From: Paolo Abeni <pabeni@redhat.com> Date: 2021-03-30 10:30:34
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.
v2 -> v3:
- no code changes, more verbose commit messages and comment in
patch 1/8
v1 -> v2:
- restrict post segmentation csum fixup to the only the relevant pkts
- use individual 'accept_gso_type' fields instead of whole gso bitmask
(Willem)
- use only ipv6 addesses from test range in self-tests (Willem)
- hopefully clarified most individual patches commit messages
Paolo Abeni (8):
udp: fixup csum for GSO receive slow path
udp: skip L4 aggregation for UDP tunnel packets
udp: properly complete L4 GRO over UDP tunnel packet
udp: never accept GSO_FRAGLIST packets
vxlan: allow L4 GRO passthrough
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 | 22 +-
include/net/udp.h | 23 ++
net/ipv4/udp.c | 5 +
net/ipv4/udp_offload.c | 27 ++-
net/ipv6/udp.c | 1 +
net/ipv6/udp_offload.c | 3 +-
tools/testing/selftests/net/Makefile | 1 +
tools/testing/selftests/net/udpgro_fwd.sh | 251 ++++++++++++++++++++++
11 files changed, 323 insertions(+), 13 deletions(-)
create mode 100755 tools/testing/selftests/net/udpgro_fwd.sh
--
2.26.2
From: Paolo Abeni <pabeni@redhat.com> Date: 2021-03-30 10:30:35
When UDP packets generated locally by a socket with UDP_SEGMENT
traverse the following path:
UDP tunnel(xmit) -> veth (segmentation) -> veth (gro) ->
UDP tunnel (rx) -> UDP socket (no UDP_GRO)
ip_summed will be set to CHECKSUM_PARTIAL at creation time and
such checksum mode will be preserved in the above path up to the
UDP tunnel receive code where we have:
__iptunnel_pull_header() -> skb_pull_rcsum() ->
skb_postpull_rcsum() -> __skb_postpull_rcsum()
The latter will convert the skb to CHECKSUM_NONE.
The UDP GSO packet will be later segmented as part of the rx socket
receive operation, and will present a CHECKSUM_NONE after segmentation.
Additionally the segmented packets UDP CB still refers to the original
GSO packet len. Overall that causes unexpected/wrong csum validation
errors later in the UDP receive path.
We could possibly address the issue with some additional checks and
csum mangling in the UDP tunnel code. Since the issue affects only
this UDP receive slow path, let's set a suitable csum status there.
Note that SKB_GSO_UDP_L4 or SKB_GSO_FRAGLIST packets lacking an UDP
encapsulation present a valid checksum when landing to udp_queue_rcv_skb(),
as the UDP checksum has been validated by the GRO engine.
v2 -> v3:
- even more verbose commit message and comments
v1 -> v2:
- restrict the csum update to the packets strictly needing them
- hopefully clarify the commit message and code comments
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
include/net/udp.h | 23 +++++++++++++++++++++++
net/ipv4/udp.c | 2 ++
net/ipv6/udp.c | 1 +
3 files changed, 26 insertions(+)
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com> Date: 2021-03-30 15:17:11
On Tue, Mar 30, 2021 at 6:29 AM Paolo Abeni [off-list ref] wrote:
When UDP packets generated locally by a socket with UDP_SEGMENT
traverse the following path:
UDP tunnel(xmit) -> veth (segmentation) -> veth (gro) ->
UDP tunnel (rx) -> UDP socket (no UDP_GRO)
ip_summed will be set to CHECKSUM_PARTIAL at creation time and
such checksum mode will be preserved in the above path up to the
UDP tunnel receive code where we have:
__iptunnel_pull_header() -> skb_pull_rcsum() ->
skb_postpull_rcsum() -> __skb_postpull_rcsum()
The latter will convert the skb to CHECKSUM_NONE.
The UDP GSO packet will be later segmented as part of the rx socket
receive operation, and will present a CHECKSUM_NONE after segmentation.
Additionally the segmented packets UDP CB still refers to the original
GSO packet len. Overall that causes unexpected/wrong csum validation
errors later in the UDP receive path.
We could possibly address the issue with some additional checks and
csum mangling in the UDP tunnel code. Since the issue affects only
this UDP receive slow path, let's set a suitable csum status there.
Note that SKB_GSO_UDP_L4 or SKB_GSO_FRAGLIST packets lacking an UDP
encapsulation present a valid checksum when landing to udp_queue_rcv_skb(),
as the UDP checksum has been validated by the GRO engine.
v2 -> v3:
- even more verbose commit message and comments
v1 -> v2:
- restrict the csum update to the packets strictly needing them
- hopefully clarify the commit message and code comments
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
From: Paolo Abeni <pabeni@redhat.com> Date: 2021-03-30 10:30:35
After the previous patch, the stack can do L4 UDP aggregation
on top of a UDP tunnel.
In such scenario, udp{4,6}_gro_complete will be called twice. This function
will enter its is_flist branch immediately, even though that is only
correct on the second call, as GSO_FRAGLIST is only relevant for the
inner packet.
Instead, we need to try first UDP tunnel-based aggregation, if the GRO
packet requires that.
This patch changes udp{4,6}_gro_complete to skip the frag list processing
when while encap_mark == 1, identifying processing of the outer tunnel
header.
Additionally, clears the field in udp_gro_complete() so that we can enter
the frag list path on the next round, for the inner header.
v1 -> v2:
- hopefully clarified the commit message
Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
net/ipv4/udp_offload.c | 8 +++++++-
net/ipv6/udp_offload.c | 3 ++-
2 files changed, 9 insertions(+), 2 deletions(-)
@@ -642,6 +642,11 @@ int udp_gro_complete(struct sk_buff *skb, int nhoff,skb_shinfo(skb)->gso_type=uh->check?SKB_GSO_UDP_TUNNEL_CSUM:SKB_GSO_UDP_TUNNEL;+/* clear the encap mark, so that inner frag_list gro_complete+*cantakeplace+*/+NAPI_GRO_CB(skb)->encap_mark=0;+/* Set encapsulation before calling into inner gro_complete()*functionstomakethemsetuptheinneroffsets.*/
@@ -665,7 +670,8 @@ INDIRECT_CALLABLE_SCOPE int udp4_gro_complete(struct sk_buff *skb, int nhoff)conststructiphdr*iph=ip_hdr(skb);structudphdr*uh=(structudphdr*)(skb->data+nhoff);-if(NAPI_GRO_CB(skb)->is_flist){+/* do fraglist only if there is no outer UDP encap (or we already processed it) */+if(NAPI_GRO_CB(skb)->is_flist&&!NAPI_GRO_CB(skb)->encap_mark){uh->len=htons(skb->len-nhoff);skb_shinfo(skb)->gso_type|=(SKB_GSO_FRAGLIST|SKB_GSO_UDP_L4);
@@ -163,7 +163,8 @@ INDIRECT_CALLABLE_SCOPE int udp6_gro_complete(struct sk_buff *skb, int nhoff)conststructipv6hdr*ipv6h=ipv6_hdr(skb);structudphdr*uh=(structudphdr*)(skb->data+nhoff);-if(NAPI_GRO_CB(skb)->is_flist){+/* do fraglist only if there is no outer UDP encap (or we already processed it) */+if(NAPI_GRO_CB(skb)->is_flist&&!NAPI_GRO_CB(skb)->encap_mark){uh->len=htons(skb->len-nhoff);skb_shinfo(skb)->gso_type|=(SKB_GSO_FRAGLIST|SKB_GSO_UDP_L4);
From: Paolo Abeni <pabeni@redhat.com> Date: 2021-03-30 10:30:37
When passing up an UDP GSO packet with L4 aggregation, there is
no need to segment it at the vxlan level. We can propagate the
packet untouched and let it be segmented later, if needed.
Introduce an helper to allow let the UDP socket to accept any
L4 aggregation and use it in the vxlan driver.
v1 -> v2:
- updated to use the newly introduced UDP socket 'accept*' fields
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
drivers/net/vxlan.c | 1 +
include/linux/udp.h | 6 ++++++
2 files changed, 7 insertions(+)
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com> Date: 2021-03-30 15:16:07
On Tue, Mar 30, 2021 at 6:30 AM Paolo Abeni [off-list ref] wrote:
When passing up an UDP GSO packet with L4 aggregation, there is
no need to segment it at the vxlan level. We can propagate the
packet untouched and let it be segmented later, if needed.
Introduce an helper to allow let the UDP socket to accept any
L4 aggregation and use it in the vxlan driver.
v1 -> v2:
- updated to use the newly introduced UDP socket 'accept*' fields
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
From: Paolo Abeni <pabeni@redhat.com> Date: 2021-03-30 10:30:37
Similar to the previous commit, let even geneve
passthrou the L4 GRO packets
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
drivers/net/geneve.c | 1 +
1 file changed, 1 insertion(+)
From: Paolo Abeni <pabeni@redhat.com> Date: 2021-03-30 10:30:37
If NETIF_F_GRO_FRAGLIST or NETIF_F_GRO_UDP_FWD are enabled, and there
are UDP tunnels available in the system, udp_gro_receive() could end-up
doing L4 aggregation (either SKB_GSO_UDP_L4 or SKB_GSO_FRAGLIST) at
the outer UDP tunnel level for packets effectively carrying and UDP
tunnel header.
That could cause inner protocol corruption. If e.g. the relevant
packets carry a vxlan header, 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.
Just skip the SKB_GSO_UDP_L4 and SKB_GSO_FRAGLIST code path if the
current packet could land in a UDP tunnel, and let udp_gro_receive()
do GRO via udp_sk(sk)->gro_receive.
The check implemented in this patch is broader than what is strictly
needed, as the existing UDP tunnel could be e.g. configured on top of
a different device: we could end-up skipping GRO at-all for some packets.
Anyhow, that is a very thin corner case and covering it will add quite
a bit of complexity.
v1 -> v2:
- hopefully clarify the commit message
Fixes: 9fd1ff5d2ac7 ("udp: Support UDP fraglist GRO/GSO.")
Fixes: 36707061d6ba ("udp: allow forwarding of plain (non-fraglisted) UDP GRO packets")
Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
net/ipv4/udp_offload.c | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
@@ -515,21 +515,24 @@ struct sk_buff *udp_gro_receive(struct list_head *head, struct sk_buff *skb,unsignedintoff=skb_gro_offset(skb);intflush=1;+/* we can do L4 aggregation only if the packet can't land in a tunnel+*otherwisewecouldcorrupttheinnerstream+*/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);returnpp;}-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))gotoout;/* mark that this skb passed once through the tunnel gro layer */
From: Paolo Abeni <pabeni@redhat.com> Date: 2021-03-30 10:30:37
Currently the UDP protocol delivers GSO_FRAGLIST packets to
the sockets without the expected segmentation.
This change addresses the issue introducing and maintaining
a couple of new fields to explicitly accept SKB_GSO_UDP_L4
or GSO_FRAGLIST packets. Additionally updates udp_unexpected_gso()
accordingly.
UDP sockets enabling UDP_GRO stil keep accept_udp_fraglist
zeroed.
v1 -> v2:
- use 2 bits instead of a whole GSO bitmask (Willem)
Fixes: 9fd1ff5d2ac7 ("udp: Support UDP fraglist GRO/GSO.")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
include/linux/udp.h | 16 +++++++++++++---
net/ipv4/udp.c | 3 +++
2 files changed, 16 insertions(+), 3 deletions(-)
@@ -2666,9 +2666,12 @@ int udp_lib_setsockopt(struct sock *sk, int level, int optname,caseUDP_GRO:lock_sock(sk);++/* when enabling GRO, accept the related GSO packet type */if(valbool)udp_tunnel_encap_enable(sk->sk_socket);up->gro_enabled=valbool;+up->accept_udp_l4=valbool;release_sock(sk);break;
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com> Date: 2021-03-30 15:15:40
On Tue, Mar 30, 2021 at 6:30 AM Paolo Abeni [off-list ref] wrote:
Currently the UDP protocol delivers GSO_FRAGLIST packets to
the sockets without the expected segmentation.
This change addresses the issue introducing and maintaining
a couple of new fields to explicitly accept SKB_GSO_UDP_L4
or GSO_FRAGLIST packets. Additionally updates udp_unexpected_gso()
accordingly.
UDP sockets enabling UDP_GRO stil keep accept_udp_fraglist
zeroed.
v1 -> v2:
- use 2 bits instead of a whole GSO bitmask (Willem)
Fixes: 9fd1ff5d2ac7 ("udp: Support UDP fraglist GRO/GSO.")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
From: Paolo Abeni <pabeni@redhat.com> Date: 2021-03-30 10:31:07
Similar to the previous commit, let even geneve
passthrou the L4 GRO packets
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
drivers/net/bareudp.c | 1 +
1 file changed, 1 insertion(+)
From: Paolo Abeni <pabeni@redhat.com> Date: 2021-03-30 10:31:07
Create a bunch of virtual topologies and verify that
NETIF_F_GRO_FRAGLIST or NETIF_F_GRO_UDP_FWD-enabled
devices aggregate the ingress packets as expected.
Additionally check that the aggregate packets are
segmented correctly when landing on a socket
Also test SKB_GSO_FRAGLIST and SKB_GSO_UDP_L4 aggregation
on top of UDP tunnel (vxlan)
v1 -> v2:
- hopefully clarify the commit message
- moved the overlay network ipv6 range into the 'documentation'
reserved range (Willem)
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
tools/testing/selftests/net/Makefile | 1 +
tools/testing/selftests/net/udpgro_fwd.sh | 251 ++++++++++++++++++++++
2 files changed, 252 insertions(+)
create mode 100755 tools/testing/selftests/net/udpgro_fwd.sh
@@ -0,0 +1,251 @@+#!/bin/sh+# SPDX-License-Identifier: GPL-2.0++readonlyBASE="ns-$(mktemp-uXXXXXX)"+readonlySRC=2+readonlyDST=1+readonlyDST_NAT=100+readonlyNS_SRC=$BASE$SRC+readonlyNS_DST=$BASE$DST++# "baremetal" network used for raw UDP traffic+readonlyBM_NET_V4=192.168.1.+readonlyBM_NET_V6=2001:db8::++# "overlay" network used for UDP over UDP tunnel traffic+readonlyOL_NET_V4=172.16.1.+readonlyOL_NET_V6=2001:db8:1::+readonlyNPROCS=`nproc`++cleanup(){+localns+local-rjobs="$(jobs-p)"+[-n"${jobs}"]&&kill-1${jobs}2>/dev/null++fornsin$NS_SRC$NS_DST;do+ipnetnsdel$ns2>/dev/null+done+}++trapcleanupEXIT++create_ns(){+localnet+localns++fornsin$NS_SRC$NS_DST;do+ipnetnsadd$ns+ip-n$nslinksetdevloup+done++iplinkaddnameveth$SRCtypevethpeernameveth$DST++fornsin$SRC$DST;do+iplinksetdevveth$nsnetns$BASE$ns+ip-n$BASE$nslinksetdevveth$nsup+ip-n$BASE$nsaddradddevveth$ns$BM_NET_V4$ns/24+ip-n$BASE$nsaddradddevveth$ns$BM_NET_V6$ns/64nodad+done+ip-n$NS_DSTlinksetveth$DSTxdpobject../bpf/xdp_dummy.osectionxdp_dummy2>/dev/null+}++create_vxlan_endpoint(){+local-rnetns=$1+local-rbm_dev=$2+local-rbm_rem_addr=$3+local-rvxlan_dev=$4+local-rvxlan_id=$5+local-rvxlan_port=4789++ip-n$netnslinksetdev$bm_devup+ip-n$netnslinkadddev$vxlan_devtypevxlanid$vxlan_id\+dstport$vxlan_portremote$bm_rem_addr+ip-n$netnslinksetdev$vxlan_devup+}++create_vxlan_pair(){+localns++create_ns++fornsin$SRC$DST;do+# note that 3 - $SRC == $DST and 3 - $DST == $SRC+create_vxlan_endpoint$BASE$nsveth$ns$BM_NET_V4$((3-$ns))vxlan$ns4+ip-n$BASE$nsaddradddevvxlan$ns$OL_NET_V4$ns/24+done+fornsin$SRC$DST;do+create_vxlan_endpoint$BASE$nsveth$ns$BM_NET_V6$((3-$ns))vxlan6$ns6+ip-n$BASE$nsaddradddevvxlan6$ns$OL_NET_V6$ns/24nodad+done+}++is_ipv6(){+if[[$1=~.*:.*]];then+return0+fi+return1+}++run_test(){+local-rmsg=$1+local-rdst=$2+local-rpkts=$3+local-rvxpkts=$4+localbind=$5+localrx_args=""+localrx_family="-4"+localfamily=-4+localfilter=IpInReceives+localipt=iptables++printf"%-40s""$msg"++ifis_ipv6$dst;then+# rx program does not support '-6' and implies ipv6 usage by default+rx_family=""+family=-6+filter=Ip6InReceives+ipt=ip6tables+fi++rx_args="$rx_family"+[-n"$bind"]&&rx_args="$rx_args -b $bind"++# send a single GSO packet, segmented in 10 UDP frames.+# Always expect 10 UDP frames on RX side as rx socket does+# not enable GRO+ipnetnsexec$NS_DST$ipt-AINPUT-pudp--dport4789+ipnetnsexec$NS_DST$ipt-AINPUT-pudp--dport8000+ipnetnsexec$NS_DST./udpgso_bench_rx-C1000-R10-n10-l1300$rx_args&+localspid=$!+sleep0.1+ipnetnsexec$NS_SRC./udpgso_bench_tx$family-M1-s13000-S1300-D$dst+localretc=$?+wait$spid+localrets=$?+if[${rets}-ne0]||[${retc}-ne0];then+echo" fail client exit code $retc, server $rets"+ret=1+return+fi++localrcv=`ipnetnsexec$NS_DST$ipt"-save"-c|grep'dport 8000'|\+sed-e's/\[//'-e's/:.*//'`+if[$rcv!=$pkts];then+echo" fail - received $rvs packets, expected $pkts"+ret=1+return+fi++localvxrcv=`ipnetnsexec$NS_DST$ipt"-save"-c|grep'dport 4789'|\+sed-e's/\[//'-e's/:.*//'`++# upper net can generate a little noise, allow some tolerance+if[$vxrcv-lt$vxpkts-o$vxrcv-gt$((vxpkts+3))];then+echo" fail - received $vxrcv vxlan packets, expected $vxpkts"+ret=1+return+fi+echo" ok"+}++run_bench(){+local-rmsg=$1+local-rdst=$2+localfamily=-4++printf"%-40s""$msg"+if[$NPROCS-lt2];then+echo" skip - needed 2 CPUs found $NPROCS"+return+fi++is_ipv6$dst&&family=-6++# bind the sender and the receiver to different CPUs to try+# get reproducible results+ipnetnsexec$NS_DSTbash-c"echo 2 > /sys/class/net/veth$DST/queues/rx-0/rps_cpus"+ipnetnsexec$NS_DSTtaskset0x2./udpgso_bench_rx-C1000-R10&+localspid=$!+sleep0.1+ipnetnsexec$NS_SRCtaskset0x1./udpgso_bench_tx$family-l3-S1300-D$dst+localretc=$?+wait$spid+localrets=$?+if[${rets}-ne0]||[${retc}-ne0];then+echo" fail client exit code $retc, server $rets"+ret=1+return+fi+}++forfamilyin46;do+BM_NET=$BM_NET_V4+OL_NET=$OL_NET_V4+IPT=iptables+SUFFIX=24+VXDEV=vxlan++if[$family=6];then+BM_NET=$BM_NET_V6+OL_NET=$OL_NET_V6+SUFFIX="64 nodad"+VXDEV=vxlan6+IPT=ip6tables+fi++echo"IPv$family"++create_ns+run_test"No GRO"$BM_NET$DST100+cleanup++create_ns+ipnetnsexec$NS_DSTethtool-Kveth$DSTrx-gro-liston+run_test"GRO frag list"$BM_NET$DST10+cleanup++# UDP GRO fwd skips aggregation when find an udp socket with the GRO option+# if there is an UDP tunnel in the running system, such lookup happen+# take place.+# use NAT to circumvent GRO FWD check+create_ns+ip-n$NS_DSTaddradddevveth$DST$BM_NET$DST_NAT/$SUFFIX+ipnetnsexec$NS_DSTethtool-Kveth$DSTrx-udp-gro-forwardingon+ipnetnsexec$NS_DST$IPT-tnat-IPREROUTING-d$BM_NET$DST_NAT\+-jDNAT--to-destination$BM_NET$DST+run_test"GRO fwd"$BM_NET$DST_NAT10$BM_NET$DST+cleanup++create_ns+run_bench"UDP fwd perf"$BM_NET$DST+ipnetnsexec$NS_DSTethtool-Kveth$DSTrx-udp-gro-forwardingon+run_bench"UDP GRO fwd perf"$BM_NET$DST+cleanup++create_vxlan_pair+ipnetnsexec$NS_DSTethtool-Kveth$DSTrx-gro-liston+run_test"GRO frag list over UDP tunnel"$OL_NET$DST11+cleanup++# use NAT to circumvent GRO FWD check+create_vxlan_pair+ip-n$NS_DSTaddradddev$VXDEV$DST$OL_NET$DST_NAT/$SUFFIX+ipnetnsexec$NS_DSTethtool-Kveth$DSTrx-udp-gro-forwardingon+ipnetnsexec$NS_DST$IPT-tnat-IPREROUTING-d$OL_NET$DST_NAT\+-jDNAT--to-destination$OL_NET$DST++# load arp cache before running the test to reduce the amount of+# stray traffic on top of the UDP tunnel+ipnetnsexec$NS_SRCping-q-c1$OL_NET$DST_NAT>/dev/null+run_test"GRO fwd over UDP tunnel"$OL_NET$DST_NAT11$OL_NET$DST+cleanup++create_vxlan_pair+run_bench"UDP tunnel fwd perf"$OL_NET$DST+ipnetnsexec$NS_DSTethtool-Kveth$DSTrx-udp-gro-forwardingon+run_bench"UDP tunnel GRO fwd perf"$OL_NET$DST+cleanup+done++exit$ret
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com> Date: 2021-03-30 15:50:43
On Tue, Mar 30, 2021 at 6:30 AM Paolo Abeni [off-list ref] wrote:
Create a bunch of virtual topologies and verify that
NETIF_F_GRO_FRAGLIST or NETIF_F_GRO_UDP_FWD-enabled
devices aggregate the ingress packets as expected.
Additionally check that the aggregate packets are
segmented correctly when landing on a socket
Also test SKB_GSO_FRAGLIST and SKB_GSO_UDP_L4 aggregation
on top of UDP tunnel (vxlan)
v1 -> v2:
- hopefully clarify the commit message
- moved the overlay network ipv6 range into the 'documentation'
reserved range (Willem)
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Hello:
This series was applied to netdev/net-next.git (refs/heads/master):
On Tue, 30 Mar 2021 12:28:48 +0200 you wrote:
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.
[...]