Article View: linux.kernel.netdev
Article #16651Re: [PATCH net-next v10 3/4] net: mana: support concurrent HWC requests
From: Wei Hu
Date: Sun, 15 Nov 2026 12:34
Date: Sun, 15 Nov 2026 12:34
91 lines
12788 bytes
12788 bytes
Thanks for the review. I will respin the series as v11 to address the admission/teardown interaction below. > Can this reject teardown commands without ever posting them to the > device? Agreed. With no available slot, abandonment or cancellation can return -ETIMEDOUT before SQ posting, while existing destructive callers can still free the associated memory. Their error handling predates this series, but the new quarantine-related no-post condition must be reconciled with it. I will address this in the next revision while preserving the lifetime protection for timed-out IDs and buffers. Releasing a quarantined slot merely to submit another command would reintroduce the late-response and pending-DMA hazards. The rejection is not permanent for every later command: a late response can release a quarantined slot, and free slots remain usable. However, that does not remove the unavailable-channel teardown concern. The source-extracted tests reproduce the no-post/free control flow; they do not establish that physical DMA corruption occurred. > Only -EBUSY keeps a caller waiting here. mana_hwc_try_get_msg_index() > turns a full bitmap into -ETIMEDOUT whenever abandoned_msgs is non-zero, > however many of the occupied slots are actually abandoned. This mixed-pool case is real. One abandoned slot does not imply that the other occupied slots cannot complete normally. I will cover it in the same admission revision, so partial abandonment alone does not rule out progress from those other slots. Cancellation, channel stop, and exhaustion of usable capacity still need to wake or terminate waiters without reusing quarantined IDs. I will not treat an abandoned-count comparison alone as a verified fix. The revision will include focused regression cases for unavailable-channel teardown, mixed healthy/abandoned occupancy, full quarantine, cancellation, and late-response recovery. > This isn't a bug, but the quarantine here also fixes a real misdelivery. Agreed. I will name the original wrong-command response/misdelivery bug explicitly and include the verified Fixes lineage and backport dependency guidance. This is a commit-description/metadata follow-up; it does not require an additional quarantine mechanism. > Will this also hide live-channel failures during setup? The specific "test_eq failed" diagnostic is suppressed for the private bootstrap context. The final patch's outer HWC test still logs a generic failure, so setup failure is not wholly silent. Keeping the specific diagnostic is a small, useful fix. I will preserve it using the explicitly passed setup context, without publishing the HWC early or weakening the intended suppression after runtime unpublication. > Should gc->hwc_drain_waitq be initialized once in mana_gd_probe() and > mana_cdx_gd_probe(), next to spin_lock_init(&gc->hwc_lock)? It belongs to > gdma_context, but here it is re-initialized on every channel creation, > including each mana_gd_resume()->mana_gd_setup(). Agreed. I will move this initialization to gdma_context creation beside hwc_lock in both PCI and CDX probe paths. The per-context waitqueue should not be reinitialized by each channel constructor. This is a small placement fix, not a broader device-lifecycle serialization change. > This is a pre-existing issue, but the new comment claims an exclusion > that nothing seems to enforce. Is anything keeping hwc alive between > this read and the later mana_hwc_timeout_read() and > mana_hwc_timeout_update() calls? The wider raw-reader/setup/PM/service lifetime and serialization issue is pre-existing. We will address it separately. Moving the per-context waitqueue initialization does not claim to resolve those wider races. Regards, Wei pw-bot: cr
Technical Details
Message-ID:
<179457550421.109246.13016810300207001034.hwc-v10-all-reviews-p3@linux.microsoft.com>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-363699-linux-kernel-netdev=dewy.ruReferences:
<2ae0e8b22569dc23178d0ea42178808ad92cb6db.1794208055.git.weh@linux.microsoft.com> <179455240021.2199510.18244084352437360589@kernel.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-363699-linux-kernel-netdev=dewy.ru From: weh@linux.microsoft.com (Wei Hu) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v10 3/4] net: mana: support concurrent HWC requests Date: Sun, 15 Nov 2026 12:34:12 +0000 Organization: Usenet Network Message-ID: <179457550421.109246.13016810300207001034.hwc-v10-all-reviews-p3@linux.microsoft.com> References: <2ae0e8b22569dc23178d0ea42178808ad92cb6db.1794208055.git.weh@linux.microsoft.com> <179455240021.2199510.18244084352437360589@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Injection-Info: usenet.network; logging-data="1796345"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:Yu2C5HIBuqlXPVrKLDQ5nzdLeuM= sha256:CvSyAJ9qcZyPtHwHPv/0ZkoKujLuC+506Zc38n75ryQ= sha1:RdgWe236jKrh9f/jb2RP2C0Fwho= sha256:ZPk2HDxoeg2QJrVzKAzbkxdiqfdkdf8bHiwLTN3ijYk= 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 E07B21149CB; Sun, 15 Nov 2026 15:34:59 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.051 X-Spam-Status: No, score=-3.051 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.249, 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 (1024-bit key) header.d=linux.microsoft.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 6v1bH_xoz6om; Sun, 15 Nov 2026 15:34:56 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-363699-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linux.microsoft.com X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id C0DAD1149C9; Sun, 15 Nov 2026 15:34:47 +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 7F6983CEF1; Sun, 15 Nov 2026 12:34:39 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=fail; t=1794746076; b=m9o3u0vFHc9L5nLjPHRYczfnlV5GWhUGRRojisgksYuIfqbX3Ha0SpPn8RCL3/i8+8Yd VOSgR5GGcdDEPfz3PscXuNDaw70njihkLNAlOGXKamzRDhjalPNIz46H8YwKz5Lkn7L96 tIKbf27d2JhWiB0b3Xt26qZHfd7Pt32DNsjr4GgiTc8Mij85FeX66TwGY76wXIQcx3su6 vRgCh7yGL+1XAI+fm26KzXPaprY/odnR+xRavQ7QzBkOYHAF6GQah65l92XdskjQ4WQo0 9gQM6GcL1HhS3hwFXPj8zxVuRxpg8g1EtW1Wd+Qt0jm+Qt08VZxg9NhSJjnOnnonbAw== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794746076; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Filter: DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:Content-Type:X-Mailing-List:List-Id:List-Post: List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence: MIME-Version:Content-Transfer-Encoding; bh=+jQashNltLw+ocyr/YXlLyfk8PT4+1WyovCrrhhY0HE=; b=XhCXyJEI86DBg5gCINoYis+Eh987OxxuGFgTl1idWRDPMqKbNKi7AW1DQJYPFCunOXPX lxLokwwn1pBD4qnT3xj2/UATP86yq3N4qose4iE4S0aYDorpl/Wnzdm7N13AVG2uA2ic+ Ypqi1nxagtHLpSMyr3++RS9Bf1LC8jYqXCRzqX9zHwYpEeWgzU/QXVRnmRcD0JP//P42D zTb03kzxEpIFDfG8fAjM4rNOd/k0pN/TKo9Z3QWNK/aJgmDO9lYvotu0o1V52OdHm322I FrYVbg5o+++8cdkXKRILS84MxBizdvkltXHJTAsJ43Zp+tPF2XHe9mJJuW75KrKcVvA== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=linux.microsoft.com header.i=@linux.microsoft.com header.a=rsa-sha256 header.s=default header.b=Jcg2I8RT; dmarc=pass header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; arc=fail 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 4BD1A606A883; Sun, 15 Nov 2026 12:34:36 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.a=rsa-sha256 header.s=default header.b=Jcg2I8RT X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=13.77.154.182 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794746075; b=otUPC2XiZHKyk5G/0bmbLmFhiEc/rQQfHHm6gykAk+hQ7I5UB03fYpC3Vocp/W5pF2lk 7mdaiHidDSG6grdLnJqbS/OFcFTCkk76f8QGQzJKQNC+kH/UkOrRl/Q2KIVNPSv8PoX2D ZTU8PU49JG8/s3SV7EwPFzRdW8PKA2viu+KYGqmvxDN+KkJTdxXkbTeBmJVYxqjjDIxs6 lWWHNEj9pTBCikfDASnXYMyBuZeZXXiOIxin8KM7IUuG20do4xGgy8KZmhaMXh5XMwDAD lCq1V2KQAe1kxds1MCci/oIYu6j2M72impVMD7zD6nL3bGF4NyYspYfoVjy07kL8c5Q== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794746075; h=DMARC-Filter:Received:DKIM-Filter:DKIM-Signature:From:To:Cc:Subject: Date:Message-ID:X-Mailer:In-Reply-To:References:Content-Type: MIME-Version:Content-Transfer-Encoding:X-Spam-Status: X-Spam-Checker-Version; bh=+jQashNltLw+ocyr/YXlLyfk8PT4+1WyovCrrhhY0HE=; b=Wog7KUv+HYlfMr4KtcEmd3zomUTa/o/EyOr8ckzJ6t14hSYlKf6k/nnU2cKmvEag+NZ1 QOvBur9lee+C/GHrMfcluI4elkKG4+rHk6rbEoO5iRsBOZZgaMKd8WdDjjWRjwUiHndj5 /HR2g5FFYhw+rbIjftQyedC7XcmyjvFp3A5CyDAyZDgJE/FIhtDSxuTkNxHsxVBNxpERM d+Pi1Sk/ReyMItqEHoaWeAHq0SQx1ECXaiYcBJ0w8kTtSEcnh/4O3G3QHoXy0d0TO+BvV 2DDzao18pbhCW3fybLuM4dfUhepYgfLDoU01PeTmhSDY/SlTlmzTMNG4rfUSOp78FVw== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass header.d=linux.microsoft.com header.i=@linux.microsoft.com header.a=rsa-sha256 header.s=default header.b=Jcg2I8RT; arc=none smtp.remote-ip=13.77.154.182 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 274FE606A33E; Sun, 15 Nov 2026 12:34:35 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 274FE606A33E X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com X-Received: from weh-cvm-dev-vm.y50bckvjo0hefgfnzfztsfttff.phxx.internal.cloudapp.net (unknown [20.169.55.37]) by linux.microsoft.com (Postfix) with ESMTPSA id C9E9920B716A; Sun, 15 Nov 2026 04:34:22 -0800 (PST) X-DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C9E9920B716A X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1794746063; bh=+jQashNltLw+ocyr/YXlLyfk8PT4+1WyovCrrhhY0HE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jcg2I8RT/dkvAEPu5VhkEOoaPZShgncM+vQhjXobgG2uvnnuhbhXe6B0UYHNfIS11 ZzhN07diyfTMPjD4WBCrutuzXH7ybeqDtIOPQU9w1P6shDm0/y4ziciFrEzL58w67o k/G2q/IrBvgAUb8VyYLyh9qaCi4a7eQxBPAFLnSY= X-Cc: longli@kernel.org, kotaranov@microsoft.com, kuba@kernel.org, davem@davemloft.net, pabeni@redhat.com, edumazet@google.com, andrew+netdev@lunn.ch, jgg@ziepe.ca, leon@kernel.org, haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, shradhagupta@linux.microsoft.com, horms@kernel.org, ernis@linux.microsoft.com, stephen@networkplumber.org, netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, gargaditya@linux.microsoft.com, kees+treewide@kernel.org, kees@kernel.org, mawasthi@linux.microsoft.com, weh@microsoft.com, edumazet@kernel.org X-Mailer: git-send-email 2.43.0 X-In-Reply-To: <179455240021.2199510.18244084352437360589@kernel.org> 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