[PATCH 3/4] [TCP]: Add unlikely() to sacktag out-of-mem in fragment case

2007-11-10 Thread Ilpo Järvinen
Signed-off-by: Ilpo Järvinen [EMAIL PROTECTED] --- net/ipv4/tcp_input.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 9fc9096..84bcdc9 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -1400,7 +1400,7 @@

[PATCH net-2.6 0/4] [TCP]: Bug fixes minor tweaks

2007-11-10 Thread Ilpo Järvinen
Hi, Here are some changes that should go to net-2.6. Boot simple transfer tested. I'll do future cleanups that are now possible in a different series to a next kernel version.

[PATCH 1/4] [TCP]: Consider GSO while counting reord in sacktag

2007-11-10 Thread Ilpo Järvinen
Reordering detection fails to take account that the reordered skb may have pcount larger than 1. In such case the lowest of them had the largest reordering, the old formula used the highest of them which is pcount - 1 packets less reordered. Signed-off-by: Ilpo Järvinen [EMAIL PROTECTED] ---

[PATCH 2/4] [TCP]: Fix reord detection due to snd_una covered holes

2007-11-10 Thread Ilpo Järvinen
Fixes subtle bug like the one with fastpath_cnt_hint happening due to the way the GSO and hints interact. Because hints are not reset when just a GSOed skb is partially ACKed, there's no guarantee that the relevant part of the write queue is going to be processed in sacktag at all (skbs below

[PATCH 4/4] [TCP]: Split SACK FRTO flag clearing (fixes FRTO corner case bug)

2007-11-10 Thread Ilpo Järvinen
In case we run out of mem when fragmenting, the clearing of FLAG_ONLY_ORIG_SACKED might get missed which then feeds FRTO with false information. Move clearing outside skb processing loop so that it will get executed even if the skb loop terminates prematurely due to out-of-mem. Besides, now the

IPSec in tunnel mode on ARM not working

2007-11-10 Thread Guennadi Liakhovetski
Hi Got two setups: with an ARM-based router and with a PC, connecting to a remote site using IPSec in tunnel mode over ppp. Setup is identical, PC works, ARM router doesn't. Kernel 2.6.23.1. The setup looks like PCa --- routerA ==== routerB --- PCb where routerA is our problematic

UDP-Lite and /proc/net/snmp

2007-11-10 Thread Herbert Xu
Hi Dave: It looks like the addition of UDP-Lite has upset netstat: $ netstat -s Ip: 1257344 total packets received 6 with invalid addresses 0 forwarded 0 incoming packets discarded 1257338 incoming packets delivered 1257151 requests sent out Icmp: 0 ICMP messages

Re: UDP-Lite and /proc/net/snmp

2007-11-10 Thread YOSHIFUJI Hideaki / 吉藤英明
In article [EMAIL PROTECTED] (at Sat, 10 Nov 2007 21:14:29 +0800), Herbert Xu [EMAIL PROTECTED] says: It looks like the addition of UDP-Lite has upset netstat: $ netstat -s Ip: : Udp: 30 packets received 0 packets to unknown port received. 0 packet receive errors 17

Re: UDP-Lite and /proc/net/snmp

2007-11-10 Thread Eric Dumazet
YOSHIFUJI Hideaki / 吉藤英明 a écrit : In article [EMAIL PROTECTED] (at Sat, 10 Nov 2007 21:14:29 +0800), Herbert Xu [EMAIL PROTECTED] says: It looks like the addition of UDP-Lite has upset netstat: $ netstat -s Ip: : Udp: 30 packets received 0 packets to unknown port received. 0

[PATCH][IPV4] Remove bugus goto-s from ip_route_input_slow

2007-11-10 Thread Pavel Emelyanov
Both places look like if (err == XXX) goto yyy; done: while both yyy targets look like err = XXX; goto done; so this is ok to remove the above if-s. yyy labels are used in other places and are not removed. Signed-off-by: Pavel Emelyanov [EMAIL

[PATCH] Make helper to get dst entry and use is

2007-11-10 Thread Pavel Emelyanov
There are many places that get the dst entry, increase the __use counter and set the lastuse time stamp. Make a helper for this. Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED] --- diff --git a/include/net/dst.h b/include/net/dst.h index e9ff4a4..2f65e89 100644 --- a/include/net/dst.h +++

[PATCH] Use list_head-s in inetpeer.c

2007-11-10 Thread Pavel Emelyanov
The inetpeer.c tracks the LRU list of inet_perr-s, but makes it by hands. Use the list_head-s for this. Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED] --- diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h index aa10a81..ad8404b 100644 --- a/include/net/inetpeer.h +++

Re: UDP-Lite and /proc/net/snmp

2007-11-10 Thread Herbert Xu
On Sat, Nov 10, 2007 at 10:32:43PM +0900, YOSHIFUJI Hideaki / 吉藤英明 wrote: Hmm? netstat 1.42 (net-tools 1.60) seems fine. Which netstat are you using? The one from Debian etch: $ netstat -V net-tools 1.60 netstat 1.42 (2001-04-15) Fred Baumgarten, Alan Cox, Bernd Eckenfels, Phil Blundell,

Re: UDP-Lite and /proc/net/snmp

2007-11-10 Thread YOSHIFUJI Hideaki / 吉藤英明
In article [EMAIL PROTECTED] (at Sat, 10 Nov 2007 22:33:25 +0800), Herbert Xu [EMAIL PROTECTED] says: On Sat, Nov 10, 2007 at 10:32:43PM +0900, YOSHIFUJI Hideaki / 吉藤英明 wrote: Hmm? netstat 1.42 (net-tools 1.60) seems fine. Which netstat are you using? The one from Debian etch:

Re: UDP-Lite and /proc/net/snmp

2007-11-10 Thread Herbert Xu
On Sat, Nov 10, 2007 at 11:48:54PM +0900, YOSHIFUJI Hideaki / 吉藤英明 wrote: Hmm. netstat -s from etch (i386) and etch (x86_64) work fine for me. Same version, same architecture. Strange... Interesting. What does your /proc/net/snmp file look like? And what does netstat -s actually

Re: UDP-Lite and /proc/net/snmp

2007-11-10 Thread Eric Dumazet
Herbert Xu a écrit : On Sat, Nov 10, 2007 at 11:48:54PM +0900, YOSHIFUJI Hideaki / 吉藤英明 wrote: Hmm. netstat -s from etch (i386) and etch (x86_64) work fine for me. Same version, same architecture. Strange... Interesting. What does your /proc/net/snmp file look like? And what does

Re: UDP-Lite and /proc/net/snmp

2007-11-10 Thread Eric Dumazet
Eric Dumazet a écrit : Herbert Xu a écrit : On Sat, Nov 10, 2007 at 11:48:54PM +0900, YOSHIFUJI Hideaki / 吉藤英明 wrote: Hmm. netstat -s from etch (i386) and etch (x86_64) work fine for me. Same version, same architecture. Strange... Interesting. What does your /proc/net/snmp file look

Re: UDP-Lite and /proc/net/snmp

2007-11-10 Thread Herbert Xu
On Sat, Nov 10, 2007 at 04:16:41PM +0100, Eric Dumazet wrote: It fails to parse /proc/net/netstat , because TcpExt line is bigger than 1024 chars. Good catch. Perhaps it's time someone rewrote this in netlink or add this to ss. Cheers, -- Visit Openswan at http://www.openswan.org/ Email:

Re: [PATCH 2/2]: e1000: avoid lockup durig error recovery

2007-11-10 Thread Stephen Hemminger
On Fri, 9 Nov 2007 16:40:05 -0600 [EMAIL PROTECTED] (Linas Vepstas) wrote: On Fri, Nov 09, 2007 at 06:02:34PM +0100, Ingo Oeser wrote: Linas Vepstas schrieb: + * napi_enabled_p - return non-zero if napi enabled + * + * Mnemonic: _p stands for predicate, returning a yes/no +

[PATCH][RFC take 2] Add support for the RDC R6040 Fast Ethernet controller

2007-11-10 Thread Florian Fainelli
This patch adds support for the RDC R6040 MAC we can find in the RDC R-321x System-on-chips and some other devices. You will need the RDC PCI identifiers if you want to test this driver : RDC_PCI_VENDOR_ID = 0x17f3 RDC_PCI_DEVICE_ID_RDC_R6040 = 0x6040 Changes from first patch : - use

Re: [PATCH][RFC take 2] Add support for the RDC R6040 Fast Ethernet controller

2007-11-10 Thread Stephen Hemminger
+static int __devinit r6040_init_one(struct pci_dev *pdev, + const struct pci_device_id *ent) +{ + struct net_device *dev; + struct r6040_private *lp; + void __iomem *ioaddr; + int err, io_size = R6040_IO_SIZE; + static int card_idx

Re: UDP-Lite and /proc/net/snmp

2007-11-10 Thread Andi Kleen
Eric Dumazet [EMAIL PROTECTED] writes: I meant a netstat bug of course, sorry :( It fails to parse /proc/net/netstat , because TcpExt line is bigger than 1024 chars. guilty -- i wrote that code a long time ago. To correct it, we might enlarge buf1[] and buf2[] from 1024 to 2048 in

Re: [PATCH 04/05] ipv6: RFC4214 Support

2007-11-10 Thread Andi Kleen
Templin, Fred L [EMAIL PROTECTED] writes: +#if defined(CONFIG_IPV6_ISATAP) + /* ISATAP (RFC4214) - router address in daddr */ + if (!strncmp(parms-name, isatap, 6)) { Modern distributions tend to have daemons to automatically rename network interfaces using SIOCSIFNAME. Not sure

[git patches] net driver fixes

2007-11-10 Thread Jeff Garzik
Please pull from 'upstream-linus' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git upstream-linus to receive the following updates: MAINTAINERS | 10 ++- drivers/net/Kconfig |2 +-

Re: Oops preceded by WARNING: at net/ipv4/tcp_input.c:1571 tcp_remove_reno_sacks()

2007-11-10 Thread Ilpo Järvinen
On Sat, 10 Nov 2007, Guillaume Chazarain wrote: Doing some bittorrent with linux-2.6.24-rc2, my box crashed with this in the log: 4WARNING: at net/ipv4/tcp_input.c:1571 tcp_remove_reno_sacks() This gets triggered when SACKED + LOST marked are more than packets_out. sacked_out is dealt

[PATCH 1/2] [VLAN] Don't drop an unclassfied vlan packet as PACKET_OTHERHOST

2007-11-10 Thread Joonwoo Park
IMHO linux should not drop unclassified vlan packets to pass these to sniffers. isn't it? But, since the __vlan_hwaccel_rx drops unclassified vlan packets, sniffers cannot see them. This make the __vlan_hwaccel_rx receive and process an unclassified vlan packet as a PACKET_OTHERHOST. Any check,

[PATCH 2/2] [e1000 VLAN] Disable vlan hw accel when promiscuous mode

2007-11-10 Thread Joonwoo Park
IMHO even though netdevice is in the promiscuous mode, we should receive all of ingress packets. This disable the vlan filtering feature when a vlan hw accel configured e1000 device goes into promiscuous mode. This make packets visible to sniffers though it's not vlan id of itself. Any check,

Re : Oops preceded by WARNING: at net/ipv4/tcp_input.c:1571 tcp_remove_reno_sacks()

2007-11-10 Thread Chazarain Guillaume
Hello Ilpo, thanks a lot for your investigation Do you have GSO enabled? According to ethtool -k, no. Is this reproducable? Unfortunately not, I saw it only once. You can try to provoke it by setting tcp_sack sysctl to 0 as this seems to be non-SACK related... If so, you could try the

Re: [PATCH 01/01] iproute2-2.6.23: RFC4214 Support (3)

2007-11-10 Thread Patrick McHardy
Fred L. Templin wrote: What do you suggest? To remove them unless there's some justification to keep them. - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 1/4] [TCP]: Consider GSO while counting reord in sacktag

2007-11-10 Thread David Miller
From: Ilpo_Järvinen [EMAIL PROTECTED] Date: Sat, 10 Nov 2007 12:55:59 +0200 Reordering detection fails to take account that the reordered skb may have pcount larger than 1. In such case the lowest of them had the largest reordering, the old formula used the highest of them which is pcount - 1

Re: [PATCH 2/4] [TCP]: Fix reord detection due to snd_una covered holes

2007-11-10 Thread David Miller
From: Ilpo_Järvinen [EMAIL PROTECTED] Date: Sat, 10 Nov 2007 12:56:00 +0200 Fixes subtle bug like the one with fastpath_cnt_hint happening due to the way the GSO and hints interact. Because hints are not reset when just a GSOed skb is partially ACKed, there's no guarantee that the relevant

Re: [PATCH 3/4] [TCP]: Add unlikely() to sacktag out-of-mem in fragment case

2007-11-10 Thread David Miller
From: Ilpo_Järvinen [EMAIL PROTECTED] Date: Sat, 10 Nov 2007 12:56:01 +0200 Signed-off-by: Ilpo Järvinen [EMAIL PROTECTED] Applied. - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at

Re: [PATCH 4/4] [TCP]: Split SACK FRTO flag clearing (fixes FRTO corner case bug)

2007-11-10 Thread David Miller
From: Ilpo_Järvinen [EMAIL PROTECTED] Date: Sat, 10 Nov 2007 12:56:02 +0200 In case we run out of mem when fragmenting, the clearing of FLAG_ONLY_ORIG_SACKED might get missed which then feeds FRTO with false information. Move clearing outside skb processing loop so that it will get executed

Re: [PATCH][IPV4] Remove bugus goto-s from ip_route_input_slow

2007-11-10 Thread David Miller
From: Pavel Emelyanov [EMAIL PROTECTED] Date: Sat, 10 Nov 2007 17:27:50 +0300 Both places look like if (err == XXX) goto yyy; done: while both yyy targets look like err = XXX; goto done; so this is ok to remove the above if-s. yyy

Re: [PATCH] Make helper to get dst entry and use is

2007-11-10 Thread David Miller
From: Pavel Emelyanov [EMAIL PROTECTED] Date: Sat, 10 Nov 2007 17:29:52 +0300 There are many places that get the dst entry, increase the __use counter and set the lastuse time stamp. Make a helper for this. Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED] Nice cleanup, applied. Thanks!

Re: [PATCH] Use list_head-s in inetpeer.c

2007-11-10 Thread David Miller
From: Pavel Emelyanov [EMAIL PROTECTED] Date: Sat, 10 Nov 2007 17:32:58 +0300 The inetpeer.c tracks the LRU list of inet_perr-s, but makes it by hands. Use the list_head-s for this. Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED] This makes every inetpeer struct consume 8 more bytes, and

Re: [PATCH] Fix infinite loop on dev_mc_unsync()

2007-11-10 Thread David Miller
From: Patrick McHardy [EMAIL PROTECTED] Date: Sat, 10 Nov 2007 01:13:42 +0100 Joe Perches wrote: On Sat, 2007-11-10 at 00:12 +0100, Patrick McHardy wrote: This may cause a use-after-free since __dev_addr_delete frees the address when all references are gone. How about a

Re: [PATCH][PACKET] Use existing sock refcnt debugging infrastructure

2007-11-10 Thread David Miller
From: Arnaldo Carvalho de Melo [EMAIL PROTECTED] Date: Fri, 9 Nov 2007 12:37:42 -0200 Em Fri, Nov 09, 2007 at 04:39:41PM +0300, Pavel Emelyanov escreveu: The packet_socks_nr variable is used purely for debugging the number of sockets. As Arnaldo pointed out, there's already an

Re: [PATCH][IPX] Use existing sock refcnt debugging infrastructure

2007-11-10 Thread David Miller
From: Arnaldo Carvalho de Melo [EMAIL PROTECTED] Date: Fri, 9 Nov 2007 12:39:08 -0200 Em Fri, Nov 09, 2007 at 04:42:05PM +0300, Pavel Emelyanov escreveu: Just like in the af_packet.c, the ipx_sock_nr variable is used for debugging purposes. Switch to using existing infrastructure.

Re: [PATCH 1/4] Un-define the IPTUNNEL_XMIT() macro

2007-11-10 Thread David Miller
From: Pavel Emelyanov [EMAIL PROTECTED] Date: Fri, 09 Nov 2007 16:09:58 +0300 This one is used in all the smth-to-ip tunnels we have and looks ... not very good. Make this a regular function in the tunnel4.ko module. Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED] This breaks the build if

Re: [PATCH 2/4] Add missed tunnel64_err handler

2007-11-10 Thread David Miller
From: Pavel Emelyanov [EMAIL PROTECTED] Date: Fri, 09 Nov 2007 16:14:12 +0300 The tunnel64_protocol uses the tunnel4_protocol's err_handler and thus calls the tunnel4_protocol's handlers. This is not very good, as in case of (icmp) error the wrong error handlers will be called (e.g. ipip

Re: [PATCH 3/4] Cleanup the xfrm4_tunnel_(un)register

2007-11-10 Thread David Miller
From: Pavel Emelyanov [EMAIL PROTECTED] Date: Fri, 09 Nov 2007 16:16:23 +0300 Both check for the family to select an appropriate tunnel list. Consolidate this check and make the for() loop more readable. Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED] Applied, thanks. - To unsubscribe from

Re: [PATCH 4/4] Consolidate equal handlers in tunnel4.c

2007-11-10 Thread David Miller
From: Pavel Emelyanov [EMAIL PROTECTED] Date: Fri, 09 Nov 2007 16:18:48 +0300 Two sets - tunnel[6]4_rcv() and tunnel[6]4_err - do the same thing, but scan for different lists of tunnels, so this code is easily consolidated. Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED] This doesn't

Re: [VLAN]: Don't synchronize addresses while the vlan device is down

2007-11-10 Thread David Miller
From: Patrick McHardy [EMAIL PROTECTED] Date: Thu, 08 Nov 2007 18:19:53 +0100 [VLAN]: Don't synchronize addresses while the vlan device is down While the VLAN device is down, the unicast addresses are not configured on the underlying device, so we shouldn't attempt to sync them. Noticed

Re: [VLAN]: Allow setting mac address while device is up

2007-11-10 Thread David Miller
From: Patrick McHardy [EMAIL PROTECTED] Date: Thu, 08 Nov 2007 18:20:19 +0100 This patch allows to change a VLAN device's MAC address while the device is up. Doesn't seem worth to hold back until 2.6.25-rc since it can't break anything without actually getting used (and it does work :))

Re: [PATCH] NET: Fix skb_truesize_check() assertion

2007-11-10 Thread David Miller
From: Chuck Lever [EMAIL PROTECTED] Date: Thu, 08 Nov 2007 11:59:19 -0500 The intent of the assertion in skb_truesize_check() is to check for skb-truesize being decremented too much by other code, resulting in a wraparound below zero. The type of the right side of the comparison causes the

Re: [PATCH] [PKT_SCHED] CLS_U32: Use ffs() instead of C code on hash mask to get first set bit.

2007-11-10 Thread David Miller
From: jamal [EMAIL PROTECTED] Date: Thu, 08 Nov 2007 08:45:31 -0500 On Thu, 2007-08-11 at 13:07 +0200, Radu Rendec wrote: Computing the rank of the first set bit in the hash mask (for using later in u32_hash_fold()) was done with plain C code. Using ffs() instead makes the code more

Re: Please pull 'fixes-davem' branch of wireless-2.6 (this time for real!)

2007-11-10 Thread David Miller
From: John W. Linville [EMAIL PROTECTED] Date: Wed, 7 Nov 2007 21:11:19 -0500 On Wed, Nov 07, 2007 at 04:32:00PM -0800, David Miller wrote: From: John W. Linville [EMAIL PROTECTED] Date: Wed, 7 Nov 2007 13:51:54 -0500 Hold-off on this one for now if -- clearly Johannes and I need to

Re: [PATCH] [AF_PACKET]: Allow multicast traffic to be caught by ORIGDEV when bonded

2007-11-10 Thread David Miller
From: PJ Waskiewicz [EMAIL PROTECTED] Date: Tue, 06 Nov 2007 07:25:47 -0800 The socket option for packet sockets to return the original ifindex instead of the bonded ifindex will not match multicast traffic. Since this socket option is the most useful for layer 2 traffic and multicast

Re: [PATCH 1/3][UNIX] Make unix_tot_inflight counter non-atomic

2007-11-10 Thread David Miller
From: Pavel Emelyanov [EMAIL PROTECTED] Date: Wed, 07 Nov 2007 16:52:36 +0300 This counter is _always_ modified under the unix_gc_lock spinlock, so its atomicity can be provided w/o additional efforts. Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED] Applied. - To unsubscribe from this

Re: [PATCH 2/3][UNIX] Convert socks to unix_socks in scan_inflight, not in callbacks

2007-11-10 Thread David Miller
From: Pavel Emelyanov [EMAIL PROTECTED] Date: Wed, 07 Nov 2007 16:56:21 +0300 The scan_inflight() routine scans through the unix sockets and calls some passed callback. The fact is that all these callbacks work with the unix_sock objects, not the sock ones, so make this conversion in the

Re: [PATCH 3/3][UNIX] The unix_nr_socks limit can be exceeded

2007-11-10 Thread David Miller
From: Pavel Emelyanov [EMAIL PROTECTED] Date: Wed, 07 Nov 2007 17:01:17 +0300 The unix_nr_socks value is limited with the 2 * get_max_files() value, as seen from the unix_create1(). However, the check and the actual increment are separated with the GFP_KERNEL allocation, so this limit can be

Re: [PATCH] netns: init dev_base_lock only once

2007-11-10 Thread David Miller
From: Alexey Dobriyan [EMAIL PROTECTED] Date: Wed, 7 Nov 2007 15:51:33 +0300 * it already statically initialized * reinitializing live global spinlock every time netns is setup is also wrong Signed-off-by: Alexey Dobriyan [EMAIL PROTECTED] Good catch. Applied, thanks Alexey. - To

Re: [PATCH] [RESEND] small possible memory leak in FIB rules

2007-11-10 Thread David Miller
From: Denis V. Lunev [EMAIL PROTECTED] Date: Wed, 7 Nov 2007 16:36:36 +0300 This patch fixes a small memory leak. Default fib rules can be deleted by the user if the rule does not carry FIB_RULE_PERMANENT flag, f.e. by ip rule flush Such a rule will not be freed as the ref-counter has

[2.6 patch] unexport sysctl_{r,w}mem_max

2007-11-10 Thread Adrian Bunk
sysctl_{r,w}mem_max can now be unexported. Signed-off-by: Adrian Bunk [EMAIL PROTECTED] --- d49d51e5f46615c30e0f96c5333733e0ab1c85e6 diff --git a/net/core/sock.c b/net/core/sock.c index 8fc2f84..c519b43 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -2097,7 +2097,3 @@

[2.6 patch] net/ipv4/ipvs/: remove unused exports

2007-11-10 Thread Adrian Bunk
This patch removes the following unused EXPORT_SYMBOL's: - ip_vs_try_bind_dest - ip_vs_find_dest Signed-off-by: Adrian Bunk [EMAIL PROTECTED] --- net/ipv4/ipvs/ip_vs_conn.c |1 - net/ipv4/ipvs/ip_vs_ctl.c |1 - 2 files changed, 2 deletions(-) ad9f400d4f66ea3423f97e609d6ef2572055c603