🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #16652

Re: [PATCH net-next v10 4/4] net: mana: add dynamic HWC queue depth with reinit path

#16652
From: Wei Hu
Date: Sun, 15 Nov 2026 12:34
61 lines
11564 bytes
Thanks for the review.

> Which direction does the PF mean by HWC_INIT_DATA_MAX_REQUEST?

The driver uses MAX_REQUEST for the RQ and MAX_RESPONSE for the SQ, and
the host-to-PF request budget follows the SQ. That allocation convention
already exists in mana_hwc_init_queues(). The new mapping is also stated
explicitly in mana_hwc_finish_channel() and the request-budget helper.

I agree that the names alone are not sufficient protocol documentation.
However, the suggested opposite interpretation is not established by the
review either. A protocol reference defining the PF's directional meaning
would be needed before concluding that these limits are reversed.

I plan to preserve the mapping, not swap the fields or impose the minimum
of both directions on that assumption. The latter could reject valid
asymmetric traffic. I will clarify the existing RQ/SQ convention in the
description without claiming a new firmware guarantee.

> How does the PF learn the ring sizes of the rebuilt channel?

The PF specifies the HWC queue depth and corresponding ring sizes. It
reports the required depth via HWC_INIT_DATA_QUEUE_DEPTH, and the VF
rebuilds the rings to implement that PF requirement.

The PF therefore already knows the required geometry; the absence of size
fields in ESTABLISH_HWC does not mean that it must keep assuming bootstrap
sizes. I plan to keep the sizing protocol unchanged and make this PF-driven
contract explicit in the description.

> Can a PF that leaves out any of these HWC_INIT_DATA types, or reports 0,
> still bring up the HWC? It looks like HWC creation now fails with -EPROTO
> even in the depth-1 setup that used to work, with no fallback.

The new nonzero-report validation does apply before the decision to keep
the bootstrap queues, and to the restored bootstrap report. I will
document that behavior and its -EPROTO result explicitly in the message.

That documentation omission is a small follow-up. It does not establish
that absent or zero maxima are valid PF reports. I will not add a fallback
to guessed limits without that contract.

> This isn't a bug in the new code, but this check fixes an existing
> out-of-bounds MMIO write, together with the INVALID_DOORBELL early return
> added to mana_gd_ring_doorbell().

Agreed that this also hardens a baseline path. I checked the original
driver's unchecked doorbell assignment and MMIO address calculation. I
will make the existing bug and applicable Fixes lineage explicit for
dependency-aware backports. This is a metadata clarification, not another
MMIO behavior change or a wholesale split of the feature series.

Regards,
Wei
Technical Details
Message-ID: <179457550423.109246.1861974882571766890.hwc-v10-all-reviews-p4@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-363700-linux-kernel-netdev=dewy.ru
References: <aa4e08e8bc9a7139778b11875e41921d2d813712.1794208055.git.weh@linux.microsoft.com> <179455240227.2199510.2666165032389090040@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-363700-linux-kernel-netdev=dewy.ru
From: weh@linux.microsoft.com (Wei Hu)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v10 4/4] net: mana: add dynamic HWC queue depth with reinit path
Date: Sun, 15 Nov 2026 12:34:13 +0000
Organization: Usenet Network
Message-ID: <179457550423.109246.1861974882571766890.hwc-v10-all-reviews-p4@linux.microsoft.com>
References: <aa4e08e8bc9a7139778b11875e41921d2d813712.1794208055.git.weh@linux.microsoft.com>  <179455240227.2199510.2666165032389090040@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
	logging-data="1796441"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:KY8QguL0kov/jJ1G6qnNj9RZv8U= sha256:jKzmHkLbQCtxrnsIa1qtZRzdPrJKIJ5AO0OxB41Bmj8=
	sha1:YTw7niA0BsBoM5afmptRw5E0lLI= sha256:kCkr7V9iYtgrL4T4Ql5UqIEd1qoqYGDjsI6KoGHvbBU=
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 B81D41149CB; Sun, 15 Nov 2026 15:35:04 +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 TeEpPKnP8f8G;
	Sun, 15 Nov 2026 15:35:01 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-363700-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 7191A1149C6; Sun, 15 Nov 2026 15:34:53 +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 8739242061; Sun, 15 Nov 2026 12:34:41 +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=1794746077;
	b=nHJdDkjeDCK4AfzkD0mlwxXpwzifjcb28wB5JiCGOiJwfTy1jhfTPmzfJjOUsjA9P1Bk
	 PxbIbXUwrFTtrCzhZJiw/IPyzbEt5uzwH3oVEdR8W23v2xrjHeyxLg6QZQFtzGC50LQgG
	 Xvovr5j5fVHOI2EnrEVqdnhTal4wLVj0yf910Cbns8ch8VPPT3wzC0nf/uv1zduZGpsgk
	 AZkx+NCx8+RkEFAtSazcESV/9NDjkfaZBbQd8Ck8Q5ssPqb4n6aljHmJbPRMeZ5HM1WDz
	 ubyfpc2yL20GP/z8h+talMnfjWKIlOl9T35W1t2ebq/xB86V7UqeqfX4HlbQNnCOqbQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794746077;
	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=6ZuGypfKU9M/I1I0dsVF8O1vxsEDxzcGg61IEASb7d0=;
	b=FotxKd2WG4ZHX8ibq7tLYnzfMgZhNJ5G2Zma4wgeRV6CBvkHvVJcaq/DPjsf8+wF1etB
	 xWPcOBmEQp3GsktzXPLmoNep9oiJ6ZyXmeZ1xCgZUqs8ubBmSFrJLNxScTXAMCX/A29c6
	 93BcGtJFV8wUjSy5PxNAJmqOx02wfY6OM43i0jl2mmkwrNjhP3APL1R2WGOuoZzzhU3J8
	 i6RTo6KOW15sHYp0PB5orA6IhaKJ/M9so2/WArn/W6AmfjZEJyFXVbo6S4p5qFxPnNF36
	 rh9rXkr0EJ1qsN5WF04IChDU1cOlewGasmIT+TK1KhwP5VaZy/DX/IrQoa+eOgl9j4Q==
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=UgJZpXmr;
	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 2E6F4606A8AC;
	Sun, 15 Nov 2026 12:34:37 +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=UgJZpXmr
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=1794746076;
	b=TtIHddzlCLG7V3CUk2gyOdzi/O/1N3gZ0RdL3k82AQKlWaSajecsUyZNiUHKvsWa0h8o
	 s+M9SrVdWssjuQ95eXVhMKPTc7ws93pOXMF7R06QQm6i6ksHYk9OmkAZLbhTXRlBtWp9v
	 XWCT/luBL6bx8BljaGnsXAQKsn2NpyWLN7ewtymz5rkUvTuZrfaa2u8VHxiwG8ZNK1Wv8
	 fMVyKUrMCz9IZ/e1bP9Mtl1le9pRnS9aLLo0ZEYyrZb0ORLl0WZa6QhOtbijB3hlr1Ikz
	 Gl1mJGmMnKHt7HQO00H6321/YEzb1tjq/V8tBw4q0dd3GXnv7/iuHE1tZvEClsUE2cg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794746076;
	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=6ZuGypfKU9M/I1I0dsVF8O1vxsEDxzcGg61IEASb7d0=;
	b=mLeuww6zxiN26KJVKtrszuIXpIGa0CkchfF+ijyhzWPrGC1glm4DTLG9euruEibMEC4U
	 eRr8C4S5AO9dIEZz/bi+29IQv4ryBWQQFi4zr//3bNW19QAzLGyQ6h/dMV0NPw3pr1cvs
	 C+CRHOhSR7Ibxww3xrRzsGdTzm9sYofPSOUxhdNSg+7W/pyyns1Sql6OtwKp/inzxS3L2
	 rT9e7Rnm19/+EokDwY4zarJemrBxkqofHbWTJCZSoYWUdlEBJleQgfC74uDyHmb6yhkOZ
	 l1zHdjRawibr5L4aR7QUkzLC81LH241KKlA8O2JtuSTkYyjGwjq+MXgbsd4TXjRhFkQ==
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=UgJZpXmr;
	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 0A802606A89B;
	Sun, 15 Nov 2026 12:34:36 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 0A802606A89B
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 5DB3C20B716B;
	Sun, 15 Nov 2026 04:34:24 -0800 (PST)
X-DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 5DB3C20B716B
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;
	s=default; t=1794746065;
	bh=6ZuGypfKU9M/I1I0dsVF8O1vxsEDxzcGg61IEASb7d0=;
	h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
	b=UgJZpXmrNgfxqgAWIpsCELQYaavhVxvzxkyN54/GZANktDuqlxdidvxDEMjVwJlUt
	 gWEJAgpLFS+rclqadtF0Jf0ITsvZAtix49KcsyFO116aF8FMgxmzGXy+6Ev4etHDbU
	 ZmtwwPkXgvsi3OHn4wQ12hl4CtdJ+q4FLrBjFbcc=
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: <179455240227.2199510.2666165032389090040@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