[PATCH] [IPV6]: Fix hardcoded removing of old module code

2008-02-13 Thread Wang Chen
Rusty hardcoded the old module code. We can remove it now. Signed-off-by: Wang Chen <[EMAIL PROTECTED]> --- net/ipv6/af_inet6.c |8 1 files changed, 0 insertions(+), 8 deletions(-) diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index bddac0e..f0aa977 100644 --- a/ne

Re: [PATCH] ICMP: ICMP_MIB_OUTMSGS increment duplicated

2008-01-21 Thread Wang Chen
David Miller said the following on 2008-1-21 19:25: > I am confused, this changelog for this patch mentions changes made > only in the net-2.6.25 tree. > Although I wrote that I find David.S's patch in net-2.6.25 was wrong, the guilty patch also in net-2.6 tree. Here is the web link. http://git.k

Re: [PATCH] ICMP: ICMP_MIB_OUTMSGS increment duplicated

2008-01-21 Thread Wang Chen
Dave, how about this one. It's like that one of IPV6. Wang Chen said the following on 2008-1-16 17:59: > In tree net-2.6.25, commit "96793b482540f3a26e2188eaf75cb56b7829d3e3" > made a mistake. > > In that patch, David L added a icmp_out_count() in ip_push

Re: [PATCH 1/2] IPV6: ICMP6_MIB_OUTMSGS increment duplicated

2008-01-21 Thread Wang Chen
David Miller said the following on 2008-1-21 19:06: > Does someone know how to setup GIT to update the HTTP > fetch information as a post-push hook? > Seems Herbert knows how to do it. Maybe run git-update-server-info every time when you rebase your tree. >> Can you apply them to net-2.6 tree? >

Re: [PATCH 1/2] IPV6: ICMP6_MIB_OUTMSGS increment duplicated

2008-01-21 Thread Wang Chen
; >> This patch remove the increment from icmpv6_send. >> >> Signed-off-by: Wang Chen <[EMAIL PROTECTED]> > > Which tree are these two changes targetted at? > > Dave, because the network of my working place can't clone git tree, I used 2.6.24-rc8 to make

[PATCH 1/2] IPV6: ICMP6_MIB_OUTMSGS increment duplicated

2008-01-21 Thread Wang Chen
[IPV6]: ICMP6_MIB_OUTMSGS increment duplicated icmpv6_send() calls ip6_push_pending_frames() indirectly. Both ip6_push_pending_frames() and icmpv6_send() increment counter ICMP6_MIB_OUTMSGS. This patch remove the increment from icmpv6_send. Signed-off-by: Wang Chen <[EMAIL PROTEC

[PATCH 2/2] IPV6: RFC 2011 compatibility broken

2008-01-21 Thread Wang Chen
[IPV6]: RFC 2011 compatibility broken The snmp6 entry name was changed, and it broke compatibility to RFC 2011. Signed-off-by: Wang Chen <[EMAIL PROTECTED]> --- linux-2.6.24.rc8.org/net/ipv6/proc.c2008-01-16 17:45:03.0 +0800 +++ linux-2.6.24.rc8/net/ipv6/proc.c2008-01

Re: [PATCH] ICMP: ICMP_MIB_OUTMSGS increment duplicated

2008-01-16 Thread Wang Chen
David Stevens said the following on 2008-1-17 0:23: > Wang, > I think your patch is correct; did you test the same case for > IPv6? > I've tested IPv4, but IPv6 not yet. If Davem accept this one, I will see the IPv6, or you take care of it. -- WCN -- To unsubscribe from this list: send

[PATCH] ICMP: ICMP_MIB_OUTMSGS increment duplicated

2008-01-16 Thread Wang Chen
p_send and icmp_reply will call icmp_push_reply, which will call ip_push_pending_frames, a duplicated increment happened in icmp_send. This patch remove the icmp_out_count from icmp_send too. Signed-off-by: Wang Chen <[EMAIL PROTECTED]> --- diff -Nurp linux-2.6.24.rc8.org/net/ipv4/icmp.c linux-2.6

Re: [PATCH 4/4] [NETDEV] sky2: rtnl_lock out of loop will be faster

2007-12-12 Thread Wang Chen
Stephen Hemminger said the following on 2007-12-13 0:30: > Umm, okay but it doesn't matter really, there can only be 2 ports and > 90+% of the boards only have one port. So why bother?? > Thanks Stephen. David, please ignore all of the four patches. -- To unsubscribe from this list: send the li

[PATCH 4/4] [NETDEV] sky2: rtnl_lock out of loop will be faster

2007-12-12 Thread Wang Chen
[PATCH 4/4] [NETDEV] sky2: rtnl_lock out of loop will be faster Before this patch, it gets and releases the lock at each iteration of the loop. Changing unregister_netdev to unregister_netdevice and locking outside of the loop will be faster for this approach. Signed-off-by: Wang Chen <[EM

[PATCH 2/4] [NETDEV] cxgb3: rtnl_lock out of loop will be faster

2007-12-12 Thread Wang Chen
[PATCH 2/4] [NETDEV] cxgb3: rtnl_lock out of loop will be faster Before this patch, it gets and releases the lock at each iteration of the loop. Changing unregister_netdev to unregister_netdevice and locking outside of the loop will be faster for this approach. Signed-off-by: Wang Chen <[EM

[PATCH 3/4] [NETDEV] ixp2000: rtnl_lock out of loop will be faster

2007-12-12 Thread Wang Chen
[PATCH 3/4] [NETDEV] ixp2000: rtnl_lock out of loop will be faster Before this patch, it gets and releases the lock at each iteration of the loop. Changing unregister_netdev to unregister_netdevice and locking outside of the loop will be faster for this approach. Signed-off-by: Wang Chen <[EM

[PATCH 1/4] [NETDEV] cxgb2: rtnl_lock out of loop will be faster

2007-12-12 Thread Wang Chen
[PATCH 1/4] [NETDEV] cxgb2: rtnl_lock out of loop will be faster Before this patch, it gets and releases the lock at each iteration of the loop. Changing unregister_netdev to unregister_netdevice and locking outside of the loop will be faster for this approach. Signed-off-by: Wang Chen <[EM

[PATCH] HDLC driver: use unregister_netdev instead of unregister_netdevice

2007-12-11 Thread Wang Chen
[PATCH] HDLC driver: use unregister_netdev instead of unregister_netdevice Since the caller and the upper caller doesn't hod the rtnl semaphore. We should use unregister_netdev instead of unregister_netdevice. Signed-off-by: Wang Chen <[EMAIL PROTECTED]> --- hdlc_fr.c |6 +++-

[PATCH] NET: Fix wrong comments for unregister_net*

2007-12-11 Thread Wang Chen
[PATCH] NET: Fix wrong comments for unregister_net* There are some return value comments for void functions. Fixed it. Signed-off-by: Wang Chen <[EMAIL PROTECTED]> --- dev.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) --- linux-2.6.24.rc4.org/net/core/dev.c 2007-12-11

Re: [PATCH 3/3] Fix use of skb after netif_rx

2007-12-09 Thread Wang Chen
Julia Lawall said the following on 2007-12-10 15:18: >> Julia, seems that your semantic patch misses following place. >> >> drivers/s390/net/qeth_main.c:2733 >> ... >> #endif >> rxrc = netif_rx(skb); >> card->dev->last_rx = jiffies; >> card->stats.rx_p

Re: [PATCH 2/3] [UDP]: Restore missing inDatagrams increments

2007-12-05 Thread Wang Chen
Herbert Xu said the following on 2007-12-5 17:10: > On Wed, Dec 05, 2007 at 05:04:48PM +0800, Wang Chen wrote: >> Yes, now, sunrpc only supports INET and INET6. >> But UDPX_INC_STATS_BH is defined in udp.h, in case others use it :) > > Which other family would that be :) >

Re: [PATCH 2/3] [UDP]: Restore missing inDatagrams increments

2007-12-05 Thread Wang Chen
Herbert Xu said the following on 2007-12-5 17:02: > On Wed, Dec 05, 2007 at 04:39:48PM +0800, Wang Chen wrote: >> Herbert Xu said the following on 2007-12-5 10:15: >>> +#define UDPX_INC_STATS_BH(sk, field) \ >>> + do { \ >>> +

Re: [PATCH 2/3] [UDP]: Restore missing inDatagrams increments

2007-12-05 Thread Wang Chen
Herbert Xu said the following on 2007-12-5 10:15: > +#define UDPX_INC_STATS_BH(sk, field) \ > + do { \ > + if ((sk)->sk_family == AF_INET) \ > + UDP_INC_STATS_BH(field, 0); \ > + else \ > + UDP6_INC_STATS_BH(field, 0); \ > + }

Re: [PATCH 2/3] [UDP]: Restore missing inDatagrams increments

2007-12-04 Thread Wang Chen
Herbert Xu said the following on 2007-12-4 21:01: > Hi Dave: > > You were right about the SUNRPC stuff being missing after all. I'd > only looked in svcsock.c and missed the call in xprtsock.c. > > [UDP]: Restore missing inDatagrams increments > > The previous move of the the UDP inDatagrams co

Re: [PATCH 3/3] [UDP6]: Counter increment on BH mode

2007-12-03 Thread Wang Chen
Herbert Xu said the following on 2007-12-3 21:17: > On Mon, Dec 03, 2007 at 10:54:35PM +1100, Herbert Xu wrote: > diff --git a/include/net/snmp.h b/include/net/snmp.h > index ea206bf..9444b54 100644 > --- a/include/net/snmp.h > +++ b/include/net/snmp.h > @@ -23,6 +23,7 @@ > > #include > #inclu

Re: [PATCH] SMC911X: Fix using of dereferenced skb after netif_rx

2007-12-03 Thread Wang Chen
Peter Korsgaard said the following on 2007-12-3 21:47: >>>>>> "Wang" == Wang Chen <[EMAIL PROTECTED]> writes: > > Hi, > > Wang> + len = skb->len; > Wang>netif_rx(skb); > dev-> stats.rx_packets++; > Wang> -

Re: [PATCH] SMC911X: Fix using of dereferenced skb after netif_rx

2007-12-03 Thread Wang Chen
Herbert Xu said the following on 2007-12-3 18:11: > Please send driver patches to Jeff Garzik <[EMAIL PROTECTED]>. > Sorry. Resend the patch. After netif_rx(), skb will be freed. So get the skb->len before netif_rx(). Signed-off-by: Wang Chen <[EMAIL PROTECTED]> --- smc9

[PATCH] SMC911X: Fix using of dereferenced skb after netif_rx

2007-12-03 Thread Wang Chen
After netif_rx(), skb will be freed. So get the skb->len before netif_rx(). Signed-off-by: Wang Chen <[EMAIL PROTECTED]> --- smc911x.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) --- linux-2.6.24.rc3.org/drivers/net/smc911x.c 2007-11-19 12:38:05.0 +0800

Re: [PATCH 3/3] [UDP6]: Counter increment on BH mode

2007-12-02 Thread Wang Chen
ill_datagram(sk, skb, flags); >> | >> |if (flags & MSG_DONTWAIT) >> | >> Is it not the other way round ?? :- > > I agree. Wang Chen, please change this and other appropriate > BH calls to USER. Basically recvmsg should always be USER while > rcv is BH. >

[PATCH 3/3] [UDP6]: Counter increment on BH mode

2007-11-29 Thread Wang Chen
(This patch base on "PATCH 2/3".) UDP_MIB_INERRORS increment is in different way for IPv4 and IPv6. For the consistence, change UDP6_INC_STATS_USER to UDP6_INC_STATS_BH. Signed-off-by: Wang Chen <[EMAIL PROTECTED]> --- udp.c |2 +- 1 files changed, 1 insertion(+), 1 deleti

[PATCH 2/3] [UDP]: Clean up for IS_UDPLITE macro

2007-11-29 Thread Wang Chen
(This patch base on "PATCH 1/3".) Since we have macro IS_UDPLITE, we can use it. Signed-off-by: Wang Chen <[EMAIL PROTECTED]> --- ipv4/udp.c | 19 +++ ipv6/udp.c | 14 -- 2 files changed, 19 insertions(+), 14 deletions(-) diff -Nurp linux-2.6.24.

[PATCH 1/3] [SNMP]: Defer InDataGrams increment until recvmsg() does checksum

2007-11-29 Thread Wang Chen
From: Wang Chen <[EMAIL PROTECTED]> Thanks dave, herbert, gerrit, andi and other people for your discussion about this problem. UdpInDatagrams can be confusing because it counts packets that might be dropped later. Move UdpInDatagrams into recvmsg() as allowed by the RFC. Signed-off-by

Re: [PATCH 1/2] [IPV4] UDP: Always checksum even if without socket filter

2007-11-29 Thread Wang Chen
Herbert Xu said the following on 2007-11-29 18:21: > On Thu, Nov 29, 2007 at 06:08:30PM +0800, Wang Chen wrote: >> Add a new UdpInEarlyDatagrams counter to count datagrams received early, >> but which might be dropped later. > > Could you please split this into two pat

Re: [PATCH 1/2] [IPV4] UDP: Always checksum even if without socket filter

2007-11-29 Thread Wang Chen
Herbert Xu said the following on 2007-11-29 17:21: > On Thu, Nov 29, 2007 at 03:55:38PM +0800, Wang Chen wrote: > > Excellent. They now do a recvmsg first with no buffer to get > meta-information, which just happens to increment the counters. > > Could you please resub

Re: [PATCH 1/2] [IPV4] UDP: Always checksum even if without socket filter

2007-11-28 Thread Wang Chen
David Miller said the following on 2007-11-21 9:39: > From: Andi Kleen <[EMAIL PROTECTED]> > Date: Tue, 20 Nov 2007 15:05:18 +0100 > >> On Tue, Nov 20, 2007 at 12:29:45AM -0500, Bill Fink wrote: >>> While I agree with your analysis that it could be worked around, >>> who knows how all the various

Re: [PATCH 1/2] [IPV4] UDP: Always checksum even if without socket filter

2007-11-19 Thread Wang Chen
David Miller said the following on 2007-11-20 14:15: > From: Bill Fink <[EMAIL PROTECTED]> > Date: Tue, 20 Nov 2007 00:29:45 -0500 > >> But the best approach seems to be just not to count >> it in the first place until tha application has actually received >> the packet, since as Herbert pointed o

Re: [PATCH 1/2] [IPV4] UDP: Always checksum even if without socket filter

2007-11-18 Thread Wang Chen
David Miller said the following on 2007-11-19 6:40: > We could defer the increment until we check the checksum, > but that is likely to break even more things because people > (as Wang Chen did initially) will send a packet to some > port with an app that doesn't eat the packet

[PATCH 1/2] [IPV4] SNMP: Decrement of UDP InDatagrams for bad checksum

2007-11-16 Thread Wang Chen
ff-by: Wang Chen <[EMAIL PROTECTED]> --- include/net/snmp.h |2 ++ include/net/udp.h |3 +++ net/ipv4/udp.c |2 ++ 3 files changed, 7 insertions(+) diff -Nurp linux-2.6.24-rc2.org/include/net/snmp.h linux-2.6.24-rc2/include/net/snmp.h --- linux-2.6.24-rc2.org/include/net/snmp

Re: [PATCH 1/2] [IPV4] UDP: Always checksum even if without socket filter

2007-11-15 Thread Wang Chen
Herbert Xu said the following on 2007-11-16 12:11: > Wang Chen <[EMAIL PROTECTED]> wrote: >> So, I think the checksum in udp_queue_rcv_skb() actually does >> the work, not that in udp_recvmsg() and udp_poll(). >> >> If I am wrong, please point out. > > W

Re: [PATCH 1/2] [IPV4] UDP: Always checksum even if without socket filter

2007-11-15 Thread Wang Chen
David Miller said the following on 2007-11-16 12:04: > From: Wang Chen <[EMAIL PROTECTED]> > Date: Fri, 16 Nov 2007 11:18:16 +0800 > > That's right, InDataGrams will increase even if we haven't > verified the checksum yet. > > When the user does a recvmsg()

Re: [PATCH 1/2] [IPV4] UDP: Always checksum even if without socket filter

2007-11-15 Thread Wang Chen
David Miller said the following on 2007-11-16 10:54: > From: Wang Chen <[EMAIL PROTECTED]> > Date: Fri, 16 Nov 2007 10:46:26 +0800 > >> The current kernel doesn't verify the udp checksum if user doesn't set a >> socket filter.It's fine for LAN. But for WA

[PATCH 1/2] [IPV4] UDP: Always checksum even if without socket filter

2007-11-15 Thread Wang Chen
cket filter Make udp checksum be always available even if without socket filter. Signed-off-by: Wang Chen <[EMAIL PROTECTED]> --- udp.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) --- linux-2.6.24-rc2.org/net/ipv4/udp.c 2007-11-09 16:37:57.0 +0800 +++ linux

Re: [PATCH 2/2] SOCK: add raw6 drops counter

2007-11-13 Thread Wang Chen
Eric Dumazet said the following on 2007-11-14 13:48: >> diff -Nurp linux-2.6.24-rc2.org/net/ipv6/raw.c >> linux-2.6.24-rc2/net/ipv6/raw.c >> --- linux-2.6.24-rc2.org/net/ipv6/raw.c2007-11-09 >> 16:38:05.0 +0800 >> +++ linux-2.6.24-rc2/net/ipv6/raw.c2007-11-14 09:46:54.0 >> +

Re: [PATCH 2/2] SOCK: add raw6 drops counter

2007-11-13 Thread Wang Chen
David Miller said the following on 2007-11-14 12:31: > From: Wang Chen <[EMAIL PROTECTED]> > Date: Wed, 14 Nov 2007 11:15:57 +0800 > >> Add raw drops counter for IPv6 in /proc/net/raw6 . >> >> Signed-off-by: Wang Chen <[EMAIL PROTECTED]> > > App

[PATCH 2/2] SOCK: add raw6 drops counter

2007-11-13 Thread Wang Chen
Add raw drops counter for IPv6 in /proc/net/raw6 . Signed-off-by: Wang Chen <[EMAIL PROTECTED]> --- raw.c | 15 --- 1 files changed, 8 insertions(+), 7 deletions(-) diff -Nurp linux-2.6.24-rc2.org/net/ipv6/raw.c linux-2.6.24-rc2/net/ipv6/raw.c --- linux-2.6.24-rc2.org/ne

[PATCH 1/2] SOCK: add raw drops counter

2007-11-13 Thread Wang Chen
Add raw drops counter for IPv4 in /proc/net/raw . Signed-off-by: Wang Chen <[EMAIL PROTECTED]> --- include/net/sock.h | 11 --- net/core/sock.c|1 + net/ipv4/raw.c | 17 ++--- 3 files changed, 19 insertions(+), 10 deletions(-) diff -Nurp linux-2.6.24-r

Re: [PATCH] IPV4: add raw drops counter

2007-11-13 Thread Wang Chen
Eric Dumazet said the following on 2007-11-13 19:11: > Wang Chen a écrit : >> Add raw drops counter for IPv4 in /proc/net/raw . >> >> +atomic_tsk_drops; >> > This doesnt need an atomic_t , just an 'unsigned int' is OK, since > sock_q

[PATCH] IPV4: add raw drops counter

2007-11-13 Thread Wang Chen
Add raw drops counter for IPv4 in /proc/net/raw . Signed-off-by: Wang Chen <[EMAIL PROTECTED]> --- include/net/sock.h |2 ++ net/core/sock.c|1 + net/ipv4/raw.c | 16 +--- 3 files changed, 12 insertions(+), 7 deletions(-) diff -Nurp linux-2.6.24-rc2.org/inclu

[PATCH] [IPv4] printk() includes KERN_* constant in net/ipv4/

2007-11-06 Thread FNST-Wang Chen
Fix the printk() without KERN_* constant in net/ipv4. Signed-off-by: Wang Chen <[EMAIL PROTECTED]> --- af_inet.c |4 ++-- devinet.c |2 +- fib_hash.c|2 +- fib_semantics.c

Re: [Spam-fortigate] Re: [PATCH 1/1] netcore: minor cleanup for register_netdevice

2007-09-05 Thread FNST-Wang Chen
oops i am wrong YOSHIFUJI Hideaki / 吉藤英明 said the following on 2007-9-6 13:34: I disagree. Some of "dev->init()" functions set up dev->iflink; e.g., ipip_tunnel_init() etc. In article <[EMAIL PROTECTED]> (at Thu, 06 Sep 2007 13:27:24 +0800), FNST-Wang Chen &l

[PATCH 1/1] netcore: minor cleanup for register_netdevice

2007-09-05 Thread FNST-Wang Chen
- minor logic cleanup Signed-off-by: Wang Chen <[EMAIL PROTECTED]> diff -Nurp linux-2.6.22.4.org/net/core/dev.c linux-2.6.22.4/net/core/dev.c --- linux-2.6.22.4.org/net/core/dev.c2007-08-22 15:33:40.0 +0800 +++ linux-2.6.22.4/net/core/dev.c2007-09-06 13:27:35.0