πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #11051

Re: [PATCH net v2 3/3] selftests: net: tun: test outer protocol of UDP tunnel GSO packets

#11051
From: Willem de Bruijn
Date: Wed, 04 Nov 2026 15:36
28 lines
12396 bytes
Eric Dumazet wrote:
> Add tests writing single 4in4 Geneve GSO frames to tun devices with
> UDP tunnel offloads enabled.
> 
> tun_vnet_udptnl_proto uses a tap device:
> 
> - outer_proto_ok: an outer IPv4 header, with or without an 802.1Q tag,
>   is accepted.
> - outer_proto_bad: an outer ethertype that does not match the declared
>   tunnel type (IPv6 on an IPv4 tunnel, or NSH, with or without a VLAN
>   tag) is rejected with EINVAL.
> 
> tun_vnet_udptnl_proto_l3 uses an IFF_TUN device with a tun_pi header,
> so skb->protocol comes from userspace and there is no Ethernet header.
> The outer IPv4 header carries options, as virtio_net_hdr_tnl_to_skb()
> expects room for an Ethernet header before the outer transport header.
> 
> - outer_proto_ok: tun_pi and the frame agree on IPv4, accepted.
> - outer_proto_bad: tun_pi claims IPv6, or the IP version of the frame
>   is not 4 while tun_pi claims IPv4: rejected with EINVAL.
> 
> Without the first patch of this series, both outer_proto_bad tests fail
> because the kernel accepts the frames.
> 
> Signed-off-by: Eric Dumazet <edumazet@kernel.org>

Reviewed-by: Willem de Bruijn <willemb@google.com>
Technical Details
Message-ID: <willemdebruijn.kernel.394adf46ec48d@gmail.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-356562-linux-kernel-netdev=dewy.ru
References: <20261104050131.629967-1-edumazet@kernel.org> <20261104050131.629967-4-edumazet@kernel.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-356562-linux-kernel-netdev=dewy.ru
From: willemdebruijn.kernel@gmail.com (Willem de Bruijn)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net v2 3/3] selftests: net: tun: test outer protocol of
 UDP tunnel GSO packets
Date: Wed, 04 Nov 2026 10:36:58 -0500
Organization: Usenet Network
Message-ID: <willemdebruijn.kernel.394adf46ec48d@gmail.com>
References: <20261104050131.629967-1-edumazet@kernel.org>
 <20261104050131.629967-4-edumazet@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="3422011"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:gUTbOtmrLxtFyjMI60uB0Zo7Fys= sha256:pjk4nHqdhd/6W2dZfKUhT3fwtZQcnbMVGYaEy0bZ4Lo=
	sha1:UQ67pqUEYzB1Ds5NLzquHEF0Bkg= sha256:rw/lFijyrLtrdc9CY75kVHAjL8GVuc7yHyHNoU9D4+k=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id B4C62112C3F; Wed,  4 Nov 2026 18:43:02 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
	FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id GaycWbbBKWvR;
	Wed,  4 Nov 2026 18:42:59 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-356562-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 7E382112C19; Wed,  4 Nov 2026 18:42:51 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 0FE253474B; Wed,  4 Nov 2026 15:37:22 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793806622;
	b=K24SbXE4bg5qpnpitphzRvkXDXxsgxs/03sB0Q4vVY5mwAC557XISpxK3kHErAv2R4wW
	 Tzk6y6WmWJweeT/YDQ+Ia3APYpeu4URAi0+7OpC1AHo+nRJDvTNdZQg6yzGjgnkIG9u/o
	 +VyN4J2kGCN+DaJ61VbtzAR4mATtA8eT1a1uVByOMg0i8t8SLnr4BNR4nycws3Vmi1nsn
	 7cCR8DWOowY9WajGefNqvvV86UXPo3j2ew/l3jY0ovdQ5VMMjNA7n6cf7RPj/X/Qep2J2
	 0pK77cDCzX450y7GGDQoC/xwRzGctxDKvlYkFpXoI7IGODbx/qZoaOGqN1UtgdGTQ3Q==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793806622;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State:
	 X-Gm-Gg:X-Received:Received:Date:From:To:Cc:Message-ID:In-Reply-To:
	 References:Subject:X-Mailing-List:List-Id:List-Post:List-Help:
	 List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Type:Content-Transfer-Encoding;
	bh=hVIa3swhsbmrrYjC4G+lOwvdapL/nqbZUw7IU7FT/vo=;
	b=jPkGgoIxSSeTeAQnMGVimzG1jOVUa0y+x6JdEFytc8r5DVGfcEyFzoJyPoegwOnRSlwh
	 DqjC+H1ZBj0IQJb2L2tsPB3Njw3sic+t6nll9NEo+vynZuZbe/IYaMOFhwSAH07ZOUFlC
	 5Xa4ape5sWQiX7pBls5oqYK55hPGdU6pkPlb8Sp1Cm/7iXPVSpIZ+sSjb/pfWpspfg9F4
	 1OrIKxN21Zr90UAtrK2THi5MgwhBktBZzK8X9zb0tXE9k/YaTwBpcVcL8c3arG5k7fuKh
	 e1l/OwQJamnm66ndi2ZeaT0TMzDsYfzJQstswX5Q80SJTu1jjdWWJiIaeT1wCkwWT6A==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=TETlKGWw;
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id D5E21606D831;
	Wed,  4 Nov 2026 15:37:02 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=TETlKGWw
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.179
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793806622;
	b=X10PDddRZuPb5/sl/LtlCKwByH4gAc4tI6bX94w9fT/ZmwbzkXn2KOcoTpQ0Tyq07Ftd
	 GvFcJybPoBhqFQ4omI0tkVI7CK8e1g09ZDopobA8Z/SJZuabJY210lHAQF/B0xjBayoPM
	 td0j5nWSmXkkUe6lD485NWfxbcnNRDOon4HHnHETNwiNqlKRM0vuR6XMuMJZSTZtIERw2
	 lONq77lIc/oT9PAMEaU8uM76hgRQ05Pc0y3JfsjI3koOWP4U6uDwJhJbvGfUqhWZWyu4F
	 XNgj1MZVOPqyOSmzCH7VEg/R0hd/E2MxbrTs75ARdCQ+qDIqA18X4J4TIaGDy3w1qpQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793806622;
	h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
	 X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received:
	 Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject:
	 MIME-Version:Content-Type:Content-Transfer-Encoding;
	bh=hVIa3swhsbmrrYjC4G+lOwvdapL/nqbZUw7IU7FT/vo=;
	b=u1OYXnHIfMwHWiKFW8PipDplb4XA7+8I5hh6T+9wiO/BqmfzRaALowMVGfeZStMcC+sL
	 RqGX7sdruM4bUcW7liWvpCcubCSEhC2aRN7oJh3coLkL7Vtp8LiFYgX15/AgmRWJAv0mg
	 JBO+G3AWmxtELBNdD2BUPHLhEbtg8ZiB6MHsAsMfv3x5A85bz31/vxuOzz3v7pwv4iAvw
	 Ip0uKZZ5ERqFv8Nh7NelTaXQhCxMzn2W1WB/gD/0US7PaFKw/lGRAyjTr1X72Mu6TiS6h
	 VlvlQnLAlp5WO0Qq/JVYo9mDMVXqbWdoZqBxGZV7CCuK3YdcDgdpk3eI6IgTa37Ju4g==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=TETlKGWw;
	arc=none smtp.remote-ip=209.85.221.179
X-Received: from mail-vk1-f179.google.com (mail-vk1-f179.google.com [209.85.221.179])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id A244E606D832
	for <netdev@vger.kernel.org>; Wed,  4 Nov 2026 15:37:01 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A244E606D832
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-vk1-f179.google.com with SMTP id 71dfb90a1353d-5ec6f271883so556920e0c.3
        for <netdev@vger.kernel.org>; Wed, 04 Nov 2026 07:37:01 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20260707; t=1793806620; x=1794411420; darn=vger.kernel.org;
        h=content-transfer-encoding:content-type:mime-version:subject
         :references:in-reply-to:message-id:cc:to:from:date:from:to:cc
         :subject:date:message-id:reply-to:content-type;
        bh=hVIa3swhsbmrrYjC4G+lOwvdapL/nqbZUw7IU7FT/vo=;
        b=TETlKGWwXd26BqRSjtY4Kqiz2NmWqu1rnB1Mn8XDlZ/rNsd0uDIm/ZiddlC/txO7Yz
         gc/ai3HsxXq7sT+Znf52SFnPg6TTN2+sUsN08ENAdZTrqcVBtxqlFgjn5VIJ0Km/HoM6
         wMqd+8q50ughxtSqJxnqzGLIrgj1zjMMmu6XtYH+udk7CieiLb2y4ChJ4X+IWzOVWgYV
         xmokiRyif5pSpwLRiDPIsoJsqUV+h69RiurOqr3TN7qHEwg7THksFSjdJ37X99htugBZ
         us60Cw2SDm7Uki/NVz7PLbK+oWVKpYZrRTdMGmF0LFGnnlz0Us7UI9iz3HtdVirnRGbX
         qpow==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1793806620; x=1794411420;
        h=content-transfer-encoding:content-type:mime-version:subject
         :references:in-reply-to:message-id:cc:to:from:date:x-gm-gg
         :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
         :content-type;
        bh=hVIa3swhsbmrrYjC4G+lOwvdapL/nqbZUw7IU7FT/vo=;
        b=FRhT0f4mI+1H/Fkytg3zgLTqzwxA1qRNkAExkp6DXCP1VKvsvsf7tOzYsJFzMBRm4r
         4H7OwZ7f2pmUszgQQqghOpt7BR3uVFYDwTiEbP9Mc3wxsNqPC6cRq8aW/PPkBIOR8I9w
         7TYj4xv46p/RZQ+Y8aYMFhBtRDHfXZ+m1QnuL0ju3r9HnmD0/lK2KduPE+DldL5T5K9c
         HYopkEx0sIkzqD25ZgFzIeMv2bgNobd1f8waYFf8DuJt+edEwatW95m1ld2uqiQEwW2M
         L4xmKZoV70g8T4ZM2/Ldah341j6W7eb4/0E8RBcPddHM1bq3CwERfrTAbrXzEFX3EzNX
         +9Ug==
X-Forwarded-Encrypted: i=1; AKwUvBz5Ii8cBsPBUkJYx/D0wIspA7KtWooYx/hlSXaLe44Zw2Kcb0tBwQC2B62F9uuIQDeKmmVjIL0=@vger.kernel.org
X-Gm-Message-State: APuU4Z/iz0zIE+9w+jXBzWz0a2/9CbpHEU0EGbzdn0iCBFZmWuxqcLdk
	0PwJjxFPznirO/uK8f4tY4MVF7jf1s4I7xr9vnNL2jBzchs3GSDlu/2Z
X-Gm-Gg: AYBFou12f1BL7lo8+dy2Wnnv6P65l9iwBVs5W3VjgvmuoPc+C/ZazZ3+xsODhuZh9fl
	4aP9hSYOIQvs6SEt6w8qUqsLgqE9w4r2ote4yKwnKI/n/8uJEKBXUBuH0C3m9T8/EeBruizuyQe
	ppTrIAjhSHPTMUNdKZ2wNLl2zacLuHPORCVlXW6oVBIR88auuH2S2lK0AZrW/ov5jRfzhg0eTGG
	ek0c/TMwU4ZFSCCsPVbYr6+eU5Zz2vhtdliVgaa7GzcUlh+T+ntJZ6dprYx9h4v9hYCGyke8XHj
	PU/CBnfiNKdJWdIrxER+xpfCuluS/I51krz6XeWmOoHBCqGKtHe1i1WULaoq5mkh5hKT6qH7XMl
	9kQ/p4Be/CWIOhVq55Ryxv8PnaOzdLZUhzLDqf2uA61XM3FWT20XW8eL1rrtMjkwPLTZn/6//Mn
	7Uo7UREC6MJzUJKiPCKz+BYx/gQtmfs3bx8FAjs/lYmiitzQ86dDGpXYQ0/kpy5NnwB88UykJIK
	mjfTQFmXgnDq47G5neg+EDQvbMnl/aLLCMmCde4lClHkBrrhdvqVVhFvlXnnIRI7XFTEQvZcjcS
	RAhZ6lIo4JFEHiEY0fnrXDwxoFDBsApEOOFRUouZ9cYOe/OUg4/GLcdWozXRNAxM4MLz2fMII5s
	kiDvwwVRzoSMLgZhjQrRqVPbQ1uESVS8D6k9jcxNvoVahTCFpzEIlqwC10evPeR1JrXbJEb+OnQ
	WswpRuopK+CB7KVi9/Pw==
X-Received: by 2002:a05:6122:4d86:b0:5ea:aedd:6087 with SMTP id 71dfb90a1353d-5ec6871d3d2mr7672956e0c.4.1793806620530;
        Wed, 04 Nov 2026 07:37:00 -0800 (PST)
X-Received: from gmail.com (223.230.150.34.bc.googleusercontent.com. [34.150.230.223])
        by smtp.gmail.com with ESMTPSA id 71dfb90a1353d-5eca8d774dcsm1927819e0c.5.2026.11.04.07.36.59
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Wed, 04 Nov 2026 07:36:59 -0800 (PST)
X-Cc: Eric Dumazet <edumazet@kernel.org>, 
 Simon Horman <horms@kernel.org>, 
 Willem de Bruijn <willemb@google.com>, 
 "Michael S. Tsirkin" <mst@redhat.com>, 
 Eugenio PΓ©rez <eperezma@redhat.com>, 
 Hassan Sultan <hassansultan@google.com>, 
 virtualization@lists.linux.dev
X-In-Reply-To: <20261104050131.629967-4-edumazet@kernel.org>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list