Re: [PATCH 3/7] vdpa/mlx5: Support configuring max data virtqueue pairs

2021-12-02 Thread Si-Wei Liu
On 12/2/2021 11:31 PM, Parav Pandit wrote: From: Si-Wei Liu Sent: Friday, December 3, 2021 12:58 PM On 12/1/2021 11:57 AM, Eli Cohen wrote: Check whether the max number of data virtqueue pairs was provided when a adding a new device and verify the new value does not exceed device capabili

Re: [PATCH 4/7] vdpa/mlx5: Report queried max supported virtqueues

2021-12-02 Thread Si-Wei Liu
On 12/1/2021 11:57 AM, Eli Cohen wrote: Report back in get_vq_num_max() the correct number of virtqueues queried from the device instead of using a constant value. Signed-off-by: Eli Cohen --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) dif

RE: [PATCH 3/7] vdpa/mlx5: Support configuring max data virtqueue pairs

2021-12-02 Thread Parav Pandit via Virtualization
> From: Si-Wei Liu > Sent: Friday, December 3, 2021 12:58 PM > > On 12/1/2021 11:57 AM, Eli Cohen wrote: > > Check whether the max number of data virtqueue pairs was provided when > > a adding a new device and verify the new value does not exceed device > > capabilities. > > > > In addition, c

Re: [PATCH 3/7] vdpa/mlx5: Support configuring max data virtqueue pairs

2021-12-02 Thread Si-Wei Liu
On 12/1/2021 11:57 AM, Eli Cohen wrote: Check whether the max number of data virtqueue pairs was provided when a adding a new device and verify the new value does not exceed device capabilities. In addition, change the arrays holding virtqueue and callback contexts to be dynamically allocated

Re: [PATCH 1/7] vdpa: Allow to configure max data virtqueues

2021-12-02 Thread Si-Wei Liu
On 12/1/2021 11:57 AM, Eli Cohen wrote: Add netlink support to configure the max virtqueue pairs for a device. At least one pair is required. The maximum is dictated by the device. Signed-off-by: Eli Cohen --- drivers/vdpa/vdpa.c | 14 +- include/linux/vdpa.h | 1 + 2 files

Re: [PATCH v3] i2c: virtio: fix completion handling

2021-12-02 Thread Viresh Kumar
On 02-12-21, 16:32, Vincent Whitchurch wrote: > The driver currently assumes that the notify callback is only received > when the device is done with all the queued buffers. > > However, this is not true, since the notify callback could be called > without any of the queued buffers being completed

Re: [PATCH 7/7] vdpa/mlx5: Restore cur_num_vqs in case of failure in change_num_qps()

2021-12-02 Thread Jason Wang
On Thu, Dec 2, 2021 at 3:58 AM Eli Cohen wrote: > > Restore ndev->cur_num_vqs to the original value in case change_num_qps() > fails. > > Fixes: 52893733f2c5 ("vdpa/mlx5: Add multiqueue support") > Signed-off-by: Eli Cohen Acked-by: Jason Wang > --- > drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 ++

Re: [PATCH 5/7] vdpa: Add support for querying control virtqueue index

2021-12-02 Thread Jason Wang
On Thu, Dec 2, 2021 at 3:58 AM Eli Cohen wrote: > > Add netlink attribute and callback function to query the control VQ > index of a device. It's better to explain the motivation of this. Actually we can deduce it from the max_virtqueue_paris if I was not wrong. So it means the value varies depen

Re: [PATCH 4/7] vdpa/mlx5: Report queried max supported virtqueues

2021-12-02 Thread Jason Wang
On Thu, Dec 2, 2021 at 3:58 AM Eli Cohen wrote: > > Report back in get_vq_num_max() the correct number of virtqueues queried > from the device instead of using a constant value. > > Signed-off-by: Eli Cohen > --- > drivers/vdpa/mlx5/net/mlx5_vnet.c | 4 ++-- > 1 file changed, 2 insertions(+), 2

Re: [PATCH 3/7] vdpa/mlx5: Support configuring max data virtqueue pairs

2021-12-02 Thread Jason Wang
On Thu, Dec 2, 2021 at 3:58 AM Eli Cohen wrote: > > Check whether the max number of data virtqueue pairs was provided when a > adding a new device and verify the new value does not exceed device > capabilities. > > In addition, change the arrays holding virtqueue and callback contexts > to be dyna

Re: [PATCH 2/7] vdpa/mlx5: Fix config_attr_mask assignment

2021-12-02 Thread Jason Wang
On Thu, Dec 2, 2021 at 3:58 AM Eli Cohen wrote: > > Fix VDPA_ATTR_DEV_NET_CFG_MACADDR assignment to be explicit 64 bit > assignment. > > No issue was seen since the value is well below 64 bit max value. > Nevertheless it needs to be fixed. > > Fixes: a007d940040c ("vdpa/mlx5: Support configuration

Re: [PATCH v3 2/5] iommu/virtio: Support bypass domains

2021-12-02 Thread Eric Auger
On 12/1/21 6:33 PM, Jean-Philippe Brucker wrote: > The VIRTIO_IOMMU_F_BYPASS_CONFIG feature adds a new flag to the ATTACH > request, that creates a bypass domain. Use it to enable identity > domains. > > When VIRTIO_IOMMU_F_BYPASS_CONFIG is not supported by the device, we > currently fail attach

Re: [PATCH v3 1/5] iommu/virtio: Add definitions for VIRTIO_IOMMU_F_BYPASS_CONFIG

2021-12-02 Thread Eric Auger
Hi Jean, On 12/1/21 6:33 PM, Jean-Philippe Brucker wrote: > Add definitions for the VIRTIO_IOMMU_F_BYPASS_CONFIG, which supersedes > VIRTIO_IOMMU_F_BYPASS. > > Reviewed-by: Kevin Tian > Signed-off-by: Jean-Philippe Brucker Reviewed-by: Eric Auger Eric > --- > include/uapi/linux/virtio_iommu.h

Re: [PATCH v2 2/2] i2c: virtio: fix completion handling

2021-12-02 Thread Vincent Whitchurch
On Thu, Nov 11, 2021 at 05:57:30PM +0100, Michael S. Tsirkin wrote: > On Thu, Nov 11, 2021 at 05:04:12PM +0100, Vincent Whitchurch wrote: > > - wait_for_completion(&vi->completion); > > + /* > > +* We only need to wait for the last one since the device is required > > +* to complete req

[PATCH v3] i2c: virtio: fix completion handling

2021-12-02 Thread Vincent Whitchurch
The driver currently assumes that the notify callback is only received when the device is done with all the queued buffers. However, this is not true, since the notify callback could be called without any of the queued buffers being completed (for example, with virtio-pci and shared interrupts) or