Article View: linux.kernel.netdev
Article #3504[PATCH nf-next 1/2] netfilter: flowtable: use PPPoE GSO handler
From: Qingfang Deng
Date: Thu, 15 Oct 2026 08:56
Date: Thu, 15 Oct 2026 08:56
51 lines
7065 bytes
7065 bytes
Flowtable currently segments GSO packets before adding encapsulation
headers, calling nf_flow_encap_push() separately for each segment.
Since commit 55a5d8fca836 ("net: pppoe: implement GRO/GSO support"), the
PPPoE GSO handler can segment encapsulated packets and update the PPPoE
payload length in each resulting segment.
Push the encapsulation headers before segmentation and let the PPPoE GSO
handler update them. This removes the per-segment encapsulation step
from nf_flow_encap_gso_xmit() while keeping the software segmentation.
Signed-off-by: Qingfang Deng <qingfang.deng@linux.dev>
---
net/netfilter/nf_flow_table_ip.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/net/netfilter/nf_flow_table_ip.c b/net/netfilter/nf_flow_table_ip.c
index c8c29a9a1684..ce69f4e741e2 100644
--- a/net/netfilter/nf_flow_table_ip.c
+++ b/net/netfilter/nf_flow_table_ip.c
@@ -767,12 +767,6 @@ static unsigned int nf_flow_encap_gso_xmit(struct net *net, struct sk_buff *skb,
skb_list_walk_safe(segs, segs, nskb) {
skb_mark_not_on_list(segs);
-
- if (nf_flow_encap_push(segs, xmit->tuple, xmit->outdev) < 0) {
- kfree_skb(segs);
- kfree_skb_list(nskb);
- return NF_STOLEN;
- }
__nf_flow_queue_xmit(net, segs, xmit);
}
@@ -783,11 +777,12 @@ static unsigned int nf_flow_queue_xmit(struct net *net, struct sk_buff *skb,
struct nf_flow_xmit *xmit)
{
if (xmit->tuple->encap_num) {
+ if (nf_flow_encap_push(skb, xmit->tuple, xmit->outdev) < 0)
+ return NF_DROP;
+
if (skb_is_gso(skb) && xmit->needs_gso_segment)
return nf_flow_encap_gso_xmit(net, skb, xmit);
- if (nf_flow_encap_push(skb, xmit->tuple, xmit->outdev) < 0)
- return NF_DROP;
}
__nf_flow_queue_xmit(net, skb, xmit);
--
2.43.0
Technical Details
Message-ID:
<20261015085603.1170-1-qingfang.deng@linux.dev>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-346621-linux-kernel-netdev=dewy.ruShow 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-346621-linux-kernel-netdev=dewy.ru From: qingfang.deng@linux.dev (Qingfang Deng) Newsgroups: linux.kernel.netdev Subject: [PATCH nf-next 1/2] netfilter: flowtable: use PPPoE GSO handler Date: Thu, 15 Oct 2026 16:56:01 +0800 Organization: Usenet Network Message-ID: <20261015085603.1170-1-qingfang.deng@linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2491880"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:tNmvZxkB0RrWazpzWexDJjAwE4g= sha256:D9YRkMqR9MhxFZpEzbbl4AHgrLY54vaIESCZX/Yf7mc= sha1:SxRiScCgG3yZLzFdNbhVTxGmZjQ= sha256:Uzo406dq3AAHDIebj+D6Q8/i5N1kOd4KJ1HF87MjewE= 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 27369110291; Thu, 15 Oct 2026 12:05:53 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -0.749 X-Spam-Status: No, score=-0.749 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.25, MAILING_LIST_MULTI=-1, 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 (1024-bit key) header.d=linux.dev 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 AP2TSJwM_R8A; Thu, 15 Oct 2026 12:05:48 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-346621-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linux.dev X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id D032A11027A; Thu, 15 Oct 2026 12:05:38 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 17D1D31E8B; Thu, 15 Oct 2026 08:57:18 +0000 (UTC) X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F236E4E4C22; Thu, 15 Oct 2026 08:56:16 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="PAOmTlW2" X-Received: from mta1.migadu.com (out-119.mta1.migadu.com [95.215.58.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A550349483A for <netdev@vger.kernel.org>; Thu, 15 Oct 2026 08:56:13 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.119 X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792054576; cv=none; b=n2UT/4O5JP/TIrBaHnSDLlUA7nu4IW0fj/OIcjZujpavhWeX+XphtQsPSzG0PacKJtChsGkL4VX6iXrV8hdBRvse6LSiesWE/PeHYf6uOrPT1eZdo/ZUlNc+Ln+3BEMrOq1ALVNIf4Lgp2ONIiTfSqhRJqIHtKB2gDwbj1hnUQ4= X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792054576; c=relaxed/simple; bh=tB2BgHLFyl6D2g/JIU2o35GL7Ibd5QUxFkroC66zz7U=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=boYyWaPT8zzwLdIowc2s2QyE/TH1jhp5EP6NDU8l5DJJoND4BjqJuFj+57HaHw2WeCubWE/LVoAqN+LYMD+qzGKvbFrfQHBcOwQKKPLR9nWeUEGAiuILt5MZvFJTyB2QozmaaKZgJo1teZvhc0Bo5jtQd15viv1hIQ9DVSO9ys0= X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=PAOmTlW2; arc=none smtp.client-ip=95.215.58.119 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Envelope-To: netdev@vger.kernel.org X-DKIM-Signature: a=rsa-sha256; bh=tB2BgHLFyl6D2g/JIU2o35GL7Ibd5QUxFkroC66zz7U=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1792054571; v=1; x=1792659371; b=PAOmTlW2ajxAOFiN4lLtgm+S9Y5wNKrSzvbYltUtAiDaBuk4ubm7V1EnQK59a0QmZbb5x61N gc/mCNI+NDTaOSsTFAIRCaLk4ygaiAkHbn80olh1xCKES6qmNPZTRAkK2WK43nRiU0AVhZuZAJo NB5/wMEHi+CP+6NuNdi8gv6c= X-Envelope-To: netdev@vger.kernel.org X-Received: by smtp.migadu.com with ESMTPS id e755357549c3f6a4; Thu, 15 Oct 2026 08:56:11 +0000 X-Mizu-Trace-ID: e755357549c3f6a4 X-Migadu-Flow: FLOW_OUT X-Cc: Felix Fietkau <nbd@nbd.name>, Qingfang Deng <qingfang.deng@linux.dev> X-Mailer: git-send-email 2.43.0 X-Precedence: bulk X-Mailing-List: netdev@vger.kernel.org X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>