Article View: linux.kernel.netdev
Article #2740Re: [PATCH v19 net-next 2/2] octeontx2: add mqprio bandwidth offload for NIX TX schedulers
From: Simon Horman
Date: Tue, 13 Oct 2026 10:56
Date: Tue, 13 Oct 2026 10:56
52 lines
8508 bytes
8508 bytes
On Mon, Oct 12, 2026 at 09:20:01AM +0530, Ratheesh Kannoth wrote: > On 2026-10-10 at 15:31:10, netdev-bot+sashiko@kernel.org (netdev-bot+sashiko@kernel.org) wrote: > > Thank you for your contribution! Sashiko AI review found 12 potential > > issue(s) to consider. > > > > Critical: 0 ยท High: 1 ยท Medium: 9 (1) ยท Low: 2 (1) > > > > If you believe none of the issues are legitimate, please reply to each > > issue of Medium severity or higher and explain why the AI is wrong. > > If any of them are legitimate and you plan to respin, please let patchwork > > know by including "pw-bot: cr" as a separate line at the end of your reply > > (one such reply per series is enough). > > > > - [High] There is a use-after-free race on the deferred netdev_tc_work > > during device removal. > > Not addressing this one; the window is theoretical and the impact is nil in practice. > 1. It needs a failing "tc qdisc replace" (validation failure on an existing > offload) to run on CPU A at the exact moment the PCI remove runs on CPU B, > with A reading defer_tc_work just before B sets it. The netdev is already > being torn down, so this is not a realistic configuration path. > 2. Even if the work is queued in that window, it is a no-op: the handler > checks defer_tc_work (set by remove) and returns before taking RTNL or > touching any other state. The only access is that single flag read. > 3. A use-after-free would also need system_wq to leave the item undispatched > for the whole remainder of remove (unregister_netdev, destroy_workqueue, > mbox teardown, AF detach, ...) until free_netdev(). That is not a > realistic scheduling delay. > The flag is accessed with READ_ONCE()/WRITE_ONCE() and ordered by smp_wmb() > before cancel_work_sync(), so any tc command that starts after shutdown > begins will see it and not queue the work. > > > - [Medium] Offload state is leaked when qdisc teardown fails. > > Not addressing this one; the trigger is very rare and the failure is reported. > The path only runs if the AF mailbox request that clears the per-queue > shapers (otx2_nix_tm_clear_queue_shaper()) fails during "tc qdisc del". That > means the AF/mailbox is already in a fault state, which is not a normal > runtime condition. > In that case the driver prints error message. > Keeping the state is deliberate. The shapers are still programmed in > hardware, so the cached rates and rate_limit continue to describe what the > hardware is doing, and they are reapplied consistently on the next open. > Dropping the software state while the hardware shapers are still active would > leave the two out of sync. > The core cannot veto qdisc teardown (mqprio_disable_offload() is void), so the > driver can only report the error, which it does. ... Reviewed-by: Simon Horman <horms@kernel.org>
Technical Details
Message-ID:
<20261013105604.GB83879@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-345573-linux-kernel-netdev=dewy.ruReferences:
<20261006094357.840823-3-rkannoth@marvell.com> <179162647058.434549.12221340477037180415@kernel.org> <asxY6cs5os_q3mAA@rkannoth-OptiPlex-7090>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-345573-linux-kernel-netdev=dewy.ru From: horms@kernel.org (Simon Horman) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH v19 net-next 2/2] octeontx2: add mqprio bandwidth offload for NIX TX schedulers Date: Tue, 13 Oct 2026 11:56:04 +0100 Organization: Usenet Network Message-ID: <20261013105604.GB83879@horms.kernel.org> References: <20261006094357.840823-3-rkannoth@marvell.com> <179162647058.434549.12221340477037180415@kernel.org> <asxY6cs5os_q3mAA@rkannoth-OptiPlex-7090> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2030579"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:MBepdYDVaxgJ8FMZ45Bmb17W+dw= sha256:IhggvEBaL8CLtO8uV2HVH8nrsO+g8SqnXKjYHAEDRhE= sha1:CqdMFBh16AZ8CBFsHiqzMdX7aLU= sha256:+F7KdT5jbSc7WB7aC7xGEz+k80HlIh3St/+gVmRd86Y= Content-Disposition: inline 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 7CE9B10FE0D; Tue, 13 Oct 2026 14:02:34 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.64 X-Spam-Status: No, score=-3.64 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, 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 K7rqVm8elcCS; Tue, 13 Oct 2026 14:02:32 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-345573-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id D55BB10FE07; Tue, 13 Oct 2026 14:02: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 14D892E228; Tue, 13 Oct 2026 10:56:23 +0000 (UTC) X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 157B14E06EA; Tue, 13 Oct 2026 10:56:15 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="hEJDgx6M" X-Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 DF07D4DD3A5; Tue, 13 Oct 2026 10:56:09 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791888974; cv=none; b=I2Fgz1MRv9bfYnRISbsLsJcW6myH1mEUZf3MoTaQuQvHN/xSCJZ8GvVl9+LBXbY8inIwIKKCVUTho7B36BQZm5PDDiAhkFhvn1LJCR4Na1ojg0eRoBLRZy66auWvY0Tu5krZeiF0tIDqShs1Ns6bp2RjYFHG6nC4+8+v5/4+psc= X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791888974; c=relaxed/simple; bh=4t0gCc5/hnG5MdZFl+mUnNykwiB4BkNHEzAvZyd2x78=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fkAyKJU5oDyyJnd0NEnQh0v7P1/Vkq0ZnLDYqNRhwzX4caKif/KZdg5MN+HUJPVKqoM+H4irpWGdxlNDSlV7WGpYU7iQEoWn7g8TJHqWaY8ne8Vx38vHwE6CgUQJfI2K8vb5fP/XWhI+URNlT6//+lMQ3dPGkxvFQnxEKp92Rd0= X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=hEJDgx6M; arc=none smtp.client-ip=100.103.45.18 X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id AA2B21F000FF; Tue, 13 Oct 2026 10:56:06 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1791888969; bh=InFvmS159g9aQRWPNx+KZVWPATxltcajLyea5HuyXhk=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=hEJDgx6MhjjvXttf0Cvr9s0JcYPqpMKzeiu6WJbLQkv1zbbf1AyC6XSUbNzhd4YTR DWiifbMZ8pg8Md5c/dPrPLHDAGfv8CRjDZvWhf5IJgk6HPml2zGHdmLL9oGyCGkuee eQ4C+ALX0/C3dxioSxIlWwIPG5eSpgm5LehVJ/koLWiJx4l7iOouVd9FvTKUwstnLz /QyDJLE4Fb/4jzkskTT0x/dAU+d9y8zvLOq5LG5GPAXwlSI15z+yTmPfYuVT3oN6zT TMdtBav2ldb+1/b6c2Uw8sQrWlkjAOd+Df83liN7Sxxa+ZNoMMfNnCZd/oo/fBMpDy ptM9BDragGpJg== X-Cc: netdev-bot+sashiko@kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, andrew+netdev@lunn.ch, ast@kernel.org, daniel@iogearbox.net, davem@davemloft.net, edumazet@kernel.org, hawk@kernel.org, john.fastabend@gmail.com, kuba@kernel.org, pabeni@redhat.com, sdf@fomichev.me, sgoutham@marvell.com 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-In-Reply-To: <asxY6cs5os_q3mAA@rkannoth-OptiPlex-7090>