Article View: linux.kernel.netdev
Article #13188[PATCH net-next v3 4/4] net/sched: act_tunnel_key: skip dst cache for skip_sw actions
From: Alexandre Cassen
Date: Mon, 09 Nov 2026 12:46
Date: Mon, 09 Nov 2026 12:46
37 lines
9542 bytes
9542 bytes
A tunnel_key set action allocates a per CPU dst cache for the software
path. This takes about 5 KB per action on a 128 CPU host. An action
flagged skip_sw never runs in software and the dst_cache helpers handle
a missing cache, so skip the allocation. Since the previous patch, a
skip_sw filter alone is enough. A replace leaves the flags of an
existing action unchanged, so check these rather than the request ones.
Reviewed-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Alexandre Cassen <acassen@corp.free.fr>
---
net/sched/act_tunnel_key.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/net/sched/act_tunnel_key.c b/net/sched/act_tunnel_key.c
index 503834853306..28d9cc080101 100644
--- a/net/sched/act_tunnel_key.c
+++ b/net/sched/act_tunnel_key.c
@@ -481,9 +481,13 @@ static int tunnel_key_init(struct net *net, struct nlattr *nla,
}
#ifdef CONFIG_DST_CACHE
- ret = dst_cache_init(&metadata->u.tun_info.dst_cache, GFP_KERNEL);
- if (ret)
- goto release_tun_meta;
+ if (!((exists ? (*a)->tcfa_flags : act_flags) &
+ TCA_ACT_FLAGS_SKIP_SW)) {
+ ret = dst_cache_init(&metadata->u.tun_info.dst_cache,
+ GFP_KERNEL);
+ if (ret)
+ goto release_tun_meta;
+ }
#endif
if (opts_len) {
--
2.43.0
Technical Details
Message-ID:
<20261109124618.933149-5-acassen@corp.free.fr>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-359283-linux-kernel-netdev=dewy.ruReferences:
<20261109124618.933149-1-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-359283-linux-kernel-netdev=dewy.ru From: acassen@corp.free.fr (Alexandre Cassen) Newsgroups: linux.kernel.netdev Subject: [PATCH net-next v3 4/4] net/sched: act_tunnel_key: skip dst cache for skip_sw actions Date: Mon, 9 Nov 2026 13:46:15 +0100 Organization: Usenet Network Message-ID: <20261109124618.933149-5-acassen@corp.free.fr> References: <20261109124618.933149-1-acassen@corp.free.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="359191"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:CPisZhwCaGPWPVKFCCF5NcWwwtU= sha256:ZR1P58kQ31fK9sGK9cZR3aS1vCYO7oJEyWbekbn25pQ= sha1:yHaecpR2aY4Pq8TYByL/mzrO/P0= sha256:GmGPKKhIiTa58VyQ6acMEV09P0jvyV5VoZVIm3DbPIc= 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 963281137E5; Mon, 9 Nov 2026 16:01:54 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.051 X-Spam-Status: No, score=-3.051 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, 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=corp.free.fr 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 XgP4W65FwDPG; Mon, 9 Nov 2026 16:01:51 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-359283-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=corp.free.fr X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mail.dewy.ru (Postfix) with ESMTPS id 04C1711379A; Mon, 9 Nov 2026 16:01:43 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sin.lore.kernel.org (Postfix) with ESMTP id 7388F342DF; Mon, 9 Nov 2026 12:46:37 +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=1794228388; b=HU1ilhv1R45lzdmqBoyrx9vKAJuzmnmQpj9QsVxcK5Tl0z9dUA9PzrTiN2ySwSJ7C989 sFGkJtZj/+bQNma2cQWvKKDMe/mb64X8grVh+d2t8lezpFN3SMsawLgOLw2fiyAAaanHe N8ZYRdgzZ6jhaxbZwaYEnObFF4BeThriY8+F/IxEabjoEoov9cV9OXAZM951EVh9PrEOM /UpTgx8UfOgtjoxXvxr2Zk+JHhem53fBKkj9jiDO4sZz/wQdJ+c8IF8czLQCsxb1xaTPv AFjVW+lp0kK1hW0IGU+hMApdNFPfVh/o8cEN6H9EA37w9v13VIJW178xbpIaEnsWvTA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794228388; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:From:To: Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Transfer-Encoding; bh=b6AWFR1oqoFKrTZfJ7PAWRxGJO9i0u4VcImjxFTGrIQ=; b=eX9X52mRxFCyWdecwCbnQWFddGHSScIvDhuJ4twsZ0bnmAM/J7KhSG+Jzs77Bbllsoe1 Uk3zN2vvp14ul7AuXiX+0hPSYxu8HG0a6Mrb4uk9jY+CJDjVKXbcrrJEAJQQZBxkfZXb6 lUyv5DXzXwyHfXsrLPYG3IDaSekKsqKYuZFr+4S/rQj7A3chucU1AyPYeETYbyeMPVr22 HbS3rqmd9pGB0tpwNRx3XfeZGAeZZehxSio1QZ5rLWjwP2Z8kRkiVpQ3BfbD62iGbGBDZ BzW16nNV2e30GE7UR3DQE7Rhwesqf0AXmT5mqS2Z47zTavfRw7+qiJQHCWsA2HhwLLQ== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=corp.free.fr header.i=@corp.free.fr header.a=rsa-sha256 header.s=rcs header.b=XLd5XIUt; dmarc=pass header.from=corp.free.fr; spf=pass smtp.mailfrom=corp.free.fr; 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 EA6D3606D816; Mon, 9 Nov 2026 12:46:27 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=corp.free.fr header.i=@corp.free.fr header.a=rsa-sha256 header.s=rcs header.b=XLd5XIUt X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=212.27.60.169 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794228387; b=Dpi+9DZ6yU6oBifdGIgnO34O60q636/9nyABhsXQ59RNa4SIPq1qn+tyF08Pb3H4Lok9 ACWxI4vFa707WG5IrYdeIhCSiRcACGqgVyayvcN4IMJrO3/jLPU6TxtxlKUc/eKpkWclZ IbOCF5HiLuJK/oaHHlpDLLFREa/eYzGjZgf20piQhcuEYa+JLcOIUMgjsaxW/LJOvz2E5 tICJd3tGlxI8pNSZakgNHTWlU7E9v72YGrjWx3taBYDHivJ30bNo9hZC0bZSRGaL60sCa W5BxzcvumJfNOcrkhxov9YKK/hKpw2xNOJWoxiQqeros7LENvfize2u/yby2NnqsYLQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794228387; h=DMARC-Filter:DKIM-Signature:Received:From:To:Cc:Subject:Date: Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=b6AWFR1oqoFKrTZfJ7PAWRxGJO9i0u4VcImjxFTGrIQ=; b=fKE0NQ9IHvZoMr4RniipGHZmt8PKSKgnL/7igDJkgi0536NqrxsGPyMOUuT0u0YNr63M cy5Ta/Ffpryqgbvc9TqAjmL1gN0NFtgA2HaeRVmevuFwUm4F49cZQxH5V7oyc0hAILmr3 kOcdqTB68u1yaL7qX0/1XAYMPQ4vmRxxniUcSwGjFBvNa8mKObpjBqkmTLQXyUDkCijcf /B0HOdIeLw9/sXN6VToWfIqJwoOAPsod/dX1vFXzK1PVIGbxMV4hQ+kHh2wFMMNYcTB2v tMyFw9oH5lqbRAkKSak7qea6rejoiXf3cbv5Fqd4UkXIM2JsyJSAbBYWFG15wwc9UWA== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=corp.free.fr; spf=pass smtp.mailfrom=corp.free.fr; dkim=pass header.d=corp.free.fr header.i=@corp.free.fr header.a=rsa-sha256 header.s=rcs header.b=XLd5XIUt; arc=none smtp.remote-ip=212.27.60.169 X-Received: from rcs.proxad.net (rcs.proxad.net [212.27.60.169]) (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 3C400606A321 for <netdev@vger.kernel.org>; Mon, 9 Nov 2026 12:46:26 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3C400606A321 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=corp.free.fr X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=corp.free.fr X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=corp.free.fr; s=rcs; t=1794228384; bh=q2r6/2kIKUn1CDRxWFWO4inRPPhA5nUO9bCMaRd+9Hs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XLd5XIUt1AVCpOz8xZm4sxv46CVvEB1muwKfQec//8mbXg21yyJXbCd11EyH7ogXR xm1ZWpfpmhJgz616izE3KZQ/nwtLSSQLoBvSej5N9e9Axq8yMwm3xrLk8mB9FvAR7N OfDX8OWqJoaW/RAp44vB95YUg+ih1k4ImPt2BvO1kmHVb0SYxwRhx0PskgScagDJep 2yIGHqQ4fjh8ivuO6gzjS5RWhfTub0QgDMs2ARn0+3hdK7ekajrnrSnKe+lL0w8oM3 rBSP8msLSVzpDjLl4opabLca7xeNc43VH5RkgBl+ZuLVkUMoi4Gv1HaF3S5+7RB/s3 JCqneM1pirP5A== X-Received: from lnxos-dev.home (82-66-150-212.subs.proxad.net [82.66.150.212]) by rcs.proxad.net (Postfix) with ESMTPSA id 965E844C066E; Mon, 9 Nov 2026 13:46:24 +0100 (CET) X-Cc: "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>, Vladimir Oltean <vladimir.oltean@nxp.com>, Ido Schimmel <idosch@nvidia.com>, netdev@vger.kernel.org X-Mailer: git-send-email 2.43.0 X-In-Reply-To: <20261109124618.933149-1-acassen@corp.free.fr> 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