From 66b992e8980e74a23edcff47155fd886c62c417a Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 7 Jun 2004 01:27:26 -0700 Subject: [TCP]: Update tcp_get_info() comments in net/tcp.h --- include/linux/tcp.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 6f33c87d8ab5..a405c0f7d841 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h @@ -351,11 +351,11 @@ struct tcp_opt { __u8 urg_mode; /* In urgent mode */ __u32 snd_up; /* Urgent pointer */ - /* The syn_wait_lock is necessary only to avoid tcp_get_info having + /* The syn_wait_lock is necessary only to avoid proc interface having * to grab the main lock sock while browsing the listening hash * (otherwise it's deadlock prone). - * This lock is acquired in read mode only from tcp_get_info() and - * it's acquired in write mode _only_ from code that is actively + * This lock is acquired in read mode only from listening_get_next() + * and it's acquired in write mode _only_ from code that is actively * changing the syn_wait_queue. All readers that are holding * the master sock lock don't need to grab this lock in read mode * too as the syn_wait_queue writes are always protected from -- cgit v1.2.3 From 81cfe91210a288b8a8ebfeab13f097d26d283d64 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 7 Jun 2004 01:28:12 -0700 Subject: [TCP]: Add receive DRS info to tcp_info. --- include/linux/tcp.h | 3 +++ net/ipv4/tcp_diag.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/include/linux/tcp.h b/include/linux/tcp.h index a405c0f7d841..39e2d22619dc 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h @@ -183,6 +183,9 @@ struct tcp_info __u32 tcpi_snd_cwnd; __u32 tcpi_advmss; __u32 tcpi_reordering; + + __u32 tcpi_rcv_rtt; + __u32 tcpi_rcv_space; }; #ifdef __KERNEL__ diff --git a/net/ipv4/tcp_diag.c b/net/ipv4/tcp_diag.c index ff047707bbb8..5506944b7e7c 100644 --- a/net/ipv4/tcp_diag.c +++ b/net/ipv4/tcp_diag.c @@ -91,6 +91,9 @@ void tcp_get_info(struct sock *sk, struct tcp_info *info) info->tcpi_snd_cwnd = tp->snd_cwnd; info->tcpi_advmss = tp->advmss; info->tcpi_reordering = tp->reordering; + + info->tcpi_rcv_rtt = ((1000000*tp->rcv_rtt_est.rtt)/HZ)>>3; + info->tcpi_rcv_space = tp->rcvq_space.space; } static int tcpdiag_fill(struct sk_buff *skb, struct sock *sk, -- cgit v1.2.3 From e3e77f6e1974880c44f8c9023b98ccee9f263097 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Mon, 7 Jun 2004 02:21:38 -0700 Subject: [NETFILTER]: Put arpt_mutex back into arp_tables.c --- include/linux/netfilter_arp.h | 1 - net/ipv4/netfilter/arp_tables.c | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/netfilter_arp.h b/include/linux/netfilter_arp.h index ecb3b56a60d3..a3f8977f7f12 100644 --- a/include/linux/netfilter_arp.h +++ b/include/linux/netfilter_arp.h @@ -17,5 +17,4 @@ #define NF_ARP_FORWARD 2 #define NF_ARP_NUMHOOKS 3 -static DECLARE_MUTEX(arpt_mutex); #endif /* __LINUX_ARP_NETFILTER_H */ diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c index c8309d63e736..28277c90eb18 100644 --- a/net/ipv4/netfilter/arp_tables.c +++ b/net/ipv4/netfilter/arp_tables.c @@ -62,6 +62,8 @@ do { \ #include #include +static DECLARE_MUTEX(arpt_mutex); + struct arpt_table_info { unsigned int size; unsigned int number; -- cgit v1.2.3