Article View: linux.kernel.netdev
Article #3109RE: [PATCH net-next v6] tcp: add BPF kfuncs to set per-socket ECN mode and AccECN option
From: "Irlanki Sandeep"
Date: Wed, 14 Oct 2026 07:49
Date: Wed, 14 Oct 2026 07:49
44 lines
9613 bytes
9613 bytes
On Wed, 7 Oct 2026 17:00:28 -0700, Jakub Kicinski <kuba@kernel.org> wrote: > On Thu, 1 Oct 2026 18:57:59 +0530 Irlanki Sandeep wrote: > > Suggested-by: Jakub Kicinski <kuba@kernel.org> > > This needs an ACK from TCP maintainers. If you respin please make sure > to drop this tag, this tag is for cases where someone suggested sending > the patch as a whole. Not for changes requested during normal course of > review. Understood, thanks for clarifying the tag semantics. I will drop the Suggested-by tag in v7 if a respin is needed. > There was a false positive from sparse regarding the use of kfunc, > I kicked off the AI review manually, please check the results here > in an hour or so: > https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261001132759.1076145-1 -irlanki.s@samsung.com Thanks for triggering the manual AI review. The results show 0 Critical, 0 High, 1 Medium, and 1 Low: 1. [Medium] SYN arrival race before LISTEN_CB completes: The review identifies that inet_csk_listen_start() hashes the socket before tcp_call_bpf(BPF_SOCK_OPS_TCP_LISTEN_CB) runs. A SYN arriving on another CPU in this window will see ecn_mode as UNSPEC and fall back to the sysctl. This is a preexisting limitation affecting any BPF_SOCK_OPS_TCP_LISTEN_CB program that configures listener behavior, not specific to this patch. I will document this fallback behavior in the kernel-doc and commit message for v7. 2. [Low] Selftest scope (API validation vs. packet inspection): The selftest validates the kfunc API layer: argument validation, return codes, verifier safety (sk_is_tcp() guard), and struct field mutation/inheritance. It does not include packet-level inspection. This is comparable in scope to progs/setget_sockopt.c, which similarly tests bpf_setsockopt/bpf_getsockopt round-trips without packet-level wire verification. Awaiting feedback from Eric and the TCP maintainers. Thanks, Sandeep
Technical Details
Message-ID:
<117401dd5bb0$8f05b2f0$ad1118d0$@samsung.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-346084-linux-kernel-netdev=dewy.ruReferences:
<CGME20261001132701epcas5p2da9b0fa7ca3bcef1ff84a62f255bc573@epcas5p2.samsung.com> <20261001132759.1076145-1-irlanki.s@samsung.com> <20261007170028.318acb6b@kernel.org>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-346084-linux-kernel-netdev=dewy.ru
From: irlanki.s@samsung.com ("Irlanki Sandeep")
Newsgroups: linux.kernel.netdev
Subject: RE: [PATCH net-next v6] tcp: add BPF kfuncs to set per-socket ECN
mode and AccECN option
Date: Wed, 14 Oct 2026 13:19:31 +0530
Organization: Usenet Network
Message-ID: <117401dd5bb0$8f05b2f0$ad1118d0$@samsung.com>
References: <CGME20261001132701epcas5p2da9b0fa7ca3bcef1ff84a62f255bc573@epcas5p2.samsung.com>
<20261001132759.1076145-1-irlanki.s@samsung.com>
<20261007170028.318acb6b@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
logging-data="2245516"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:Q5aUxO09323S5Txe+DEfKBYRNIw= sha256:fJux1+zLE4qTgxuohdnURN2hVWwSX/oa2hVg9wQvJw8=
sha1:G+qKTHV2uL3qJgOxnvVTZQcrfH0= sha256:VXty9T/eGGBIF2kfhZXScL6N3VJ7ZrJHWXcaj0JalEo=
Content-Language: en-in
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 B9D69110068; Wed, 14 Oct 2026 11:00:35 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.289
X-Spam-Status: No, score=-3.289 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1,
DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
HEADER_FROM_DIFFERENT_DOMAINS=0.25, MAILING_LIST_MULTI=-1,
RCVD_IN_DNSWL_MED=-2.3, 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=samsung.com
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 bKfNMmz6GvZ0;
Wed, 14 Oct 2026 11:00:31 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-346084-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=samsung.com
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
by mail.dewy.ru (Postfix) with ESMTPS id 3355410FFFF; Wed, 14 Oct 2026 11:00:23 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
by tor.lore.kernel.org (Postfix) with ESMTP id 6FDBD6601D; Wed, 14 Oct 2026 07:51:57 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 402854A341D;
Wed, 14 Oct 2026 07:49:49 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="S7z+lnoE"
X-Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id C47B33A8739
for <netdev@vger.kernel.org>; Wed, 14 Oct 2026 07:49:46 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.25
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1791964189; cv=none; b=nwDCdjB3eiYVcwKRhgdZUU6uBwSAy5blMLnKUPvmqp+RgLV6BCyol9hPV1CkPAi+YH1XsQ9AAIVOTQwSdpwp1Y8XXUJr+U6GGO9QW1cARbdV1BMYSHM0HBvJm8Me2imcQXoxhYMpM6Ze2aqUb0Dj9s6CUP9tlkbbzCTr8PiaTDc=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1791964189; c=relaxed/simple;
bh=dLWKEvruuD6C19bCQno+l/oa1P/6rO/VCYAXqdyytvk=;
h=From:To:Cc:In-Reply-To:Subject:Date:Message-ID:MIME-Version:
Content-Type:References; b=B/4oOcZG6o6F9cQ+a45+wSMtsboj5CRrbBGPhA1pDOyt0SK9bSWoiDkw1ESa760AAKURN70IA7T9rZvn6CkQjIRAm3f95NbAjRswOpEi5hIH3stUUyLnHDYn25PtrGxLwWuCgBCn77iulB2yT2IEV9TJRhcm9VdL/aEdVFBbJiA=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=S7z+lnoE; arc=none smtp.client-ip=203.254.224.25
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com
X-Received: from epcas5p2.samsung.com (unknown [182.195.41.40])
by mailout2.samsung.com (KnoxPortal) with ESMTP id 20261014074938epoutp0288e4fd0cfb4ce9c539b93fd3ef0193f0~eVe0V-AIv2785727857epoutp02H
for <netdev@vger.kernel.org>; Wed, 14 Oct 2026 07:49:38 +0000 (GMT)
X-DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20261014074938epoutp0288e4fd0cfb4ce9c539b93fd3ef0193f0~eVe0V-AIv2785727857epoutp02H
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com;
s=mail20170921; t=1791964178;
bh=Gps2kTJ1Dkj1Dk3mpOjm9wB6BcS474HImd2/NbFl3IA=;
h=From:To:Cc:In-Reply-To:Subject:Date:References:From;
b=S7z+lnoEr8J/ye3xlheFwBwhLSTamfQEJEjNadjjeWLzB3+BqTkImc+qpp/HPhD89
aWUBNHQAE4M6Bruk2knGxRBBsLPF4CjQ82xvLP1ix40x9IBoLZPiJdTKNcYFG1uKwz
XmcGH9azkUtexFE+BNHup7T5TUMf+GS0s5GYxsYE=
X-Received: from epsnrtp02.localdomain (unknown [182.195.42.154]) by
epcas5p4.samsung.com (KnoxPortal) with ESMTPS id
20261014074937epcas5p45bd5d2dddf765964da940e523c757410~eVezhxFcN0855408554epcas5p4h;
Wed, 14 Oct 2026 07:49:37 +0000 (GMT)
X-Received: from epcas5p2.samsung.com (unknown [182.195.38.92]) by
epsnrtp02.localdomain (Postfix) with ESMTP id 4j4NdX68w0z2SSKX; Wed, 14 Oct
2026 07:49:36 +0000 (GMT)
X-Received: from epsmtip1.samsung.com (unknown [182.195.34.30]) by
epcas5p3.samsung.com (KnoxPortal) with ESMTPA id
20261014074936epcas5p3aa47693f3407c0f352943f02e1c112c3~eVeyaq0EQ0767107671epcas5p3R;
Wed, 14 Oct 2026 07:49:36 +0000 (GMT)
X-Received: from SRIB8EG28RUQ1R (unknown [107.108.208.92]) by
epsmtip1.samsung.com (KnoxPortal) with ESMTPA id
20261014074933epsmtip1687c42748145a71c8c4fb0c232d0e8f0~eVevVvOmT2972729727epsmtip1B;
Wed, 14 Oct 2026 07:49:33 +0000 (GMT)
X-Cc: <netdev@vger.kernel.org>, <bpf@vger.kernel.org>, <edumazet@google.com>,
<davem@davemloft.net>, <pabeni@redhat.com>, <ncardwell@google.com>,
<ast@kernel.org>, <daniel@iogearbox.net>, <andrii@kernel.org>,
<corbet@lwn.net>, <linux-kernel@vger.kernel.org>, <lorenzo@google.com>,
<maze@google.com>, <sporeba@google.com>, <motomuman@google.com>,
<madhan.raj@samsung.com>, <srihari.k@samsung.com>, <g.pokhra@samsung.com>,
<r.kumawat@samsung.com>, <raj.kumars@samsung.com>, <ts413.lee@samsung.com>,
<ramyashree.s@samsung.com>, <daeil2.hwang@samsung.com>, "'CPGS'"
<cpgs@samsung.com>
X-In-Reply-To: <20261007170028.318acb6b@kernel.org>
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>
X-Mailer: Microsoft Outlook 16.0
X-Thread-Index: AQFiGh7FxEkrBp5pI+mpFK8IrUA4cQI/u/Z6AVCeO9O31pb6oA==
X-CMS-MailID: 20261014074936epcas5p3aa47693f3407c0f352943f02e1c112c3
X-Msg-Generator: CA
X-CMS-TYPE: 105P
X-CPGSPASS: Y
X-cpgsPolicy: CPGSC10-065,Y
X-CFilter-Loop: Reflected
X-CMS-RootMailID: 20261001132701epcas5p2da9b0fa7ca3bcef1ff84a62f255bc573