Jason Wang
2021-Dec-21 07:57 UTC
[PATCH v3 09/10] vdpa/mlx5: Configure max supported virtqueues
On Tue, Dec 21, 2021 at 2:23 PM Eli Cohen <elic at nvidia.com> wrote:> > On Tue, Dec 21, 2021 at 02:04:39PM +0800, Jason Wang wrote: > > > > ? 2021/12/19 ??10:02, Eli Cohen ??: > > > Configure max supported virtqueues on the management device. This info > > > can be retrieved using: > > > > > > $ vdpa dev show > > > vdpa-a: type network mgmtdev auxiliary/mlx5_core.sf.1 vendor_id 5555 \ > > > max_vqp 3 max_vq_size 256 max_supported_vqs 256 > > > > > > I still think we should report 257 here to be aligned with the spec even if > > we know cvq is probably emulated. > > OK, you mean report 257 for max_supported_vqs?Yes.> > > > > > > > > > Signed-off-by: Eli Cohen <elic at nvidia.com> > > > --- > > > drivers/vdpa/mlx5/net/mlx5_vnet.c | 1 + > > > 1 file changed, 1 insertion(+) > > > > > > diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c > > > index 72ed5efbe35d..68dbddadde93 100644 > > > --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c > > > +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c > > > @@ -2689,6 +2689,7 @@ static int mlx5v_probe(struct auxiliary_device *adev, > > > mgtdev->mgtdev.id_table = id_table; > > > mgtdev->mgtdev.config_attr_mask = BIT_ULL(VDPA_ATTR_DEV_NET_CFG_MACADDR) | > > > BIT_ULL(VDPA_ATTR_DEV_NET_CFG_MAX_VQP); > > > + mgtdev->mgtdev.max_supported_vqs = MLX5_CAP_DEV_VDPA_EMULATION(mdev, max_num_virtio_queues); > > > > > > Do we need to change other vdpa parent like the simulator and ifcvf? > > > > I can change for the simulator but not sure I know how to do it for > ifcvf or other drivers.Adding LingShan to answer this question. And we don't need to care about eni and vp_vdpa now since they don't support mgmt devices yet. Thanks> > > Thanks > > > > > > > mgtdev->madev = madev; > > > err = vdpa_mgmtdev_register(&mgtdev->mgtdev); > > >