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

From: Qingfang Deng

Date: Thu Oct 15 2026 - 04:59:00 EST


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@xxxxxxxxx>
---
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