From: Aaron Tomlin <atomlin@atomlin.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Aaron Tomlin <atomlin@atomlin.com>,
Florian Fainelli <florian.fainelli@broadcom.com>,
ronak.doshi@broadcom.com, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
bcm-kernel-feedback-list@broadcom.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 0/1] vmxnet3: Adjust maximum Rx ring buffer size
Date: Wed, 8 Jan 2025 21:05:15 +0000 (GMT) [thread overview]
Message-ID: <71e6ab28-be0d-b85c-900b-537295bc81d1@atomlin.com> (raw)
In-Reply-To: <20250107154647.4bcbae3c@kernel.org>
On Tue, 7 Jan 2025, Jakub Kicinski wrote:
> This is a bit of a weird driver. But we should distinguish the default
> ring size, which yes, should not be too large, and max ring size which
> can be large but user setting a large size risks the fact the
> allocations will fail and device will not open.
>
> This driver seems to read the default size from the hypervisor, is that
> the value that is too large in your case? Maybe we should min() it with
> something reasonable? The max allowed to be set via ethtool can remain
> high IMO
>
See vmxnet3_get_ringparam(). If I understand correctly, since commit
50a5ce3e7116a ("vmxnet3: add receive data ring support"), if the specified
VMXNET3 adapter has support for the Rx Data ring feature then the maximum
Rx Data buffer size is reported as VMXNET3_RXDATA_DESC_MAX_SIZE (i.e. 2048)
by 'ethtool'. Furthermore, See vmxnet3_set_ringparam(). A user specified Rx
mini value cannot be more than VMXNET3_RXDATA_DESC_MAX_SIZE. Indeed the Rx
mini value in the context of VMXNET3 would be the size of the Rx Data ring
buffer. See the following excerpt from vmxnet3_set_ringparam(). As far as I
can tell, the Rx Data buffer cannot be more than
VMXNET3_RXDATA_DESC_MAX_SIZE:
686 static int
687 vmxnet3_set_ringparam(struct net_device *netdev,
688 struct ethtool_ringparam *param,
689 struct kernel_ethtool_ringparam *kernel_param,
690 struct netlink_ext_ack *extack)
691 {
:
760 new_rxdata_desc_size =
761 (param->rx_mini_pending + VMXNET3_RXDATA_DESC_SIZE_MASK) &
762 ~VMXNET3_RXDATA_DESC_SIZE_MASK;
763 new_rxdata_desc_size = min_t(u16, new_rxdata_desc_size,
764 VMXNET3_RXDATA_DESC_MAX_SIZE);
Have I missed something?
--
Aaron Tomlin
next prev parent reply other threads:[~2025-01-08 21:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-05 21:30 Aaron Tomlin
2025-01-05 21:30 ` [RFC PATCH 1/1] " Aaron Tomlin
2025-01-06 23:47 ` [RFC PATCH 0/1] " Jakub Kicinski
2025-01-06 23:51 ` Florian Fainelli
2025-01-07 0:57 ` Jakub Kicinski
2025-01-07 22:55 ` Aaron Tomlin
2025-01-07 23:46 ` Jakub Kicinski
[not found] ` <CAP1Q3XQ_Fubke4=SYrFkaiJj0RHB99ehdMedMVDTFtRS6R_RCw@mail.gmail.com>
2025-01-08 17:24 ` Ronak Doshi
2025-01-08 21:05 ` Aaron Tomlin [this message]
2025-01-15 20:55 ` Aaron Tomlin
2025-01-08 16:53 ` Florian Fainelli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=71e6ab28-be0d-b85c-900b-537295bc81d1@atomlin.com \
--to=atomlin@atomlin.com \
--cc=andrew+netdev@lunn.ch \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=florian.fainelli@broadcom.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=ronak.doshi@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®