Skip to contentSkip to conversation

ip6_gre: use skb_vlan_inet_prepare() instead of pskb_inet_may_pull()

PATCH In review Eric Dumazet 4 participants 11 messages Jan 6 – Jan 12

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ip6_gre: use skb_vlan_inet_prepare() instead of pskb_inet_may_pull()

I added skb_vlan_inet_prepare() helper in the cited commit, hinting that we would need to use it more broadly.

syzbot confirmed this was the case in ip6_gre.

uninit-value in ip6table_mangle_hook+0x97d/0x9c0 net/ipv6/netfilter/ip6table_mangle.c:72

 ip6t_mangle_out net/ipv6/netfilter/ip6table_mangle.c:56 [inline]
 ip6table_mangle_hook+0x97d/0x9c0 net/ipv6/netfilter/ip6table_mangle.c:72
 nf_hook_entry_hookfn include/linux/netfilter.h:154 [inline]
 nf_hook_slow+0xf4/0x400 net/netfilter/core.c:626
 nf_hook include/linux/netfilter.h:269 [inline]
 __ip6_local_out+0x5ac/0x640 net/ipv6/output_core.c:143
 ip6_local_out+0x4c/0x210 net/ipv6/output_core.c:153
 ip6tunnel_xmit+0x129/0x460 include/net/ip6_tunnel.h:161
 ip6_tnl_xmit+0x341a/0x3860 net/ipv6/ip6_tunnel.c:1281

Uninit was stored to memory at:

 ip6_tnl_xmit+0x34f7/0x3860 net/ipv6/ip6_tunnel.c:1277
 __gre6_xmit+0x14b9/0x1550 net/ipv6/ip6_gre.c:815
 ip6gre_xmit_ipv4 net/ipv6/ip6_gre.c:839 [inline]
 ip6gre_tunnel_xmit+0x18f7/0x2030 net/ipv6/ip6_gre.c:922

Uninit was created at:

 slab_post_alloc_hook mm/slub.c:4091 [inline]
 slab_alloc_node mm/slub.c:4134 [inline]
 __do_kmalloc_node mm/slub.c:4263 [inline]
 __kmalloc_node_track_caller_noprof+0x6c7/0xf90 mm/slub.c:4283
 kmalloc_reserve+0x23e/0x4a0 net/core/skbuff.c:609
 pskb_expand_head+0x226/0x1a60 net/core/skbuff.c:2275
 skb_realloc_headroom+0x140/0x2b0 net/core/skbuff.c:2355
 ip6_tnl_xmit+0x2106/0x3860 net/ipv6/ip6_tunnel.c:1227
 __gre6_xmit+0x14b9/0x1550 net/ipv6/ip6_gre.c:815
 ip6gre_xmit_ipv4 net/ipv6/ip6_gre.c:839 [inline]
 ip6gre_tunnel_xmit+0x18f7/0x2030 net/ipv6/ip6_gre.c:922
Fixes d8a6213d70ac ("geneve: fix header validation in geneve[6]_xmit_skb")
Reported-by [email protected]
Cc Mazin Al Haddad <[email protected]>

---
v2: invert the conditions (Jakub)
v1: https://lore.kernel.org/netdev/CANn89iK6uqJ8YEvzcz-EsS1piyay7hTdbC=S_z-Feho9YBeN_g@mail.gmail.com/T/#t

 net/ipv6/ip6_gre.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
net/ipv6/ip6_gre.c +2 -2
index d19d86ed43766bbc8ec052113be02ab231a5272c..ca1571c63f40f90dd4fd53b526b6c481087f8320 100644
@@ -881,7 +881,7 @@ static netdev_tx_t ip6gre_tunnel_xmit(struct sk_buff *skb,
 	__be16 payload_protocol;
 	int ret;
 
-	if (!pskb_inet_may_pull(skb))
+	if (skb_vlan_inet_prepare(skb, false))
 		goto tx_err;
 
 	if (!ip6_tnl_xmit_ctl(t, &t->parms.laddr, &t->parms.raddr))
@@ -929,7 +929,7 @@ static netdev_tx_t ip6erspan_tunnel_xmit(struct sk_buff *skb,
 	__u32 mtu;
 	int nhoff;
 
-	if (!pskb_inet_may_pull(skb))
+	if (skb_vlan_inet_prepare(skb, false))
 		goto tx_err;
 
 	if (!ip6_tnl_xmit_ctl(t, &t->parms.laddr, &t->parms.raddr))
Signature · 1 line
2.52.0.351.gbe84eed79e-goog
maintainer
#1 lore raw
Quoted 1 line · On Tue, 6 Jan 2026 14:45:29 +0000 Eric Dumazet wrote:

v2: invert the conditions (Jakub)

Thanks! Much better now, but still failing
tools/testing/selftests/net/gre_gso.sh

TAP version 13
1..1

# timeout set to 3600
# selftests: net: gre_gso.sh
# 2.16 [+2.16]     TEST: GREv6/v4 - copy file w/ TSO                                   [ OK ]
# 3.16 [+1.01] 2026/01/06 10:32:57 socat[20546] W exiting on signal 15
# 3.17 [+0.01] 2026/01/06 10:32:57 socat[20546] W exiting on signal 15
# 3.17 [+0.00]     TEST: GREv6/v4 - copy file w/ GSO                                   [FAIL]
# 3.18 [+0.01] 2026/01/06 10:32:57 socat[20533] W exiting on signal 15
# 3.19 [+0.00]     TEST: GREv6/v6 - copy file w/ TSO                                   [ OK ]
# 4.19 [+1.00] 2026/01/06 10:32:59 socat[20559] W exiting on signal 15
# 4.19 [+0.01]     TEST: GREv6/v6 - copy file w/ GSO                                   [FAIL]
# 4.20 [+0.01] 2026/01/06 10:32:59 socat[20549] W exiting on signal 15
# 4.22 [+0.02] 2026/01/06 10:32:59 socat[20560] W exiting on signal 15
# 4.23 [+0.01] 
# 4.23 [+0.00] Tests passed:   2
# 4.23 [+0.00] Tests failed:   2
not ok 1 selftests: net: gre_gso.sh # exit=1

https://netdev-ctrl.bots.linux.dev/logs/vmksft/net/results/461862/65-gre-gso-sh/stdout

#2 lore raw
Quoted 26 lines · Jakub Kicinski
Quoted 1 line · On Tue, 6 Jan 2026 14:45:29 +0000 Eric Dumazet wrote:

v2: invert the conditions (Jakub)

Thanks! Much better now, but still failing
tools/testing/selftests/net/gre_gso.sh

TAP version 13
1..1

# timeout set to 3600
# selftests: net: gre_gso.sh
# 2.16 [+2.16]     TEST: GREv6/v4 - copy file w/ TSO                                   [ OK ]
# 3.16 [+1.01] 2026/01/06 10:32:57 socat[20546] W exiting on signal 15
# 3.17 [+0.01] 2026/01/06 10:32:57 socat[20546] W exiting on signal 15
# 3.17 [+0.00]     TEST: GREv6/v4 - copy file w/ GSO                                   [FAIL]
# 3.18 [+0.01] 2026/01/06 10:32:57 socat[20533] W exiting on signal 15
# 3.19 [+0.00]     TEST: GREv6/v6 - copy file w/ TSO                                   [ OK ]
# 4.19 [+1.00] 2026/01/06 10:32:59 socat[20559] W exiting on signal 15
# 4.19 [+0.01]     TEST: GREv6/v6 - copy file w/ GSO                                   [FAIL]
# 4.20 [+0.01] 2026/01/06 10:32:59 socat[20549] W exiting on signal 15
# 4.22 [+0.02] 2026/01/06 10:32:59 socat[20560] W exiting on signal 15
# 4.23 [+0.01]
# 4.23 [+0.00] Tests passed:   2
# 4.23 [+0.00] Tests failed:   2
not ok 1 selftests: net: gre_gso.sh # exit=1
Quoted 1 line

https://netdev-ctrl.bots.linux.dev/logs/vmksft/net/results/461862/65-gre-gso-sh/stdout

For some reason I am unable to run this test from a virtme-ng instance.

I guess I wlll not make a new version of this patch, maybe Florian can take over.

maintainer
#3 lore raw
Quoted 4 lines · On Tue, 6 Jan 2026 20:33:40 +0100 Eric Dumazet wrote:

For some reason I am unable to run this test from a virtme-ng instance.

I guess I wlll not make a new version of this patch, maybe Florian can take over.

Hm, no complications seen here:

$ vng -r --user root
..
prompt# cd tools/testing/selftests/net/
prompt# ./gre_gso.sh 

TEST: GREv6/v4 - copy file w/ TSO [ OK ]
TEST: GREv6/v4 - copy file w/ GSO [ OK ]
2026/01/06 15:30:35 socat[1704] W exiting on signal 15
TEST: GREv6/v6 - copy file w/ TSO [ OK ]
TEST: GREv6/v6 - copy file w/ GSO [ OK ]
2026/01/06 15:30:35 socat[1721] W exiting on signal 15

Tests passed:   4
Tests failed:   0

Happy to give you access to the netdev machine to experiment there if that helps, just send me an SSH key.

#4 lore raw
Quoted 21 lines · Jakub Kicinski
Quoted 4 lines · On Tue, 6 Jan 2026 20:33:40 +0100 Eric Dumazet wrote:

For some reason I am unable to run this test from a virtme-ng instance.

I guess I wlll not make a new version of this patch, maybe Florian can take over.

Hm, no complications seen here:

$ vng -r --user root
..
prompt# cd tools/testing/selftests/net/
prompt# ./gre_gso.sh

TEST: GREv6/v4 - copy file w/ TSO [ OK ]
TEST: GREv6/v4 - copy file w/ GSO [ OK ]
2026/01/06 15:30:35 socat[1704] W exiting on signal 15
TEST: GREv6/v6 - copy file w/ TSO [ OK ]
TEST: GREv6/v6 - copy file w/ GSO [ OK ]
2026/01/06 15:30:35 socat[1721] W exiting on signal 15

Quoted 6 lines
Tests passed:   4
Tests failed:   0

Happy to give you access to the netdev machine to experiment there if that helps, just send me an SSH key.

My vng launch script had the -v option ( --verbose, -v Increase
console output verbosity), and this was causing issues.

Anyway, using my v2 patch on top of current net-tree (238e03d0466239410) seems fine to me, no error at all, not sure why your bot is unhappy.

Could multiple patches have been tested together, one having a side effect ?

[hi on] edumazet@edumazet1:~/git/net-next$ vng -r --user root --cpus 4 --memory 4G
/usr/lib/tmpfiles.d/legacy.conf:14: Duplicate line for path "/run/lock", ignoring.
_ _

   __   _(_)_ __| |_ _ __ ___   ___       _ __   __ _
   \ \ / / |  __| __|  _   _ \ / _ \_____|  _ \ / _  |
    \ V /| | |  | |_| | | | | |  __/_____| | | | (_| |
     \_/ |_|_|   \__|_| |_| |_|\___|     |_| |_|\__  |
                                                |___/

kernel version: 6.16.12-1rodete2-amd64 x86_64
(CTRL+d to exit)

Illegal instruction shell-history-configtool configure-interactively

root@virtme-ng:/usr/local/google/home/edumazet/git/net-next# cd
tools/testing/selftests/net/
root@virtme-ng:/usr/local/google/home/edumazet/git/net-next/tools/testing/selftests/net#
./gre_gso.sh
    TEST: GREv6/v4 - copy file w/ TSO                                   [ OK ]
    TEST: GREv6/v4 - copy file w/ GSO                                   [ OK ]
2026/01/06 21:25:27 socat[1214] W exiting on signal 15
    TEST: GREv6/v6 - copy file w/ TSO                                   [ OK ]
    TEST: GREv6/v6 - copy file w/ GSO                                   [ OK ]
2026/01/06 21:25:27 socat[1229] W exiting on signal 15
Tests passed:   4
Tests failed:   0

root@virtme-ng:/usr/local/google/home/edumazet/git/net-next/tools/testing/selftests/net#

#5 lore raw
Quoted 65 lines · Eric Dumazet
Quoted 21 lines · Jakub Kicinski
Quoted 4 lines · On Tue, 6 Jan 2026 20:33:40 +0100 Eric Dumazet wrote:

For some reason I am unable to run this test from a virtme-ng instance.

I guess I wlll not make a new version of this patch, maybe Florian can take over.

Hm, no complications seen here:

$ vng -r --user root
..
prompt# cd tools/testing/selftests/net/
prompt# ./gre_gso.sh

TEST: GREv6/v4 - copy file w/ TSO [ OK ]
TEST: GREv6/v4 - copy file w/ GSO [ OK ]
2026/01/06 15:30:35 socat[1704] W exiting on signal 15
TEST: GREv6/v6 - copy file w/ TSO [ OK ]
TEST: GREv6/v6 - copy file w/ GSO [ OK ]
2026/01/06 15:30:35 socat[1721] W exiting on signal 15

Quoted 6 lines
Tests passed:   4
Tests failed:   0

Happy to give you access to the netdev machine to experiment there if that helps, just send me an SSH key.

My vng launch script had the -v option ( --verbose, -v Increase
console output verbosity), and this was causing issues.

Anyway, using my v2 patch on top of current net-tree (238e03d0466239410) seems fine to me, no error at all, not sure why your bot is unhappy.

Could multiple patches have been tested together, one having a side effect ?

[hi on] edumazet@edumazet1:~/git/net-next$ vng -r --user root --cpus 4 --memory 4G
/usr/lib/tmpfiles.d/legacy.conf:14: Duplicate line for path "/run/lock", ignoring.
_ _

   __   _(_)_ __| |_ _ __ ___   ___       _ __   __ _
   \ \ / / |  __| __|  _   _ \ / _ \_____|  _ \ / _  |
    \ V /| | |  | |_| | | | | |  __/_____| | | | (_| |
     \_/ |_|_|   \__|_| |_| |_|\___|     |_| |_|\__  |
                                                |___/

kernel version: 6.16.12-1rodete2-amd64 x86_64
(CTRL+d to exit)

Illegal instruction shell-history-configtool configure-interactively

root@virtme-ng:/usr/local/google/home/edumazet/git/net-next# cd
tools/testing/selftests/net/
root@virtme-ng:/usr/local/google/home/edumazet/git/net-next/tools/testing/selftests/net#
./gre_gso.sh
    TEST: GREv6/v4 - copy file w/ TSO                                   [ OK ]
    TEST: GREv6/v4 - copy file w/ GSO                                   [ OK ]
2026/01/06 21:25:27 socat[1214] W exiting on signal 15
    TEST: GREv6/v6 - copy file w/ TSO                                   [ OK ]
    TEST: GREv6/v6 - copy file w/ GSO                                   [ OK ]
2026/01/06 21:25:27 socat[1229] W exiting on signal 15
Quoted 3 lines
Tests passed:   4
Tests failed:   0

root@virtme-ng:/usr/local/google/home/edumazet/git/net-next/tools/testing/selftests/net#

Ah of course my script had '-r arch/x86/boot/bzImage'

I will test more tomorrow.

maintainer
#6 lore raw
Quoted 25 lines · On Tue, 6 Jan 2026 22:33:05 +0100 Eric Dumazet wrote:
Quoted 25 lines

[hi on] edumazet@edumazet1:~/git/net-next$ vng -r --user root --cpus 4 --memory 4G
/usr/lib/tmpfiles.d/legacy.conf:14: Duplicate line for path "/run/lock", ignoring.
_ _

   __   _(_)_ __| |_ _ __ ___   ___       _ __   __ _
   \ \ / / |  __| __|  _   _ \ / _ \_____|  _ \ / _  |
    \ V /| | |  | |_| | | | | |  __/_____| | | | (_| |
     \_/ |_|_|   \__|_| |_| |_|\___|     |_| |_|\__  |
                                                |___/

kernel version: 6.16.12-1rodete2-amd64 x86_64
(CTRL+d to exit)

Illegal instruction shell-history-configtool configure-interactively

root@virtme-ng:/usr/local/google/home/edumazet/git/net-next# cd
tools/testing/selftests/net/
root@virtme-ng:/usr/local/google/home/edumazet/git/net-next/tools/testing/selftests/net#
./gre_gso.sh
    TEST: GREv6/v4 - copy file w/ TSO                                   [ OK ]
    TEST: GREv6/v4 - copy file w/ GSO                                   [ OK ]
2026/01/06 21:25:27 socat[1214] W exiting on signal 15
    TEST: GREv6/v6 - copy file w/ TSO                                   [ OK ]
    TEST: GREv6/v6 - copy file w/ GSO                                   [ OK ]
2026/01/06 21:25:27 socat[1229] W exiting on signal 15
Quoted 5 lines
Quoted 3 lines
Tests passed:   4
Tests failed:   0
root@virtme-ng:/usr/local/google/home/edumazet/git/net-next/tools/testing/selftests/net#  

Ah of course my script had '-r arch/x86/boot/bzImage'

Maybe your machine / TCP tunings are super fast. I think we have some packet loss here which slows things down, maybe we run into the timeout of 1 sec with GSO and you don't.

I did this to the (GSO side of the) test:

tools/testing/selftests/net/gre_gso.sh +10 -3
index 5100d90f92d2..b9a223b584f6 100755
@@ -125,9 +125,16 @@ gre_gst_test_checks()
 
        ethtool -K veth0 tso off
 
-       cat $TMPFILE | timeout 1 socat -u STDIN TCP:$addr:$port
-       log_test $? 0 "$name - copy file w/ GSO"
-
+       $NS_EXEC nstat >>/dev/null
+       nstat >>/dev/null
+       cat $TMPFILE | \time timeout 1 socat -u STDIN TCP:$addr:$port
+       R=$?
+       echo "== Sender"
+       nstat
+       echo "== Receiver"
+       $NS_EXEC nstat
+       log_test $R 0 "$name - copy file w/ GSO"
+       
        ethtool -K veth0 tso on
 
        kill $PID

Without the fix under discussion I get:

# ./gre_gso.sh 
    TEST: GREv6/v4 - copy file w/ TSO                                   [ OK ]
0.00user 0.12system 0:00.13elapsed 92%CPU (0avgtext+0avgdata 3744maxresident)k
0inputs+0outputs (0major+406minor)pagefaults 0swaps
== Sender
#kernel
IpInReceives                    255                0.0
IpInDelivers                    255                0.0
IpOutRequests                   259                0.0
IpOutTransmits                  259                0.0
TcpActiveOpens                  1                  0.0
TcpInSegs                       255                0.0
TcpOutSegs                      1539               0.0
Ip6InReceives                   255                0.0
Ip6InDelivers                   255                0.0
Ip6InOctets                     26528              0.0
Ip6OutOctets                    2124096            0.0
Ip6InNoECTPkts                  255                0.0
Ip6OutTransmits                 259                0.0
TcpExtTCPPureAcks               252                0.0
TcpExtTCPBacklogCoalesce        1                  0.0
TcpExtTCPOrigDataSent           1536               0.0
TcpExtTCPDelivered              1537               0.0
IpExtInOctets                   13268              0.0
IpExtOutOctets                  2110628            0.0
IpExtInNoECTPkts                255                0.0
== Receiver
#kernel
IpInReceives                    7                  0.0
IpInDelivers                    7                  0.0
TcpPassiveOpens                 2                  0.0
TcpInSegs                       7                  0.0
Ip6InReceives                   1287               0.0
Ip6InDelivers                   1287               0.0
Ip6InMcastPkts                  1                  0.0
Ip6InOctets                     4328152            0.0
Ip6InMcastOctets                72                 0.0
Ip6InNoECTPkts                  2564               0.0
Icmp6InNeighborSolicits         1                  0.0
Icmp6OutNeighborAdvertisements  1                  0.0
Icmp6InType135                  1                  0.0
Icmp6OutType136                 1                  0.0
TcpExtTW                        2                  0.0
TcpExtTCPRcvCoalesce            22                 0.0
IpExtInOctets                   4194668            0.0
IpExtInNoECTPkts                2564               0.0
    TEST: GREv6/v4 - copy file w/ GSO                                   [ OK ]
2026/01/06 17:23:10 socat[787] W exiting on signal 15
    TEST: GREv6/v6 - copy file w/ TSO                                   [ OK ]
0.00user 0.12system 0:00.14elapsed 85%CPU (0avgtext+0avgdata 3668maxresident)k
0inputs+0outputs (0major+405minor)pagefaults 0swaps
== Sender
#kernel
TcpActiveOpens                  1                  0.0
TcpInSegs                       261                0.0
TcpOutSegs                      1539               0.0
Ip6InReceives                   522                0.0
Ip6InDelivers                   522                0.0
Ip6OutRequests                  263                0.0
Ip6InOctets                     51172              0.0
Ip6OutOctets                    4245868            0.0
Ip6InNoECTPkts                  522                0.0
Ip6OutTransmits                 526                0.0
TcpExtTCPPureAcks               257                0.0
TcpExtTCPLossProbes             1                  0.0
TcpExtTCPBacklogCoalesce        2                  0.0
TcpExtTCPOrigDataSent           1537               0.0
TcpExtTCPDelivered              1538               0.0
== Receiver
#kernel
IpInReceives                    7                  0.0
IpInDelivers                    7                  0.0
TcpPassiveOpens                 4                  0.0
TcpInSegs                       11                 0.0
Ip6InReceives                   2571               0.0
Ip6InDelivers                   2571               0.0
Ip6InMcastPkts                  1                  0.0
Ip6InOctets                     12875768           0.0
Ip6InMcastOctets                72                 0.0
Ip6InNoECTPkts                  7670               0.0
Icmp6InNeighborSolicits         1                  0.0
Icmp6OutNeighborAdvertisements  1                  0.0
Icmp6InType135                  1                  0.0
Icmp6OutType136                 1                  0.0
TcpExtTW                        4                  0.0
TcpExtTCPRcvCoalesce            42                 0.0
IpExtInOctets                   4194668            0.0
IpExtInNoECTPkts                2564               0.0
    TEST: GREv6/v6 - copy file w/ GSO                                   [ OK ]
2026/01/06 17:23:10 socat[808] W exiting on signal 15
Tests passed:   4
Tests failed:   0

With the change I see retransmits:

# ./gre_gso.sh 
    TEST: GREv6/v4 - copy file w/ TSO                                   [ OK ]
2026/01/06 17:25:21 socat[805] W exiting on signal 15
Command exited with non-zero status 124
0.00user 0.03system 0:01.02elapsed 3%CPU (0avgtext+0avgdata 3792maxresident)k
0inputs+0outputs (2major+408minor)pagefaults 0swaps
== Sender
#kernel
IpInReceives                    103                0.0
IpInDelivers                    103                0.0
IpOutRequests                   145                0.0
IpOutTransmits                  145                0.0
TcpActiveOpens                  1                  0.0
TcpInSegs                       103                0.0
TcpOutSegs                      123                0.0
TcpRetransSegs                  52                 0.0
Ip6InReceives                   103                0.0
Ip6InDelivers                   103                0.0
Ip6InOctets                     11176              0.0
Ip6OutOctets                    254280             0.0
Ip6InNoECTPkts                  103                0.0
Ip6OutTransmits                 145                0.0
TcpExtDelayedACKs               1                  0.0
TcpExtTCPPureAcks               88                 0.0
TcpExtTCPSackRecovery           9                  0.0
TcpExtTCPLostRetransmit         10                 0.0
TcpExtTCPLossFailures           1                  0.0
TcpExtTCPFastRetrans            33                 0.0
TcpExtTCPSlowStartRetrans       15                 0.0
TcpExtTCPTimeouts               4                  0.0
TcpExtTCPLossProbes             2                  0.0
TcpExtTCPSackRecoveryFail       3                  0.0
TcpExtTCPBacklogCoalesce        12                 0.0
TcpExtTCPSackMerged             4                  0.0
TcpExtTCPSackShiftFallback      9                  0.0
TcpExtTCPOrigDataSent           120                0.0
TcpExtTCPDelivered              119                0.0
TcpExtTcpTimeoutRehash          4                  0.0
IpExtInOctets                   5820               0.0
IpExtOutOctets                  246740             0.0
IpExtInNoECTPkts                103                0.0
== Receiver
#kernel
IpInReceives                    23                 0.0
IpInDelivers                    22                 0.0
TcpPassiveOpens                 2                  0.0
TcpInSegs                       23                 0.0
Ip6InReceives                   21                 0.0
Ip6InDelivers                   21                 0.0
Ip6InMcastPkts                  1                  0.0
Ip6InOctets                     2262688            0.0
Ip6InMcastOctets                72                 0.0
Ip6InNoECTPkts                  1295               0.0
Icmp6InNeighborSolicits         1                  0.0
Icmp6OutNeighborAdvertisements  1                  0.0
Icmp6InType135                  1                  0.0
Icmp6OutType136                 1                  0.0
TcpExtTW                        1                  0.0
TcpExtTCPRcvCoalesce            72                 0.0
TcpExtTCPOFOQueue               13                 0.0
IpExtInOctets                   2261596            0.0
IpExtInNoECTPkts                1295               0.0
    TEST: GREv6/v4 - copy file w/ GSO                                   [FAIL]
2026/01/06 17:25:21 socat[789] W exiting on signal 15
    TEST: GREv6/v6 - copy file w/ TSO                                   [ OK ]
2026/01/06 17:25:22 socat[825] W exiting on signal 15
Command exited with non-zero status 124
0.00user 0.10system 0:01.05elapsed 9%CPU (0avgtext+0avgdata 3720maxresident)k
0inputs+0outputs (0major+406minor)pagefaults 0swaps
== Sender
#kernel
TcpActiveOpens                  1                  0.0
TcpInSegs                       408                0.0
TcpOutSegs                      430                0.0
TcpRetransSegs                  73                 0.0
Ip6InReceives                   818                0.0
Ip6InDelivers                   817                0.0
Ip6OutRequests                  464                0.0
Ip6InMcastPkts                  1                  0.0
Ip6OutMcastPkts                 1                  0.0
Ip6InOctets                     81620              0.0
Ip6OutOctets                    1460624            0.0
Ip6InMcastOctets                72                 0.0
Ip6OutMcastOctets               72                 0.0
Ip6InNoECTPkts                  818                0.0
Ip6OutTransmits                 928                0.0
Icmp6OutMsgs                    1                  0.0
Icmp6OutRouterSolicits          1                  0.0
Icmp6OutType133                 1                  0.0
TcpExtDelayedACKs               1                  0.0
TcpExtTCPPureAcks               238                0.0
TcpExtTCPSackRecovery           15                 0.0
TcpExtTCPDSACKUndo              1                  0.0
TcpExtTCPLostRetransmit         10                 0.0
TcpExtTCPLossFailures           1                  0.0
TcpExtTCPFastRetrans            57                 0.0
TcpExtTCPSlowStartRetrans       12                 0.0
TcpExtTCPTimeouts               4                  0.0
TcpExtTCPLossProbes             8                  0.0
TcpExtTCPSackRecoveryFail       3                  0.0
TcpExtTCPBacklogCoalesce        161                0.0
TcpExtTCPDSACKRecv              1                  0.0
TcpExtTCPSackShiftFallback      15                 0.0
TcpExtTCPOrigDataSent           427                0.0
TcpExtTCPDelivered              427                0.0
TcpExtTcpTimeoutRehash          4                  0.0
TcpExtTCPDSACKRecvSegs          1                  0.0
== Receiver
#kernel
IpInReceives                    21                 0.0
IpInDelivers                    21                 0.0
TcpPassiveOpens                 4                  0.0
TcpInSegs                       43                 0.0
Ip6InReceives                   65                 0.0
Ip6InDelivers                   65                 0.0
Ip6InMcastPkts                  1                  0.0
Ip6InOctets                     7658680            0.0
Ip6InMcastOctets                72                 0.0
Ip6InNoECTPkts                  3889               0.0
Icmp6InNeighborSolicits         1                  0.0
Icmp6OutNeighborAdvertisements  1                  0.0
Icmp6InType135                  1                  0.0
Icmp6OutType136                 1                  0.0
TcpExtTW                        3                  0.0
TcpExtDelayedACKLost            1                  0.0
TcpExtTCPDSACKOldSent           1                  0.0
TcpExtTCPRcvCoalesce            197                0.0
TcpExtTCPOFOQueue               30                 0.0
IpExtInOctets                   2294396            0.0
IpExtInNoECTPkts                1295               0.0
    TEST: GREv6/v6 - copy file w/ GSO                                   [FAIL]
2026/01/06 17:25:22 socat[812] W exiting on signal 15
Tests passed:   2
Tests failed:   2

If I increase the timeout to 3 or 4 sec it's enough time to finish the file transfer regardless of the loss.

#7 lore raw
In reply to Eric Dumazet
Quoted 27 lines · Eric Dumazet
Quoted 26 lines · Jakub Kicinski
Quoted 1 line · On Tue, 6 Jan 2026 14:45:29 +0000 Eric Dumazet wrote:

v2: invert the conditions (Jakub)

Thanks! Much better now, but still failing
tools/testing/selftests/net/gre_gso.sh

TAP version 13
1..1

# timeout set to 3600
# selftests: net: gre_gso.sh
# 2.16 [+2.16]     TEST: GREv6/v4 - copy file w/ TSO                                   [ OK ]
# 3.16 [+1.01] 2026/01/06 10:32:57 socat[20546] W exiting on signal 15
# 3.17 [+0.01] 2026/01/06 10:32:57 socat[20546] W exiting on signal 15
# 3.17 [+0.00]     TEST: GREv6/v4 - copy file w/ GSO                                   [FAIL]
# 3.18 [+0.01] 2026/01/06 10:32:57 socat[20533] W exiting on signal 15
# 3.19 [+0.00]     TEST: GREv6/v6 - copy file w/ TSO                                   [ OK ]
# 4.19 [+1.00] 2026/01/06 10:32:59 socat[20559] W exiting on signal 15
# 4.19 [+0.01]     TEST: GREv6/v6 - copy file w/ GSO                                   [FAIL]
# 4.20 [+0.01] 2026/01/06 10:32:59 socat[20549] W exiting on signal 15
# 4.22 [+0.02] 2026/01/06 10:32:59 socat[20560] W exiting on signal 15
# 4.23 [+0.01]
# 4.23 [+0.00] Tests passed:   2
# 4.23 [+0.00] Tests failed:   2
not ok 1 selftests: net: gre_gso.sh # exit=1
Quoted 6 lines
Quoted 1 line

https://netdev-ctrl.bots.linux.dev/logs/vmksft/net/results/461862/65-gre-gso-sh/stdout

For some reason I am unable to run this test from a virtme-ng instance.

I guess I wlll not make a new version of this patch, maybe Florian can take over.

Its failing because nhoff is moved by 14 bytes, test passes after doing:

- if (skb_vlan_inet_prepare(skb, false))
+ if (skb_vlan_inet_prepare(skb, true))

#8 lore raw
Quoted 38 lines · Florian Westphal
Quoted 27 lines · Eric Dumazet
Quoted 26 lines · Jakub Kicinski
Quoted 1 line · On Tue, 6 Jan 2026 14:45:29 +0000 Eric Dumazet wrote:

v2: invert the conditions (Jakub)

Thanks! Much better now, but still failing
tools/testing/selftests/net/gre_gso.sh

TAP version 13
1..1

# timeout set to 3600
# selftests: net: gre_gso.sh
# 2.16 [+2.16]     TEST: GREv6/v4 - copy file w/ TSO                                   [ OK ]
# 3.16 [+1.01] 2026/01/06 10:32:57 socat[20546] W exiting on signal 15
# 3.17 [+0.01] 2026/01/06 10:32:57 socat[20546] W exiting on signal 15
# 3.17 [+0.00]     TEST: GREv6/v4 - copy file w/ GSO                                   [FAIL]
# 3.18 [+0.01] 2026/01/06 10:32:57 socat[20533] W exiting on signal 15
# 3.19 [+0.00]     TEST: GREv6/v6 - copy file w/ TSO                                   [ OK ]
# 4.19 [+1.00] 2026/01/06 10:32:59 socat[20559] W exiting on signal 15
# 4.19 [+0.01]     TEST: GREv6/v6 - copy file w/ GSO                                   [FAIL]
# 4.20 [+0.01] 2026/01/06 10:32:59 socat[20549] W exiting on signal 15
# 4.22 [+0.02] 2026/01/06 10:32:59 socat[20560] W exiting on signal 15
# 4.23 [+0.01]
# 4.23 [+0.00] Tests passed:   2
# 4.23 [+0.00] Tests failed:   2
not ok 1 selftests: net: gre_gso.sh # exit=1
Quoted 6 lines
Quoted 1 line

https://netdev-ctrl.bots.linux.dev/logs/vmksft/net/results/461862/65-gre-gso-sh/stdout

For some reason I am unable to run this test from a virtme-ng instance.

I guess I wlll not make a new version of this patch, maybe Florian can take over.

Its failing because nhoff is moved by 14 bytes, test passes after doing:

Review

Quoted 2 lines
(quoted diff) +1 -1
-       if (skb_vlan_inet_prepare(skb, false))
+       if (skb_vlan_inet_prepare(skb, true))

Thanks Florian.

I finally understood that my virtme-ng problem with this test is that on my platform, /proc/sys/net/core/fb_tunnels_only_for_init_net was set to 2

Tests have a hidden dependency against this sysctl.

reviewer
#9 lore raw
Quoted 42 lines · Eric Dumazet
Quoted 38 lines · Florian Westphal
Quoted 27 lines · Eric Dumazet
Quoted 26 lines · Jakub Kicinski
Quoted 1 line · On Tue, 6 Jan 2026 14:45:29 +0000 Eric Dumazet wrote:

v2: invert the conditions (Jakub)

Thanks! Much better now, but still failing
tools/testing/selftests/net/gre_gso.sh

TAP version 13
1..1

# timeout set to 3600
# selftests: net: gre_gso.sh
# 2.16 [+2.16]     TEST: GREv6/v4 - copy file w/ TSO                                   [ OK ]
# 3.16 [+1.01] 2026/01/06 10:32:57 socat[20546] W exiting on signal 15
# 3.17 [+0.01] 2026/01/06 10:32:57 socat[20546] W exiting on signal 15
# 3.17 [+0.00]     TEST: GREv6/v4 - copy file w/ GSO                                   [FAIL]
# 3.18 [+0.01] 2026/01/06 10:32:57 socat[20533] W exiting on signal 15
# 3.19 [+0.00]     TEST: GREv6/v6 - copy file w/ TSO                                   [ OK ]
# 4.19 [+1.00] 2026/01/06 10:32:59 socat[20559] W exiting on signal 15
# 4.19 [+0.01]     TEST: GREv6/v6 - copy file w/ GSO                                   [FAIL]
# 4.20 [+0.01] 2026/01/06 10:32:59 socat[20549] W exiting on signal 15
# 4.22 [+0.02] 2026/01/06 10:32:59 socat[20560] W exiting on signal 15
# 4.23 [+0.01]
# 4.23 [+0.00] Tests passed:   2
# 4.23 [+0.00] Tests failed:   2
not ok 1 selftests: net: gre_gso.sh # exit=1
Quoted 6 lines
Quoted 1 line

https://netdev-ctrl.bots.linux.dev/logs/vmksft/net/results/461862/65-gre-gso-sh/stdout

For some reason I am unable to run this test from a virtme-ng instance.

I guess I wlll not make a new version of this patch, maybe Florian can take over.

Its failing because nhoff is moved by 14 bytes, test passes after doing:

Review

Quoted 2 lines
(quoted diff) +1 -1
-       if (skb_vlan_inet_prepare(skb, false))
+       if (skb_vlan_inet_prepare(skb, true))
Quoted 7 lines

Thanks Florian.

I finally understood that my virtme-ng problem with this test is that on my platform, /proc/sys/net/core/fb_tunnels_only_for_init_net was set to 2

Tests have a hidden dependency against this sysctl.

Should unhide it by making the tests check or set this value?

It seems like a lot of time was lost on this already.

#10 lore raw
Quoted 50 lines · Simon Horman
Quoted 48 lines · Eric Dumazet
Quoted 38 lines · Florian Westphal
Quoted 27 lines · Eric Dumazet
Quoted 26 lines · Jakub Kicinski
Quoted 1 line · On Tue, 6 Jan 2026 14:45:29 +0000 Eric Dumazet wrote:

v2: invert the conditions (Jakub)

Thanks! Much better now, but still failing
tools/testing/selftests/net/gre_gso.sh

TAP version 13
1..1

# timeout set to 3600
# selftests: net: gre_gso.sh
# 2.16 [+2.16]     TEST: GREv6/v4 - copy file w/ TSO                                   [ OK ]
# 3.16 [+1.01] 2026/01/06 10:32:57 socat[20546] W exiting on signal 15
# 3.17 [+0.01] 2026/01/06 10:32:57 socat[20546] W exiting on signal 15
# 3.17 [+0.00]     TEST: GREv6/v4 - copy file w/ GSO                                   [FAIL]
# 3.18 [+0.01] 2026/01/06 10:32:57 socat[20533] W exiting on signal 15
# 3.19 [+0.00]     TEST: GREv6/v6 - copy file w/ TSO                                   [ OK ]
# 4.19 [+1.00] 2026/01/06 10:32:59 socat[20559] W exiting on signal 15
# 4.19 [+0.01]     TEST: GREv6/v6 - copy file w/ GSO                                   [FAIL]
# 4.20 [+0.01] 2026/01/06 10:32:59 socat[20549] W exiting on signal 15
# 4.22 [+0.02] 2026/01/06 10:32:59 socat[20560] W exiting on signal 15
# 4.23 [+0.01]
# 4.23 [+0.00] Tests passed:   2
# 4.23 [+0.00] Tests failed:   2
not ok 1 selftests: net: gre_gso.sh # exit=1
Quoted 6 lines
Quoted 1 line

https://netdev-ctrl.bots.linux.dev/logs/vmksft/net/results/461862/65-gre-gso-sh/stdout

For some reason I am unable to run this test from a virtme-ng instance.

I guess I wlll not make a new version of this patch, maybe Florian can take over.

Its failing because nhoff is moved by 14 bytes, test passes after doing:

Review

Quoted 2 lines
(quoted diff) +1 -1
-       if (skb_vlan_inet_prepare(skb, false))
+       if (skb_vlan_inet_prepare(skb, true))

Thanks Florian.

I finally understood that my virtme-ng problem with this test is that on my platform, /proc/sys/net/core/fb_tunnels_only_for_init_net was set to 2

Quoted 5 lines
Quoted 1 line

Tests have a hidden dependency against this sysctl.

Should unhide it by making the tests check or set this value?

It seems like a lot of time was lost on this already.

Or we could change iproute2 to no longer rely on the default devices.

2029 execve("/bin/ip", ["ip", "tunnel", "add", "gre1", "mode", "ip6gre", "local", "fe80::782c:82ff:fe5d:68cc", "remote", "fe80::8827:efff:feaf:1d87", "dev", "veth0"], 0x56329212d6e0 /* 12 vars */) = 0

2029  setsockopt(4, SOL_NETLINK, NETLINK_EXT_ACK, [1], 4) = 0
2029  bind(4, {sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, 12) = 0
2029  getsockname(4, {sa_family=AF_NETLINK, nl_pid=-2025971371,

nl_groups=00000000}, [12]) = 0
2029 sendmsg(4, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=[{nlmsg_len=52, nlmsg_type=RTM_GETLINK, nlmsg_flags=NLM_F_REQUEST, nlmsg_seq=1768231049, nlmsg_pid=0}, {ifi_family=AF_UNSPEC, ifi_type=ARPHRD_NETROM, ifi_index=0, ifi_flags=0, ifi_change=0}, [[{nla_len=8, nla_type=IFLA_EXT_MASK}, RTEXT_FILTER_VF|RTEXT_FILTER_SKIP_STATS], [{nla_len=10, nla_type=IFLA_IFNAME}, "veth0"]]], iov_len=52}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 52
2029 recvmsg(4, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=NULL, iov_len=0}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_TRUNC}, MSG_PEEK|MSG_TRUNC) = 832
2029 recvmsg(4, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=[{nlmsg_len=832, nlmsg_type=RTM_NEWLINK, nlmsg_flags=0, nlmsg_seq=1768231049, nlmsg_pid=-2025971371}, {ifi_family=AF_UNSPEC, ifi_type=ARPHRD_ETHER, ifi_index=if_nametoindex("veth0"), ifi_flags=IFF_UP|IFF_BROADCAST|IFF_RUNNING|IFF_MULTICAST|IFF_LOWER_UP, ifi_change=0}, [[{nla_len=10, nla_type=IFLA_IFNAME}, "veth0"], [{nla_len=8, nla_type=IFLA_TXQLEN}, 1000], [{nla_len=5, nla_type=IFLA_OPERSTATE}, 6], [{nla_len=5, nla_type=IFLA_LINKMODE}, 0], [{nla_len=5, nla_type=IFLA_NETNS_IMMUTABLE}, 0], [{nla_len=8, nla_type=IFLA_MTU}, 1500], [{nla_len=8, nla_type=IFLA_MIN_MTU}, 68], [{nla_len=8, nla_type=IFLA_MAX_MTU}, 65535], [{nla_len=8, nla_type=IFLA_GROUP}, 0], [{nla_len=8, nla_type=IFLA_PROMISCUITY}, 0], [{nla_len=8, nla_type=IFLA_ALLMULTI}, 0], [{nla_len=8, nla_type=IFLA_NUM_TX_QUEUES}, 8], [{nla_len=8, nla_type=IFLA_GSO_MAX_SEGS}, 65535], [{nla_len=8, nla_type=IFLA_GSO_MAX_SIZE}, 65536], [{nla_len=8, nla_type=IFLA_GRO_MAX_SIZE}, 65536], [{nla_len=8, nla_type=IFLA_GSO_IPV4_MAX_SIZE}, 65536], [{nla_len=8, nla_type=IFLA_GRO_IPV4_MAX_SIZE}, 65536], [{nla_len=8, nla_type=IFLA_TSO_MAX_SIZE}, 524280], [{nla_len=8, nla_type=IFLA_TSO_MAX_SEGS}, 65535], [{nla_len=8, nla_type=IFLA_MAX_PACING_OFFLOAD_HORIZON}, "\x00\x00\x00\x00"], [{nla_len=8, nla_type=IFLA_NUM_RX_QUEUES}, 8], [{nla_len=5, nla_type=IFLA_CARRIER}, 1], [{nla_len=8, nla_type=IFLA_CARRIER_CHANGES}, 2], [{nla_len=8, nla_type=IFLA_CARRIER_UP_COUNT}, 1], [{nla_len=8, nla_type=IFLA_CARRIER_DOWN_COUNT}, 1], [{nla_len=6, nla_type=0x44 /* IFLA_??? */}, "\x00\x00"], [{nla_len=6, nla_type=0x45 /* IFLA_??? */}, "\x00\x00"], [{nla_len=5, nla_type=IFLA_PROTO_DOWN}, 0], [{nla_len=10, nla_type=IFLA_ADDRESS}, 16:ad:38:9c:d2:4b], [{nla_len=10, nla_type=IFLA_BROADCAST}, ff:ff:ff:ff:ff:ff], [{nla_len=12, nla_type=IFLA_XDP}, [{nla_len=5, nla_type=IFLA_XDP_ATTACHED}, XDP_ATTACHED_NONE]], [{nla_len=16, nla_type=IFLA_LINKINFO}, [{nla_len=9, nla_type=IFLA_INFO_KIND}, "veth"]], ...]], iov_len=32768}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 832

2029  close(4)                          = 0
2029  socket(AF_INET6, SOCK_DGRAM, IPPROTO_IP) = 4
2029  ioctl(4, _IOC(_IOC_NONE, 0x89, 0xf1, 0), 0x7fff4a526580) = -1
ENODEV (No such device)
2029  write(2, "add tunnel \"ip6gre0\" failed: No "..., 44) = 44
2029  close(4)                          = 0
2029  exit_group(1)                     = ?