* [PATCH v1 net-next] vmxnet3: support higher link speeds from vmxnet3 v9
@ 2024-10-04 17:43 Ronak Doshi
2024-10-07 15:18 ` Simon Horman
2024-10-08 0:10 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Ronak Doshi @ 2024-10-04 17:43 UTC (permalink / raw)
To: netdev
Cc: Ronak Doshi, Broadcom internal kernel review list,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
open list
Until now, vmxnet3 was default reporting 10Gbps as link speed.
Vmxnet3 v9 adds support for user to configure higher link speeds.
User can configure the link speed via VMs advanced parameters options
in VCenter. This speed is reported in gbps by hypervisor.
This patch adds support for vmxnet3 to report higher link speeds and
converts it to mbps as expected by Linux stack.
Signed-off-by: Ronak Doshi <ronak.doshi@broadcom.com>
Acked-by: Guolin Yang <guolin.yang@broadcom.com>
---
Changes in v1:
- Add a comment to explain the changes
---
drivers/net/vmxnet3/vmxnet3_drv.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index b70654c7ad34..6793fa09f9d1 100644
--- a/drivers/net/vmxnet3/vmxnet3_drv.c
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c
@@ -201,6 +201,14 @@ vmxnet3_check_link(struct vmxnet3_adapter *adapter, bool affectTxQueue)
adapter->link_speed = ret >> 16;
if (ret & 1) { /* Link is up. */
+ /*
+ * From vmxnet3 v9, the hypervisor reports the speed in Gbps.
+ * Convert the speed to Mbps before rporting it to the kernel.
+ * Max link speed supported is 10000G.
+ */
+ if (VMXNET3_VERSION_GE_9(adapter) &&
+ adapter->link_speed < 10000)
+ adapter->link_speed = adapter->link_speed * 1000;
netdev_info(adapter->netdev, "NIC Link is Up %d Mbps\n",
adapter->link_speed);
netif_carrier_on(adapter->netdev);
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v1 net-next] vmxnet3: support higher link speeds from vmxnet3 v9
2024-10-04 17:43 [PATCH v1 net-next] vmxnet3: support higher link speeds from vmxnet3 v9 Ronak Doshi
@ 2024-10-07 15:18 ` Simon Horman
2024-10-08 0:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2024-10-07 15:18 UTC (permalink / raw)
To: Ronak Doshi
Cc: netdev, Broadcom internal kernel review list, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, open list
On Fri, Oct 04, 2024 at 10:43:03AM -0700, Ronak Doshi wrote:
> Until now, vmxnet3 was default reporting 10Gbps as link speed.
> Vmxnet3 v9 adds support for user to configure higher link speeds.
> User can configure the link speed via VMs advanced parameters options
> in VCenter. This speed is reported in gbps by hypervisor.
>
> This patch adds support for vmxnet3 to report higher link speeds and
> converts it to mbps as expected by Linux stack.
>
> Signed-off-by: Ronak Doshi <ronak.doshi@broadcom.com>
> Acked-by: Guolin Yang <guolin.yang@broadcom.com>
> ---
> Changes in v1:
> - Add a comment to explain the changes
Thanks for the update.
Reviewed-by: Simon Horman <horms@kernel.org>
...
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1 net-next] vmxnet3: support higher link speeds from vmxnet3 v9
2024-10-04 17:43 [PATCH v1 net-next] vmxnet3: support higher link speeds from vmxnet3 v9 Ronak Doshi
2024-10-07 15:18 ` Simon Horman
@ 2024-10-08 0:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-10-08 0:10 UTC (permalink / raw)
To: Ronak Doshi
Cc: netdev, bcm-kernel-feedback-list, davem, edumazet, kuba, pabeni,
linux-kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Fri, 4 Oct 2024 10:43:03 -0700 you wrote:
> Until now, vmxnet3 was default reporting 10Gbps as link speed.
> Vmxnet3 v9 adds support for user to configure higher link speeds.
> User can configure the link speed via VMs advanced parameters options
> in VCenter. This speed is reported in gbps by hypervisor.
>
> This patch adds support for vmxnet3 to report higher link speeds and
> converts it to mbps as expected by Linux stack.
>
> [...]
Here is the summary with links:
- [v1,net-next] vmxnet3: support higher link speeds from vmxnet3 v9
https://git.kernel.org/netdev/net-next/c/0458cbedfe35
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-08 0:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-04 17:43 [PATCH v1 net-next] vmxnet3: support higher link speeds from vmxnet3 v9 Ronak Doshi
2024-10-07 15:18 ` Simon Horman
2024-10-08 0:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).