🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #7572

Re: [PATCH net 1/2] net/sched: act_api: inherit filter offload flags only on new actions

#7572
From: Simon Horman
Date: Mon, 26 Oct 2026 16:53
37 lines
9818 bytes
On Wed, Oct 21, 2026 at 09:32:18PM +0200, Alexandre Cassen wrote:
> tcf_action_init() gives the skip_sw and skip_hw flags of a filter to the
> actions it binds. An action that another filter created gets them too,
> they then apply to every filter that uses this action. When a
> skip_sw filter reuses the action of a software filter, the software
> filter silently stops running it. This happens even when the filter add
> fails on a later action. A skip_hw filter likewise prevents a later
> filter without flags from reusing the action.
> 
> Give the flags only to the actions that the filter creates. The mismatch
> check still rejects a filter that reuses an action with a flag that the
> filter does not have.
> 
> Discovered by manual code inspection after the Sashiko AI review [1] of
> a tunnel_key patch questioned how actions get the filter flags.
> Reproduced on netdevsim without kernel changes. The egress filter below
> runs in software only, since netdevsim offloads only ingress filters.
> Once the skip_sw filter reuses its drop action, the last command shows
> skip_sw on this action and the egress filter stops dropping packets:
> 
>   ethtool -K eth0 hw-tc-offload on
>   tc qdisc add dev eth0 clsact
>   tc filter add dev eth0 egress protocol ip flower dst_ip 192.0.2.1 \
>      action gact drop index 1
>   tc filter add dev eth0 ingress protocol ip flower skip_sw \
>      dst_ip 192.0.2.2 action gact drop index 1
>   tc actions get action gact index 1
> 
> Tested with the reproducer and the tc-testing action, matchall and
> flower tests.
> 
> Fixes: 34d35b4edbbe ("net/sched: act_api: deny mismatched skip_sw/skip_hw flags for actions created by classifiers")
> Link: https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261009051930.3619697-1-acassen%40corp.free.fr [1]
> Signed-off-by: Alexandre Cassen <acassen@corp.free.fr>

Reviewed-by: Simon Horman <horms@kernel.org>
Technical Details
Message-ID: <20261026165327.GD257209@horms.kernel.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-352003-linux-kernel-netdev=dewy.ru
References: <20261021193222.1318333-1-acassen@corp.free.fr> <20261021193222.1318333-2-acassen@corp.free.fr>

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-352003-linux-kernel-netdev=dewy.ru
From: horms@kernel.org (Simon Horman)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net 1/2] net/sched: act_api: inherit filter offload flags
 only on new actions
Date: Mon, 26 Oct 2026 16:53:27 +0000
Organization: Usenet Network
Message-ID: <20261026165327.GD257209@horms.kernel.org>
References: <20261021193222.1318333-1-acassen@corp.free.fr>
 <20261021193222.1318333-2-acassen@corp.free.fr>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="1352484"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:9qqeAcDzTsT+gJzwrvi1Dfo08c0= sha256:gAXOatlHt6OqS9nPQRnI4/lOWc6dtihwPir99YDYsbE=
	sha1:HhYjjfI8HUH1YYhcgm2j+fM3Mls= sha256:KP+eAUnXiY04afDMcSg0z/AJ4Q7GCpM/ZbgsGrEXZbc=
Content-Disposition: inline
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 4AFD1125BAD; Mon, 26 Oct 2026 19:53:55 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.738
X-Spam-Status: No, score=-3.738 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.339, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
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 JcYZeEzH-LT3;
	Mon, 26 Oct 2026 19:53:50 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-352003-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 813D7125BA9; Mon, 26 Oct 2026 19:53:41 +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 BE4752794C; Mon, 26 Oct 2026 16:53:35 +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=1793033613;
	b=QfFB7FEXrqzUBaMXUp+dxKp3kNiV7ZOeMNVM0wfYNm8jzWuWBmMsP8l9sfS8Kxs7hLpa
	 WgvVla7z2M15dw+r9d8mUnQwHq/x34xDq3oMRW3wvPfEM5meIgRSg5/2bHAyIfL3nzhbc
	 8OocOn3ITyIvLgGmc+OAl/4YqPq6nL0Nt3PkB7NnqC1auwwrS7fpPHC4PlTE8hqdgJWSs
	 vPMMIUTOvWbKAWkaUaMTIlmBBoFi3KOqkiUAGovQJoy2AqaMRIkjs+3zisL2hzgBBf5YR
	 D4cYieeL+fdWhLRYpLphz+z1t7Edw0ZRVS1YgTcHfkC5IHNu6bQcLA5lMJSCwqdaitQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793033613;
	h=X-Original-To:Received:Received:DKIM-Signature:Date:From:To:Cc:
	 Subject:Message-ID:References:X-Mailing-List:List-Id:List-Post:
	 List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence:
	 MIME-Version:Content-Type:Content-Disposition:In-Reply-To;
	bh=npiwoGlUI3XgozENEsH36EsRteGrJOb6/rz8ZfwuW80=;
	b=Lj0ZybVSIJUBOYMqtWQoWK0jwUbQvMOduA7SB1UFtyoak+R++3qRYJy/FzVPnCpGbuUE
	 nPH3q9rTT9ougwadXXo5x50b0tffQB5Uq7iJ/P7sqHxt97CFtOHBWEiviZVuHQQsVyeoh
	 3Hw4/Qi/0xlDqQKvZw2HITXROxSRI5IXzLNUyY3q2EqZQO7akojuB9lKchpEaYmfKEudJ
	 IixCRis8o0bJKSh5BOjfRu1l9WcPBySJ0AyEbV8V6TwzCYoeVHCVu42IEdR2CwoEZONnu
	 wlJe+byDcIT7pmkMg2plGFyKuyqcgrRoF3Icvq22UsWzWFOirEZpzNljuXoPL/q3UJA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Hey+lG0T;
	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 64152606A323;
	Mon, 26 Oct 2026 16:53:33 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Hey+lG0T
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793033612;
	b=JbPlw0wHV2njeQpp1nxjZlYNlTW5KTEfNrLoRzljUf8AzQdKGZMCWNaLs5zre/UaFbA7
	 S7PAAUi4KkR3yj2a4gEDEkqVwwfhv2q5L3Kcf2n6ZCGMdeUYdCNHZiv/1Sy7oVzYeBu+p
	 nLLLZz5P4+tGSVor51qFUP4LhapZbpVF0Ic6Bkx8d8B+bdrug1Hf53fIE/OGED7tADDXM
	 r7AI+xBdMmM/IDCs8OtwELQj6/zbU+oSwfdQ/cUNB91pjKTtk6737EASRQfArYpnrNxEM
	 ujFVhymzfDQR9s0GYuRWsamG8rN+LUiAUlNAobXggvWabPeFal1mm4JomrSdNZjS0xQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793033612;
	h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID:
	 References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To;
	bh=npiwoGlUI3XgozENEsH36EsRteGrJOb6/rz8ZfwuW80=;
	b=uTpZGEz7em9ojoPNuGF47J3gigmReL9Ev98BGF/xSnysIlTmWTZoCO8ToS3LemoAOcyh
	 w6hMUiZkEA8YPDdYHK+IsLIl9HFh0dQpzXr9Dfbr5e9plHOoh1ujkJbTtoMv7depkGBrq
	 d7UpXgm83xs26fb7V3Nb3ybB6MtFqEoHN/aNx2TJvKcZ/JweeiLRskOTohatqNUU6eTbN
	 T39VnTw580tXAbw9wBNcDowOhUtDSXioOeS9Nh9OmNaULmXBaJTxEQ4sxXcpt+fVJoqFa
	 XrIjnRpErX2KyJZK9siF7EgIswoCBUnfpmc5TCpPcudUsADm6OlCJNrtvs1LDdUJIjA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Hey+lG0T;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3E804606A31A;
	Mon, 26 Oct 2026 16:53:31 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F04E1F01825;
	Mon, 26 Oct 2026 16:53:29 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1793033611;
	bh=npiwoGlUI3XgozENEsH36EsRteGrJOb6/rz8ZfwuW80=;
	h=Date:From:To:Cc:Subject:References:In-Reply-To;
	b=Hey+lG0TAhUsAJP0mNh8EOzWe+NQI+eYyrS5mauLlWjYSoD0BsWVw7acM+48vYlUc
	 JT7k9tmBuJialMzYNk3QW6DGWvwaNy2/QNoNN/HE5Tpg3+8moOZUm4mL3zJXOMBXlx
	 QV/ePAj+fryNgmE/fNL6rnl36RpH70GAy0O43wo8Whx4JRdEGTT8XghmIvRlULbIMJ
	 fH1S1qzn3DTaE/mKpNPiYuGiZnbRQk6xDrrakFVc8Enpvr68y4LaBkR5q4yXJ8NfVU
	 2c78K2TKEv8zbl58xTvHKL2JqO9KDudqlLRI943zqI7ow7yp/7fAXlIVxgMNaDt5R7
	 3Dg8itv4BBJfg==
X-Cc: Jamal Hadi Salim <jhs@mojatatu.com>, Jiri Pirko <jiri@resnulli.us>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Vladimir Oltean <vladimir.oltean@nxp.com>,
	Ido Schimmel <idosch@nvidia.com>, Shuah Khan <shuah@kernel.org>,
	netdev@vger.kernel.org, linux-kselftest@vger.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
X-In-Reply-To: <20261021193222.1318333-2-acassen@corp.free.fr>