Skip to content

Commit

Permalink
net/vmxnet3: fix missing register command
Browse files Browse the repository at this point in the history
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: 5241d61 ("net/vmxnet3: support capability registers")
Cc: stable@dpdk.org

Signed-off-by: Ronak Doshi <ronak.doshi@broadcom.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
  • Loading branch information
Ronak Doshi authored and ferruhy committed Apr 26, 2024
1 parent 9e0dea6 commit 70fef0a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -1228,7 +1228,7 @@ Roman Kapl <rka@sysgo.com>
Roman Korynkevych <romanx.korynkevych@intel.com>
Roman Storozhenko <roman.storozhenko@intel.com>
Roman Zhukov <roman.zhukov@arknetworks.am> <roman.zhukov@oktetlabs.ru>
Ronak Doshi <doshir@vmware.com>
Ronak Doshi <ronak.doshi@broadcom.com> <doshir@vmware.com>
Ron Beider <rbeider@amazon.com>
Ronghua Zhang <rzhang@vmware.com>
RongQiang Xie <xie.rongqiang@zte.com.cn>
Expand Down
1 change: 1 addition & 0 deletions drivers/net/vmxnet3/base/vmxnet3_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 70fef0a

Please sign in to comment.