Article View: linux.kernel.netdev
Article #12259Re: [PATCH net-next v4 2/2] pppoe: queue unbound packets directly
From: Simon Horman
Date: Fri, 06 Nov 2026 18:12
Date: Fri, 06 Nov 2026 18:12
62 lines
9840 bytes
9840 bytes
This is an AI-generated review of your patch. The human sending this
email has considered the AI review valid, or at least plausible.
Full review at: https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261103111711.28202-1-qingfang.deng@linux.dev?part=2
---
pppoe: queue unbound packets directly
This patch makes pppoe_rcv() queue unbound packets directly with
sock_queue_rcv_skb() instead of going through __sk_receive_skb(). It also
removes the now unused pppoe_rcv_core() backlog callback. Ordering with
PPPIOCGCHAN now depends on the synchronize_net() added in commit
92c1bf630abf ("pppox: drain queued packets on channel handoff").
> diff --git a/drivers/net/ppp/pppoe.c b/drivers/net/ppp/pppoe.c
> index 5d5187e4976b3..51445fddb4d31 100644
> --- a/drivers/net/ppp/pppoe.c
> +++ b/drivers/net/ppp/pppoe.c
[ ... ]
> @@ -417,11 +389,12 @@ static int pppoe_rcv(struct sk_buff *skb, struct net_device *dev,
>
> skb->dev = NULL;
>
> - if (likely(po->sk.sk_state & PPPOX_BOUND)) {
> + if (likely(po->sk.sk_state & PPPOX_BOUND))
> ppp_input(&po->chan, skb);
> - return NET_RX_SUCCESS;
> - }
> - return __sk_receive_skb(&po->sk, skb, 0, 1, false);
> + else if (sock_queue_rcv_skb(&po->sk, skb))
> + goto drop;
[Severity: Low]
This isn't a bug, but with this change PPPoE no longer calls
__sk_receive_skb() anywhere. A comment in ppp_bridge_gso_segment() in
drivers/net/ppp/ppp_generic.c still says it does:
drivers/net/ppp/ppp_generic.c:ppp_bridge_gso_segment() {
...
/* skb->dev is NULL here (cleared by __sk_receive_skb() for PPPoE),
* and some GSO handlers (tunnels, IPv6 UFO) dereference it.
*/
...
}
The NULL skb->dev precondition still holds. The explicit skb->dev = NULL
in pppoe_rcv() above provides it, and __sock_queue_rcv_skb() also clears
it on the queued path.
Should that comment be updated to say pppoe_rcv() clears skb->dev? As
written, it points at a function PPPoE no longer uses. Someone relying on
it could drop the assignment in pppoe_rcv() and bring back the NULL-dev
problem the comment warns about.
> +
> + return NET_RX_SUCCESS;
>
> drop:
> kfree_skb(skb);
[ ... ]
Technical Details
Message-ID:
<20261106181250.1264364-1-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-358099-linux-kernel-netdev=dewy.ruReferences:
<20261103111711.28202-2-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-358099-linux-kernel-netdev=dewy.ru From: horms@kernel.org (Simon Horman) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v4 2/2] pppoe: queue unbound packets directly Date: Fri, 6 Nov 2026 18:12:49 +0000 Organization: Usenet Network Message-ID: <20261106181250.1264364-1-horms@kernel.org> References: <20261103111711.28202-2-qingfang.deng@linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="3942772"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:BDtJf68Btxa9qb/WMTbyCpIWRsw= sha256:mwxgzBoWwp+MzLWH4q0DZoGM79aTD6eBrXuZ4qei4k8= sha1:+TyFBSm5JKYyHKSmo2UXNk2QeTI= sha256:Ud93jHOeRMYGjRPderuEuLQt8nR/1OMNRCHrjwRcEJ4= 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 680EB1132CC; Fri, 6 Nov 2026 21:19:40 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.401 X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, 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] 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 D3uN6aq0FUxD; Fri, 6 Nov 2026 21:19:36 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-358099-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 4F5D21132C9; Fri, 6 Nov 2026 21:19:26 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 9CAF435BBE; Fri, 6 Nov 2026 18:13:21 +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=1793988800; b=QywlmYA9+rgRaguk7L88foxjlvLtJwZPQvmw7BHvToFDOgmQ9ZgFJyofE0kCJUBxlGaB cJmFpvL1FkGTuwPIKIjp7T10QYRU6XqP8c6K6q33jOBqJ8u9sRhHaflDaoA1fL7o3xLl4 xe3ydWDLvVlFpZQr6y9V0JMlyw55MtntvzlbguVBIkf9nUsrinqW5+uESV5ippBbGCO3y AbTsu1meNYeCIRMKYGF3IycKNfaOgX5T7Ym/czdzWAjOem/NKhgMEN2VxjmzFHBj+SnPV xFDu3CN7Cdp/f09sIzPxjKqSRtsOJdZfOlLzquMErV/bkIKyMWqqVRKU+aG3nftKTkA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793988800; h=X-Original-To:Received:Received:DKIM-Signature: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=5uW9Ehp+A9D3eXSKYh46ELliQ8ORQGcIYpLoOSQ/VQw=; b=yJX6wyZWCRbshi/KOQdWYj9h3tFO800xwvVfA8wM6VrQcbK1Kwe+1y4TnoIS6C+kvW5R gT7rehISdNoBy+u2nFUZX7nNTB7Uy4T4HQsw+4DJ9b9jaagNXR/yPp2YoIv//KV/nnLqE wmJRaKv3TrOv6z3iV/Hli20NGeSuz+GccG5T6igaz6wvs9qZk+MEqyz4mVIh9bDqzA9IR RuuIT7rjihkXLXt30UpxWlacjWmqxFZrwYC6o0oLa88V+S7bMj0Dw15Swe1+u0b1uzcm1 zUm8y7566GzNfZFCcv79U7gcSVMpZBJCrcGNPr0NjWyZ3y7kYaDMVB9RxeGFjI56fiA== 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=Bjfx1BE+; 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 DCD02606A338; Fri, 6 Nov 2026 18:13:19 +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=Bjfx1BE+ 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=1793988786; b=ENlNRplp0wILK/RbG29diDQJXKmZrusCsD+SXqS0xgDT51PgpnsZMBispseP2mjRP7ss HxWizHJmbVWdsJIw/QRnS4wKGZGpB9shFdqZXbsBOpFySV1kZ5n5CJyglA7o2RxfiXRZ4 gQu+CRjbw4IvV1NTAmR+hR55tbYDp8ookHuCgNqBM7fhG5Rc28xNfcxPQBBd29snx3KF9 VK8z/sot/w21Eb3eTFf/+VYcEDW+dzKOh+75+driGMEeZ5XVCpfv/YrBN2SKyeZtBGYZH rTsHvbOiCQpu338wNBp3J2efV6ecFOUUQtCBDD4iy9RQGZv378+vA8rszZxBDum+bRA== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793988786; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:Content-Transfer-Encoding; bh=5uW9Ehp+A9D3eXSKYh46ELliQ8ORQGcIYpLoOSQ/VQw=; b=dZ+y4NEFeIOG0cKR+1UXGqgBbu7AKmUSaFrRxT1ApomjFGBazq8AXj0CHpNFZ4ew8ZK4 6aBRQF3lMBMNb7rUtk+KS2HUVFLu7s0SsPda2PykNbbAv9XAE7yqCU8lLWqCvot7yqh4z XvkPzgDq/3OYq4HYFZbdUPDNSJWV221INRLRINHEkoMbZZkGlJ9j6UHCD01UbSYktMru0 jykDFte23veoGxsSrouydgAL2DTysfYS+HUu0/+Nf6Br720P4qgjHFe8nEG29Fim8pKa8 cX5JUU8uqKPZi2L7LhR8QNL0MlHvlZIVl61Vl4hy0ZafU+mXI1ARWjTTuzEy1h02qGw== 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=Bjfx1BE+; 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 DD7B1606A326; Fri, 6 Nov 2026 18:13:05 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 43D901F0089F; Fri, 6 Nov 2026 18:13:03 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1793988785; bh=5uW9Ehp+A9D3eXSKYh46ELliQ8ORQGcIYpLoOSQ/VQw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Bjfx1BE+rETzh/Pvou9EtopRmr6k9H4YPXvWhTJoTTJVIfUjsRy+PUIKIyJfTFZak ury3s+gPOLNjHl7x626rAPkNW//X9y6xVzGHa1PmpmQqdll1hJe4dVh8zlqxLttGUh aiVode3Hgr8mi3vApurA7n06cNCdM9sGYWwBthQ+/lHRcoyZGHBWKMuj2Cp8GRnvit jjVioC8PmZaZ3SAsUYx6Heb1NZMYEr7qBui6pDDm8pzUKtGwzNxffnA9uYzWhnq5tu znj/3NavQz9vMxbpJQQa1++SIzXizIOavM1UWmR1JBb6sKt3fJZjehoQH2JryzJ2tr t3IhGTnqFB5Lw== X-Cc: Simon Horman <horms@kernel.org>, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, manizada@pm.me, ericwouds@gmail.com, nbd@nbd.name, netdev@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: git-send-email 2.56.0 X-In-Reply-To: <20261103111711.28202-2-qingfang.deng@linux.dev> 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