On 10/23/2023 10:45 PM, Jason Wang wrote:
On Sat, Oct 21, 2023 at 5:28 PM Si-Wei Liu wrote:
Using .compat_reset op from the previous patch, the buggy .reset
behaviour can be kept as-is on older userspace apps, which don't ack the
IOTLB_PERSIST backend feature. As this compatibility qui
On 10/24/2023 9:21 AM, Si-Wei Liu wrote:
On 10/23/2023 10:45 PM, Jason Wang wrote:
On Sat, Oct 21, 2023 at 5:28 PM Si-Wei Liu
wrote:
Using .compat_reset op from the previous patch, the buggy .reset
behaviour can be kept as-is on older userspace apps, which don't ack
the
IOTLB_PE
51 PM, Lei Yang wrote:
QE tested this series v4 with regression testing on real nic, there is
no new regression bug.
Tested-by: Lei Yang
On Tue, Oct 24, 2023 at 6:02 AM Si-Wei Liu wrote:
On 10/22/2023 8:51 PM, Jason Wang wrote:
Hi Si-Wei:
On Sat, Oct 21, 2023 at 5:28 PM Si-Wei Liu wrote
all/CAPpAL=yhdqn1aztecn3mps8o4m+bl_hvy02fdpihn7dwd91...@mail.gmail.com/
Signed-off-by: Si-Wei Liu
---
drivers/vhost/vdpa.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
index 9a2343c45df0..30df5c58db73 100644
--- a/drivers/vhost/vdpa.c
+++ b/drivers/
2:41 AM, Lei Yang wrote:
On Wed, Oct 25, 2023 at 1:27 AM Si-Wei Liu wrote:
Hello Si-Wei
Thanks a lot for testing! Please be aware that there's a follow-up fix
for a potential oops in this v4 series:
The first, when I did not apply this patch [1], I will also hit this
patch mentioned pr
On 10/25/2023 10:26 PM, Michael S. Tsirkin wrote:
On Wed, Oct 25, 2023 at 04:13:14PM -0700, Si-Wei Liu wrote:
When the vhost-vdpa device is being closed, vhost_vdpa_cleanup() doesn't
clean up the vqs pointer after free. This could lead to use-after-tree
when _compat_vdpa_reset() tri
nd-email-si-wei@oracle.com/
---
Si-Wei Liu (7):
vdpa: introduce .reset_map operation callback
vhost-vdpa: reset vendor specific mapping to initial state in .release
vhost-vdpa: introduce IOTLB_PERSIST backend feature bit
vdpa: introduce .compat_reset operation callback
vhost-vdpa: clean i
evice reset should not cause mapping to go away on such
IOTLB model, so persistent mapping is implied across reset. Before the
userspace process using vhost-vdpa is gone, give it a chance to reset
iotlb back to the initial state in vhost_vdpa_cleanup().
Signed-off-by: Si-Wei Liu
Acked-by: Eugenio
ot bother to implement such op,
but only those drivers that are doing or used to do non-compliant
map-cleaning reset will have to.
Signed-off-by: Si-Wei Liu
---
include/linux/vdpa.h | 13 +
1 file changed, 13 insertions(+)
diff --git a/include/linux/vdpa.h b/include/linux/vdp
ot a MUST for every parent that implements the
.dma_map or .set_map API, because device may work with DMA ops directly
by implement their own to manipulate system memory mappings, so don't
have to use .reset_map to achieve a simple IOMMU device model for 1:1
passthrough mapping.
Signed-off-
d clean up memory mappings by itself.
Additionally, implement .compat_reset to cater for older userspace,
which may wish to see mapping to be cleared during reset.
Co-developed-by: Dragos Tatulea
Signed-off-by: Dragos Tatulea
Signed-off-by: Si-Wei Liu
---
drivers/vdpa/mlx5/core/mlx5_vdpa.h | 1
it is safe to skip this unmap & map in the case of vhost stop
& start cycle.
In that sense, this feature flag is actually a signal for userspace to
know that the driver bug has been solved. Not offering it indicates that
userspace cannot trust the kernel will retain the maps.
Signed-off-by:
ompared to overloading the existing .reset with
flags, .compat_reset won't cause any extra burden to the implementation
of every compliant driver.
Signed-off-by: Si-Wei Liu
Tested-by: Dragos Tatulea
Tested-by: Lei Yang
---
drivers/vhost/vdpa.c | 20
drivers/virtio/vir
tself.
Additionally, implement .compat_reset to cater for older userspace,
which may wish to see mapping to be cleared during reset.
Signed-off-by: Si-Wei Liu
Tested-by: Stefano Garzarella
---
drivers/vdpa/vdpa_sim/vdpa_sim.c | 52 ++--
1 file changed, 43 insertions(
On 10/25/2023 11:55 PM, Si-Wei Liu wrote:
On 10/25/2023 10:26 PM, Michael S. Tsirkin wrote:
On Wed, Oct 25, 2023 at 04:13:14PM -0700, Si-Wei Liu wrote:
When the vhost-vdpa device is being closed, vhost_vdpa_cleanup()
doesn't
clean up the vqs pointer after free. This could lead t
Steve, I think this is a loose end that I myself am not sure if worth
fixing, copy Eugenio for his awareness. Reason is that when CVQ is in
place it always has to cope with device state saving and restoration
using shadowed virtqueue for a lot of cases not just migration, and
that's the reas
On 11/24/2021 9:09 AM, Eli Cohen wrote:
Make sure to offer VIRTIO_NET_F_MTU since we configure the MTU based on
what was queried from the device.
This allows the virtio driver to allocate large enough buffers based on
the reported MTU.
Signed-off-by: Eli Cohen
Reviewed-by: Si-Wei Liu
On 11/24/2021 9:19 AM, Eli Cohen wrote:
Increase the limit on the maximum number of supported virtqueues to 256
to match hardware capabilities.
Signed-off-by: Eli Cohen
Acked-by: Si-Wei Liu
---
drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion
On 11/25/2021 8:22 AM, Michael S. Tsirkin wrote:
On Thu, Nov 25, 2021 at 09:29:53AM +0200, Eli Cohen wrote:
On Thu, Nov 25, 2021 at 02:21:43AM -0500, Michael S. Tsirkin wrote:
On Wed, Nov 24, 2021 at 07:19:53PM +0200, Eli Cohen wrote:
Increase the limit on the maximum number of supported vi
On 11/30/2021 1:48 AM, Eli Cohen wrote:
Allow to configure the max virtqueues for a device.
Signed-off-by: Eli Cohen
---
drivers/vdpa/vdpa.c | 16 +++-
include/linux/vdpa.h | 1 +
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/drivers/vdpa/vdpa.c b/drivers/v
On 11/30/2021 1:48 AM, Eli Cohen wrote:
Check if the required number of data virtqueues 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.
Si
On 12/1/2021 2:03 AM, Eli Cohen wrote:
On Tue, Nov 30, 2021 at 05:24:03PM -0800, Si-Wei Liu wrote:
On 11/30/2021 1:48 AM, Eli Cohen wrote:
Allow to configure the max virtqueues for a device.
Signed-off-by: Eli Cohen
---
drivers/vdpa/vdpa.c | 16 +++-
include/linux
On 12/1/2021 2:03 AM, Eli Cohen wrote:
+ if ((config.max_virtqueues - 1) & config.max_virtqueues) {
+ NL_SET_ERR_MSG_MOD(info->extack,
+ "Must provide power of two number of
virtqueues");
Why there's such limitation
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
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
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
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
On 12/7/2021 12:19 AM, Eli Cohen wrote:
On Thu, Dec 02, 2021 at 11:28:12PM -0800, Si-Wei Liu wrote:
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
On 12/8/2021 12:14 PM, Eli Cohen wrote:
Provide an interface to read the negotiated features. This is needed
when building the netlink message in vdpa_dev_net_config_fill().
Also fix the implementation of vdpa_dev_net_config_fill() to use the
negotiated features instead of the device features
On 12/8/2021 12:14 PM, Eli Cohen wrote:
Distribute the available rx virtqueues amongst the available RQT
entries.
RQTs require to have a power of two entries. When creating or modifying
the RQT, use the lowest number of power of two entries that is not less
than the number of rx virtqueues. D
On 12/8/2021 12:14 PM, 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.
Example:
$ vdpa dev add name vdpa-a mgmtdev auxiliary/mlx5_core.sf.1 max_vqp 5
Not this patch, but I think ther
On 12/8/2021 12:14 PM, Eli Cohen wrote:
Add netlink attribute and callback function to query the control VQ
index of a device.
Example:
$ vdpa dev config show vdpa-a
vdpa-a: mac 00:00:00:00:88:88 link up link_announce false max_vq_pairs 5 \
mtu 9000 ctrl_vq_idx 10
First, I am not sure i
On 12/8/2021 9:36 PM, Jason Wang wrote:
On Thu, Dec 9, 2021 at 8:25 AM Si-Wei Liu wrote:
On 12/8/2021 12:14 PM, 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.
Example:
$ vdpa
On 12/8/2021 10:47 PM, Eli Cohen wrote:
On Wed, Dec 08, 2021 at 03:57:21PM -0800, Si-Wei Liu wrote:
On 12/8/2021 12:14 PM, Eli Cohen wrote:
Provide an interface to read the negotiated features. This is needed
when building the netlink message in vdpa_dev_net_config_fill().
Also fix the
On 12/8/2021 12:14 PM, 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")
Acked-by: Jason Wang
Signed-off-by: Eli Cohen
---
drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 ++
1 file changed, 2
On 12/8/2021 10:55 PM, Eli Cohen wrote:
On Wed, Dec 08, 2021 at 04:12:33PM -0800, Si-Wei Liu wrote:
On 12/8/2021 12:14 PM, Eli Cohen wrote:
Distribute the available rx virtqueues amongst the available RQT
entries.
RQTs require to have a power of two entries. When creating or modifying
the
ready reached.
Thanks,
-Siwei
On 3/2/2021 2:53 AM, Jason Wang wrote:
On 2021/3/2 5:47 下午, Michael S. Tsirkin wrote:
On Mon, Mar 01, 2021 at 11:56:50AM +0800, Jason Wang wrote:
On 2021/3/1 5:34 上午, Michael S. Tsirkin wrote:
On Wed, Feb 24, 2021 at 10:24:41AM -0800, Si-Wei Liu wrote:
Detecting
On 12/12/2021 5:38 AM, Eli Cohen wrote:
On Thu, Dec 09, 2021 at 02:29:17PM -0800, Si-Wei Liu wrote:
On 12/8/2021 10:47 PM, Eli Cohen wrote:
On Wed, Dec 08, 2021 at 03:57:21PM -0800, Si-Wei Liu wrote:
On 12/8/2021 12:14 PM, Eli Cohen wrote:
Provide an interface to read the negotiated
On 12/13/2021 6:42 AM, Eli Cohen wrote:
Add netlink attribute to store flags indicating current state of the
device.
In addition, introduce a flag to indicate whether control virtqueue is
used.
This indication can be retrieved by:
vdpa dev config show vdpa-a
vdpa-a: mac 00:00:00:00:88:88 lin
On 12/13/2021 6:42 AM, Eli Cohen wrote:
Add max_supported_vqs field to struct vdpa_mgmt_dev. Upstream drivers
need to feel this value according to the device capabilities.
This value is reported back in a netlink message when showing a device.
Example:
$ vdpa dev show
vdpa-a: type network m
ot;)
Acked-by: Jason Wang
Reviewed-by: Si-Wei Liu
Signed-off-by: Eli Cohen
---
drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c
b/drivers/vdpa/mlx5/net/mlx5_vnet.c
index 98aed4b36c3f..4a2149f70f1e 10
On 12/13/2021 6:42 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
On 12/13/2021 5:07 AM, Eli Cohen wrote:
On Mon, Dec 13, 2021 at 08:44:53AM +0200, Eli Cohen wrote:
On Fri, Dec 10, 2021 at 10:29:43AM +0800, Jason Wang wrote:
On Fri, Dec 10, 2021 at 5:51 AM Si-Wei Liu wrote:
On 12/8/2021 9:36 PM, Jason Wang wrote:
On Thu, Dec 9, 2021 at 8:25 AM Si-Wei
On 12/13/2021 6:42 AM, Eli Cohen wrote:
Add max_supported_vqs field to struct vdpa_mgmt_dev. Upstream drivers
need to feel this value according to the device capabilities.
This value is reported back in a netlink message when showing a device.
Example:
$ vdpa dev show
vdpa-a: type network m
On 12/12/2021 7:02 PM, Jason Wang wrote:
On Sun, Dec 12, 2021 at 5:26 PM Michael S. Tsirkin wrote:
On Fri, Dec 10, 2021 at 05:44:15PM -0800, Si-Wei Liu wrote:
Sorry for reviving this ancient thread. I was kinda lost for the conclusion
it ended up with. I have the following questions,
1
On 12/12/2021 1:26 AM, Michael S. Tsirkin wrote:
On Fri, Dec 10, 2021 at 05:44:15PM -0800, Si-Wei Liu wrote:
Sorry for reviving this ancient thread. I was kinda lost for the conclusion
it ended up with. I have the following questions,
1. legacy guest support: from the past conversations it
On 12/13/2021 9:06 PM, Michael S. Tsirkin wrote:
On Mon, Dec 13, 2021 at 05:59:45PM -0800, Si-Wei Liu wrote:
On 12/12/2021 1:26 AM, Michael S. Tsirkin wrote:
On Fri, Dec 10, 2021 at 05:44:15PM -0800, Si-Wei Liu wrote:
Sorry for reviving this ancient thread. I was kinda lost for the
On 12/14/2021 6:06 PM, Jason Wang wrote:
On Wed, Dec 15, 2021 at 9:05 AM Si-Wei Liu wrote:
On 12/13/2021 9:06 PM, Michael S. Tsirkin wrote:
On Mon, Dec 13, 2021 at 05:59:45PM -0800, Si-Wei Liu wrote:
On 12/12/2021 1:26 AM, Michael S. Tsirkin wrote:
On Fri, Dec 10, 2021 at 05:44:15PM
On 12/15/2021 1:33 PM, Michael S. Tsirkin wrote:
On Wed, Dec 15, 2021 at 12:52:20PM -0800, Si-Wei Liu wrote:
On 12/14/2021 6:06 PM, Jason Wang wrote:
On Wed, Dec 15, 2021 at 9:05 AM Si-Wei Liu wrote:
On 12/13/2021 9:06 PM, Michael S. Tsirkin wrote:
On Mon, Dec 13, 2021 at 05:59:45PM
On 12/14/2021 12:22 AM, Eli Cohen wrote:
On Mon, Dec 13, 2021 at 05:00:18PM -0800, Si-Wei Liu wrote:
On 12/13/2021 6:42 AM, Eli Cohen wrote:
Add max_supported_vqs field to struct vdpa_mgmt_dev. Upstream drivers
need to feel this value according to the device capabilities.
This value is
On 12/15/2021 6:53 PM, Jason Wang wrote:
On Thu, Dec 16, 2021 at 10:02 AM Si-Wei Liu wrote:
On 12/15/2021 1:33 PM, Michael S. Tsirkin wrote:
On Wed, Dec 15, 2021 at 12:52:20PM -0800, Si-Wei Liu wrote:
On 12/14/2021 6:06 PM, Jason Wang wrote:
On Wed, Dec 15, 2021 at 9:05 AM Si-Wei Liu
On 12/15/2021 7:43 PM, Jason Wang wrote:
On Thu, Dec 16, 2021 at 4:52 AM Si-Wei Liu wrote:
On 12/14/2021 6:06 PM, Jason Wang wrote:
On Wed, Dec 15, 2021 at 9:05 AM Si-Wei Liu wrote:
On 12/13/2021 9:06 PM, Michael S. Tsirkin wrote:
On Mon, Dec 13, 2021 at 05:59:45PM -0800, Si-Wei Liu
On 12/19/2021 4:08 AM, Eli Cohen wrote:
On Wed, Dec 15, 2021 at 06:56:40PM -0800, Si-Wei Liu wrote:
On 12/14/2021 12:22 AM, Eli Cohen wrote:
On Mon, Dec 13, 2021 at 05:00:18PM -0800, Si-Wei Liu wrote:
On 12/13/2021 6:42 AM, Eli Cohen wrote:
Add max_supported_vqs field to struct
On 12/21/2021 9:19 AM, Eli Cohen wrote:
Avoid reading device configuration during feature negotiation. Read
device status and verify that VIRTIO_CONFIG_S_FEATURES_OK is set.
Otherwise, return -EAGAIN.
Signed-off-by: Eli Cohen
---
drivers/vdpa/vdpa.c | 10 ++
1 file changed, 10 in
On 12/21/2021 9:20 AM, Eli Cohen wrote:
Add max_supported_vqs field to struct vdpa_mgmt_dev. Upstream drivers
need to feel this value according to the device capabilities.
This value is reported back in a netlink message when showing management
devices.
Example:
$ vdpa dev show
s/dev/mgmtd
On 12/21/2021 9:20 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")
Acked-by: Jason Wang
Signed-off-by: Eli Cohen
Reviewed-by: Si-Wei Liu
---
drivers/
On 12/21/2021 9:20 AM, Eli Cohen wrote:
Add netlink attribute to store the negotiated features. This can be used
by userspace to get the current state of the vdpa instance.
Example:
$ vdpa dev config show vdpa-a
vdpa-a: mac 00:00:00:00:88:88 link up link_announce false max_vq_pairs 4 \
mt
allocated.
Acked-by: Jason Wang
Signed-off-by: Eli Cohen
Reviewed-by: Si-Wei Liu
---
drivers/vdpa/mlx5/net/mlx5_vnet.c | 43 +--
1 file changed, 30 insertions(+), 13 deletions(-)
diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c
b/drivers/vdpa/mlx5/net/mlx5_vnet.c
index
On 12/21/2021 9:20 AM, Eli Cohen wrote:
Configure max supported virtqueues on the management device. This info
can be retrieved using:
$ vdpa mgmtdev show
auxiliary/mlx5_core.sf.1:
supported_classes net
max_supported_vqs 257
Signed-off-by: Eli Cohen
Reviewed-by: Si-Wei Liu
On 12/21/2021 9:20 AM, Eli Cohen wrote:
All masks in this file are 64 bits. Change BIT to BIT_ULL.
Other occurences use (1 << val) which yields a 32 bit value. Change them
to use BIT_ULL too.
Signed-off-by: Eli Cohen
Reviewed-by: Si-Wei Liu
---
drivers/vdpa/vdpa.
On 12/21/2021 9:06 PM, Parav Pandit wrote:
From: Si-Wei Liu
Sent: Wednesday, December 22, 2021 7:31 AM
On 12/21/2021 9:20 AM, Eli Cohen wrote:
Add max_supported_vqs field to struct vdpa_mgmt_dev. Upstream drivers
need to feel this value according to the device capabilities.
This value
On 12/21/2021 9:55 PM, Eli Cohen wrote:
On Tue, Dec 21, 2021 at 05:55:56PM -0800, Si-Wei Liu wrote:
On 12/21/2021 9:19 AM, Eli Cohen wrote:
Avoid reading device configuration during feature negotiation. Read
device status and verify that VIRTIO_CONFIG_S_FEATURES_OK is set.
Otherwise
On 12/21/2021 11:10 PM, Eli Cohen wrote:
On Wed, Dec 22, 2021 at 09:03:37AM +0200, Parav Pandit wrote:
From: Eli Cohen
Sent: Wednesday, December 22, 2021 12:17 PM
--- a/drivers/vdpa/vdpa.c
+++ b/drivers/vdpa/vdpa.c
@@ -507,6 +507,9 @@ static int vdpa_mgmtdev_fill(const struct
vdpa_mgmt_
On 12/21/2021 11:54 PM, Eli Cohen wrote:
On Tue, Dec 21, 2021 at 11:29:36PM -0800, Si-Wei Liu wrote:
On 12/21/2021 11:10 PM, Eli Cohen wrote:
On Wed, Dec 22, 2021 at 09:03:37AM +0200, Parav Pandit wrote:
From: Eli Cohen
Sent: Wednesday, December 22, 2021 12:17 PM
--- a/drivers/vdpa
On 12/22/2021 6:20 AM, Eli Cohen wrote:
Add wrappers to get/set status and protect these operations with
cf_mutex to serialize these operations with respect to get/set config
operations.
Need to protect vdpa_reset() which is essentially vdpa_set_status(0)
-Siwei
Signed-off-by: Eli Cohen
-
On 12/22/2021 6:20 AM, Eli Cohen wrote:
Add max_supported_vqs field to struct vdpa_mgmt_dev. Upstream drivers
need to feel this value according to the device capabilities.
This value is reported back in a netlink message when showing management
devices.
Examples:
$ vdpa mgmtdev show
auxilia
On 12/22/2021 6:27 PM, Jason Wang wrote:
On Thu, Dec 23, 2021 at 3:25 AM Si-Wei Liu wrote:
On 12/21/2021 11:54 PM, Eli Cohen wrote:
On Tue, Dec 21, 2021 at 11:29:36PM -0800, Si-Wei Liu wrote:
On 12/21/2021 11:10 PM, Eli Cohen wrote:
On Wed, Dec 22, 2021 at 09:03:37AM +0200, Parav
On 12/22/2021 9:39 PM, Eli Cohen wrote:
On Wed, Dec 22, 2021 at 06:43:38PM -0800, Si-Wei Liu wrote:
On 12/22/2021 6:27 PM, Jason Wang wrote:
On Thu, Dec 23, 2021 at 3:25 AM Si-Wei Liu wrote:
On 12/21/2021 11:54 PM, Eli Cohen wrote:
On Tue, Dec 21, 2021 at 11:29:36PM -0800, Si-Wei Liu
On 12/22/2021 9:46 PM, Eli Cohen wrote:
On Wed, Dec 22, 2021 at 02:58:18PM -0800, Si-Wei Liu wrote:
On 12/22/2021 6:20 AM, Eli Cohen wrote:
Add wrappers to get/set status and protect these operations with
cf_mutex to serialize these operations with respect to get/set config
operations
On 12/28/2021 7:36 AM, Eli Cohen wrote:
On Thu, Dec 23, 2021 at 01:58:50PM -0800, Si-Wei Liu wrote:
On 12/22/2021 9:46 PM, Eli Cohen wrote:
On Wed, Dec 22, 2021 at 02:58:18PM -0800, Si-Wei Liu wrote:
On 12/22/2021 6:20 AM, Eli Cohen wrote:
Add wrappers to get/set status and protect these
On 12/30/2021 6:20 AM, Eli Cohen wrote:
Remove overriding of virtio_version_1_0 which forced the virtqueue
object to version 1.
Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices")
Signed-off-by: Eli Cohen
Reviewed-by: Si-Wei Liu
-Siwei
---
drivers
On 1/5/2022 3:46 AM, Eli Cohen wrote:
Add wrappers to get/set status and protect these operations with
cf_mutex to serialize these operations with respect to get/set config
operations.
Signed-off-by: Eli Cohen
---
drivers/vdpa/vdpa.c | 19 +++
drivers/vhost/vdpa.c
On 1/5/2022 3:46 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.
Example:
$ vdpa dev add name vdpa-a mgmtdev auxiliary/mlx5_core.sf.1 max_vqp 4
Signed-off-by: Eli Cohen
---
v6->
for (i = 0, j = 0; i < max_rqt; i++, j += 2)
- list[i] = cpu_to_be32(ndev->vqs[j %
ndev->mvdev.max_vqs].virtq_id);
+ list[i] = cpu_to_be32(ndev->vqs[j % (2 * num)].virtq_id);
Good catch. LGTM.
Reviewed-by: Si-Wei Liu
MLX5_SET(rqtc, rqtc, rqt_actual_size, max
On 1/6/2022 5:27 PM, Si-Wei Liu wrote:
On 1/5/2022 3:46 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
:
$ auxiliary/mlx5_core.sf.1:
Missing the exact 'vdpa mgmtdev show ...' command, otherwise:
Reviewed-by: Si-Wei Liu
supported_classes net
max_supported_vqs 257
dev_features CSUM GUEST_CSUM MTU HOST_TSO4 HOST_TSO6 STATUS CTRL_VQ MQ \
CTRL_MAC_ADDR VERSION_1 ACCES
HOST_TSO6 STATUS CTRL_VQ MQ \
CTRL_MAC_ADDR VERSION_1 ACCESS_PLATFORM
Signed-off-by: Eli Cohen
Reviewed-by: Si-Wei Liu
---
v6 -> v7:
1. Add supported features
drivers/vdpa/mlx5/net/mlx5_vnet.c | 35 ---
1 file changed, 23 insertions(+), 12 deleti
On 1/6/2022 9:08 PM, Jason Wang wrote:
在 2022/1/7 上午8:33, Si-Wei Liu 写道:
On 1/5/2022 3:46 AM, Eli Cohen wrote:
Add wrappers to get/set status and protect these operations with
cf_mutex to serialize these operations with respect to get/set config
operations.
Signed-off-by: Eli Cohen
On 1/6/2022 9:43 PM, Jason Wang wrote:
在 2022/1/7 上午9:50, Si-Wei Liu 写道:
On 1/6/2022 5:27 PM, Si-Wei Liu wrote:
On 1/5/2022 3:46 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
It's unfortunate. Don't know why this series got pulled into linux-next
prematurely. The code review is still on going and there were
outstanding comments that hadn't been addressed yet.
On 1/7/2022 10:01 AM, Nathan Chancellor wrote:
Apologies if this reply is somewhat mangled. This patch did
set after trying to allocate ndev->vqs,event_cbs.
So move the allocation to after mvdev is set but before the arrays
are used in init_mvqs()
Fixes: 7620d51af29a ("vdpa/mlx5: Support configuring max data virtqueue")
Signed-off-by: Tom Rix
Reviewed-by: Si-Wei Liu
---
drivers/vdpa/mlx5/
On 1/9/2022 6:10 AM, Eli Cohen wrote:
On Thu, Jan 06, 2022 at 05:50:24PM -0800, Si-Wei Liu wrote:
On 1/6/2022 5:27 PM, Si-Wei Liu wrote:
On 1/5/2022 3:46 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
On 1/9/2022 6:09 AM, Eli Cohen wrote:
On Thu, Jan 06, 2022 at 04:33:49PM -0800, Si-Wei Liu wrote:
On 1/5/2022 3:46 AM, Eli Cohen wrote:
Add wrappers to get/set status and protect these operations with
cf_mutex to serialize these operations with respect to get/set config
operations.
Signed
On 1/9/2022 10:05 PM, Jason Wang wrote:
在 2022/1/8 上午9:23, Si-Wei Liu 写道:
On 1/6/2022 9:08 PM, Jason Wang wrote:
在 2022/1/7 上午8:33, Si-Wei Liu 写道:
On 1/5/2022 3:46 AM, Eli Cohen wrote:
Add wrappers to get/set status and protect these operations with
cf_mutex to serialize these
On 1/9/2022 11:04 PM, Michael S. Tsirkin wrote:
On Wed, Jan 05, 2022 at 01:46:32PM +0200, Eli Cohen 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.
So I put a version of thi
On 1/9/2022 11:49 PM, Eli Cohen wrote:
On Mon, Jan 10, 2022 at 02:04:32AM -0500, Michael S. Tsirkin wrote:
On Wed, Jan 05, 2022 at 01:46:32PM +0200, Eli Cohen wrote:
Allow the user to configure the max number of virtqueue pairs for a vdpa
instance. The user can then control the actual number
On 1/10/2022 11:34 PM, Eli Cohen wrote:
On Mon, Jan 10, 2022 at 05:00:34PM -0800, Si-Wei Liu wrote:
On 1/9/2022 6:10 AM, Eli Cohen wrote:
On Thu, Jan 06, 2022 at 05:50:24PM -0800, Si-Wei Liu wrote:
On 1/6/2022 5:27 PM, Si-Wei Liu wrote:
On 1/5/2022 3:46 AM, Eli Cohen wrote:
Check whether
On 1/10/2022 10:26 PM, Parav Pandit wrote:
From: Jason Wang
Sent: Tuesday, January 11, 2022 10:17 AM
I guess in this situation it would be better defer to the future patch
to add such locking or wrapper, although right now there are just two
additional calls taking the lock needlessly when
On 1/10/2022 8:46 PM, Jason Wang wrote:
On Tue, Jan 11, 2022 at 9:30 AM Si-Wei Liu wrote:
On 1/9/2022 10:05 PM, Jason Wang wrote:
在 2022/1/8 上午9:23, Si-Wei Liu 写道:
On 1/6/2022 9:08 PM, Jason Wang wrote:
在 2022/1/7 上午8:33, Si-Wei Liu 写道:
On 1/5/2022 3:46 AM, Eli Cohen wrote:
Add
r in a same series.
Reviewed-by: Si-Wei Liu
u8 status, status_old;
int ret, nvqs = v->nvqs;
u16 i;
@@ -177,7 +176,7 @@ static long vhost_vdpa_set_status(struct vhost_vdpa *v, u8
__user *statusp)
vhost_vdpa_unsetup_vq_irq(v, i);
if (st
On 1/10/2022 11:22 PM, Eli Cohen wrote:
Make sure the decision whether an index received trough a callback is
valid or not consults the negotiated features.
Signed-off-by: Eli Cohen
Reviewed-by: Si-Wei Liu
Is there more for this series? Subject says there're 4 patches in
Reviewed-by: Si-Wei Liu
---
drivers/vdpa/vdpa.c | 11 ---
drivers/vhost/vdpa.c | 5 +++--
include/linux/vdpa.h | 1 -
3 files changed, 3 insertions(+), 14 deletions(-)
diff --git a/drivers/vdpa/vdpa.c b/drivers/vdpa/vdpa.c
index 4380367d00b5..9846c9de4bfa 100644
--- a/drivers/v
cf_mutex, a netlink thread calling vdpa_dev_config_fill
could get passed the VIRTIO_CONFIG_S_FEATURES_OK check in
vdpa_dev_config_fill() and end up reporting wrong features.
Fixes: 5f6e85953d8f ("vdpa: Read device configuration only if FEATURES_OK")
Signed-off-by: Eli Cohen
Reviewed-
already
clear, I got get_vq_state() call which caused out array bounds
access since is_index_valid() reported the index value.
So this is more of not hit a bug since the call shouldn't have been made
first place.
Signed-off-by: Eli Cohen
Reviewed-by: Si-Wei Liu
---
drivers/vdpa/mlx
his patch, but there should've been validation done in the
upper layer to guarantee set_featuers() for VIRTIO_NET_F_MQ always comes
with VIRTIO_NET_F_CTRL_VQ. Maybe checking both: BIT_ULL(VIRTIO_NET_F_MQ)
| BIT_ULL(VIRTIO_NET_F_CTRL_VQ)?
otherwise it looks good to me.
Revie
On 1/11/2022 7:21 AM, Eli Cohen wrote:
On Tue, Jan 11, 2022 at 12:52:29AM -0800, Si-Wei Liu wrote:
On 1/10/2022 11:34 PM, Eli Cohen wrote:
On Mon, Jan 10, 2022 at 05:00:34PM -0800, Si-Wei Liu wrote:
On 1/9/2022 6:10 AM, Eli Cohen wrote:
On Thu, Jan 06, 2022 at 05:50:24PM -0800, Si-Wei Liu
On 1/11/2022 6:29 PM, Jason Wang wrote:
On Wed, Jan 12, 2022 at 6:15 AM Si-Wei Liu wrote:
On 1/11/2022 10:34 AM, Eli Cohen wrote:
Modify the code such that ndev->cur_num_vqs better reflects the actual
number of data virtqueues. The value can be accurately realized after
features h
On 1/11/2022 10:37 PM, Eli Cohen wrote:
On Tue, Jan 11, 2022 at 02:14:47PM -0800, Si-Wei Liu wrote:
On 1/11/2022 10:34 AM, Eli Cohen wrote:
Modify the code such that ndev->cur_num_vqs better reflects the actual
number of data virtqueues. The value can be accurately realized after
featu
This patchset contains the fixes for a few issues uncovered during the
review for the "Allow for configuring max number of virtqueue pairs"
series.
It is based on Eli's fixes:
2e4cda633a22 ("vdpa/mlx5: Fix tracking of current number of VQs")
in the vhost tree.
Si-Wei Li
Fixes: 52893733f2c5 ("vdpa/mlx5: Add multiqueue support")
Signed-off-by: Si-Wei Liu
---
drivers/vdpa/mlx5/net/mlx5_vnet.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c
b/drivers/vdpa/mlx5/net/mlx5_vnet.c
index 46d4deb..491127f 10
101 - 200 of 483 matches
Mail list logo