Skip to contentSkip to conversation

net/vmxnet3: fix a missing vmxnet3 register command

PATCH Superseded Ronak Doshi 2 participants 3 messages Apr 18, 2024 – Apr 22, 2024

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Ronak Doshi

author maintainer
#0 lore raw

PATCH v2 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.

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

---
 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
#1 lore raw
Quoted 25 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.

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

---
 drivers/net/vmxnet3/base/vmxnet3_defs.h | 1 +
 1 file changed, 1 insertion(+)
drivers/net/vmxnet3/base/vmxnet3_defs.h +0 -0
index 24c235876e..a6bb281d8d 100644

drivers/net/vmxnet3/base/vmxnet3_defs.h typedef enum { · line 132

Quoted 7 lines
drivers/net/vmxnet3/base/vmxnet3_defs.h +1 -0
@@ -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;

Hi Ronak,

Thank you for the patch.

What is the fixed from user perspective, what is the impact.

I can see two commands effected from missing enum, they are GET_DCR0_REG & GET_MAX_CAPABILITIES.
Was user not able to read capabilities, or get random capabilities, from device up until now?
If so what were these capabilities and how user impacted from missing them? Can you please detail the impact more in the commit log?

author maintainer
#2 lore raw

Basically it will just provide incorrect information. With the enum being misaligned due to missing command, GET_DCR0_REG and GET_MAX_CAPABILITIES will just lead to incorrect commands being issued.

Thanks,
Ronak

Quoted 50 lines · Ferruh Yigit
Quoted 13 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.

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

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

Review

Quoted 8 lines

--
Change log
v2: fixed typo

---
 drivers/net/vmxnet3/base/vmxnet3_defs.h | 1 +
 1 file changed, 1 insertion(+)
(quoted diff) +0 -0

b/drivers/net/vmxnet3/base/vmxnet3_defs.h

drivers/net/vmxnet3/base/vmxnet3_defs.h typedef enum { · line 132

Quoted 11 lines

index 24c235876e..a6bb281d8d 100644

drivers/net/vmxnet3/base/vmxnet3_defs.h +1 -0
@@ -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;

Hi Ronak,

Thank you for the patch.

What is the fixed from user perspective, what is the impact.

I can see two commands effected from missing enum, they are GET_DCR0_REG & GET_MAX_CAPABILITIES.
Was user not able to read capabilities, or get random capabilities, from device up until now?
If so what were these capabilities and how user impacted from missing them? Can you please detail the impact more in the commit log?

Signature · 11 lines
This electronic communication and the information and any files transmitted 
with it, or attached to it, are confidential and are intended solely for 
the use of the individual or entity to whom it is addressed and may contain 
information that is confidential, legally privileged, protected by privacy 
laws, or otherwise restricted from disclosure to anyone else. If you are 
not the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, you are hereby notified that any use, 
copying, distributing, dissemination, forwarding, printing, or copying of 
this e-mail is strictly prohibited. If you received this e-mail in error, 
please return the e-mail to the sender, delete it from your computer, and 
destroy any printed copy of it.