* Re: [PATCH v3] net: fix wrong network header length [not found] <20220216073055.22642-1-lina.wang@mediatek.com> @ 2022-02-17 3:05 ` Alexei Starovoitov [not found] ` <20220217070139.30028-1-lina.wang@mediatek.com> 0 siblings, 1 reply; 3+ messages in thread From: Alexei Starovoitov @ 2022-02-17 3:05 UTC (permalink / raw) To: Lina Wang Cc: David S . Miller, Jakub Kicinski, Matthias Brugger, Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko, Network Development, LKML, linux-arm-kernel, linux-mediatek, bpf, Maciej Żenczykowski, Willem de Bruijn, Eric Dumazet On Tue, Feb 15, 2022 at 11:37 PM Lina Wang <lina.wang@mediatek.com> wrote: > > When clatd starts with ebpf offloaing, and NETIF_F_GRO_FRAGLIST is enable, > several skbs are gathered in skb_shinfo(skb)->frag_list. The first skb's > ipv6 header will be changed to ipv4 after bpf_skb_proto_6_to_4, > network_header\transport_header\mac_header have been updated as ipv4 acts, > but other skbs in frag_list didnot update anything, just ipv6 packets. Please add a test that demonstrates the issue and verifies the fix. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <20220217070139.30028-1-lina.wang@mediatek.com>]
* Re: [PATCH v3] net: fix wrong network header length [not found] ` <20220217070139.30028-1-lina.wang@mediatek.com> @ 2022-02-17 8:45 ` Paolo Abeni 2022-02-17 17:05 ` Alexei Starovoitov 0 siblings, 1 reply; 3+ messages in thread From: Paolo Abeni @ 2022-02-17 8:45 UTC (permalink / raw) To: Lina Wang, David S . Miller, Jakub Kicinski, Matthias Brugger, Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko Cc: Network Development, LKML, linux-arm-kernel, bpf, Maciej Żenczykowski, Willem de Bruijn, Eric Dumazet Hello, On Thu, 2022-02-17 at 15:01 +0800, Lina Wang wrote: > On Wed, 2022-02-16 at 19:05 -0800, Alexei Starovoitov wrote: > > On Tue, Feb 15, 2022 at 11:37 PM Lina Wang <lina.wang@mediatek.com> > > wrote: > > > > > > When clatd starts with ebpf offloaing, and NETIF_F_GRO_FRAGLIST is > > > enable, > > > several skbs are gathered in skb_shinfo(skb)->frag_list. The first > > > skb's > > > ipv6 header will be changed to ipv4 after bpf_skb_proto_6_to_4, > > > network_header\transport_header\mac_header have been updated as > > > ipv4 acts, > > > but other skbs in frag_list didnot update anything, just ipv6 > > > packets. > > > > Please add a test that demonstrates the issue and verifies the fix. > > I used iperf udp test to verify the patch, server peer enabled -d to debug > received packets. > > 192.0.0.4 is clatd interface ip, corresponding ipv6 addr is > 2000:1:1:1:afca:1b1f:1a9:b367, server peer ip is 1.1.1.1, > whose ipv6 is 2004:1:1:1::101:101. > > Without the patch, when udp length 2840 packets received, iperf shows: > pcount 1 packet_count 0 > pcount 27898727 packet_count 1 > pcount 3 packet_count 27898727 > > pcount should be 2, but is 27898727(0x1a9b367) , which is 20 bytes put > forward. > > 12:08:02.680299 Unicast to us 2004:1:1:1::101:101 2000:1:1:1:afca:1b1f:1a9:b367 UDP 51196 → 5201 Len=2840 > 0000 20 00 00 01 00 01 00 01 af ca 1b 1f 01 a9 b3 67 ipv6 dst address > 0000 c7 fc 14 51 0b 20 c7 ab udp header > 0000 00 00 00 ab 00 0e f3 49 00 00 00 01 08 06 69 d2 00000001 is pcount > 12:08:02.682084 Unicast to us 1.1.1.1 192.0.0.4 UDP 51196 → 5201 Len=2840 > > After applied the patch, there is no OOO, pcount acted in order. To clarify: Alexei is asking to add a test under: tools/testing/selftests/net/ to cover this specific case. You can propbably extend the existing udpgro_fwd.sh. Please explicitly CC people who gave feedback to previous iterations, it makes easier to track the discussion. /P _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3] net: fix wrong network header length 2022-02-17 8:45 ` Paolo Abeni @ 2022-02-17 17:05 ` Alexei Starovoitov 0 siblings, 0 replies; 3+ messages in thread From: Alexei Starovoitov @ 2022-02-17 17:05 UTC (permalink / raw) To: Paolo Abeni Cc: Lina Wang, David S . Miller, Jakub Kicinski, Matthias Brugger, Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko, Network Development, LKML, linux-arm-kernel, bpf, Maciej Żenczykowski, Willem de Bruijn, Eric Dumazet On Thu, Feb 17, 2022 at 12:45 AM Paolo Abeni <pabeni@redhat.com> wrote: > > Hello, > > On Thu, 2022-02-17 at 15:01 +0800, Lina Wang wrote: > > On Wed, 2022-02-16 at 19:05 -0800, Alexei Starovoitov wrote: > > > On Tue, Feb 15, 2022 at 11:37 PM Lina Wang <lina.wang@mediatek.com> > > > wrote: > > > > > > > > When clatd starts with ebpf offloaing, and NETIF_F_GRO_FRAGLIST is > > > > enable, > > > > several skbs are gathered in skb_shinfo(skb)->frag_list. The first > > > > skb's > > > > ipv6 header will be changed to ipv4 after bpf_skb_proto_6_to_4, > > > > network_header\transport_header\mac_header have been updated as > > > > ipv4 acts, > > > > but other skbs in frag_list didnot update anything, just ipv6 > > > > packets. > > > > > > Please add a test that demonstrates the issue and verifies the fix. > > > > I used iperf udp test to verify the patch, server peer enabled -d to debug > > received packets. > > > > 192.0.0.4 is clatd interface ip, corresponding ipv6 addr is > > 2000:1:1:1:afca:1b1f:1a9:b367, server peer ip is 1.1.1.1, > > whose ipv6 is 2004:1:1:1::101:101. > > > > Without the patch, when udp length 2840 packets received, iperf shows: > > pcount 1 packet_count 0 > > pcount 27898727 packet_count 1 > > pcount 3 packet_count 27898727 > > > > pcount should be 2, but is 27898727(0x1a9b367) , which is 20 bytes put > > forward. > > > > 12:08:02.680299 Unicast to us 2004:1:1:1::101:101 2000:1:1:1:afca:1b1f:1a9:b367 UDP 51196 → 5201 Len=2840 > > 0000 20 00 00 01 00 01 00 01 af ca 1b 1f 01 a9 b3 67 ipv6 dst address > > 0000 c7 fc 14 51 0b 20 c7 ab udp header > > 0000 00 00 00 ab 00 0e f3 49 00 00 00 01 08 06 69 d2 00000001 is pcount > > 12:08:02.682084 Unicast to us 1.1.1.1 192.0.0.4 UDP 51196 → 5201 Len=2840 > > > > After applied the patch, there is no OOO, pcount acted in order. > > To clarify: Alexei is asking to add a test under: > > tools/testing/selftests/net/ > > to cover this specific case. You can propbably extend the existing > udpgro_fwd.sh. Exactly. I suspect the setup needs a bit more than just iperf udp test. Does it need a specific driver and hw? Can it be reproduced with veth or other virtual netdev? Also commit talks about bpf_skb_proto_6_to_4. So that bpf helper has to be somehow involved, but iperf udp test says nothing about it. Please craft a _complete_ selftest. > Please explicitly CC people who gave feedback to previous iterations, > it makes easier to track the discussion. > > /P > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-02-17 17:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20220216073055.22642-1-lina.wang@mediatek.com>
2022-02-17 3:05 ` [PATCH v3] net: fix wrong network header length Alexei Starovoitov
[not found] ` <20220217070139.30028-1-lina.wang@mediatek.com>
2022-02-17 8:45 ` Paolo Abeni
2022-02-17 17:05 ` Alexei Starovoitov
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).