* [PATCH] udp: fix for unicast RX path optimization
@ 2010-04-08 14:56 Jorge Boncompte [DTI2]
2010-04-08 15:12 ` Eric Dumazet
0 siblings, 1 reply; 4+ messages in thread
From: Jorge Boncompte [DTI2] @ 2010-04-08 14:56 UTC (permalink / raw)
To: Linux Network Development list
Commits 5051ebd275de672b807c28d93002c2fb0514a3c9 and
5051ebd275de672b807c28d93002c2fb0514a3c9 ("ipv[46]: udp: optimize unicast RX
path") broke some programs.
After upgrading a L2TP server to 2.6.33 it started to fail, tunnels going up an
down, after the 10th tunnel came up. My modified rp-l2tp uses a global
unconnected socket bound to (INADDR_ANY, 1701) and one connected socket per
tunnel after parameter negotiation.
After ten sockets were open and due to mixed parameters to
udp[46]_lib_lookup2() kernel started to drop packets.
Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
---
diff -uNrp linux-2.6.33/net/ipv4/udp.c kernel-netns/net/ipv4/udp.c
--- linux-2.6.33/net/ipv4/udp.c 2010-02-24 19:52:17.000000000 +0100
+++ kernel-netns/net/ipv4/udp.c 2010-04-08 15:07:21.888717449 +0200
@@ -471,8 +471,8 @@ static struct sock *__udp4_lib_lookup(st
if (hslot->count < hslot2->count)
goto begin;
- result = udp4_lib_lookup2(net, INADDR_ANY, sport,
- daddr, hnum, dif,
+ result = udp4_lib_lookup2(net, saddr, sport,
+ INADDR_ANY, hnum, dif,
hslot2, slot2);
}
rcu_read_unlock();
diff -uNrp linux-2.6.33/net/ipv6/udp.c kernel-netns/net/ipv6/udp.c
--- linux-2.6.33/net/ipv6/udp.c 2010-02-24 19:52:17.000000000 +0100
+++ kernel-netns/net/ipv6/udp.c 2010-04-08 15:07:57.081396901 +0200
@@ -258,8 +258,8 @@ static struct sock *__udp6_lib_lookup(st
if (hslot->count < hslot2->count)
goto begin;
- result = udp6_lib_lookup2(net, &in6addr_any, sport,
- daddr, hnum, dif,
+ result = udp6_lib_lookup2(net, saddr, sport,
+ &in6addr_any, hnum, dif,
hslot2, slot2);
}
rcu_read_unlock();
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] udp: fix for unicast RX path optimization
2010-04-08 14:56 [PATCH] udp: fix for unicast RX path optimization Jorge Boncompte [DTI2]
@ 2010-04-08 15:12 ` Eric Dumazet
2010-04-08 18:16 ` David Miller
2010-04-08 18:30 ` David Miller
0 siblings, 2 replies; 4+ messages in thread
From: Eric Dumazet @ 2010-04-08 15:12 UTC (permalink / raw)
To: jorge, David Miller; +Cc: Linux Network Development list
Le jeudi 08 avril 2010 à 16:56 +0200, Jorge Boncompte [DTI2] a écrit :
> Commits 5051ebd275de672b807c28d93002c2fb0514a3c9 and
> 5051ebd275de672b807c28d93002c2fb0514a3c9 ("ipv[46]: udp: optimize unicast RX
> path") broke some programs.
>
> After upgrading a L2TP server to 2.6.33 it started to fail, tunnels going up an
> down, after the 10th tunnel came up. My modified rp-l2tp uses a global
> unconnected socket bound to (INADDR_ANY, 1701) and one connected socket per
> tunnel after parameter negotiation.
>
> After ten sockets were open and due to mixed parameters to
> udp[46]_lib_lookup2() kernel started to drop packets.
>
> Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
Oops...
Thank you for finding this bug, this is indeed the right fix.
This is a stable candidate. David, can you catch it even if Jorge didnt
sent you a copy ?
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] udp: fix for unicast RX path optimization
2010-04-08 15:12 ` Eric Dumazet
@ 2010-04-08 18:16 ` David Miller
2010-04-08 18:30 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2010-04-08 18:16 UTC (permalink / raw)
To: eric.dumazet; +Cc: jorge, netdev
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 08 Apr 2010 17:12:27 +0200
> This is a stable candidate. David, can you catch it even if Jorge didnt
> sent you a copy ?
It went to netdev and thus patchwork and I both have it :-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] udp: fix for unicast RX path optimization
2010-04-08 15:12 ` Eric Dumazet
2010-04-08 18:16 ` David Miller
@ 2010-04-08 18:30 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2010-04-08 18:30 UTC (permalink / raw)
To: eric.dumazet; +Cc: jorge, netdev
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 08 Apr 2010 17:12:27 +0200
> Le jeudi 08 avril 2010 à 16:56 +0200, Jorge Boncompte [DTI2] a écrit :
>> Commits 5051ebd275de672b807c28d93002c2fb0514a3c9 and
>> 5051ebd275de672b807c28d93002c2fb0514a3c9 ("ipv[46]: udp: optimize unicast RX
>> path") broke some programs.
>>
>> After upgrading a L2TP server to 2.6.33 it started to fail, tunnels going up an
>> down, after the 10th tunnel came up. My modified rp-l2tp uses a global
>> unconnected socket bound to (INADDR_ANY, 1701) and one connected socket per
>> tunnel after parameter negotiation.
>>
>> After ten sockets were open and due to mixed parameters to
>> udp[46]_lib_lookup2() kernel started to drop packets.
>>
>> Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
...
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied and queued up for -stable.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-04-08 18:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-08 14:56 [PATCH] udp: fix for unicast RX path optimization Jorge Boncompte [DTI2]
2010-04-08 15:12 ` Eric Dumazet
2010-04-08 18:16 ` David Miller
2010-04-08 18:30 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).