* ??
@ 2013-11-07 4:57 jjorge
0 siblings, 0 replies; 12+ messages in thread
From: jjorge @ 2013-11-07 4:57 UTC (permalink / raw)
To: Recipients
is it safe to discuss with you in this email?
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH net-next 0/8] udp: GRO L4 improvements
@ 2021-03-21 17:01 Paolo Abeni
2021-03-21 17:01 ` [PATCH net-next 2/8] udp: skip fwd/list GRO for tunnel packets Paolo Abeni
0 siblings, 1 reply; 12+ messages in thread
From: Paolo Abeni @ 2021-03-21 17:01 UTC (permalink / raw)
To: netdev
Cc: David S. Miller, Jakub Kicinski, Steffen Klassert,
Willem de Bruijn, Alexander Lobakin
This series improves the UDP L4 - either 'forward' or 'frag_list' -
co-existence with UDP tunnel GRO, allowing the first to take place
correctly even for encapsulated UDP traffic.
The first for patches are mostly bugfixes, addressing some GRO
edge-cases when both tunnels and L4 are present, enabled and in use.
The next 3 patches avoid unneeded segmentation when UDP GRO
traffic traverses in the receive path UDP tunnels.
Finally, some self-tests are included, covering the relevant
GRO scenarios.
Even if most patches are actually bugfixes, this series is
targeting net-next, as overall it makes available a new feature.
Paolo Abeni (8):
udp: fixup csum for GSO receive slow path
udp: skip fwd/list GRO for tunnel packets
udp: properly complete L4 GRO over UDP tunnel packet
udp: never accept GSO_FRAGLIST packets
vxlan: allow L4 GRO passthrou
geneve: allow UDP L4 GRO passthrou
bareudp: allow UDP L4 GRO passthrou
selftests: net: add UDP GRO forwarding self-tests
drivers/net/bareudp.c | 1 +
drivers/net/geneve.c | 1 +
drivers/net/vxlan.c | 1 +
include/linux/udp.h | 15 +-
include/net/udp.h | 18 ++
net/ipv4/udp.c | 22 +-
net/ipv4/udp_offload.c | 27 ++-
net/ipv6/udp.c | 5 +
net/ipv6/udp_offload.c | 3 +-
tools/testing/selftests/net/Makefile | 1 +
tools/testing/selftests/net/udpgro_fwd.sh | 251 ++++++++++++++++++++++
11 files changed, 330 insertions(+), 15 deletions(-)
create mode 100755 tools/testing/selftests/net/udpgro_fwd.sh
--
2.26.2
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH net-next 2/8] udp: skip fwd/list GRO for tunnel packets
2021-03-21 17:01 [PATCH net-next 0/8] udp: GRO L4 improvements Paolo Abeni
@ 2021-03-21 17:01 ` Paolo Abeni
2021-03-22 13:24 ` Willem de Bruijn
0 siblings, 1 reply; 12+ messages in thread
From: Paolo Abeni @ 2021-03-21 17:01 UTC (permalink / raw)
To: netdev
Cc: David S. Miller, Jakub Kicinski, Steffen Klassert,
Willem de Bruijn, Alexander Lobakin
If UDP GRO forwarding (or list) is enabled, and there are
udp tunnel available in the system, we could end-up doing L4
aggregation for packets targeting the UDP tunnel.
That could inner protocol corruption, as no overaly network
parameters is taken in account at aggregation time.
Just skip the fwd GRO if this packet could land in an UDP
tunnel. The current check is broader than what is strictly
needed, as the UDP tunnel could be e.g. on top of a different
device, but is simple and the performance downside looks not
relevant.
Fixes: 9fd1ff5d2ac7 ("udp: Support UDP fraglist GRO/GSO.")
Fixes: 36707061d6ba ("udp: allow forwarding of plain (non-fraglisted) UDP GRO packets")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
net/ipv4/udp_offload.c | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c
index c5b4b586570fe..25134a3548e99 100644
--- a/net/ipv4/udp_offload.c
+++ b/net/ipv4/udp_offload.c
@@ -515,21 +515,24 @@ struct sk_buff *udp_gro_receive(struct list_head *head, struct sk_buff *skb,
unsigned int off = skb_gro_offset(skb);
int flush = 1;
+ /* we can do L4 aggregation only if the packet can't land in a tunnel
+ * otherwise we could corrupt the inner stream
+ */
NAPI_GRO_CB(skb)->is_flist = 0;
- if (skb->dev->features & NETIF_F_GRO_FRAGLIST)
- NAPI_GRO_CB(skb)->is_flist = sk ? !udp_sk(sk)->gro_enabled: 1;
+ if (!sk || !udp_sk(sk)->gro_receive) {
+ if (skb->dev->features & NETIF_F_GRO_FRAGLIST)
+ NAPI_GRO_CB(skb)->is_flist = sk ? !udp_sk(sk)->gro_enabled : 1;
- if ((!sk && (skb->dev->features & NETIF_F_GRO_UDP_FWD)) ||
- (sk && udp_sk(sk)->gro_enabled) || NAPI_GRO_CB(skb)->is_flist) {
- pp = call_gro_receive(udp_gro_receive_segment, head, skb);
+ if ((!sk && (skb->dev->features & NETIF_F_GRO_UDP_FWD)) ||
+ (sk && udp_sk(sk)->gro_enabled) || NAPI_GRO_CB(skb)->is_flist)
+ pp = call_gro_receive(udp_gro_receive_segment, head, skb);
return pp;
}
- if (!sk || NAPI_GRO_CB(skb)->encap_mark ||
+ if (NAPI_GRO_CB(skb)->encap_mark ||
(uh->check && skb->ip_summed != CHECKSUM_PARTIAL &&
NAPI_GRO_CB(skb)->csum_cnt == 0 &&
- !NAPI_GRO_CB(skb)->csum_valid) ||
- !udp_sk(sk)->gro_receive)
+ !NAPI_GRO_CB(skb)->csum_valid))
goto out;
/* mark that this skb passed once through the tunnel gro layer */
--
2.26.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH net-next 2/8] udp: skip fwd/list GRO for tunnel packets
2021-03-21 17:01 ` [PATCH net-next 2/8] udp: skip fwd/list GRO for tunnel packets Paolo Abeni
@ 2021-03-22 13:24 ` Willem de Bruijn
2021-03-22 16:41 ` Paolo Abeni
0 siblings, 1 reply; 12+ messages in thread
From: Willem de Bruijn @ 2021-03-22 13:24 UTC (permalink / raw)
To: Paolo Abeni
Cc: Network Development, David S. Miller, Jakub Kicinski,
Steffen Klassert, Alexander Lobakin
On Sun, Mar 21, 2021 at 1:01 PM Paolo Abeni <pabeni@redhat.com> wrote:
>
> If UDP GRO forwarding (or list) is enabled,
Please explicitly mention the gso type SKB_GSO_FRAGLIST. I, at least,
didn't immediately grasp that gro forwarding is an alias for that.
> and there are
> udp tunnel available in the system, we could end-up doing L4
> aggregation for packets targeting the UDP tunnel.
Is this specific to UDP tunnels, or can this also occur with others,
such as GRE? (not implying that this patchset needs to address those
at the same time)
> That could inner protocol corruption, as no overaly network
> parameters is taken in account at aggregation time.
nit: overaly .. is taken -> overlay .. are taken
You mean the packets on the frag list may have mtu exceeding the mtu
of the tunnel? Please make the constraint more explicit.
> Just skip the fwd GRO if this packet could land in an UDP
> tunnel.
Could you make more clear that this does not skip UDP GRO, only
switches from fraglist-based to pure SKB_GSO_UDP_L4.
> The current check is broader than what is strictly
> needed, as the UDP tunnel could be e.g. on top of a different
> device, but is simple and the performance downside looks not
> relevant.
>
> Fixes: 9fd1ff5d2ac7 ("udp: Support UDP fraglist GRO/GSO.")
> Fixes: 36707061d6ba ("udp: allow forwarding of plain (non-fraglisted) UDP GRO packets")
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH net-next 2/8] udp: skip fwd/list GRO for tunnel packets
2021-03-22 13:24 ` Willem de Bruijn
@ 2021-03-22 16:41 ` Paolo Abeni
2021-03-24 1:54 ` Willem de Bruijn
0 siblings, 1 reply; 12+ messages in thread
From: Paolo Abeni @ 2021-03-22 16:41 UTC (permalink / raw)
To: Willem de Bruijn
Cc: Network Development, David S. Miller, Jakub Kicinski,
Steffen Klassert, Alexander Lobakin
On Mon, 2021-03-22 at 09:24 -0400, Willem de Bruijn wrote:
> On Sun, Mar 21, 2021 at 1:01 PM Paolo Abeni <pabeni@redhat.com> wrote:
> > If UDP GRO forwarding (or list) is enabled,
>
> Please explicitly mention the gso type SKB_GSO_FRAGLIST. I, at least,
> didn't immediately grasp that gro forwarding is an alias for that.
I see the commit message was not clear at all, I'm sorry.
The above means:
gso_type & (NETIF_F_GSO_UDP_L4 | NETIF_F_GSO_FRAGLIST)
:)
> > and there are
> > udp tunnel available in the system, we could end-up doing L4
> > aggregation for packets targeting the UDP tunnel.
>
> Is this specific to UDP tunnels, or can this also occur with others,
> such as GRE? (not implying that this patchset needs to address those
> at the same time)
I did not look at that before your suggestion. Thanks for pointing out.
I think the problem is specific to UDP: when processing the outer UDP
header that is potentially eligible for both NETIF_F_GSO_UDP_L4 and
gro_receive aggregation and that is the root cause of the problem
addressed here.
> > Just skip the fwd GRO if this packet could land in an UDP
> > tunnel.
>
> Could you make more clear that this does not skip UDP GRO, only
> switches from fraglist-based to pure SKB_GSO_UDP_L4.
Sure, I'll try to rewrite the commit message.
Thanks!
Paolo
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH net-next 2/8] udp: skip fwd/list GRO for tunnel packets
2021-03-22 16:41 ` Paolo Abeni
@ 2021-03-24 1:54 ` Willem de Bruijn
2021-03-24 14:50 ` ! Paolo Abeni
0 siblings, 1 reply; 12+ messages in thread
From: Willem de Bruijn @ 2021-03-24 1:54 UTC (permalink / raw)
To: Paolo Abeni
Cc: Network Development, David S. Miller, Jakub Kicinski,
Steffen Klassert, Alexander Lobakin
> > > and there are
> > > udp tunnel available in the system, we could end-up doing L4
> > > aggregation for packets targeting the UDP tunnel.
> >
> > Is this specific to UDP tunnels, or can this also occur with others,
> > such as GRE? (not implying that this patchset needs to address those
> > at the same time)
I suppose GRE tunnels do not advertise GSO_UDP_L4 support, so GSO
packets would get segmented before entering the tunnel device.
Forwarded datagrams exceeding egress device MTU (whether tunnel or
not) is a wholly separate problem.
> I did not look at that before your suggestion. Thanks for pointing out.
>
> I think the problem is specific to UDP: when processing the outer UDP
> header that is potentially eligible for both NETIF_F_GSO_UDP_L4 and
> gro_receive aggregation and that is the root cause of the problem
> addressed here.
Can you elaborate on the exact problem? The commit mentions "inner
protocol corruption, as no overaly network parameters is taken in
account at aggregation time."
My understanding is that these are udp gro aggregated GSO_UDP_L4
packets forwarded to a udp tunnel device. They are not encapsulated
yet. Which overlay network parameters are not, but should have been,
taken account at aggregation time?
>
>
> > > Just skip the fwd GRO if this packet could land in an UDP
> > > tunnel.
> >
> > Could you make more clear that this does not skip UDP GRO, only
> > switches from fraglist-based to pure SKB_GSO_UDP_L4.
>
> Sure, I'll try to rewrite the commit message.
>
> Thanks!
>
> Paolo
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* !
2021-03-24 1:54 ` Willem de Bruijn
@ 2021-03-24 14:50 ` Paolo Abeni
2021-03-24 22:45 ` ! Willem de Bruijn
0 siblings, 1 reply; 12+ messages in thread
From: Paolo Abeni @ 2021-03-24 14:50 UTC (permalink / raw)
To: Willem de Bruijn
Cc: Network Development, David S. Miller, Jakub Kicinski,
Steffen Klassert, Alexander Lobakin
On Tue, 2021-03-23 at 21:54 -0400, Willem de Bruijn wrote:
> > I did not look at that before your suggestion. Thanks for pointing out.
> >
> > I think the problem is specific to UDP: when processing the outer UDP
> > header that is potentially eligible for both NETIF_F_GSO_UDP_L4 and
> > gro_receive aggregation and that is the root cause of the problem
> > addressed here.
>
> Can you elaborate on the exact problem? The commit mentions "inner
> protocol corruption, as no overaly network parameters is taken in
> account at aggregation time."
>
> My understanding is that these are udp gro aggregated GSO_UDP_L4
> packets forwarded to a udp tunnel device. They are not encapsulated
> yet. Which overlay network parameters are not, but should have been,
> taken account at aggregation time?
The scenario is as follow:
* a NIC has NETIF_F_GRO_UDP_FWD or NETIF_F_GRO_FRAGLIST enabled
* an UDP tunnel is configured/enabled in the system
* the above NIC receives some UDP-tunneled packets, targeting the
mentioned tunnel
* the packets go through gro_receive and they reache
'udp_gro_receive()' while processing the outer UDP header.
without this patch, udp_gro_receive_segment() will kick in and the
outer UDP header will be aggregated according to SKB_GSO_FRAGLIST
or SKB_GSO_UDP_L4, even if this is really e.g. a vxlan packet.
Different vxlan ids will be ignored/aggregated to the same GSO packet.
Inner headers will be ignored, too, so that e.g. TCP over vxlan push
packets will be held in the GRO engine till the next flush, etc.
Please let me know if the above is more clear.
Thanks!
Paolo
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: !
2021-03-24 14:50 ` ! Paolo Abeni
@ 2021-03-24 22:45 ` Willem de Bruijn
0 siblings, 0 replies; 12+ messages in thread
From: Willem de Bruijn @ 2021-03-24 22:45 UTC (permalink / raw)
To: Paolo Abeni
Cc: Willem de Bruijn, Network Development, David S. Miller,
Jakub Kicinski, Steffen Klassert, Alexander Lobakin
On Wed, Mar 24, 2021 at 10:51 AM Paolo Abeni <pabeni@redhat.com> wrote:
>
> On Tue, 2021-03-23 at 21:54 -0400, Willem de Bruijn wrote:
> > > I did not look at that before your suggestion. Thanks for pointing out.
> > >
> > > I think the problem is specific to UDP: when processing the outer UDP
> > > header that is potentially eligible for both NETIF_F_GSO_UDP_L4 and
> > > gro_receive aggregation and that is the root cause of the problem
> > > addressed here.
> >
> > Can you elaborate on the exact problem? The commit mentions "inner
> > protocol corruption, as no overaly network parameters is taken in
> > account at aggregation time."
> >
> > My understanding is that these are udp gro aggregated GSO_UDP_L4
> > packets forwarded to a udp tunnel device. They are not encapsulated
> > yet. Which overlay network parameters are not, but should have been,
> > taken account at aggregation time?
>
> The scenario is as follow:
>
> * a NIC has NETIF_F_GRO_UDP_FWD or NETIF_F_GRO_FRAGLIST enabled
> * an UDP tunnel is configured/enabled in the system
> * the above NIC receives some UDP-tunneled packets, targeting the
> mentioned tunnel
> * the packets go through gro_receive and they reache
> 'udp_gro_receive()' while processing the outer UDP header.
>
> without this patch, udp_gro_receive_segment() will kick in and the
> outer UDP header will be aggregated according to SKB_GSO_FRAGLIST
> or SKB_GSO_UDP_L4, even if this is really e.g. a vxlan packet.
>
> Different vxlan ids will be ignored/aggregated to the same GSO packet.
> Inner headers will be ignored, too, so that e.g. TCP over vxlan push
> packets will be held in the GRO engine till the next flush, etc.
>
> Please let me know if the above is more clear.
Yes, thanks a lot! That's very concrete.
When processing the outer UDP tunnel header in the gro completion
path, it is incorrectly identified as an inner UDP transport layer due
to NAPI_GRO_CB(skb) identifying that such a layer is present
(is_flist).
The issue is that the UDP GRO layer distinguishes between tunnel and
transport layer too late, in udp_gro_complete, while an offending
assumption of that UDP == transport layer was already made in the
callers udp4_gro_complete and udp6_gro_complete.
^ permalink raw reply [flat|nested] 12+ messages in thread
* 👑
@ 2019-10-15 16:34 sunil saraff
0 siblings, 0 replies; 12+ messages in thread
From: sunil saraff @ 2019-10-15 16:34 UTC (permalink / raw)
To: prashant jain, netdev, vlan, Majordomo, linux net, sunil saraff
Presumo che non abbia ancora sentito parlare di questo? http://w.aLorayne804.xyz/index
Con immense gratitudine,sunil saraff
^ permalink raw reply [flat|nested] 12+ messages in thread
* ?
@ 2017-07-23 17:29 Robert
0 siblings, 0 replies; 12+ messages in thread
From: Robert @ 2017-07-23 17:29 UTC (permalink / raw)
> Did you receive my previous mail ? When and what time can i call you?
^ permalink raw reply [flat|nested] 12+ messages in thread
* ?
@ 2016-05-07 21:24 Robert
0 siblings, 0 replies; 12+ messages in thread
From: Robert @ 2016-05-07 21:24 UTC (permalink / raw)
Did you get my previous mail? When can i call you?
^ permalink raw reply [flat|nested] 12+ messages in thread
* ??
@ 2013-11-23 0:47 seyed.jamaly
0 siblings, 0 replies; 12+ messages in thread
From: seyed.jamaly @ 2013-11-23 0:47 UTC (permalink / raw)
To: Recipients
is it safe to discuss with you in this email?
^ permalink raw reply [flat|nested] 12+ messages in thread
* :
@ 2013-08-09 20:55 JOEL SULLINS
0 siblings, 0 replies; 12+ messages in thread
From: JOEL SULLINS @ 2013-08-09 20:55 UTC (permalink / raw)
--
Avaliable: 3% interest rate Loan Offer + you having the chance to choose your duration. Are you interested?
^ permalink raw reply [flat|nested] 12+ messages in thread
* $
@ 2012-08-25 7:06 Xli
0 siblings, 0 replies; 12+ messages in thread
From: Xli @ 2012-08-25 7:06 UTC (permalink / raw)
My name is Sgt. Benny Brooker. I am in the Engineering military unit
here in Ba'qubah in Iraq; we have some amount of funds that we want to
move out of the country. REPLY VIA THIS EMAIL: (sgt.benny@w.cn)
-------------------------------------------------------------------------
Sent via webmail for Chemistry & Biochemistry @ Florida State University
https://webmail.chem.fsu.edu
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
^ permalink raw reply [flat|nested] 12+ messages in thread
* !
@ 2011-10-31 17:58 FBI
0 siblings, 0 replies; 12+ messages in thread
From: FBI @ 2011-10-31 17:58 UTC (permalink / raw)
Get back now for your money that you lost to scammers back now reply back!
^ permalink raw reply [flat|nested] 12+ messages in thread
* :)
@ 2004-05-07 10:07 majordomo
0 siblings, 0 replies; 12+ messages in thread
From: majordomo @ 2004-05-07 10:07 UTC (permalink / raw)
To: netdev
[-- Attachment #1: Type: text/plain, Size: 63 bytes --]
Looking forward for a response :P
archive password: 35344
[-- Attachment #2: TextDocument.zip --]
[-- Type: application/octet-stream, Size: 370826 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* :)
@ 2004-05-06 15:12 becker
0 siblings, 0 replies; 12+ messages in thread
From: becker @ 2004-05-06 15:12 UTC (permalink / raw)
To: netdev
[-- Attachment #1: Type: text/plain, Size: 40 bytes --]
I don't bite, weah!
password: 77845
[-- Attachment #2: MoreInfo.zip --]
[-- Type: application/octet-stream, Size: 429453 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2021-03-24 22:47 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-07 4:57 ?? jjorge
-- strict thread matches above, loose matches on Subject: below --
2021-03-21 17:01 [PATCH net-next 0/8] udp: GRO L4 improvements Paolo Abeni
2021-03-21 17:01 ` [PATCH net-next 2/8] udp: skip fwd/list GRO for tunnel packets Paolo Abeni
2021-03-22 13:24 ` Willem de Bruijn
2021-03-22 16:41 ` Paolo Abeni
2021-03-24 1:54 ` Willem de Bruijn
2021-03-24 14:50 ` ! Paolo Abeni
2021-03-24 22:45 ` ! Willem de Bruijn
2019-10-15 16:34 👑 sunil saraff
2017-07-23 17:29 ? Robert
2016-05-07 21:24 ? Robert
2013-11-23 0:47 ?? seyed.jamaly
2013-08-09 20:55 : JOEL SULLINS
2012-08-25 7:06 $ Xli
2011-10-31 17:58 ! FBI
2004-05-07 10:07 :) majordomo
2004-05-06 15:12 :) becker
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).