All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ricardo B. Marlière" <rbm@suse.com>
To: "Ricardo B. Marlière" <rbm@suse.com>,
	"Linus Heckemann" <git@sphalerite.org>,
	edumazet@google.com
Cc: <davem@davemloft.net>, <eric.dumazet@gmail.com>,
	<horms@kernel.org>, <kuba@kernel.org>, <morikw2@gmail.com>,
	<netdev@vger.kernel.org>, <pabeni@redhat.com>,
	<syzbot+d4dda070f833dc5dc89a@syzkaller.appspotmail.com>
Subject: Re: [PATCH] selftests/net: add test for IPv4-in-IPv6 tunneling
Date: Mon, 09 Feb 2026 19:19:53 -0300	[thread overview]
Message-ID: <DGAS4219YAVM.1FO5C2440EBYZ@suse.com> (raw)
In-Reply-To: <DGAR3PO1D33S.1TI7W7U4SPTOG@suse.com>

On Mon Feb 9, 2026 at 6:32 PM -03, Ricardo B. Marlière wrote:
> On Sun Feb 8, 2026 at 11:46 AM -03, Linus Heckemann wrote:
>> 81c734dae203757fb3c9eee6f9896386940776bd was fine in and of itself, but
>> its backport to 6.12 (and 6.6) broke IPv4-in-IPv6 tunneling, see [1].
>> This adds a self-test for basic IPv4-in-IPv6 functionality.
>>
>> [1]: https://lore.kernel.org/all/CAA2RiuSnH_2xc+-W6EnFEG00XjS-dszMq61JEvRjcGS31CBw=g@mail.gmail.com/
>
> I used this script to test the regression in a clean v6.12 tree with
> commit 81c734dae203 ("ip6_tunnel: use skb_vlan_inet_prepare() in
> __ip6_tnl_rcv()") applied on top:
>
>
> # ../ip6_tunnel.sh
> PING 172.0.0.2 (172.0.0.2) 56(84) bytes of data.
>
> --- 172.0.0.2 ping statistics ---
> 1 packets transmitted, 0 received, 100% packet loss, time 0ms
>
>
> dropwatch shows:
>
> 1 drops at __ip6_tnl_rcv+74 (0xffffffffc05c7064) [software]
>
>
> Now, when also applying commit 4b406f814817 ("net: tunnel: make
> skb_vlan_inet_prepare() return drop reasons") on top of that, the issue

oops, that would be 9990ddf47d41 ("net: tunnel: make skb_vlan_inet_prepare() return drop reasons")

> goes away. Is there a way to trigger stable to pick this up?
>
>> ---
>>  tools/testing/selftests/net/Makefile      |  1 +
>>  tools/testing/selftests/net/ip6_tunnel.sh | 41 +++++++++++++++++++++++
>>  2 files changed, 42 insertions(+)
>>  create mode 100644 tools/testing/selftests/net/ip6_tunnel.sh
>>
>> diff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests/net/Makefile
>> index 45c4ea381bc36..5037a344ad826 100644
>> --- a/tools/testing/selftests/net/Makefile
>> +++ b/tools/testing/selftests/net/Makefile
>> @@ -43,6 +43,7 @@ TEST_PROGS := \
>>  	io_uring_zerocopy_tx.sh \
>>  	ioam6.sh \
>>  	ip6_gre_headroom.sh \
>> +	ip6_tunnel.sh \
>>  	ip_defrag.sh \
>>  	ip_local_port_range.sh \
>>  	ipv6_flowlabel.sh \
>> diff --git a/tools/testing/selftests/net/ip6_tunnel.sh b/tools/testing/selftests/net/ip6_tunnel.sh
>> new file mode 100644
>> index 0000000000000..366f4c06cd6a3
>> --- /dev/null
>> +++ b/tools/testing/selftests/net/ip6_tunnel.sh
>> @@ -0,0 +1,41 @@
>> +#!/bin/bash
>> +# Test that IPv4-over-IPv6 tunneling works.
>> +
>> +set -e
>> +
>> +setup_prepare() {
>> +  ip link add transport1 type veth peer name transport2
>> +
>> +  ip netns add ns1
>> +  ip link set transport1 netns ns1
>> +  ip netns exec ns1 bash <<EOF
>> +  set -e
>> +  ip address add 2001:db8::1/64 dev transport1 nodad
>> +  ip link set transport1 up
>> +  ip link add link transport1 name tunnel1 type ip6tnl mode ipip6 local 2001:db8::1 remote 2001:db8::2
>> +  ip address add 172.0.0.1/32 peer 172.0.0.2/32 dev tunnel1
>> +  ip link set tunnel1 up
>> +EOF
>> +
>> +  ip netns add ns2
>> +  ip link set transport2 netns ns2
>> +  ip netns exec ns2 bash <<EOF
>> +  set -e
>> +  ip address add 2001:db8::2/64 dev transport2 nodad
>> +  ip link set transport2 up
>> +  ip link add link transport2 name tunnel2 type ip6tnl mode ipip6 local 2001:db8::2 remote 2001:db8::1
>> +  ip address add 172.0.0.2/32 peer 172.0.0.1/32 dev tunnel2
>> +  ip link set tunnel2 up
>> +EOF
>> +}
>> +
>> +cleanup() {
>> +  ip netns delete ns1
>> +  ip netns delete ns2
>> +  # in case the namespaces haven't been set up yet
>> +  ip link delete transport1
>> +}
>> +
>> +trap cleanup EXIT
>> +setup_prepare
>> +ip netns exec ns1 ping -W1 -c1 172.0.0.2


  reply	other threads:[~2026-02-09 22:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-08 14:46 [PATCH] selftests/net: add test for IPv4-in-IPv6 tunneling Linus Heckemann
2026-02-09  0:56 ` Hangbin Liu
2026-02-09 21:32 ` Ricardo B. Marlière
2026-02-09 22:19   ` Ricardo B. Marlière [this message]
2026-02-10 13:31 ` Ricardo B. Marlière

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DGAS4219YAVM.1FO5C2440EBYZ@suse.com \
    --to=rbm@suse.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=git@sphalerite.org \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=morikw2@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=syzbot+d4dda070f833dc5dc89a@syzkaller.appspotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.