From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3BF4D43EDC for ; Mon, 22 Apr 2024 19:48:39 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 17ED54028B; Mon, 22 Apr 2024 19:48:39 +0200 (CEST) Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) by mails.dpdk.org (Postfix) with ESMTP id 23F9040268 for ; Mon, 22 Apr 2024 19:48:38 +0200 (CEST) Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-a55b10bfd30so105665566b.0 for ; Mon, 22 Apr 2024 10:48:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1713808118; x=1714412918; darn=dpdk.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ZnISEWZX7uH2YooRIcUpbSADDz69fnYRklr10MQ+Xa4=; b=h6JtDsaB3hazacIycX3bh3NgwvKPvJawE9gwDBYTZT0Pt0efG7t3DWD2n7lOOr4rhI 19cnSqOxuSlAdgW6Btu8+2ZHFyzae77mA2pJrjnKq9OckPSmk3aVoGg2DyVOEBGDbrM6 swzgXZujTlAcWBugKgiGnX/8RdjfSDuxKO5aM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713808118; x=1714412918; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZnISEWZX7uH2YooRIcUpbSADDz69fnYRklr10MQ+Xa4=; b=MAfkAgG671tCr61r4Dbv0i4dfjkFDt2jkI57bRcsjUX6OCnDoPOxqnh4mcUh32ROF+ 4wNhRh82EA0kYBx/6L0MgXHtrj/UABQKcDfRkX0aIZJTGTt15XTiVk3BH98LNHO1S9XO 24o7ivKGTUTymaITSYKUeivUt1K+T/K7XQeBugNktKL2QJjVWa4TdBpIh93ONp4Jd8MA VCns5XuNP6e+zf+SAcqGWaJUst3MrBRT2WjC72IrRc4GFayrq0kxlBA1O5T4OatqrZ6i TvLxEWTsqDBZkltr0cqS9O0n+uArJX+HSdwhcDfCbwvXuak0HfPFHJZq19s58efXZloY 2jOQ== X-Forwarded-Encrypted: i=1; AJvYcCWo0iYaEMS6+d+o4HJ3xX5XPluvWsRvWzRkBs1afjYLQz0HJleA5ZLszTZJGcAElskfzqzosF8pk20ZVfoybeg= X-Gm-Message-State: AOJu0Ywdsa0Y+hlGa9W+law2AZKI1tP5viYghu1DP5ywBhhGW0JNSzXW WBZr5dYoJrFr05ODkmSdbTL3DxSYT/9A55fdxpe0DpClfS4mH017TWfMQxa0FUniugzfTA0s45f XVjBcwrsFcuuM6tdGEZ9tkVguPf6FuILfMNhLtOQRFUAgWiyMPj5Bz0kBVivI4S+oDWUy66gn/A lDlxB7O7rs X-Google-Smtp-Source: AGHT+IHD65m/BS1tjAQFNbA0n1XcTCADgaBAY51XeQ6UjTr0kCkdFwo4NXmlQ3EJ5o0ymO2rwn5VMAQb08GfTGukkjs= X-Received: by 2002:a50:d582:0:b0:56e:2cb6:480e with SMTP id v2-20020a50d582000000b0056e2cb6480emr8701739edi.38.1713808117654; Mon, 22 Apr 2024 10:48:37 -0700 (PDT) MIME-Version: 1.0 References: <20240418063644.24737-1-ronak.doshi@broadcom.com> <8530ecbc-dafc-412b-aba4-553eeacbebdc@amd.com> In-Reply-To: <8530ecbc-dafc-412b-aba4-553eeacbebdc@amd.com> From: Ronak Doshi Date: Mon, 22 Apr 2024 10:48:21 -0700 Message-ID: Subject: Re: [PATCH v2] net/vmxnet3: fix a missing vmxnet3 register command To: Ferruh Yigit Cc: Jochen Behrens , Ronak Doshi , dev@dpdk.org, stable@dpdk.org Content-Type: multipart/alternative; boundary="000000000000115ca40616b30c3d" X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org --000000000000115ca40616b30c3d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=E2=80=AFAM Ferruh Yigit = 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 > > -- > > 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 the= m? > Can you please detail the impact more in the commit log? > > > --=20 This electronic communication and the information and any files transmitted= =20 with it, or attached to it, are confidential and are intended solely for=20 the use of the individual or entity to whom it is addressed and may contain= =20 information that is confidential, legally privileged, protected by privacy= =20 laws, or otherwise restricted from disclosure to anyone else. If you are=20 not the intended recipient or the person responsible for delivering the=20 e-mail to the intended recipient, you are hereby notified that any use,=20 copying, distributing, dissemination, forwarding, printing, or copying of= =20 this e-mail is strictly prohibited. If you received this e-mail in error,= =20 please return the e-mail to the sender, delete it from your computer, and= =20 destroy any printed copy of it. --000000000000115ca40616b30c3d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Basically it will just provide incorrect information. With= the enum being misaligned=C2=A0due to missing command,=C2=A0GET_DCR0_REG a= nd GET_MAX_CAPABILITIES will just lead to incorrect commands being issued.<= br clear=3D"all">

Thanks,
Ronak


On Fri, Apr 19, 2024= at 1:35=E2=80=AFAM 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&q= uot;)
> Cc: stable@dpdk.o= rg
>
> Signed-off-by: Ronak Doshi <ronak.doshi@broadcom.com>
> --
> Change log
> v2: fixed typo
> ---
>=C2=A0 drivers/net/vmxnet3/base/vmxnet3_defs.h | 1 +
>=C2=A0 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/vmxnet3/base/vmxnet3_defs.h b/drivers/net/vmx= net3/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 {
>=C2=A0 =C2=A0 =C2=A0VMXNET3_CMD_RESERVED7,
>=C2=A0 =C2=A0 =C2=A0VMXNET3_CMD_RESERVED8,
>=C2=A0 =C2=A0 =C2=A0VMXNET3_CMD_GET_MAX_QUEUES_CONF,
> +=C2=A0 =C2=A0VMXNET3_CMD_RESERVED11,
>=C2=A0 =C2=A0 =C2=A0VMXNET3_CMD_GET_MAX_CAPABILITIES,
>=C2=A0 =C2=A0 =C2=A0VMXNET3_CMD_GET_DCR0_REG,
>=C2=A0 } 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?



This ele= ctronic communication and the information and any files transmitted with it= , or attached to it, are confidential and are intended solely for the use o= f the individual or entity to whom it is addressed and may contain informat= ion that is confidential, legally privileged, protected by privacy laws, or= otherwise restricted from disclosure to anyone else. If you are not the in= tended recipient or the person responsible for delivering the e-mail to the= intended recipient, you are hereby notified that any use, copying, distrib= uting, dissemination, forwarding, printing, or copying of this e-mail is st= rictly 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. --000000000000115ca40616b30c3d--