Skip to contentSkip to conversation

net/vmxnet3: fix a missing vmxnet3 register command

PATCH Applied Ronak Doshi 2 participants 3 messages Apr 22, 2024 – Apr 26, 2024

Subsystems (2)
lore
Share & tools
lore

Ronak Doshi

author maintainer
#0 lore raw

PATCH v3 1/1 net/vmxnet3: fix a missing vmxnet3 register command

Vmxnet3 uses capability registers to advertise the supported capabilities of UPT device. It uses DCR0_REG command register for this purpose. However, the register command enum misses one command which technically is not used by dpdk vmxnet3 driver yet. This can cause issue for commands added later. For example, DCR0_REG and MAX_CAPABILITIES register commands when issued will lead to incorrect command being executed in the hypervisor. The return values can be unexpected and can result in some capabilities being disabled and affect vnics requesting Uniform Passthroguh (UPT) mode.

This patch fixes this issue by adding a reserved command in its place.

Fixes 5241d61bd865 ("net/vmxnet3: support capability registers")

--
Change log
v2: fixed typo
v3: updated commit message with more information

---
 drivers/net/vmxnet3/base/vmxnet3_defs.h | 1 +
 1 file changed, 1 insertion(+)
drivers/net/vmxnet3/base/vmxnet3_defs.h +1 -0
index 24c235876e..a6bb281d8d 100644
@@ -126,6 +126,7 @@ typedef enum {
    VMXNET3_CMD_RESERVED7,
    VMXNET3_CMD_RESERVED8,
    VMXNET3_CMD_GET_MAX_QUEUES_CONF,
+   VMXNET3_CMD_RESERVED11,
    VMXNET3_CMD_GET_MAX_CAPABILITIES,
    VMXNET3_CMD_GET_DCR0_REG,
 } Vmxnet3_Cmd;
Signature · 1 line
2.11.0
Applied
#1 lore raw
Quoted 11 lines · Ronak Doshi

Vmxnet3 uses capability registers to advertise the supported capabilities of UPT device. It uses DCR0_REG command register for this purpose. However, the register command enum misses one command which technically is not used by dpdk vmxnet3 driver yet. This can cause issue for commands added later. For example, DCR0_REG and MAX_CAPABILITIES register commands when issued will lead to incorrect command being executed in the hypervisor. The return values can be unexpected and can result in some capabilities being disabled and affect vnics requesting Uniform Passthroguh (UPT) mode.

Quoted 8 lines

This patch fixes this issue by adding a reserved command in its place.

Fixes 5241d61bd865 ("net/vmxnet3: support capability registers")

Applied to dpdk-next-net/main, thanks.

#2 lore raw
Quoted 15 lines · Ferruh Yigit
Quoted 14 lines · Ronak Doshi

Vmxnet3 uses capability registers to advertise the supported capabilities of UPT device. It uses DCR0_REG command register for this purpose. However, the register command enum misses one command which technically is not used by dpdk vmxnet3 driver yet. This can cause issue for commands added later. For example, DCR0_REG and MAX_CAPABILITIES register commands when issued will lead to incorrect command being executed in the hypervisor. The return values can be unexpected and can result in some capabilities being disabled and affect vnics requesting Uniform Passthroguh (UPT) mode.

This patch fixes this issue by adding a reserved command in its place.

Quoted 8 lines
Quoted 5 lines
Fixes 5241d61bd865 ("net/vmxnet3: support capability registers")

Applied to dpdk-next-net/main, thanks.

Hi Jochen, Ajit,

Independent from this patch.

Do you want to handle this driver in the next-net-brcm tree?

If so a maintainers file update and update to CI & patchwork script required to select correct tree for driver.