[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM8PR12MB5400D725BCA4784F9D86FA65ABAB9@DM8PR12MB5400.namprd12.prod.outlook.com>
Date: Mon, 13 Jun 2022 08:19:38 +0000
From: Eli Cohen <elic@...dia.com>
To: Jason Wang <jasowang@...hat.com>
CC: mst <mst@...hat.com>, eperezma <eperezma@...hat.com>,
virtualization <virtualization@...ts.linux-foundation.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Si-Wei Liu <si-wei.liu@...cle.com>
Subject: RE: [PATCH 1/2] vdpa/mlx5: Update Control VQ callback information
> -----Original Message-----
> From: Jason Wang <jasowang@...hat.com>
> Sent: Monday, June 13, 2022 11:11 AM
> To: Eli Cohen <elic@...dia.com>
> Cc: mst <mst@...hat.com>; eperezma <eperezma@...hat.com>; virtualization <virtualization@...ts.linux-foundation.org>; linux-
> kernel <linux-kernel@...r.kernel.org>; Si-Wei Liu <si-wei.liu@...cle.com>
> Subject: Re: [PATCH 1/2] vdpa/mlx5: Update Control VQ callback information
>
> On Mon, Jun 13, 2022 at 4:00 PM Eli Cohen <elic@...dia.com> wrote:
> >
> > The control VQ specific information is stored in the dedicated struct
> > mlx5_control_vq. When the callback is updated through
> > mlx5_vdpa_set_vq_cb(), make sure to update the control VQ struct.
> >
> > Fixes: 5262912ef3cf ("vdpa/mlx5: Add support for control VQ and MAC setting")
> > Signed-off-by: Eli Cohen <elic@...dia.com>
> > ---
> > drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > index 1b6d46b86f81..789c078ff1af 100644
> > --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > @@ -1962,6 +1962,8 @@ static void mlx5_vdpa_set_vq_cb(struct vdpa_device *vdev, u16 idx, struct vdpa_c
> > struct mlx5_vdpa_net *ndev = to_mlx5_vdpa_ndev(mvdev);
> >
> > ndev->event_cbs[idx] = *cb;
> > + if (is_ctrl_vq_idx(mvdev, idx))
> > + mvdev->cvq.event_cb = *cb;
> > }
> >
>
> Acked-by: Jason Wang <jasowang@...hat.com)
>
> In the future, I wonder if we can simply just use event_cbs[] since it
> has took cvq into account:
>
> struct vdpa_callback event_cbs[MLX5_MAX_SUPPORTED_VQS + 1];
Right. I will change this is some future patch.
>
> Thanks
>
> > static void mlx5_cvq_notify(struct vringh *vring)
> > --
> > 2.35.1
> >
Powered by blists - more mailing lists