[PATCH] net: gro: fix napi_gro_cb zeroed alignment

2024-05-14 Thread Richard Gobert
Add 2 byte padding to napi_gro_cb struct to ensure zeroed member is aligned after flush_id member was removed in the original commit. Fixes: 4b0ebbca3e16 ("net: gro: move L3 flush checks to tcp_gro_receive and udp_gro_receive_segment") Suggested-by: Geert Uytterhoeven Signed-off-b

Re: [PATCH net-next v10 2/3] net: gro: move L3 flush checks to tcp_gro_receive and udp_gro_receive_segment

2024-05-14 Thread Richard Gobert
Jakub Kicinski wrote: > On Tue, 14 May 2024 14:13:21 +0200 Geert Uytterhoeven wrote: >> On Thu, May 9, 2024 at 9:09 PM Richard Gobert >> wrote: >>> {inet,ipv6}_gro_receive functions perform flush checks (ttl, flags, >>> iph->id, ...) against all packets in a

Re: [PATCH net-next v9 2/3] net: gro: move L3 flush checks to tcp_gro_receive and udp_gro_receive_segment

2024-05-10 Thread Richard Gobert
Eric Dumazet wrote: > On Thu, May 9, 2024 at 8:58 PM Richard Gobert > wrote: >> > >> >> Interesting, I think that is indeed a bug, that exists also in the current >> implementation. >> NAPI_GRO_CB(p)->ip_fixedid (is_atomic before we renamed it in t

[PATCH net-next v10 3/3] selftests/net: add flush id selftests

2024-05-09 Thread Richard Gobert
Added flush id selftests to test different cases where DF flag is set or unset and id value changes in the following packets. All cases where the packets should coalesce or should not coalesce are tested. Signed-off-by: Richard Gobert --- tools/testing/selftests/net/gro.c | 138

[PATCH net-next v10 2/3] net: gro: move L3 flush checks to tcp_gro_receive and udp_gro_receive_segment

2024-05-09 Thread Richard Gobert
10.09% [kernel] [k] inet_gro_receive 2.08% [kernel] [k] tcp_gro_receive patch applied: 6.97% [kernel] [k] inet_gro_receive 3.68% [kernel] [k] tcp_gro_receive Signed-off-by: Richard Gobert --- include/net/gro.h | 76 +- net

[PATCH net-next v10 1/3] net: gro: use cb instead of skb->network_header

2024-05-09 Thread Richard Gobert
This patch converts references of skb->network_header to napi_gro_cb's network_offset and inner_network_offset. Signed-off-by: Richard Gobert --- include/net/gro.h| 9 +++-- net/ipv4/af_inet.c | 4 net/ipv4/tcp_offload.c | 3 ++- net/ipv6/ip6_offload.c | 5 ++

[PATCH net-next v10 0/3] net: gro: remove network_header use, move p->{flush/flush_id} calculations to L4

2024-05-09 Thread Richard Gobert
P bug - Remove more conditionals and memory fetches from inet_gro_flush - v1: https://lore.kernel.org/netdev/e1d22505-c5f8-4c02-a997-642484803...@gmail.com/ Richard Gobert (3): net: gro: use cb instead of skb->network_header net: gro: move L3 flush checks to tcp_gro_receive and udp

Re: [PATCH net-next v9 2/3] net: gro: move L3 flush checks to tcp_gro_receive and udp_gro_receive_segment

2024-05-09 Thread Richard Gobert
Willem de Bruijn wrote: > Richard Gobert wrote: >> {inet,ipv6}_gro_receive functions perform flush checks (ttl, flags, >> iph->id, ...) against all packets in a loop. These flush checks are used in >> all merging UDP and TCP flows. >> >> These checks need to be

Re: [PATCH net-next v9 2/3] net: gro: move L3 flush checks to tcp_gro_receive and udp_gro_receive_segment

2024-05-09 Thread Richard Gobert
Eric Dumazet wrote: > On Tue, May 7, 2024 at 6:30 PM Richard Gobert > wrote: >> >> {inet,ipv6}_gro_receive functions perform flush checks (ttl, flags, >> iph->id, ...) against all packets in a loop. These flush checks are used in >> all merging UDP and TCP flo

[PATCH net-next v9 3/3] selftests/net: add flush id selftests

2024-05-07 Thread Richard Gobert
Added flush id selftests to test different cases where DF flag is set or unset and id value changes in the following packets. All cases where the packets should coalesce or should not coalesce are tested. Signed-off-by: Richard Gobert --- tools/testing/selftests/net/gro.c | 138

[PATCH net-next v9 2/3] net: gro: move L3 flush checks to tcp_gro_receive and udp_gro_receive_segment

2024-05-07 Thread Richard Gobert
10.09% [kernel] [k] inet_gro_receive 2.08% [kernel] [k] tcp_gro_receive patch applied: 6.97% [kernel] [k] inet_gro_receive 3.68% [kernel] [k] tcp_gro_receive Signed-off-by: Richard Gobert --- include/net/gro.h | 78 +- net

[PATCH net-next v9 1/3] net: gro: use cb instead of skb->network_header

2024-05-07 Thread Richard Gobert
This patch converts references of skb->network_header to napi_gro_cb's network_offset and inner_network_offset. Signed-off-by: Richard Gobert --- include/net/gro.h| 9 +++-- net/ipv4/af_inet.c | 4 net/ipv4/tcp_offload.c | 3 ++- net/ipv6/ip6_offload.c | 5 ++

[PATCH net-next v9 0/3] net: gro: remove network_header use, move p->{flush/flush_id} calculations to L4

2024-05-07 Thread Richard Gobert
02-a997-642484803...@gmail.com/ Richard Gobert (3): net: gro: use cb instead of skb->network_header net: gro: move L3 flush checks to tcp_gro_receive and udp_gro_receive_segment selftests/net: add flush id selftests include/net/gro.h | 87 --- net/core/gro.c

Re: [PATCH net-next v8 3/3] selftests/net: add flush id selftests

2024-05-07 Thread Richard Gobert
Willem de Bruijn wrote: > Richard Gobert wrote: >> Added flush id selftests to test different cases where DF flag is set or >> unset and id value changes in the following packets. All cases where the >> packets should coalesce or should not coalesce are tested. >> >&

Re: [PATCH net-next v8 2/3] net: gro: move L3 flush checks to tcp_gro_receive and udp_gro_receive_segment

2024-05-07 Thread Richard Gobert
Willem de Bruijn wrote: > Richard Gobert wrote: >> {inet,ipv6}_gro_receive functions perform flush checks (ttl, flags, >> iph->id, ...) against all packets in a loop. These flush checks are used in >> all merging UDP and TCP flows. >> >> These checks need to be

Re: [PATCH net-next v8 1/3] net: gro: use cb instead of skb->network_header

2024-05-07 Thread Richard Gobert
Willem de Bruijn wrote: > Richard Gobert wrote: >> This patch converts references of skb->network_header to napi_gro_cb's >> network_offset and inner_network_offset. >> >> Signed-off-by: Richard Gobert >> --- >> include/net/gro.h| 9 +++-

[PATCH net-next v8 3/3] selftests/net: add flush id selftests

2024-05-06 Thread Richard Gobert
Added flush id selftests to test different cases where DF flag is set or unset and id value changes in the following packets. All cases where the packets should coalesce or should not coalesce are tested. Signed-off-by: Richard Gobert --- tools/testing/selftests/net/gro.c | 147

[PATCH net-next v8 2/3] net: gro: move L3 flush checks to tcp_gro_receive and udp_gro_receive_segment

2024-05-06 Thread Richard Gobert
09% [kernel] [k] inet_gro_receive 2.08% [kernel] [k] tcp_gro_receive patch applied: 6.97% [kernel] [k] inet_gro_receive 3.68% [kernel] [k] tcp_gro_receive Signed-off-by: Richard Gobert --- include/net/gro.h | 66 ++ net

[PATCH net-next v8 1/3] net: gro: use cb instead of skb->network_header

2024-05-06 Thread Richard Gobert
This patch converts references of skb->network_header to napi_gro_cb's network_offset and inner_network_offset. Signed-off-by: Richard Gobert --- include/net/gro.h| 9 +++-- net/ipv4/af_inet.c | 4 net/ipv4/tcp_offload.c | 3 ++- net/ipv6/ip6_offload.c | 5 ++

[PATCH net-next v8 0/3] net: gro: remove network_header use, move p->{flush/flush_id} calculations to L4

2024-05-06 Thread Richard Gobert
.kernel.org/netdev/e1d22505-c5f8-4c02-a997-642484803...@gmail.com/ Richard Gobert (3): net: gro: use cb instead of skb->network_header net: gro: move L3 flush checks to tcp_gro_receive and udp_gro_receive_segment selftests/net: add flush id selftests include/net/gro.h | 75 +

Re: [PATCH net-next v7 1/3] net: gro: add {inner_}network_offset to napi_gro_cb

2024-04-18 Thread Richard Gobert
Paolo Abeni wrote: > On Fri, 2024-04-12 at 17:55 +0200, Richard Gobert wrote: >> This patch adds network_offset and inner_network_offset to napi_gro_cb, and >> makes sure both are set correctly. In the common path there's only one >> write (skb_gro_reset_offset). &g

Re: [PATCH net-next v7 2/3] net: gro: move L3 flush checks to tcp_gro_receive and udp_gro_receive_segment

2024-04-18 Thread Richard Gobert
Paolo Abeni wrote: > On Tue, 2024-04-16 at 11:21 +0200, Paolo Abeni wrote: >> On Fri, 2024-04-12 at 17:55 +0200, Richard Gobert wrote: >>> {inet,ipv6}_gro_receive functions perform flush checks (ttl, flags, >>> iph->id, ...) against all packets in a loo

Re: [PATCH net-next v7 3/3] selftests/net: add flush id selftests

2024-04-17 Thread Richard Gobert
Willem de Bruijn wrote: > Richard Gobert wrote: >> Added flush id selftests to test different cases where DF flag is set or >> unset and id value changes in the following packets. All cases where the >> packets should coalesce or should not coalesce are tested. >> >&

Re: [PATCH net-next v7 1/3] net: gro: add {inner_}network_offset to napi_gro_cb

2024-04-17 Thread Richard Gobert
Willem de Bruijn wrote: > Richard Gobert wrote: >> This patch adds network_offset and inner_network_offset to napi_gro_cb, and >> makes sure both are set correctly. In the common path there's only one >> write (skb_gro_reset_offset). >> >> Signed-off-by:

[PATCH net-next v7 3/3] selftests/net: add flush id selftests

2024-04-12 Thread Richard Gobert
Added flush id selftests to test different cases where DF flag is set or unset and id value changes in the following packets. All cases where the packets should coalesce or should not coalesce are tested. Signed-off-by: Richard Gobert --- tools/testing/selftests/net/gro.c | 144

[PATCH net-next v7 2/3] net: gro: move L3 flush checks to tcp_gro_receive and udp_gro_receive_segment

2024-04-12 Thread Richard Gobert
6.97% [kernel] [k] inet_gro_receive 3.68% [kernel] [k] tcp_gro_receive Signed-off-by: Richard Gobert --- include/net/gro.h | 66 ++ net/core/gro.c | 4 --- net/ipv4/af_inet.c | 41 +- net/ipv4/tcp_off

[PATCH net-next v7 1/3] net: gro: add {inner_}network_offset to napi_gro_cb

2024-04-12 Thread Richard Gobert
This patch adds network_offset and inner_network_offset to napi_gro_cb, and makes sure both are set correctly. In the common path there's only one write (skb_gro_reset_offset). Signed-off-by: Richard Gobert --- drivers/net/geneve.c | 1 + drivers/net/vxlan/vxlan_core.c

[PATCH net-next v7 0/3] net: gro: move p->{flush/flush_id} calculations to L4

2024-04-12 Thread Richard Gobert
ore.kernel.org/all/2ce1600b-e733-448b-91ac-9d0ae2b86...@gmail.com/ v1 -> v2: - Pass p_off in *_gro_complete to fix UDP bug - Remove more conditionals and memory fetches from inet_gro_flush - v1: https://lore.kernel.org/netdev/e1d22505-c5f8-4c02-a997-642484803...@gmail.com/ Richard Gobert

Re: [PATCH net-next v6 5/6] net: gro: move L3 flush checks to tcp_gro_receive and udp_gro_receive_segment

2024-04-12 Thread Richard Gobert
Willem de Bruijn wrote: > Richard Gobert wrote: >> Willem de Bruijn wrote: >>> Richard Gobert wrote: >>>> {inet,ipv6}_gro_receive functions perform flush checks (ttl, flags, >>>> iph->id, ...) against all packets in a loop. These flush checks are

Re: [PATCH net-next v6 5/6] net: gro: move L3 flush checks to tcp_gro_receive and udp_gro_receive_segment

2024-04-11 Thread Richard Gobert
Willem de Bruijn wrote: > Richard Gobert wrote: >> {inet,ipv6}_gro_receive functions perform flush checks (ttl, flags, >> iph->id, ...) against all packets in a loop. These flush checks are used >> currently only in tcp flows in GRO. >> >> These checks need to

Re: [PATCH net-next v6 2/6] net: gro: add p_off param in *_gro_complete

2024-04-11 Thread Richard Gobert
Willem de Bruijn wrote: > And the latter parse the network header for total_len/payload_len, to > find their original offset. > > It's also a bit of a hack. But a lot smaller patch, probably. While producing a smaller change - this is a bit of a hacky code change. My initial idea was to use netw

[PATCH net-next v6 6/6] selftests/net: add flush id selftests

2024-04-10 Thread Richard Gobert
Added flush id selftests to test different cases where DF flag is set or unset and id value changes in the following packets. All cases where the packets should coalesce or should not coalesce are tested. Signed-off-by: Richard Gobert --- tools/testing/selftests/net/gro.c | 144

[PATCH net-next v6 5/6] net: gro: move L3 flush checks to tcp_gro_receive and udp_gro_receive_segment

2024-04-10 Thread Richard Gobert
_receive is included because of -g, in this case GRO is just overhead) net-next: 1.26% [kernel] [k] inet_gro_receive patch applied: 0.85% [kernel] [k] inet_gro_receive Signed-off-by: Richard Gobert --- include/net/gro.h | 66 ++ net

[PATCH net-next v6 4/6] net: gro: add {inner_}network_offset to napi_gro_cb

2024-04-10 Thread Richard Gobert
This patch adds network_offset and inner_network_offset to napi_gro_cb, and makes sure both are set correctly. In the common path there's only one write (skb_gro_reset_offset). Signed-off-by: Richard Gobert --- drivers/net/geneve.c | 1 + drivers/net/vxlan/vxlan_core.c

[PATCH net-next v6 3/6] selftests/net: add local address bind in vxlan selftest

2024-04-10 Thread Richard Gobert
Add local address bind support to existing udpgro_fwd.sh vxlan selftest, to ensure UDP socket lookup in GRO is working. Signed-off-by: Richard Gobert --- tools/testing/selftests/net/udpgro_fwd.sh | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/testing

[PATCH net-next v6 2/6] net: gro: add p_off param in *_gro_complete

2024-04-10 Thread Richard Gobert
bytes bytes bytessecs.10^6bits/sec 131072 16384 163845.01 2877.38 Fixes: 57c67ff4bd92 ("udp: additional GRO support") Suggested-by: Eric Dumazet Signed-off-by: Richard Gobert --- drivers/net/geneve.c | 7 --- drivers/net/vxlan/vxlan_core.c |

[PATCH net-next v6 1/6] net: gro: add flush check in udp_gro_receive_segment

2024-04-10 Thread Richard Gobert
plain (non-fraglisted) UDP GRO packets") Signed-off-by: Richard Gobert --- net/ipv4/udp_offload.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c index 3498dd1d0694..1f4e08f43c4b 100644 --- a/net/ipv4/udp_offlo

[PATCH net-next v6 0/6] net: gro: encapsulation bug fix and flush checks improvements

2024-04-10 Thread Richard Gobert
.kernel.org/netdev/e1d22505-c5f8-4c02-a997-642484803...@gmail.com/ Richard Gobert (6): net: gro: add flush check in udp_gro_receive_segment net: gro: add p_off param in *_gro_complete selftests/net: add local address bind in vxlan selftest net: gro: add {inner_}network_offset to napi_gro_cb

Re: [PATCH net-next v5 4/6] net: gro: add {inner_}network_offset to napi_gro_cb

2024-04-10 Thread Richard Gobert
Willem de Bruijn wrote: > Richard Gobert wrote: >> This patch adds network_offset and inner_network_offset to napi_gro_cb, and >> makes sure both are set correctly. In the common path there's only one >> write (skb_gro_reset_offset). >> >> Signed-off-by:

Re: [PATCH net-next v4 4/4] net: gro: move L3 flush checks to tcp_gro_receive

2024-03-27 Thread Richard Gobert
Paolo Abeni wrote: > On Tue, 2024-03-26 at 18:25 +0100, Richard Gobert wrote: >> Paolo Abeni wrote: >>> Hi, >>> >>> On Tue, 2024-03-26 at 16:02 +0100, Richard Gobert wrote: >>>> This patch is meaningful by itself - removing checks against non-rel

Re: [PATCH net-next v4 4/4] net: gro: move L3 flush checks to tcp_gro_receive

2024-03-26 Thread Richard Gobert
Paolo Abeni wrote: > Hi, > > On Tue, 2024-03-26 at 16:02 +0100, Richard Gobert wrote: >> This patch is meaningful by itself - removing checks against non-relevant >> packets and making the flush/flush_id checks in a single place. > > I'm personally not sure this p

Re: [PATCH net-next v4 4/4] net: gro: move L3 flush checks to tcp_gro_receive

2024-03-26 Thread Richard Gobert
Willem de Bruijn wrote:> One issue: if the do this move in net/next, then a later fix that > relies on it cannot be backporter to older stable kernels. > I understand. I can either add a first commit to this series which fixes the bug by checking ->flush and ->flush_id in udp_gro_receive_segment

Re: [PATCH net-next v4 4/4] net: gro: move L3 flush checks to tcp_gro_receive

2024-03-26 Thread Richard Gobert
Eric Dumazet wrote: > > I do not understand this patch 4/4 then. > > Why bother moving stuff in net/ipv4/tcp_offload.c if we plan to move > it back to where it belongs ? Willem also pointed that out, and I agree. I'll post a v5 and move this functionality to gro.c. Currently, gro_network_flush w

Re: [PATCH net-next v4 4/4] net: gro: move L3 flush checks to tcp_gro_receive

2024-03-26 Thread Richard Gobert
Eric Dumazet wrote: > On Mon, Mar 25, 2024 at 7:27 PM Richard Gobert > wrote: >> >> {inet,ipv6}_gro_receive functions perform flush checks (ttl, flags, >> iph->id, ...) against all packets in a loop. These flush checks are used >> currently only in tcp flows i

Re: [PATCH net-next v4 4/4] net: gro: move L3 flush checks to tcp_gro_receive

2024-03-26 Thread Richard Gobert
Willem de Bruijn wrote: > My main concern is moving this code to tcp_offload.c, if it likely > soon will be moved elsewhere again. Got it. I'll move these functions to gro.c and post a v5 with Jakub's requests as well.

Re: [PATCH net-next v4 4/4] net: gro: move L3 flush checks to tcp_gro_receive

2024-03-26 Thread Richard Gobert
Willem de Bruijn wrote: > In v3 we discussed how the flush on network layer differences (like > TTL or ToS) currently only affect the TCP GRO path, but should apply > more broadly. > > We agreed that it is fine to leave that to a separate patch series. > > But seeing this patch, it introduces a l

Re: [PATCH net-next v3 4/4] net: gro: move L3 flush checks to tcp_gro_receive

2024-03-11 Thread Richard Gobert
Willem de Bruijn wrote: > Richard Gobert wrote: >> Eric Dumazet wrote: >>> On Sat, Mar 9, 2024 at 4:35 PM Richard Gobert >>> wrote: >>>> >>>> {inet,ipv6}_gro_receive functions perform flush checks (ttl, flags, >>>> iph->id, ...) a

Re: [PATCH net-next v3 4/4] net: gro: move L3 flush checks to tcp_gro_receive

2024-03-11 Thread Richard Gobert
Willem de Bruijn wrote: > Richard Gobert wrote: >> {inet,ipv6}_gro_receive functions perform flush checks (ttl, flags, >> iph->id, ...) against all packets in a loop. These flush checks are >> relevant only to tcp flows, and as such they're used to determine whether

Re: [PATCH net-next v3 4/4] net: gro: move L3 flush checks to tcp_gro_receive

2024-03-11 Thread Richard Gobert
Eric Dumazet wrote: > On Sat, Mar 9, 2024 at 4:35 PM Richard Gobert > wrote: >> >> {inet,ipv6}_gro_receive functions perform flush checks (ttl, flags, >> iph->id, ...) against all packets in a loop. These flush checks are >> relevant only to tcp flows, and

[PATCH net-next v3 4/4] net: gro: move L3 flush checks to tcp_gro_receive

2024-03-09 Thread Richard Gobert
6% [kernel] [k] inet_gro_receive patch applied: 0.85% [kernel] [k] inet_gro_receive udpgro_bench.sh single connection GRO improvement: net-next: 0.76% [kernel] [k] inet_gro_receive patch applied: 0.61% [kernel] [k] inet_gro_receive Signed-off-by: Richard Gobert --- includ

[PATCH net-next v3 3/4] net: gro: add {inner_}network_offset to napi_gro_cb

2024-03-09 Thread Richard Gobert
This patch adds network_offset and inner_network_offset to napi_gro_cb, and makes sure both are set correctly. In the common path there's only one write (skb_gro_reset_offset). Signed-off-by: Richard Gobert --- include/net/gro.h | 18 -- net/8021q/vlan_core.c | 2 ++

[PATCH net-next v3 2/4] selftests/net: add local address bind in vxlan selftest

2024-03-09 Thread Richard Gobert
Add local address bind support to existing udpgro_fwd.sh vxlan selftest, to ensure UDP socket lookup in GRO is working. Signed-off-by: Richard Gobert --- tools/testing/selftests/net/udpgro_fwd.sh | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/testing

[PATCH net-next v3 1/4] net: gro: add p_off param in *_gro_complete

2024-03-09 Thread Richard Gobert
bytes bytes bytessecs.10^6bits/sec 131072 16384 163845.01 2877.38 Fixes: 57c67ff4bd92 ("udp: additional GRO support") Suggested-by: Eric Dumazet Signed-off-by: Richard Gobert --- drivers/net/geneve.c | 7 --- drivers/net/vxlan/vxlan_core.c |

[PATCH net-next v3 0/4] net: gro: encapsulation bug fix and flush checks improvements

2024-03-09 Thread Richard Gobert
el.org/netdev/2ce1600b-e733-448b-91ac-9d0ae2b86...@gmail.com/ v1 -> v2: - Pass p_off in *_gro_complete to fix UDP bug - Remove more conditionals and memory fetches from inet_gro_flush - v1: https://lore.kernel.org/netdev/e1d22505-c5f8-4c02-a997-642484803...@gmail.com/ Richard Gobert (4):

Re: [PATCH net-next v2 3/4] net: gro: set inner_network_header in receive phase

2024-03-09 Thread Richard Gobert
Eric Dumazet wrote: > On Thu, Mar 7, 2024 at 2:28 PM Richard Gobert > wrote: >> >> This patch sets network_header and inner_network_header to their respective >> values during the receive phase of GRO. This allows us to use >> inner_network_header later on in GRO.

[PATCH net-next v2 4/4] net: gro: move L3 flush checks to tcp_gro_receive

2024-03-07 Thread Richard Gobert
6% [kernel] [k] inet_gro_receive patch applied: 0.85% [kernel] [k] inet_gro_receive udpgro_bench.sh single connection GRO improvement: net-next: 0.76% [kernel] [k] inet_gro_receive patch applied: 0.61% [kernel] [k] inet_gro_receive Signed-off-by: Richard Gobert --- includ

[PATCH net-next v2 3/4] net: gro: set inner_network_header in receive phase

2024-03-07 Thread Richard Gobert
: Richard Gobert --- include/net/gro.h | 13 +++-- net/8021q/vlan_core.c | 5 + net/ethernet/eth.c | 1 + net/ipv4/af_inet.c | 9 ++--- net/ipv4/gre_offload.c | 1 + net/ipv6/ip6_offload.c | 12 +--- 6 files changed, 25 insertions(+), 16 deletions(-) diff --git

[PATCH net-next v2 2/4] selftests/net: add local address bind in vxlan selftest

2024-03-07 Thread Richard Gobert
Add local address bind support to existing udpgro_fwd.sh vxlan selftest, to ensure UDP socket lookup in GRO is working. Signed-off-by: Richard Gobert --- tools/testing/selftests/net/udpgro_fwd.sh | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/testing

[PATCH net-next v2 1/4] net: gro: add p_off param in *_gro_complete

2024-03-07 Thread Richard Gobert
bytes bytes bytessecs.10^6bits/sec 131072 16384 163845.01 2877.38 Fixes: 57c67ff4bd92 ("udp: additional GRO support") Suggested-by: Eric Dumazet Signed-off-by: Richard Gobert --- drivers/net/geneve.c | 7 --- drivers/net/vxlan/vxlan_core.c |

[PATCH net-next v2 0/4] net: gro: encapsulation bug fix and flush checks improvements

2024-03-07 Thread Richard Gobert
org/netdev/e1d22505-c5f8-4c02-a997-642484803...@gmail.com/ Richard Gobert (4): net: gro: add p_off param in *_gro_complete selftests/net: add local address bind in vxlan selftest net: gro: set inner_network_header in receive phase net: gro: move L3 flush checks to tcp_gro_receive drivers/

Re: [PATCH net-next 1/3] net: gro: set {inner_,}network_header in receive phase

2024-03-01 Thread Richard Gobert
Eric Dumazet wrote: > On Thu, Feb 29, 2024 at 2:22 PM Richard Gobert > wrote: >> >> >> >> Eric Dumazet wrote: >>> >>> My intuition is that this patch has a high cost for normal GRO processing. >>> SW-GRO is already a bottleneck on ARM c

Re: [PATCH net-next 1/3] net: gro: set {inner_,}network_header in receive phase

2024-02-29 Thread Richard Gobert
Eric Dumazet wrote: > > My intuition is that this patch has a high cost for normal GRO processing. > SW-GRO is already a bottleneck on ARM cores in smart NICS. > > I would suggest instead using parameters to give both the nhoff and thoff > values > this would avoid many conditionals in the fa

[PATCH net-next 3/3] net: gro: move L3 flush checks to tcp_gro_receive

2024-02-22 Thread Richard Gobert
% [kernel] [k] inet_gro_receive Signed-off-by: Richard Gobert --- include/net/gro.h | 9 ++ net/core/gro.c | 3 -- net/ipv4/af_inet.c | 36 - net/ipv4/tcp_offload.c | 71 ++ net/ipv6/ip6_offload.c |

[PATCH net-next 2/3] selftests/net: add local address bind in vxlan selftest

2024-02-22 Thread Richard Gobert
Add local address bind support to existing udpgro_fwd.sh vxlan selftest, to ensure UDP socket lookup in GRO is working. Signed-off-by: Richard Gobert --- tools/testing/selftests/net/udpgro_fwd.sh | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/testing

[PATCH net-next 1/3] net: gro: set {inner_,}network_header in receive phase

2024-02-22 Thread Richard Gobert
r_network_header offset during the GRO complete phase, depending on skb->encapsulation. Fixes: 57c67ff4bd92 ("udp: additional GRO support") Signed-off-by: Richard Gobert --- include/net/gro.h| 14 +- net/8021q/vlan_core.c| 3 +++ net/ipv4/af_inet.c | 8 +

[PATCH net-next 0/3] net: gro: encapsulation bug fix and flush checks improvements

2024-02-22 Thread Richard Gobert
://lore.kernel.org/netdev/df300a49-7811-4126-a56a-a77100c88...@gmail.com/). Richard Gobert (3): net: gro: set {inner_,}network_header in receive phase selftests/net: add local address bind in vxlan selftest net: gro: move L3 flush checks to tcp_gro_receive include/net/gro.h

[PATCH net-next v3 3/3] selftests/net: fix GRO coalesce test and add ext header coalesce tests

2024-01-03 Thread Richard Gobert
. I changed the receive socket filter to accept a packet with one extension header. This change exposed a bug in the fragment test -- the old BPF did not accept the fragment packet. I updated correct_num_packets in the fragment test accordingly. Signed-off-by: Richard Gobert Reviewed-by: Willem de

[PATCH net-next v3 2/3] net: gro: parse ipv6 ext headers without frag0 invalidation

2024-01-03 Thread Richard Gobert
kets with ext headers. Signed-off-by: Richard Gobert Reviewed-by: Willem de Bruijn Reviewed-by: David Ahern --- net/ipv6/ip6_offload.c | 51 +- 1 file changed, 41 insertions(+), 10 deletions(-) diff --git a/net/ipv6/ip6_offload.c b/net/ipv6/ip6_offloa

[PATCH net-next v3 1/3] net: gso: add HBH extension header offload support

2024-01-03 Thread Richard Gobert
This commit adds net_offload to IPv6 Hop-by-Hop extension headers (as it is done for routing and dstopts) since it is supported in GSO and GRO. This allows to remove specific HBH conditionals in GSO and GRO when pulling and parsing an incoming packet. Signed-off-by: Richard Gobert Reviewed-by

[PATCH net-next v3 0/3] net: gro: reduce extension header parsing overhead

2024-01-03 Thread Richard Gobert
header payloads do not coalesce. - Added more info in the second commit message regarding the code changes. - v1: https://lore.kernel.org/netdev/f4eff69d-3917-4c42-8c6b-d09597ac4...@gmail.com/ Richard Gobert (3): net: gso: add HBH extension header offload support net: gro: parse ipv6 ext h

Re: [PATCH net-next v2 2/3] net: gro: parse ipv6 ext headers without frag0 invalidation

2024-01-03 Thread Richard Gobert
Eric Dumazet wrote: > > > Hmm... I was looking at > > skb_checksum_setup_ipv6() , it uses skb_maybe_pull_tail( ... > sizeof(struct ipv6_opt_hdr)) > ipv6_skip_exthdr() also uses sizeof(struct ipv6_opt_hdr) > ip6_tnl_parse_tlv_enc_lim also uses the same. > hbh_mt6(), ipv6header_mt6(), .. same..

Re: [PATCH net-next v2 2/3] net: gro: parse ipv6 ext headers without frag0 invalidation

2024-01-03 Thread Richard Gobert
Eric Dumazet wrote: > On Tue, Jan 2, 2024 at 2:25 PM Richard Gobert > wrote: >> >> The existing code always pulls the IPv6 header and sets the transport >> offset initially. Then optionally again pulls any extension headers in >> ipv6_gso_pull_exthdrs and sets

[PATCH net-next v2 3/3] selftests/net: fix GRO coalesce test and add ext header coalesce tests

2024-01-02 Thread Richard Gobert
. I changed the receive socket filter to accept a packet with one extension header. This change exposed a bug in the fragment test -- the old BPF did not accept the fragment packet. I updated correct_num_packets in the fragment test accordingly. Signed-off-by: Richard Gobert --- tools/testing

[PATCH net-next v2 2/3] net: gro: parse ipv6 ext headers without frag0 invalidation

2024-01-02 Thread Richard Gobert
kets with ext headers. Signed-off-by: Richard Gobert Reviewed-by: Willem de Bruijn --- include/net/ipv6.h | 1 + net/ipv6/ip6_offload.c | 51 +- 2 files changed, 42 insertions(+), 10 deletions(-) diff --git a/include/net/ipv6.h b/include/net/ipv

[PATCH net-next v2 1/3] net: gso: add HBH extension header offload support

2024-01-02 Thread Richard Gobert
This commit adds net_offload to IPv6 Hop-by-Hop extension headers (as it is done for routing and dstopts) since it is supported in GSO and GRO. This allows to remove specific HBH conditionals in GSO and GRO when pulling and parsing an incoming packet. Signed-off-by: Richard Gobert Reviewed-by

[PATCH net-next v2 0/3] net: gro: reduce extension header parsing overhead

2024-01-02 Thread Richard Gobert
ith different extension header payloads do not coalesce. - Added more info in the second commit message regarding the code changes. - v1: https://lore.kernel.org/netdev/f4eff69d-3917-4c42-8c6b-d09597ac4...@gmail.com/ Richard Gobert (3): net: gso: add HBH extension header offload supp

Re: [PATCH net-next 3/3] selftests/net: fix GRO coalesce test and add ext

2023-12-28 Thread Richard Gobert
Willem de Bruijn wrote: > Richard Gobert wrote: >> Currently there is no test which checks that IPv6 extension header packets >> successfully coalesce. This commit adds a test, which verifies two IPv6 >> packets with HBH extension headers do coalesce. >> >> I

Re: [PATCH net-next 2/3] net: gro: parse ipv6 ext headers without frag0

2023-12-28 Thread Richard Gobert
Willem de Bruijn wrote: > Richard Gobert wrote: >> This commit utilizes a new helper function, ipv6_gro_pull_exthdrs, which >> is used in ipv6_gro_receive to pull ipv6 ext headers instead of >> ipv6_gso_pull_exthdrs. To use ipv6_gso_pull_exthdr, pskb_pull and >> _

[PATCH net-next 3/3] selftests/net: fix GRO coalesce test and add ext

2023-12-21 Thread Richard Gobert
a bug in the fragment test -- the old BPF did not accept the fragment packet. I updated correct_num_packets in the fragment test accordingly. Signed-off-by: Richard Gobert --- tools/testing/selftests/net/gro.c | 78 --- 1 file changed, 71 insertions(+), 7 deletions

[PATCH net-next 2/3] net: gro: parse ipv6 ext headers without frag0

2023-12-21 Thread Richard Gobert
around the call to ipv6_gso_pull_exthdrs and enables the frag0 fast path in IPv6 packets with ext headers. Signed-off-by: Richard Gobert --- net/ipv6/ip6_offload.c | 51 +- 1 file changed, 41 insertions(+), 10 deletions(-) diff --git a/net/ipv6/ip6_offload.c

[PATCH net-next 1/3] net: gso: add HBH extension header offload support

2023-12-21 Thread Richard Gobert
This commit adds net_offload to IPv6 Hop-by-Hop extension headers (as it is done for routing and dstopts) since it is supported in GSO and GRO. This allows to remove specific HBH conditionals in GSO and GRO when pulling and parsing an incoming packet. Signed-off-by: Richard Gobert --- net/ipv6

[PATCH net-next 0/3] net: gro: reduce extension header parsing overhead

2023-12-21 Thread Richard Gobert
- Added a utility function to support frag0 fast path in ipv6_gro_receive - Added self-test for IPv6 packets with extension headers in GRO Richard Richard Gobert (3): net: gso: add HBH extension header offload support net: gro: parse ipv6 ext headers without frag0 invalidation selftests/net