Subject: Re: [PATCH net-next v3] gve: Introduce a way to disable queue formats

From: Leon Romanovsky <[email-masked]>
Date: Thu, 2 Feb 2023 10:07:11 +0200

On Wed, Feb 01, 2023 at 07:57:22AM -0800, Jeroen de Borst wrote:
> The device is capable of simultaneously supporting multiple
> queue formats. These queue formats are:
> 
> - GQI-QPL: A queue format with in-order completions and a
> bounce-buffer (Queue Page List)
> - GQI-RDA: A queue format with in-order completions and no
> bounce-buffer (Raw DMA Access)
> - DQO-RDA: A queue format with out-of-order completions and
> no bounce buffer
> 
> With this change the driver can deliberately pick a queue format.
> 
> Signed-off-by: Jeroen de Borst <[email-masked]>
> ---
> Changed in v2:
> - Documented queue formats and addressed nits.
> Changed in v3:
> - Move changelog below trailer
> ---
>  drivers/net/ethernet/google/gve/gve.h         | 28 +++++++++
>  drivers/net/ethernet/google/gve/gve_adminq.c  | 35 +++++++-----
>  drivers/net/ethernet/google/gve/gve_ethtool.c | 57 ++++++++++++-------
>  drivers/net/ethernet/google/gve/gve_main.c    | 26 ++++++++-
>  4 files changed, 109 insertions(+), 37 deletions(-)

<...>

>  	priv->queue_format = GVE_QUEUE_FORMAT_UNSPECIFIED;
>  	/* Get the initial information we need from the device */
>  	err = gve_adminq_describe_device(priv);
> @@ -1661,6 +1680,7 @@ static int gve_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>  	priv->service_task_flags = 0x0;
>  	priv->state_flags = 0x0;
>  	priv->ethtool_flags = 0x0;
> +	priv->ethtool_formats = 0x0;
>  

There is no need to assign zeroes to priv as it is allocated with kvzalloc.

Thanks,
Reviewed-by: Leon Romanovsky <[email-masked]>