[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZDQFqV5xfQBC6hWT@corigine.com>
Date: Mon, 10 Apr 2023 14:48:41 +0200
From: Simon Horman <simon.horman@...igine.com>
To: Gautam Dawar <gautam.dawar@....com>
Cc: linux-net-drivers@....com, jasowang@...hat.com,
Edward Cree <ecree.xilinx@...il.com>,
Martin Habets <habetsm.xilinx@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Richard Cochran <richardcochran@...il.com>,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
eperezma@...hat.com, harpreet.anand@....com, tanuj.kamde@....com,
koushik.dutta@....com
Subject: Re: [PATCH net-next v4 08/14] sfc: implement vdpa vring config
operations
On Fri, Apr 07, 2023 at 01:40:09PM +0530, Gautam Dawar wrote:
> This patch implements the vDPA config operations related to
> virtqueues or vrings. These include setting vring address,
> getting vq state, operations to enable/disable a vq etc.
> The resources required for vring operations eg. VI, interrupts etc.
> are also allocated.
>
> Signed-off-by: Gautam Dawar <gautam.dawar@....com>
...
> diff --git a/drivers/net/ethernet/sfc/ef100_vdpa_ops.c b/drivers/net/ethernet/sfc/ef100_vdpa_ops.c
...
> +static void ef100_vdpa_set_vq_ready(struct vdpa_device *vdev, u16 idx,
> + bool ready)
> +{
> + struct ef100_vdpa_nic *vdpa_nic = get_vdpa_nic(vdev);
> +
> + if (is_qid_invalid(vdpa_nic, idx, __func__))
> + return;
> +
> + mutex_lock(&vdpa_nic->lock);
> + if (ready) {
> + vdpa_nic->vring[idx].vring_state |=
> + EF100_VRING_READY_CONFIGURED;
> + } else {
> + vdpa_nic->vring[idx].vring_state &=
> + ~EF100_VRING_READY_CONFIGURED;
> + }
nit: the if/else above does not need { }
> + mutex_unlock(&vdpa_nic->lock);
> +}
...
Powered by blists - more mailing lists