Jason Wang
2021-Dec-14 03:17 UTC
[PATCH v2 00/10] Allow for configuring max number of virtqueue pairs
On Mon, Dec 13, 2021 at 10:43 PM Eli Cohen <elic at nvidia.com> wrote:> > Allow the user to configure the max number of virtqueue pairs for a vdpa > instance. The user can then control the actual number of virtqueue pairs > using ethtool. > > Example, set number of VQPs to 2: > $ ethtool -L ens1 combined 2 > > A user can check the max supported virtqueues for a management device by > runnig: > > 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 256I think the maxsupported_vqs should be an odd number since it should contain control vq.> > and refer to this value when adding a device. > > To create a device with a max of 5 VQPs: > vdpa dev add name vdpa-a mgmtdev auxiliary/mlx5_core.sf.1 max_vqp 5A question, consider the parent support both net and block, if user use vdpa dev add name vdpa-a mgmtdev auxiliary/mlx5_core.sf.1 How do we know it's a net or block device? Or do you expect some block specific attributes to be added? Thanks> > V1 -> V2: > 1. Do not return the index of the control VQ. Instead return an > indication if Ctrl VQ was negotiated. > 2. Do not returen conig information if FEATURES_OK is not set to avoid > reporting out of sync information. > 3. Minor fixes as described by the individual patches > 4. Add patches to return the max virtqueues a device is capable of > supporting. > > Eli Cohen (10): > vdpa: Provide interface to read driver features > vdpa/mlx5: Distribute RX virtqueues in RQT object > vdpa: Read device configuration only if FEATURES_OK > vdpa: Allow to configure max data virtqueues > vdpa/mlx5: Fix config_attr_mask assignment > vdpa/mlx5: Support configuring max data virtqueue pairs > vdpa: Add support for returning device configuration information > vdpa/mlx5: Restore cur_num_vqs in case of failure in change_num_qps() > vdpa: Support reporting max device virtqueues > vdpa/mlx5: Configure max supported virtqueues > > drivers/vdpa/alibaba/eni_vdpa.c | 16 +++-- > drivers/vdpa/ifcvf/ifcvf_main.c | 16 +++-- > drivers/vdpa/mlx5/net/mlx5_vnet.c | 94 +++++++++++++++++------------- > drivers/vdpa/vdpa.c | 42 ++++++++++++- > drivers/vdpa/vdpa_sim/vdpa_sim.c | 21 +++++-- > drivers/vdpa/vdpa_user/vduse_dev.c | 16 +++-- > drivers/vdpa/virtio_pci/vp_vdpa.c | 16 +++-- > drivers/vhost/vdpa.c | 2 +- > drivers/virtio/virtio_vdpa.c | 2 +- > include/linux/vdpa.h | 16 +++-- > include/uapi/linux/vdpa.h | 9 +++ > 11 files changed, 178 insertions(+), 72 deletions(-) > > -- > 2.33.1 >
Parav Pandit
2021-Dec-14 04:11 UTC
[PATCH v2 00/10] Allow for configuring max number of virtqueue pairs
> From: Jason Wang <jasowang at redhat.com> > Sent: Tuesday, December 14, 2021 8:47 AM > > A question, consider the parent support both net and block, if user use > > vdpa dev add name vdpa-a mgmtdev auxiliary/mlx5_core.sf.1 > > How do we know it's a net or block device? Or do you expect some block > specific attributes to be added?User should pass the virtio device id of type net/blk etc when creating the device. No such in-kernel driver exists so far, so when it is added netlink interface should be enhanced to accept the optional device id.
Stefano Garzarella
2021-Dec-14 09:42 UTC
[PATCH v2 00/10] Allow for configuring max number of virtqueue pairs
Hi Eli, I don't know what's wrong, but I've only received replies through the virtualization at lists.linux-foundation.org mailing list. Even in the archive I can't find your original series. Adding virtualization-owner at lists.linux-foundation.org to double check what's going wrong. Thanks, Stefano On Tue, Dec 14, 2021 at 11:17:00AM +0800, Jason Wang wrote:>On Mon, Dec 13, 2021 at 10:43 PM Eli Cohen <elic at nvidia.com> wrote: >> >> Allow the user to configure the max number of virtqueue pairs for a vdpa >> instance. The user can then control the actual number of virtqueue pairs >> using ethtool. >> >> Example, set number of VQPs to 2: >> $ ethtool -L ens1 combined 2 >> >> A user can check the max supported virtqueues for a management device by >> runnig: >> >> 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 think the maxsupported_vqs should be an odd number since it should >contain control vq. > >> >> and refer to this value when adding a device. >> >> To create a device with a max of 5 VQPs: >> vdpa dev add name vdpa-a mgmtdev auxiliary/mlx5_core.sf.1 max_vqp 5 > >A question, consider the parent support both net and block, if user use > >vdpa dev add name vdpa-a mgmtdev auxiliary/mlx5_core.sf.1 > >How do we know it's a net or block device? Or do you expect some block >specific attributes to be added? > >Thanks > >> >> V1 -> V2: >> 1. Do not return the index of the control VQ. Instead return an >> indication if Ctrl VQ was negotiated. >> 2. Do not returen conig information if FEATURES_OK is not set to avoid >> reporting out of sync information. >> 3. Minor fixes as described by the individual patches >> 4. Add patches to return the max virtqueues a device is capable of >> supporting. >> >> Eli Cohen (10): >> vdpa: Provide interface to read driver features >> vdpa/mlx5: Distribute RX virtqueues in RQT object >> vdpa: Read device configuration only if FEATURES_OK >> vdpa: Allow to configure max data virtqueues >> vdpa/mlx5: Fix config_attr_mask assignment >> vdpa/mlx5: Support configuring max data virtqueue pairs >> vdpa: Add support for returning device configuration information >> vdpa/mlx5: Restore cur_num_vqs in case of failure in change_num_qps() >> vdpa: Support reporting max device virtqueues >> vdpa/mlx5: Configure max supported virtqueues >> >> drivers/vdpa/alibaba/eni_vdpa.c | 16 +++-- >> drivers/vdpa/ifcvf/ifcvf_main.c | 16 +++-- >> drivers/vdpa/mlx5/net/mlx5_vnet.c | 94 +++++++++++++++++------------- >> drivers/vdpa/vdpa.c | 42 ++++++++++++- >> drivers/vdpa/vdpa_sim/vdpa_sim.c | 21 +++++-- >> drivers/vdpa/vdpa_user/vduse_dev.c | 16 +++-- >> drivers/vdpa/virtio_pci/vp_vdpa.c | 16 +++-- >> drivers/vhost/vdpa.c | 2 +- >> drivers/virtio/virtio_vdpa.c | 2 +- >> include/linux/vdpa.h | 16 +++-- >> include/uapi/linux/vdpa.h | 9 +++ >> 11 files changed, 178 insertions(+), 72 deletions(-) >> >> -- >> 2.33.1 >> > >_______________________________________________ >Virtualization mailing list >Virtualization at lists.linux-foundation.org >https://lists.linuxfoundation.org/mailman/listinfo/virtualization >