[v2] net/vmxnet3: fix a missing vmxnet3 register command

Message ID 20240418063644.24737-1-ronak.doshi@broadcom.com (mailing list archive)
State Superseded
Delegated to: Ferruh Yigit
Headers
Series [v2] net/vmxnet3: fix a missing vmxnet3 register command |

Checks

Context Check Description
ci/loongarch-compilation success Compilation OK
ci/checkpatch warning coding style issues
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS

Commit Message

Ronak Doshi April 18, 2024, 6:36 a.m. UTC
  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")
Cc: stable@dpdk.org

Signed-off-by: Ronak Doshi <ronak.doshi@broadcom.com>
--
Change log
v2: fixed typo
---
 drivers/net/vmxnet3/base/vmxnet3_defs.h | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Ferruh Yigit April 19, 2024, 8:35 a.m. UTC | #1
On 4/18/2024 7:36 AM, Ronak Doshi wrote:
> 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")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ronak Doshi <ronak.doshi@broadcom.com>
> --
> Change log
> v2: fixed typo
> ---
>  drivers/net/vmxnet3/base/vmxnet3_defs.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/vmxnet3/base/vmxnet3_defs.h b/drivers/net/vmxnet3/base/vmxnet3_defs.h
> index 24c235876e..a6bb281d8d 100644
> --- a/drivers/net/vmxnet3/base/vmxnet3_defs.h
> +++ b/drivers/net/vmxnet3/base/vmxnet3_defs.h
> @@ -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?
  
Ronak Doshi April 22, 2024, 5:48 p.m. UTC | #2
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


On Fri, Apr 19, 2024 at 1:35 AM Ferruh Yigit <ferruh.yigit@amd.com> wrote:

> On 4/18/2024 7:36 AM, Ronak Doshi wrote:
> > 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")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Ronak Doshi <ronak.doshi@broadcom.com>
> > --
> > Change log
> > v2: fixed typo
> > ---
> >  drivers/net/vmxnet3/base/vmxnet3_defs.h | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/net/vmxnet3/base/vmxnet3_defs.h
> b/drivers/net/vmxnet3/base/vmxnet3_defs.h
> > index 24c235876e..a6bb281d8d 100644
> > --- a/drivers/net/vmxnet3/base/vmxnet3_defs.h
> > +++ b/drivers/net/vmxnet3/base/vmxnet3_defs.h
> > @@ -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?
>
>
>
  

Patch

diff --git a/drivers/net/vmxnet3/base/vmxnet3_defs.h b/drivers/net/vmxnet3/base/vmxnet3_defs.h
index 24c235876e..a6bb281d8d 100644
--- a/drivers/net/vmxnet3/base/vmxnet3_defs.h
+++ b/drivers/net/vmxnet3/base/vmxnet3_defs.h
@@ -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;