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 12AE442B34; Thu, 18 May 2023 19:41:47 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 012E142BC9; Thu, 18 May 2023 19:41:47 +0200 (CEST) Received: from mail-ua1-f49.google.com (mail-ua1-f49.google.com [209.85.222.49]) by mails.dpdk.org (Postfix) with ESMTP id C622D42B8B for ; Thu, 18 May 2023 19:41:45 +0200 (CEST) Received: by mail-ua1-f49.google.com with SMTP id a1e0cc1a2514c-77d049b9040so9684407241.1 for ; Thu, 18 May 2023 10:41:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1684431705; x=1687023705; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=GHHtVZmSVtTWP3JPuY/tqlQSDu3CIEPrzcfljcy2FRI=; b=Fsck2hpJSwq9U57OmQedI2bv/0JF8fxxM/loJoTK4Qc9CKXWg4Br6wCnraq+pObNOs 3IBh3OKsspSAwue26b1PsiDxXulM2MK2vErYty2cn8EnsE1ae9rn++w9Xi+f+PlZVmTS 14EPceYKWYwb5+f7bPnQCmUQhbabeMkMArz8ftYQnnqeekpUypBhu8LT4fsQBSU1kBLu DQO9fVH1uWhs6hE5Ev+Zvgj4zZs9O0EHoSmxp+yofVue82sW9u9vDaOsV8g9iqgwv5PZ 832hRtubCmkbvcFVHWbGddWI34wVi5fUQq5S6sUlFWLE/ICqcfGfhau71l10lq8lhYjH lt1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684431705; x=1687023705; 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=GHHtVZmSVtTWP3JPuY/tqlQSDu3CIEPrzcfljcy2FRI=; b=ONmO1G1DQXACztmNOjdZX1pQSxQNPnKZCHOUqOLuZdGK/vh36MPFpq5fPRHxO9+dFe l11w/CQ1c7FqTI0LZzzzmXa4at8f/brF/+nAkA8JWtK14lNtLrKPxPqSdpdQndXvRglt m2Hxu6SSGzK8c0ikWoDgx2E87+9A3NMY8qaXDIieQSTAg47HDYxwbQLkCdYwymX28Dww QEf4eT1kpGXsTR6htWI4GZtlVPbvi5v1wHys7Xa5nVTR+A3UO/3Bswa89jTkGTlqI6j6 QvdyUaRiRLp192kSEnwP/3GE7NulwOoldLlnLkX4IzzJhiWCa63A4v+RRlOyGEBTkmXe 6rBg== X-Gm-Message-State: AC+VfDxr/pE5NW1B29JzlHZoWuXZvdTOiDfMbeh1aoW4bcgmHXQoss45 Yiu3yFtp5b8GaAiG8H5yam1RyoFA9TdIQ/ZZ2luILw== X-Google-Smtp-Source: ACHHUZ7rrcq0IYpAShL4xhezIJxkEuTN8ZtD+cPvTHcwdqqwQH4qlBzGyTiRVLG7YM3bNQqvfrKfIplNQg4srOQIMAs= X-Received: by 2002:a05:6102:548f:b0:42f:ee66:6a5 with SMTP id bk15-20020a056102548f00b0042fee6606a5mr343912vsb.6.1684431705002; Thu, 18 May 2023 10:41:45 -0700 (PDT) MIME-Version: 1.0 References: <20230426213700.2668699-1-rushilg@google.com> <20230508191552.104540-1-rushilg@google.com> In-Reply-To: From: Rushil Gupta Date: Thu, 18 May 2023 10:41:34 -0700 Message-ID: Subject: Re: [v2] net/gve: check driver compatibility To: Ferruh Yigit Cc: qi.z.zhang@intel.com, jingjing.wu@intel.com, junfeng.guo@intel.com, joshwash@google.com, dev@dpdk.org, Jeroen de Borst Content-Type: multipart/alternative; boundary="0000000000006d19bf05fbfb519c" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org --0000000000006d19bf05fbfb519c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks for reviewing. Here is v3: http://patchwork.dpdk.org/project/dpdk/patch/20230518174005.1377467-1-rushi= lg@google.com/ On Wed, May 17, 2023 at 9:59=E2=80=AFAM Ferruh Yigit = wrote: > On 5/8/2023 8:15 PM, Rushil Gupta wrote: > > Change gve_driver_info fields to report DPDK as OS type and DPDK RTE > > version as OS version, reserving driver_version fields for GVE driver > > version based on features. > > > > Signed-off-by: Rushil Gupta > > Signed-off-by: Joshua Washington > > Signed-off-by: Junfeng Guo > > Signed-off-by: Jeroen de Borst > > --- > > drivers/net/gve/base/gve.h | 3 -- > > drivers/net/gve/base/gve_adminq.c | 19 ++++++++++ > > drivers/net/gve/base/gve_adminq.h | 46 ++++++++++++++++++++++- > > drivers/net/gve/base/gve_osdep.h | 24 ++++++++++++ > > drivers/net/gve/gve_ethdev.c | 61 +++++++++++++++++++++++++------ > > drivers/net/gve/gve_ethdev.h | 2 +- > > drivers/net/gve/gve_version.c | 14 +++++++ > > drivers/net/gve/gve_version.h | 25 +++++++++++++ > > drivers/net/gve/meson.build | 7 ++++ > > 9 files changed, 185 insertions(+), 16 deletions(-) > > create mode 100644 drivers/net/gve/gve_version.c > > create mode 100644 drivers/net/gve/gve_version.h > > > > 'doc/guides/nics/gve.rst' has following reference to Linux kernel version= : > > " > The base code is under MIT license and based on GVE kernel driver v1.3.0. > " > > Previously you mentioned that Linux kernel code has nothing to do with > DPDK version, should above note removed or updated? > > I will address this in the license patch 23.11. We will port all of our MIT licenses to BSD. http://patchwork.dpdk.org/project/dpdk/patch/20230411045908.844901-2-rushil= g@google.com/ For now let's keep this change separate from license update/removal. > <...> > > > +static int > > +gve_verify_driver_compatibility(struct gve_priv *priv) > > +{ > > + struct gve_driver_info *driver_info; > > + int err; > > + > > + driver_info =3D rte_zmalloc("driver info", sizeof(struct > gve_driver_info), 0); > > Can use calloc(), no need to use DPDK memory APIs. > This memory is not for datapath, and only used for short time. > Done > > > + if (driver_info =3D=3D NULL) { > > + PMD_DRV_LOG(ERR, > > + "Could not alloc for driver compatibility"); > > Message can be misleading, adding 'verify' may help. > Done > > > + return -ENOMEM; > > + } > > + *driver_info =3D (struct gve_driver_info) { > > + .os_type =3D 5, /* DPDK */ > > + .driver_major =3D GVE_VERSION_MAJOR, > > + .driver_minor =3D GVE_VERSION_MINOR, > > + .driver_sub =3D GVE_VERSION_SUB, > > + .os_version_major =3D cpu_to_be32(DPDK_VERSION_MAJOR), > > + .os_version_minor =3D cpu_to_be32(DPDK_VERSION_MINOR), > > + .os_version_sub =3D cpu_to_be32(DPDK_VERSION_SUB), > > + .driver_capability_flags =3D { > > + cpu_to_be64(GVE_DRIVER_CAPABILITY_FLAGS1), > > + cpu_to_be64(GVE_DRIVER_CAPABILITY_FLAGS2), > > + cpu_to_be64(GVE_DRIVER_CAPABILITY_FLAGS3), > > + cpu_to_be64(GVE_DRIVER_CAPABILITY_FLAGS4), > > + }, > > + }; > > + > > + populate_driver_version_strings((char > *)driver_info->os_version_str1, > > + (char *)driver_info->os_version_str2); > > + > > Is it accepted by adminq_verify if 'os_version_str1' & 'os_version_str2' > is not set? If not 'populate_driver_version_strings()' should return > success/error value. > It is acceptable if 'os_version_str1' & 'os_version_str2' are not set. > > > + err =3D gve_adminq_verify_driver_compatibility(priv, > > + sizeof(struct gve_driver_info), (dma_addr_t)driver_info); > > + > > + /* It's ok if the device doesn't support this */ > > + if (err =3D=3D -EOPNOTSUPP) > > + err =3D 0; > > + > > + rte_free(driver_info); > > + return err; > > +} > > + > > static int > > gve_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info > *dev_info) > > { > > @@ -672,6 +706,11 @@ gve_init_priv(struct gve_priv *priv, bool > skip_describe_device) > > PMD_DRV_LOG(ERR, "Failed to alloc admin queue: err=3D%d", > err); > > return err; > > } > > + err =3D gve_verify_driver_compatibility(priv); > > + if (err) { > > + PMD_DRV_LOG(ERR, "Could not verify driver compatibility: > err=3D%d", err); > > + goto free_adminq; > > + } > > > > if (skip_describe_device) > > goto setup_device; > > diff --git a/drivers/net/gve/gve_ethdev.h b/drivers/net/gve/gve_ethdev.= h > > index 42a02cf5d4..23ccff37d3 100644 > > --- a/drivers/net/gve/gve_ethdev.h > > +++ b/drivers/net/gve/gve_ethdev.h > > @@ -222,7 +222,7 @@ struct gve_priv { > > uint32_t adminq_report_stats_cnt; > > uint32_t adminq_report_link_speed_cnt; > > uint32_t adminq_get_ptype_map_cnt; > > - > > + uint32_t adminq_verify_driver_compatibility_cnt; > > volatile uint32_t state_flags; > > > > /* Gvnic device link speed from hypervisor. */ > > diff --git a/drivers/net/gve/gve_version.c > b/drivers/net/gve/gve_version.c > > new file mode 100644 > > index 0000000000..f02b4f696f > > --- /dev/null > > +++ b/drivers/net/gve/gve_version.c > > @@ -0,0 +1,14 @@ > > +/* SPDX-License-Identifier: BSD-3-Clause > > + * Google Virtual Ethernet (gve) driver > > Is above line added intentionally? > Normally SPDX tag only contains license and copyright information, > please check 'gve_ethdev.c' for sample tag. > Fixed. > > > + * Copyright (C) 2015-2023 Google, Inc. > > + */ > > +#include "gve_version.h" > > + > > +const char *gve_version_string(void) > > +{ > > + static char gve_version[10]; > > DPDK-1.0.0 =3D> 10 chars, it doesn't left room for terminating NULL, but > at least 'gve_write_version()' seems expecting to have one. > Great catch! Fixed. > > > + snprintf(gve_version, sizeof(gve_version), "%s%d.%d.%d", > > + GVE_VERSION_PREFIX, GVE_VERSION_MAJOR, GVE_VERSION_MINOR, > > + GVE_VERSION_SUB); > > 'snprintf()' adds terminating NULL, truncating version string, need more > space in the 'gve_version' array. > > > + return gve_version; > > +} > > diff --git a/drivers/net/gve/gve_version.h > b/drivers/net/gve/gve_version.h > > new file mode 100644 > > index 0000000000..eca717d64b > > --- /dev/null > > +++ b/drivers/net/gve/gve_version.h > > @@ -0,0 +1,25 @@ > > +/* SPDX-License-Identifier: BSD-3-Clause > > + * Google Virtual Ethernet (gve) driver > > Ditto > Fixed. > > > + * Copyright (C) 2015-2023 Google, Inc. > > + */ > > + > > +#ifndef _GVE_VERSION_H_ > > +#define _GVE_VERSION_H_ > > + > > +#include > > + > > +#define GVE_VERSION_PREFIX "DPDK-" > > +#define GVE_VERSION_MAJOR 1 > > +#define GVE_VERSION_MINOR 0 > > +#define GVE_VERSION_SUB 0 > > + > > +#define DPDK_VERSION_MAJOR (100 * RTE_VER_YEAR + RTE_VER_MONTH) > > +#define DPDK_VERSION_MINOR RTE_VER_MINOR > > +#define DPDK_VERSION_SUB RTE_VER_RELEASE > > + > > + > > +const char * > > +gve_version_string(void); > > + > > + > > +#endif /* GVE_VERSION_H */ > > diff --git a/drivers/net/gve/meson.build b/drivers/net/gve/meson.build > > index af0010c01c..62ab02d0dc 100644 > > --- a/drivers/net/gve/meson.build > > +++ b/drivers/net/gve/meson.build > > @@ -7,10 +7,17 @@ if is_windows > > subdir_done() > > endif > > > > +if is_freebsd > > + build =3D false > > + reason =3D 'not supported on FreeBSD' > > + subdir_done() > > +endif > > + > > instead of both 'is_windows' & 'is_freebsd' checks, > can check as "not is_linux": > > if not is_linux > build =3D false > reason =3D 'only supported on Linux' > endif > Fixed. --0000000000006d19bf05fbfb519c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks for reviewing. Here is v3:=C2=A0http://patchwork.dpdk.org/project/dpdk/patch/20230= 518174005.1377467-1-rushilg@google.com/

On Wed, May 17, 2023 at 9:59=E2= =80=AFAM Ferruh Yigit <ferruh.yigit@amd.com> wrote:
On 5/8/2023 8:15 PM, Rushil Gupta wrote:
> Change gve_driver_info fields to report DPDK as OS type and DPDK RTE > version as OS version, reserving driver_version fields for GVE driver<= br> > version based on features.
>
> Signed-off-by: Rushil Gupta <rushilg@google.com>
> Signed-off-by: Joshua Washington <joshwash@google.com>
> Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
> Signed-off-by: Jeroen de Borst <jeroendb@google.com>
> ---
>=C2=A0 drivers/net/gve/base/gve.h=C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 3 = --
>=C2=A0 drivers/net/gve/base/gve_adminq.c | 19 ++++++++++
>=C2=A0 drivers/net/gve/base/gve_adminq.h | 46 ++++++++++++++++++++++- >=C2=A0 drivers/net/gve/base/gve_osdep.h=C2=A0 | 24 ++++++++++++
>=C2=A0 drivers/net/gve/gve_ethdev.c=C2=A0 =C2=A0 =C2=A0 | 61 ++++++++++= +++++++++++++++------
>=C2=A0 drivers/net/gve/gve_ethdev.h=C2=A0 =C2=A0 =C2=A0 |=C2=A0 2 +- >=C2=A0 drivers/net/gve/gve_version.c=C2=A0 =C2=A0 =C2=A0| 14 +++++++ >=C2=A0 drivers/net/gve/gve_version.h=C2=A0 =C2=A0 =C2=A0| 25 ++++++++++= +++
>=C2=A0 drivers/net/gve/meson.build=C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 7 = ++++
>=C2=A0 9 files changed, 185 insertions(+), 16 deletions(-)
>=C2=A0 create mode 100644 drivers/net/gve/gve_version.c
>=C2=A0 create mode 100644 drivers/net/gve/gve_version.h
>

'doc/guides/nics/gve.rst' has following reference to Linux kernel v= ersion:

"
The base code is under MIT license and based on GVE kernel driver v1.3.0. "

Previously you mentioned that Linux kernel code has nothing to do with
DPDK version, should above note removed or updated?

I will address this in=C2=A0the=C2=A0license patch 23= .11. We will port all of our MIT licenses to BSD.
For now let's keep this chan= ge separate from license update/removal.
<...>

> +static int
> +gve_verify_driver_compatibility(struct gve_priv *priv)
> +{
> +=C2=A0 =C2=A0 =C2=A0struct gve_driver_info *driver_info;
> +=C2=A0 =C2=A0 =C2=A0int err;
> +
> +=C2=A0 =C2=A0 =C2=A0driver_info =3D rte_zmalloc("driver info&quo= t;, sizeof(struct gve_driver_info), 0);

Can use calloc(), no need to use DPDK memory APIs.
This memory is not for datapath, and only used for short time.
Done=C2=A0

> +=C2=A0 =C2=A0 =C2=A0if (driver_info =3D=3D NULL) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0PMD_DRV_LOG(ERR,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0"Could not alloc for driver compatibility");=

Message can be misleading, adding 'verify' may help.
Done=C2=A0

> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return -ENOMEM;
> +=C2=A0 =C2=A0 =C2=A0}
> +=C2=A0 =C2=A0 =C2=A0*driver_info =3D (struct gve_driver_info) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0.os_type =3D 5, /* DP= DK */
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0.driver_major =3D GVE= _VERSION_MAJOR,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0.driver_minor =3D GVE= _VERSION_MINOR,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0.driver_sub =3D GVE_V= ERSION_SUB,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0.os_version_major =3D= cpu_to_be32(DPDK_VERSION_MAJOR),
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0.os_version_minor =3D= cpu_to_be32(DPDK_VERSION_MINOR),
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0.os_version_sub =3D c= pu_to_be32(DPDK_VERSION_SUB),
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0.driver_capability_fl= ags =3D {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0cpu_to_be64(GVE_DRIVER_CAPABILITY_FLAGS1),
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0cpu_to_be64(GVE_DRIVER_CAPABILITY_FLAGS2),
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0cpu_to_be64(GVE_DRIVER_CAPABILITY_FLAGS3),
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0cpu_to_be64(GVE_DRIVER_CAPABILITY_FLAGS4),
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0},
> +=C2=A0 =C2=A0 =C2=A0};
> +
> +=C2=A0 =C2=A0 =C2=A0populate_driver_version_strings((char *)driver_in= fo->os_version_str1,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0(char *)driver_info->os_version_str2);
> +

Is it accepted by adminq_verify if 'os_version_str1' & 'os_= version_str2'
is not set? If not 'populate_driver_version_strings()' should retur= n
success/error value.
It is acceptable if=C2=A0 'os= _version_str1' & 'os_version_str2' are not set.

> +=C2=A0 =C2=A0 =C2=A0err =3D gve_adminq_verify_driver_compatibility(pr= iv,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sizeof(struct gve_dri= ver_info), (dma_addr_t)driver_info);
> +
> +=C2=A0 =C2=A0 =C2=A0/* It's ok if the device doesn't support = this */
> +=C2=A0 =C2=A0 =C2=A0if (err =3D=3D -EOPNOTSUPP)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0err =3D 0;
> +
> +=C2=A0 =C2=A0 =C2=A0rte_free(driver_info);
> +=C2=A0 =C2=A0 =C2=A0return err;
> +}
> +
>=C2=A0 static int
>=C2=A0 gve_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_inf= o *dev_info)
>=C2=A0 {
> @@ -672,6 +706,11 @@ gve_init_priv(struct gve_priv *priv, bool skip_de= scribe_device)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0PMD_DRV_LOG(ERR,= "Failed to alloc admin queue: err=3D%d", err);
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return err;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0}
> +=C2=A0 =C2=A0 =C2=A0err =3D gve_verify_driver_compatibility(priv); > +=C2=A0 =C2=A0 =C2=A0if (err) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0PMD_DRV_LOG(ERR, &quo= t;Could not verify driver compatibility: err=3D%d", err);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0goto free_adminq;
> +=C2=A0 =C2=A0 =C2=A0}
>=C2=A0
>=C2=A0 =C2=A0 =C2=A0 =C2=A0if (skip_describe_device)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0goto setup_devic= e;
> diff --git a/drivers/net/gve/gve_ethdev.h b/drivers/net/gve/gve_ethdev= .h
> index 42a02cf5d4..23ccff37d3 100644
> --- a/drivers/net/gve/gve_ethdev.h
> +++ b/drivers/net/gve/gve_ethdev.h
> @@ -222,7 +222,7 @@ struct gve_priv {
>=C2=A0 =C2=A0 =C2=A0 =C2=A0uint32_t adminq_report_stats_cnt;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0uint32_t adminq_report_link_speed_cnt;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0uint32_t adminq_get_ptype_map_cnt;
> -
> +=C2=A0 =C2=A0 =C2=A0uint32_t adminq_verify_driver_compatibility_cnt;<= br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0volatile uint32_t state_flags;
>=C2=A0
>=C2=A0 =C2=A0 =C2=A0 =C2=A0/* Gvnic device link speed from hypervisor. = */
> diff --git a/drivers/net/gve/gve_version.c b/drivers/net/gve/gve_versi= on.c
> new file mode 100644
> index 0000000000..f02b4f696f
> --- /dev/null
> +++ b/drivers/net/gve/gve_version.c
> @@ -0,0 +1,14 @@
> +/* SPDX-License-Identifier: BSD-3-Clause
> + * Google Virtual Ethernet (gve) driver

Is above line added intentionally?
Normally SPDX tag only contains license and copyright information,
please check 'gve_ethdev.c' for sample tag.
Fi= xed.=C2=A0

> + * Copyright (C) 2015-2023 Google, Inc.
> + */
> +#include "gve_version.h"
> +
> +const char *gve_version_string(void)
> +{
> +=C2=A0 =C2=A0 =C2=A0static char gve_version[10];

DPDK-1.0.0 =3D> 10 chars, it doesn't left room for terminating NULL,= but
at least 'gve_write_version()' seems expecting to have one.
Great catch! Fixed.=C2=A0

> +=C2=A0 =C2=A0 =C2=A0snprintf(gve_version, sizeof(gve_version), "= %s%d.%d.%d",
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0GVE_VERSION_PREFIX, G= VE_VERSION_MAJOR, GVE_VERSION_MINOR,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0GVE_VERSION_SUB);

'snprintf()' adds terminating NULL, truncating version string, need= more
space in the 'gve_version' array.

> +=C2=A0 =C2=A0 =C2=A0return gve_version;
> +}
> diff --git a/drivers/net/gve/gve_version.h b/drivers/net/gve/gve_versi= on.h
> new file mode 100644
> index 0000000000..eca717d64b
> --- /dev/null
> +++ b/drivers/net/gve/gve_version.h
> @@ -0,0 +1,25 @@
> +/* SPDX-License-Identifier: BSD-3-Clause
> + * Google Virtual Ethernet (gve) driver

Ditto
Fixed.=C2=A0

> + * Copyright (C) 2015-2023 Google, Inc.
> + */
> +
> +#ifndef _GVE_VERSION_H_
> +#define _GVE_VERSION_H_
> +
> +#include <rte_version.h>
> +
> +#define GVE_VERSION_PREFIX "DPDK-"
> +#define GVE_VERSION_MAJOR 1
> +#define GVE_VERSION_MINOR 0
> +#define GVE_VERSION_SUB 0
> +
> +#define DPDK_VERSION_MAJOR (100 * RTE_VER_YEAR + RTE_VER_MONTH)
> +#define DPDK_VERSION_MINOR RTE_VER_MINOR
> +#define DPDK_VERSION_SUB RTE_VER_RELEASE
> +
> +
> +const char *
> +gve_version_string(void);
> +
> +
> +#endif /* GVE_VERSION_H */
> diff --git a/drivers/net/gve/meson.build b/drivers/net/gve/meson.build=
> index af0010c01c..62ab02d0dc 100644
> --- a/drivers/net/gve/meson.build
> +++ b/drivers/net/gve/meson.build
> @@ -7,10 +7,17 @@ if is_windows
>=C2=A0 =C2=A0 =C2=A0 subdir_done()
>=C2=A0 endif
>=C2=A0
> +if is_freebsd
> +=C2=A0 =C2=A0 build =3D false
> +=C2=A0 =C2=A0 reason =3D 'not supported on FreeBSD'
> +=C2=A0 =C2=A0 subdir_done()
> +endif
> +

instead of both 'is_windows' & 'is_freebsd' checks,
can check as "not is_linux":

if not is_linux
=C2=A0 =C2=A0 build =3D false
=C2=A0 =C2=A0 reason =3D 'only supported on Linux'
endif
Fixed.=C2=A0
--0000000000006d19bf05fbfb519c--