vmxnet3: support higher link speeds from vmxnet3 v9
Subsystems (3)
Ronak Doshi
maintainerPATCH 1/1 vmxnet3: support higher link speeds from vmxnet3 v9
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.
---
Changes in v1:
- Add a comment to explain the changes
--- drivers/net/vmxnet3/vmxnet3_drv.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/net/vmxnet3/vmxnet3_drv.c +8 -0
@@ -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);
Signature · 1 line
2.11.0
Quoted 5 lines · Ronak Doshi
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.
Quoted 8 lines
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 <[email protected]>Acked-by Guolin Yang <[email protected]>---
Changes in v1:
- Add a comment to explain the changes
Thanks for the update.
...
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 9 lines · 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!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html