🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #3505

[PATCH nf-next 2/2] netfilter: flowtable: avoid unnecessary linearization for PPPoE

#3505
From: Qingfang Deng
Date: Thu, 15 Oct 2026 08:56
28 lines
6435 bytes
Passing no features to skb_gso_segment() forces nonlinear skb to be
linearized, even when the output device can transmit them directly.

Allow scatter-gather and frag_list payloads during segmentation to avoid
the linearization. dev_queue_xmit() subsequently validates each segment
against the output device's features and linearizes it if necessary.

Signed-off-by: Qingfang Deng <qingfang.deng@linux.dev>
---
 net/netfilter/nf_flow_table_ip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/netfilter/nf_flow_table_ip.c b/net/netfilter/nf_flow_table_ip.c
index ce69f4e741e2..aeef1fb27d70 100644
--- a/net/netfilter/nf_flow_table_ip.c
+++ b/net/netfilter/nf_flow_table_ip.c
@@ -756,7 +756,7 @@ static unsigned int nf_flow_encap_gso_xmit(struct net *net, struct sk_buff *skb,
 {
 	struct sk_buff *segs, *nskb;
 
-	segs = skb_gso_segment(skb, 0);
+	segs = skb_gso_segment(skb, NETIF_F_SG | NETIF_F_FRAGLIST);
 	if (IS_ERR(segs))
 		return NF_DROP;
 
-- 
2.43.0
Technical Details
Message-ID: <20261015085603.1170-2-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-346622-linux-kernel-netdev=dewy.ru
References: <20261015085603.1170-1-qingfang.deng@linux.dev>

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-346622-linux-kernel-netdev=dewy.ru
From: qingfang.deng@linux.dev (Qingfang Deng)
Newsgroups: linux.kernel.netdev
Subject: [PATCH nf-next 2/2] netfilter: flowtable: avoid unnecessary linearization for PPPoE
Date: Thu, 15 Oct 2026 16:56:02 +0800
Organization: Usenet Network
Message-ID: <20261015085603.1170-2-qingfang.deng@linux.dev>
References: <20261015085603.1170-1-qingfang.deng@linux.dev>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2491957"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:L2fDvwNSqvKk3oKmpT+bShrJCz0= sha256:04l7iMR2QPPmwt7m+feIH9ioNAExAePELLiUx57xgs4=
	sha1:9xYXSIUR+Cj00qzyaLzOYV7IDac= sha256:oCrQwehZRPIaLskqIWBKJvmxlW+bmuqNQq/xnD8QVT0=
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 5AAA2110292; Thu, 15 Oct 2026 12:06:05 +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 uylP97yVBOZ4;
	Thu, 15 Oct 2026 12:06:03 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-346622-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 C137B11027A; Thu, 15 Oct 2026 12:05:54 +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 374FD4116C; Thu, 15 Oct 2026 08:57:34 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 80B9A4EBAC9;
	Thu, 15 Oct 2026 08:56:20 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="Ev0W2+Xf"
X-Received: from mta0.migadu.com (out-174.mta0.migadu.com [91.218.175.174])
	(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 D5E244DA541
	for <netdev@vger.kernel.org>; Thu, 15 Oct 2026 08:56:18 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.174
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1792054580; cv=none; b=lvCZiErvg7BxQpmje7QSHpjxK1gZWmqCSdiXmc44UNF/opWvIhMqvJHAou7wH13kEUS+1gLDTUfSSVJlclnhJVVe6mbSnB7Udj8uvYV1GCii+MQUScR5d+SWiTwflnf5xyrjff9HcK3vy4vQe49/zydJSmcMFlIqvgIfWiRvvjo=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1792054580; c=relaxed/simple;
	bh=bUr05XVeGddQjujnjNuFewb+iUPWllxq2K3a7xSu2+Q=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version; b=XdToL9h6sH2znb7L7wAehe7Fi0QYrCB93u4PZxkZ4HZBuufaxJUcIbF9CWvX2ol1XQc7MM13A2ssTgWuIwek6GMY2DB4wxM8TCrCzrGFWISndsC2MjUPaIMr3gN4YQXzt3eSiretoj+1EQZwGk+ydSGmfK684mOgq4ptq8H7MjI=
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=Ev0W2+Xf; arc=none smtp.client-ip=91.218.175.174
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=bUr05XVeGddQjujnjNuFewb+iUPWllxq2K3a7xSu2+Q=;
 c=simple/simple; d=linux.dev;
 h=from:to:subject:date:message-id:mime-version:content-type; s=key1;
 t=1792054576; v=1; x=1792659376;
 b=Ev0W2+XfECUhGUdQNkOTaqE8Xv9TXe7Ndtk2tuloTRkGZ6ZAVa+50UbH6v4/O1ercIeU3mDv
 bT3RpDCVIzf7bpyhne/1ZsdFx3KlfU8ccXXi3UnrcNroXNBzQ/JPw43518yHOFayXxoPlwFtak6
 e6d1Zo3uE4DHMLUy6AWHs0Z0=
X-Envelope-To: netdev@vger.kernel.org
X-Received: by smtp.migadu.com with ESMTPS id 0fad598284d665b2;
	Thu, 15 Oct 2026 08:56:16 +0000
X-Mizu-Trace-ID: 0fad598284d665b2
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-In-Reply-To: <20261015085603.1170-1-qingfang.deng@linux.dev>
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>