Re: [RFC v1 0/8] vhost-vdpa: add support for iommufd

2024-01-11 Thread Cindy Lu
On Thu, Jan 11, 2024 at 6:25 AM Michael S. Tsirkin wrote: > > On Sat, Nov 04, 2023 at 01:16:33AM +0800, Cindy Lu wrote: > > > > Hi All > > This code provides the iommufd support for vdpa device > > This code fixes the bugs from the last version and also add the asid

Re: [PATCH v3] vduse: Fix off by one in vduse_dev_mmap()

2024-02-28 Thread Cindy Lu
t; --- > > v2: add array_index_nospec() > > v3: I accidentally corrupted v2. Try again. > > Thanks for fix this > > drivers/vdpa/vdpa_user/vduse_dev.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > Reviewed-by: Stefan Hajnoczi Reviewed-by: C

[PATCH v2] Documentation: Add reconnect process for VDUSE

2024-03-29 Thread Cindy Lu
Add a document explaining the reconnect process, including what the Userspace App needs to do and how it works with the kernel. Signed-off-by: Cindy Lu --- Documentation/userspace-api/vduse.rst | 41 +++ 1 file changed, 41 insertions(+) diff --git a/Documentation

Re: [PATCH v2] Documentation: Add reconnect process for VDUSE

2024-04-03 Thread Cindy Lu
On Fri, Mar 29, 2024 at 5:52 PM Michael S. Tsirkin wrote: > > On Fri, Mar 29, 2024 at 05:38:25PM +0800, Cindy Lu wrote: > > Add a document explaining the reconnect process, including what the > > Userspace App needs to do and how it works with the kernel. > > >

[PATCH v3] Documentation: Add reconnect process for VDUSE

2024-04-03 Thread Cindy Lu
Add a document explaining the reconnect process, including what the Userspace App needs to do and how it works with the kernel. Signed-off-by: Cindy Lu --- Documentation/userspace-api/vduse.rst | 41 +++ 1 file changed, 41 insertions(+) diff --git a/Documentation

Re: [PATCH v3] Documentation: Add reconnect process for VDUSE

2024-04-08 Thread Cindy Lu
On Mon, Apr 8, 2024 at 3:40 PM Michael S. Tsirkin wrote: > > On Thu, Apr 04, 2024 at 01:56:31PM +0800, Cindy Lu wrote: > > Add a document explaining the reconnect process, including what the > > Userspace App needs to do and how it works with the kernel. > > >

Re: [PATCH v3] Documentation: Add reconnect process for VDUSE

2024-04-09 Thread Cindy Lu
On Mon, Apr 8, 2024 at 8:50 PM Michael S. Tsirkin wrote: > > On Mon, Apr 08, 2024 at 08:39:21PM +0800, Cindy Lu wrote: > > On Mon, Apr 8, 2024 at 3:40 PM Michael S. Tsirkin wrote: > > > > > > On Thu, Apr 04, 2024 at 01:56:31PM +0800, Cindy Lu wrote: > &g

[PATCH v2 0/1] virtio-pci: Fix the crash that the vector was used after released

2024-04-09 Thread Cindy Lu
et_stop(), So this step will not lost during this process. Change from V1 1.add the check for if using irqfd 2.remove the check for bool recovery, irqfd's user is enough to check status Cindy Lu (1): virtio-pci: Fix the crash that the vector was used after releas

[PATCH v2 1/1] virtio-pci: Fix the crash that the vector was used after released.

2024-04-09 Thread Cindy Lu
640f8d731 in kvm_vcpu_thread_fn (arg=0x560642f205e0) at ../accel/kvm/kvm-accel-ops.c:51 21 0x5606411949f4 in qemu_thread_start (args=0x560642f292b0) at ../util/qemu-thread-posix.c:541 22 0x7fc87148cdcd in start_thread (arg=) at pthread_create.c:442 23 0x7fc871512630 in clone3 () at

Re: [PATCH v2 1/1] virtio-pci: Fix the crash that the vector was used after released.

2024-04-09 Thread Cindy Lu
Sorry, send to the wrong mail list, please ignore it On Wed, Apr 10, 2024 at 12:35 PM Cindy Lu wrote: > > When the guest triggers vhost_stop and then virtio_reset, the vector will the > IRQFD for this vector will be released and change to VIRTIO_NO_VECTOR. > After that, the

Re: [PATCH v2 0/1] virtio-pci: Fix the crash that the vector was used after released

2024-04-09 Thread Cindy Lu
Sorry, send to the wrong mail list, please ignore it On Wed, Apr 10, 2024 at 12:35 PM Cindy Lu wrote: > > During the booting process of the Vyatta image, the behavior of the > called function in qemu is as follows: > > 1. vhost_net_stop() was triggered by guest image . Thi

[PATCH v5 0/5] vduse: Add support for reconnection

2024-04-12 Thread Cindy Lu
the Documentation for vduse reconnection 2. merge the patch from Dan Carpenter vduse: Fix off by one in vduse_dev_mmap() 3. fix the wrong comment in the code Signed-off-by: Cindy Lu Cindy Lu (5): vduse: Add new ioctl VDUSE_DEV_GET_CONFIG vduse: Add new ioctl VDUSE_DEV_GET_STATUS vduse

[PATCH v5 1/5] vduse: Add new ioctl VDUSE_DEV_GET_CONFIG

2024-04-12 Thread Cindy Lu
The ioctl VDUSE_DEV_GET_CONFIG is used by the Userspace App to get the device configuration space. Signed-off-by: Cindy Lu --- drivers/vdpa/vdpa_user/vduse_dev.c | 21 + include/uapi/linux/vduse.h | 3 +++ 2 files changed, 24 insertions(+) diff --git a/drivers/vdpa

[PATCH v5 2/5] vduse: Add new ioctl VDUSE_DEV_GET_STATUS

2024-04-12 Thread Cindy Lu
The ioctl VDUSE_DEV_GET_STATUS is used by the Userspace App to get the device status Signed-off-by: Cindy Lu --- drivers/vdpa/vdpa_user/vduse_dev.c | 7 +++ include/uapi/linux/vduse.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/drivers/vdpa/vdpa_user/vduse_dev.c b

[PATCH v5 3/5] vduse: Add function to get/free the pages for reconnection

2024-04-12 Thread Cindy Lu
Signed-off-by: Cindy Lu --- drivers/vdpa/vdpa_user/vduse_dev.c | 40 ++ 1 file changed, 40 insertions(+) diff --git a/drivers/vdpa/vdpa_user/vduse_dev.c b/drivers/vdpa/vdpa_user/vduse_dev.c index ef3c9681941e..2da659d5f4a8 100644 --- a/drivers/vdpa/vdpa_user

[PATCH v5 4/5] vduse: Add file operation for mmap

2024-04-12 Thread Cindy Lu
Add the operation for mmap, This function will be used by the user space application to map the pages to the user space. Signed-off-by: Cindy Lu --- drivers/vdpa/vdpa_user/vduse_dev.c | 57 ++ 1 file changed, 57 insertions(+) diff --git a/drivers/vdpa/vdpa_user

[PATCH v5 5/5] Documentation: Add reconnect process for VDUSE

2024-04-12 Thread Cindy Lu
Add a document explaining the reconnect process, including what the Userspace App needs to do and how it works with the kernel. Signed-off-by: Cindy Lu --- Documentation/userspace-api/vduse.rst | 41 +++ 1 file changed, 41 insertions(+) diff --git a/Documentation

Re: [PATCH v5 5/5] Documentation: Add reconnect process for VDUSE

2024-04-17 Thread Cindy Lu
On Tue, Apr 16, 2024 at 11:46 AM Jason Wang wrote: > > On Fri, Apr 12, 2024 at 9:31 PM Cindy Lu wrote: > > > > Add a document explaining the reconnect process, including what the > > Userspace App needs to do and how it works with the kernel. > &g

Re: [PATCH v5 3/5] vduse: Add function to get/free the pages for reconnection

2024-04-23 Thread Cindy Lu
gt; > > > > > > On Thu, Apr 18, 2024 at 08:57:51AM +0800, Jason Wang wrote: > > > > > On Wed, Apr 17, 2024 at 5:29 PM Michael S. Tsirkin > > > > > wrote: > > > > > > > > > > > > On Fri, Apr

Re: [RFC v1 3/8] vhost: Add 3 new uapi to support iommufd

2023-11-07 Thread Cindy Lu
On Wed, Nov 8, 2023 at 11:03 AM Jason Wang wrote: > > On Tue, Nov 7, 2023 at 2:57 PM Cindy Lu wrote: > > > > On Mon, Nov 6, 2023 at 3:30 PM Jason Wang wrote: > > > > > > On Sat, Nov 4, 2023 at 1:17 AM Cindy Lu wrote: > > > > > > > >

Re: [RFC v1 8/8] iommu: expose the function iommu_device_use_default_domain

2023-11-07 Thread Cindy Lu
On Wed, Nov 8, 2023 at 11:04 AM Jason Wang wrote: > > On Tue, Nov 7, 2023 at 2:10 PM Cindy Lu wrote: > > > > On Mon, Nov 6, 2023 at 3:26 PM Jason Wang wrote: > > > > > > On Sat, Nov 4, 2023 at 1:18 AM Cindy Lu wrote: > > > > > > > &g

Re: [RFC v1 3/8] vhost: Add 3 new uapi to support iommufd

2023-11-09 Thread Cindy Lu
Jason Wang 于2023年11月10日周五 10:32写道: > > On Wed, Nov 8, 2023 at 3:09 PM Jason Wang wrote: > > > > On Wed, Nov 8, 2023 at 2:39 PM Cindy Lu wrote: > > > > > > On Wed, Nov 8, 2023 at 11:03 AM Jason Wang wrote: > > > > > > > > On Tue, No

[PATCH 1/2] vdpa: support set mac address from vdpa tool

2024-06-10 Thread Cindy Lu
pa0 mac 00:11:22:33:44:55 root@L1# vdpa -jp dev config show vdpa0 { "config": { "vdpa0": { "mac": "00:11:22:33:44:55", "link ": "up", "link_announce ": false, "mtu&quo

[PATCH 2/2] vdpa_sim_net: Add the support of set mac address

2024-06-10 Thread Cindy Lu
Add the function to support setting the MAC address. For vdpa_sim_net, the driver will write the MAC address to the config space, and other devices can implement their own functions to support this. Signed-off-by: Cindy Lu --- drivers/vdpa/vdpa_sim/vdpa_sim_net.c | 18 +- 1 file

Re: [PATCH 1/2] vdpa: support set mac address from vdpa tool

2024-06-12 Thread Cindy Lu
On Wed, Jun 12, 2024 at 3:12 PM Michael S. Tsirkin wrote: > > On Tue, Jun 11, 2024 at 01:32:32PM +0800, Cindy Lu wrote: > > Add new UAPI to support the mac address from vdpa tool > > The patch does not do what commit log says. > Instead there's an internal API to set

Re: [PATCH 1/2] vdpa: support set mac address from vdpa tool

2024-06-13 Thread Cindy Lu
On Thu, Jun 13, 2024 at 2:59 PM Michael S. Tsirkin wrote: > > On Tue, Jun 11, 2024 at 01:32:32PM +0800, Cindy Lu wrote: > > Add new UAPI to support the mac address from vdpa tool > > Function vdpa_nl_cmd_dev_config_set_doit() will get the > > MAC address from the vdpa too

Re: [PATCH 1/2] vdpa: support set mac address from vdpa tool

2024-06-19 Thread Cindy Lu
On Tue, Jun 18, 2024 at 6:39 PM Michael S. Tsirkin wrote: > > On Mon, Jun 17, 2024 at 09:44:21AM -0700, Jakub Kicinski wrote: > > On Mon, 17 Jun 2024 12:20:19 -0400 Michael S. Tsirkin wrote: > > > > But the virtio spec doesn't allow setting the MAC... > > > > I'm probably just lost in the conversa

[PATCH v3 1/2] vdpa: support set mac address from vdpa tool

2024-07-07 Thread Cindy Lu
pa0 mac 00:11:22:33:44:55 root@L1# vdpa -jp dev config show vdpa0 { "config": { "vdpa0": { "mac": "00:11:22:33:44:55", "link ": "up", "link_announce ": false, "mtu&quo

[PATCH v3 0/2] vdpa: support set mac address from vdpa tool

2024-07-07 Thread Cindy Lu
ation - Address the comments Cindy Lu (2): vdpa: support set mac address from vdpa tool vdpa_sim_net: Add the support of set mac address drivers/vdpa/vdpa.c | 81 drivers/vdpa/vdpa_sim/vdpa_sim_net.c | 19 ++- include/linux/v

[PATCH v3 2/2] vdpa_sim_net: Add the support of set mac address

2024-07-07 Thread Cindy Lu
Add the function to support setting the MAC address. For vdpa_sim_net, the driver will write the MAC address to the config space, and other devices can implement their own functions to support this. Signed-off-by: Cindy Lu --- drivers/vdpa/vdpa_sim/vdpa_sim_net.c | 19 ++- 1

[PATCH] vdpa/mlx5: Add the support of set mac address

2024-07-07 Thread Cindy Lu
Add the function to support setting the MAC address. For vdpa/mlx5, the function will use mlx5_mpfs_add_mac to set the mac address Tested in ConnectX-6 Dx device Signed-off-by: Cindy Lu --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 23 +++ 1 file changed, 23 insertions(+) diff

Re: [PATCH] vdpa_sim_blk: add `capacity` module parameter

2024-07-08 Thread Cindy Lu
On Fri, 5 Jul 2024 at 20:42, Stefano Garzarella wrote: > > On Fri, Jul 05, 2024 at 07:30:51AM GMT, Michael S. Tsirkin wrote: > >On Fri, Jul 05, 2024 at 01:28:21PM +0200, Stefano Garzarella wrote: > >> The vDPA block simulator always allocated a 128 MiB ram-disk, but some > >> filesystems (e.g. XFS

Re: [PATCH v3 2/2] vdpa_sim_net: Add the support of set mac address

2024-07-08 Thread Cindy Lu
On Mon, 8 Jul 2024 at 15:06, Jason Wang wrote: > > On Mon, Jul 8, 2024 at 2:48 PM Cindy Lu wrote: > > > > Add the function to support setting the MAC address. > > For vdpa_sim_net, the driver will write the MAC address > > to the config space, and other devic

Re: [PATCH v3 0/2] vdpa: support set mac address from vdpa tool

2024-07-08 Thread Cindy Lu
On Tue, 9 Jul 2024 at 11:59, Parav Pandit wrote: > > Hi Cindy, > > > From: Cindy Lu > > Sent: Monday, July 8, 2024 12:17 PM > > > > Add support for setting the MAC address using the VDPA tool. > > This feature will allow setting the MAC address u

Re: [PATCH] vdpa/mlx5: Add the support of set mac address

2024-07-09 Thread Cindy Lu
On Mon, 8 Jul 2024 at 15:03, Jason Wang wrote: > > On Mon, Jul 8, 2024 at 2:56 PM Cindy Lu wrote: > > > > Add the function to support setting the MAC address. > > For vdpa/mlx5, the function will use mlx5_mpfs_add_mac > > to set the mac address > > > >

Re: [PATCH] vdpa/mlx5: Add the support of set mac address

2024-07-09 Thread Cindy Lu
On Mon, 8 Jul 2024 at 19:26, Michael S. Tsirkin wrote: > > On Mon, Jul 08, 2024 at 02:55:49PM +0800, Cindy Lu wrote: > > Add the function to support setting the MAC address. > > For vdpa/mlx5, the function will use mlx5_mpfs_add_mac > > to set the mac address > &g

Re: [PATCH] vdpa/mlx5: Add the support of set mac address

2024-07-09 Thread Cindy Lu
On Tue, 9 Jul 2024 at 12:56, Ratheesh Kannoth wrote: > > On 2024-07-08 at 12:25:49, Cindy Lu (l...@redhat.com) wrote: > > +static int mlx5_vdpa_set_attr_mac(struct vdpa_mgmt_dev *v_mdev, > > + struct vdpa_device *dev, > > +

Re: [PATCH] vdpa/mlx5: Add the support of set mac address

2024-07-09 Thread Cindy Lu
On Mon, 8 Jul 2024 at 15:27, Dragos Tatulea wrote: > > On Mon, 2024-07-08 at 14:55 +0800, Cindy Lu wrote: > > Add the function to support setting the MAC address. > > For vdpa/mlx5, the function will use mlx5_mpfs_add_mac > > to set the mac address > > >

Re: [PATCH v3 0/2] vdpa: support set mac address from vdpa tool

2024-07-10 Thread Cindy Lu
On Wed, 10 Jul 2024 at 14:10, Michael S. Tsirkin wrote: > > On Wed, Jul 10, 2024 at 11:05:48AM +0800, Jason Wang wrote: > > On Tue, Jul 9, 2024 at 8:42 PM Michael S. Tsirkin wrote: > > > > > > On Tue, Jul 09, 2024 at 02:19:19PM +0800, Cindy Lu wrote: > > &g

[PATH v4 0/3] vdpa: support set mac address from vdpa tool

2024-07-21 Thread Cindy Lu
ation - Address the comments Changelog v4 - Address the comments - Add a lock for the vdap_sim_net device's dev_set_attr operation Cindy Lu (3): vdpa: support set mac address from vdpa tool vdpa_sim_net: Add the support of set mac address vdpa/mlx5: Add the support of set mac address

[PATH v4 1/3] vdpa: support set mac address from vdpa tool

2024-07-21 Thread Cindy Lu
pa0 mac 00:11:22:33:44:55 root@L1# vdpa -jp dev config show vdpa0 { "config": { "vdpa0": { "mac": "00:11:22:33:44:55", "link ": "up", "link_announce ": false, "mtu&quo

[PATH v4 2/3] vdpa_sim_net: Add the support of set mac address

2024-07-21 Thread Cindy Lu
Add the function to support setting the MAC address. For vdpa_sim_net, the driver will write the MAC address to the config space, and other devices can implement their own functions to support this. Signed-off-by: Cindy Lu --- drivers/vdpa/vdpa_sim/vdpa_sim_net.c | 22 +- 1

[PATH v4 3/3] vdpa/mlx5: Add the support of set mac address

2024-07-21 Thread Cindy Lu
Add the function to support setting the MAC address. For vdpa/mlx5, the function will use mlx5_mpfs_add_mac to set the mac address Tested in ConnectX-6 Dx device Signed-off-by: Cindy Lu --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 25 + 1 file changed, 25 insertions(+) diff

Re: [PATH v4 2/3] vdpa_sim_net: Add the support of set mac address

2024-07-22 Thread Cindy Lu
On Mon, 22 Jul 2024 at 15:48, Jason Wang wrote: > > On Mon, Jul 22, 2024 at 9:06 AM Cindy Lu wrote: > > > > Add the function to support setting the MAC address. > > For vdpa_sim_net, the driver will write the MAC address > > to the config space, and other devic

Re: [PATH v4 3/3] vdpa/mlx5: Add the support of set mac address

2024-07-22 Thread Cindy Lu
On Mon, 22 Jul 2024 at 15:49, Jason Wang wrote: > > On Mon, Jul 22, 2024 at 9:06 AM Cindy Lu wrote: > > > > Add the function to support setting the MAC address. > > For vdpa/mlx5, the function will use mlx5_mpfs_add_mac > > to set the mac address > >

Re: [PATH v4 3/3] vdpa/mlx5: Add the support of set mac address

2024-07-22 Thread Cindy Lu
On Mon, 22 Jul 2024 at 17:45, Dragos Tatulea wrote: > > On Mon, 2024-07-22 at 15:48 +0800, Jason Wang wrote: > > On Mon, Jul 22, 2024 at 9:06 AM Cindy Lu wrote: > > > > > > Add the function to support setting the MAC address. > > > For vdpa/mlx5, the funct

Re: [PATH v4 3/3] vdpa/mlx5: Add the support of set mac address

2024-07-22 Thread Cindy Lu
On Mon, 22 Jul 2024 at 20:55, Cindy Lu wrote: > > On Mon, 22 Jul 2024 at 17:45, Dragos Tatulea wrote: > > > > On Mon, 2024-07-22 at 15:48 +0800, Jason Wang wrote: > > > On Mon, Jul 22, 2024 at 9:06 AM Cindy Lu wrote: > > > > > > > >

Re: [PATH v4 3/3] vdpa/mlx5: Add the support of set mac address

2024-07-22 Thread Cindy Lu
On Tue, 23 Jul 2024 at 09:28, Jason Wang wrote: > > On Mon, Jul 22, 2024 at 10:48 PM Cindy Lu wrote: > > > > On Mon, 22 Jul 2024 at 20:55, Cindy Lu wrote: > > > > > > On Mon, 22 Jul 2024 at 17:45, Dragos Tatulea wrote: > > > > > > &

[PATH v5 0/3] vdpa: support set mac address from vdpa tool

2024-07-22 Thread Cindy Lu
ation - Address the comments Changelog v4 - Address the comments - Add a lock for the vdap_sim?_net device's dev_set_attr operation Changelog v5 - Address the comments Cindy Lu (3): vdpa: support set mac address from vdpa tool vdpa_sim_net: Add the support of set mac address vdpa/mlx

[PATH v5 1/3] vdpa: support set mac address from vdpa tool

2024-07-22 Thread Cindy Lu
pa0 mac 00:11:22:33:44:55 root@L1# vdpa -jp dev config show vdpa0 { "config": { "vdpa0": { "mac": "00:11:22:33:44:55", "link ": "up", "link_announce ": false, "mtu&quo

[PATH v5 2/3] vdpa_sim_net: Add the support of set mac address

2024-07-22 Thread Cindy Lu
Add the function to support setting the MAC address. For vdpa_sim_net, the driver will write the MAC address to the config space, and other devices can implement their own functions to support this. Signed-off-by: Cindy Lu --- drivers/vdpa/vdpa_sim/vdpa_sim_net.c | 22 +- 1

[PATH v5 3/3] vdpa/mlx5: Add the support of set mac address

2024-07-22 Thread Cindy Lu
Add the function to support setting the MAC address. For vdpa/mlx5, the function will use mlx5_mpfs_add_mac to set the mac address Tested in ConnectX-6 Dx device Signed-off-by: Cindy Lu --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 28 1 file changed, 28 insertions

Re: [PATH v5 1/3] vdpa: support set mac address from vdpa tool

2024-07-22 Thread Cindy Lu
On Tue, 23 Jul 2024 at 14:01, Jason Wang wrote: > > On Tue, Jul 23, 2024 at 1:41 PM Cindy Lu wrote: > > > > Add new UAPI to support the mac address from vdpa tool > > Function vdpa_nl_cmd_dev_attr_set_doit() will get the > > new MAC address from the vdpa tool

Re: [PATH v5 0/3] vdpa: support set mac address from vdpa tool

2024-07-23 Thread Cindy Lu
On Wed, 24 Jul 2024 at 02:45, Andrew Lunn wrote: > > On Tue, Jul 23, 2024 at 01:39:19PM +0800, Cindy Lu wrote: > > Add support for setting the MAC address using the VDPA tool. > > This feature will allow setting the MAC address using the VDPA tool. > > For examp

Re: [PATH v5 3/3] vdpa/mlx5: Add the support of set mac address

2024-07-23 Thread Cindy Lu
On Tue, 23 Jul 2024 at 19:29, Michael S. Tsirkin wrote: > > On Tue, Jul 23, 2024 at 07:49:44AM +, Dragos Tatulea wrote: > > On Tue, 2024-07-23 at 13:39 +0800, Cindy Lu wrote: > > > Add the function to support setting the MAC address. > > > For vd

Re: [PATH v5 1/3] vdpa: support set mac address from vdpa tool

2024-07-23 Thread Cindy Lu
On Wed, 24 Jul 2024 at 02:48, Andrew Lunn wrote: > > On Tue, Jul 23, 2024 at 01:39:20PM +0800, Cindy Lu wrote: > > Add new UAPI to support the mac address from vdpa tool > > Function vdpa_nl_cmd_dev_attr_set_doit() will get the > > new MAC address from the vdpa tool and t

[PATH v6 0/3] vdpa: support set mac address from vdpa tool

2024-07-24 Thread Cindy Lu
T_F_MAC in vdpa_dev_net_device_attr_set - Remove unnecessary check - Enhance the error log Cindy Lu (3): vdpa: support set mac address from vdpa tool vdpa_sim_net: Add the support of set mac address vdpa/mlx5: Add the support of set mac address drivers/vdpa/mlx5/net/mlx5_vnet.c| 28 ++ dr

[PATH v6 1/3] vdpa: support set mac address from vdpa tool

2024-07-24 Thread Cindy Lu
pa0 mac 00:11:22:33:44:55 root@L1# vdpa -jp dev config show vdpa0 { "config": { "vdpa0": { "mac": "00:11:22:33:44:55", "link ": "up", "link_announce ": false, "mtu&quo

[PATH v6 2/3] vdpa_sim_net: Add the support of set mac address

2024-07-24 Thread Cindy Lu
Add the function to support setting the MAC address. For vdpa_sim_net, the driver will write the MAC address to the config space, and other devices can implement their own functions to support this. Signed-off-by: Cindy Lu --- drivers/vdpa/vdpa_sim/vdpa_sim_net.c | 22 +- 1

[PATH v6 3/3] vdpa/mlx5: Add the support of set mac address

2024-07-24 Thread Cindy Lu
Add the function to support setting the MAC address. For vdpa/mlx5, the function will use mlx5_mpfs_add_mac to set the mac address Tested in ConnectX-6 Dx device Signed-off-by: Cindy Lu --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 28 1 file changed, 28 insertions

Re: [PATH v6 0/3] vdpa: support set mac address from vdpa tool

2024-07-26 Thread Cindy Lu
On Fri, 26 Jul 2024 at 01:25, Joe Damato wrote: > > On Thu, Jul 25, 2024 at 09:31:01AM +0800, Cindy Lu wrote: > > Add support for setting the MAC address using the VDPA tool. > > This feature will allow setting the MAC address using the VDPA tool. > > For examp

Re: [PATH v6 1/3] vdpa: support set mac address from vdpa tool

2024-07-26 Thread Cindy Lu
On Fri, 26 Jul 2024 at 01:29, Joe Damato wrote: > > On Thu, Jul 25, 2024 at 09:31:02AM +0800, Cindy Lu wrote: > [...] > > diff --git a/drivers/vdpa/vdpa.c b/drivers/vdpa/vdpa.c > > index 8d391947eb8d..532cf3b52b26 100644 > > --- a/drivers/vdpa/vdpa.c > > +++ b/d

Re: [PATH v6 1/3] vdpa: support set mac address from vdpa tool

2024-07-26 Thread Cindy Lu
On Fri, 26 Jul 2024 at 01:29, Joe Damato wrote: > > On Thu, Jul 25, 2024 at 09:31:02AM +0800, Cindy Lu wrote: > [...] > > diff --git a/drivers/vdpa/vdpa.c b/drivers/vdpa/vdpa.c > > index 8d391947eb8d..532cf3b52b26 100644 > > --- a/drivers/vdpa/vdpa.c > > +++ b/d

Re: [PATH v6 3/3] vdpa/mlx5: Add the support of set mac address

2024-07-26 Thread Cindy Lu
On Fri, 26 Jul 2024 at 01:32, Joe Damato wrote: > > On Thu, Jul 25, 2024 at 09:31:04AM +0800, Cindy Lu wrote: > > Add the function to support setting the MAC address. > > For vdpa/mlx5, the function will use mlx5_mpfs_add_mac > > to set the mac address > > >

[PATCH v7 0/3] vdpa: support set mac address from vdpa tool

2024-07-28 Thread Cindy Lu
T_F_MAC in vdpa_dev_net_device_attr_set - Remove unnecessary check - Enhance the error log Changelog v7 - change the code to reverse-xmas tree style - make all patches pass the check of ./scripts/checkpatch.pl --strict - Address other comments Cindy Lu (3): vdpa: support set mac address from vdpa tool vd

[PATCH v7 1/3] vdpa: support set mac address from vdpa tool

2024-07-28 Thread Cindy Lu
pa0 mac 00:11:22:33:44:55 root@L1# vdpa -jp dev config show vdpa0 { "config": { "vdpa0": { "mac": "00:11:22:33:44:55", "link ": "up", "link_announce ": false, "mtu&quo

[PATCH v7 2/3] vdpa_sim_net: Add the support of set mac address

2024-07-28 Thread Cindy Lu
Add the function to support setting the MAC address. For vdpa_sim_net, the driver will write the MAC address to the config space, and other devices can implement their own functions to support this. Signed-off-by: Cindy Lu --- drivers/vdpa/vdpa_sim/vdpa_sim_net.c | 21 - 1

[PATCH v7 3/3] vdpa/mlx5: Add the support of set mac address

2024-07-28 Thread Cindy Lu
Add the function to support setting the MAC address. For vdpa/mlx5, the function will use mlx5_mpfs_add_mac to set the mac address Tested in ConnectX-6 Dx device Signed-off-by: Cindy Lu --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 28 1 file changed, 28 insertions

Re: [PATCH v7 1/3] vdpa: support set mac address from vdpa tool

2024-07-29 Thread Cindy Lu
On Tue, 30 Jul 2024 at 03:13, Andrew Lunn wrote: > > > +static int vdpa_dev_net_device_attr_set(struct vdpa_device *vdev, > > + struct genl_info *info) > > +{ > > + struct vdpa_dev_set_config set_config = {}; > > + struct vdpa_mgmt_dev *mdev = vdev->mdev

Re: [PATCH v7 2/3] vdpa_sim_net: Add the support of set mac address

2024-07-29 Thread Cindy Lu
On Tue, 30 Jul 2024 at 03:15, Andrew Lunn wrote: > > > +static int vdpasim_net_set_attr(struct vdpa_mgmt_dev *mdev, struct > > vdpa_device *dev, > > + const struct vdpa_dev_set_config *config) > > +{ > > + struct vdpasim *vdpasim = container_of(dev, struct vdpasim,

Re: [PATCH v7 3/3] vdpa/mlx5: Add the support of set mac address

2024-07-29 Thread Cindy Lu
On Tue, 30 Jul 2024 at 03:16, Andrew Lunn wrote: > > > +static int mlx5_vdpa_set_attr(struct vdpa_mgmt_dev *v_mdev, struct > > vdpa_device *dev, > > + const struct vdpa_dev_set_config *add_config) > > +{ > > + struct virtio_net_config *config; > > + struct mlx5_c

[PATCH v8 0/3] vdpa: support set mac address from vdpa tool

2024-07-30 Thread Cindy Lu
mprove the error log - remove the unnecessary memcpy Cindy Lu (3): vdpa: support set mac address from vdpa tool vdpa_sim_net: Add the support of set mac address vdpa/mlx5: Add the support of set mac address drivers/vdpa/mlx5/net/mlx5_vnet.c| 28 ++ drivers/vdpa/vdpa.c

[PATCH v8 1/3] vdpa: support set mac address from vdpa tool

2024-07-30 Thread Cindy Lu
pa0 mac 00:11:22:33:44:55 root@L1# vdpa -jp dev config show vdpa0 { "config": { "vdpa0": { "mac": "00:11:22:33:44:55", "link ": "up", "link_announce ": false, "mtu&quo

[PATCH v8 2/3] vdpa_sim_net: Add the support of set mac address

2024-07-30 Thread Cindy Lu
Add the function to support setting the MAC address. For vdpa_sim_net, the driver will write the MAC address to the config space, and other devices can implement their own functions to support this. Signed-off-by: Cindy Lu --- drivers/vdpa/vdpa_sim/vdpa_sim_net.c | 21 - 1

[PATCH v8 3/3] vdpa/mlx5: Add the support of set mac address

2024-07-30 Thread Cindy Lu
Add the function to support setting the MAC address. For vdpa/mlx5, the function will use mlx5_mpfs_add_mac to set the mac address Tested in ConnectX-6 Dx device Signed-off-by: Cindy Lu --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 28 1 file changed, 28 insertions

[RFC 0/7] vhost: Add support of kthread API

2024-08-19 Thread Cindy Lu
o identify which mode we are using, and a new UAPI is introduced to allow the userspace app to set the mode they want to use. Cindy Lu (7): vhost: Add a new module_param for enable kthread vhost: Add kthread support in function vhost_worker_queue() vhost: Add kthread support in function vhost_wo

[RFC 1/7] vhost: Add a new module_param for enable kthread

2024-08-19 Thread Cindy Lu
Add a new module parameter to enable kthread while loading modules. This parameter will identify if the vhost will use kthread or a task. The default value will be true. Signed-off-by: Cindy Lu --- drivers/vhost/vhost.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/vhost

[RFC 2/7] vhost: Add kthread support in function vhost_worker_queue()

2024-08-19 Thread Cindy Lu
Added back the previously removed function vhost_worker_queue() and renamed it to vhost_worker_queue_khtread(). The new vhost_worker_queue() will select the different mode based on the value of the parameter. Signed-off-by: Cindy Lu --- drivers/vhost/vhost.c | 30

[RFC 3/7] vhost: Add kthread support in function vhost_workers_free()

2024-08-19 Thread Cindy Lu
Added back the previously removed function vhost_workers_free() and renamed it to vhost_workers_free_khtread(). The new vhost_workers_free() will select the different mode based on the value of the parameter. Signed-off-by: Cindy Lu --- drivers/vhost/vhost.c | 52

[RFC 4/7] vhost: Add the vhost_worker to support kthread

2024-08-19 Thread Cindy Lu
Add back the previously removed vhost_worker function to support the kthread and rename it vhost_run_work_kthread_list. Signed-off-by: Cindy Lu --- drivers/vhost/vhost.c | 38 ++ 1 file changed, 38 insertions(+) diff --git a/drivers/vhost/vhost.c b/drivers

[RFC 6/7] vhost: Add kthread support in function vhost_worker_create

2024-08-19 Thread Cindy Lu
parameter. Signed-off-by: Cindy Lu --- drivers/vhost/vhost.c | 55 ++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 66ccda81f073..0a7b2999100f 100644 --- a/drivers/vhost/vhost.c +++ b/drivers

[RFC 5/7] vhost: Add the cgroup related function

2024-08-19 Thread Cindy Lu
Add back the previously removed cgroup function to support the kthread The biggest change for this part is in vhost_attach_cgroups() and vhost_worker_cgroups_kthread(). This is because of the change in struct dev->worker_xa. Signed-off-by: Cindy Lu --- drivers/vhost/vhost.c |

[RFC 7/7] vhost: Add new UAPI to support changing Kthread mode

2024-08-19 Thread Cindy Lu
Add a new UAPI to support setting the vhost device to use kthread mode. The user space application needs to use VHOST_SET_USE_KTHREAD to set the mode. This setting must be set before VHOST_SET_OWNER is set. Signed-off-by: Cindy Lu --- drivers/vhost/vhost.c | 11 ++- include/uapi

Re: [RFC 7/7] vhost: Add new UAPI to support changing Kthread mode

2024-08-25 Thread Cindy Lu
On Wed, 21 Aug 2024 at 13:07, Christoph Hellwig wrote: > > On Mon, Aug 19, 2024 at 05:27:33PM +0800, Cindy Lu wrote: > > Add a new UAPI to support setting the vhost device to > > use kthread mode. The user space application needs to use > > VHOST_SET_USE_KTHREAD to set the

Re: [PATCH] vdpa/mlx5: Use random MAC address when no nic vport MAC set

2024-08-28 Thread Cindy Lu
On Wed, 28 Aug 2024 at 09:51, Jason Wang wrote: > > On Wed, Aug 28, 2024 at 12:03 AM Dragos Tatulea wrote: > > > > When the vdpa device is configured without a specific MAC > > address, the vport MAC address is used. However, this > > address can be 0 which prevents the driver from properly > > c

Re: [RFC 2/7] vhost: Add kthread support in function vhost_worker_queue()

2024-08-28 Thread Cindy Lu
On Tue, 27 Aug 2024 at 10:36, Jason Wang wrote: > > On Mon, Aug 19, 2024 at 5:29 PM Cindy Lu wrote: > > > > Added back the previously removed function vhost_worker_queue() and > > renamed it to vhost_worker_queue_khtread(). The new vhost_worker_queue() > > will sele

Re: [RFC 7/7] vhost: Add new UAPI to support changing Kthread mode

2024-08-28 Thread Cindy Lu
On Tue, 27 Aug 2024 at 10:32, Jason Wang wrote: > > On Mon, Aug 19, 2024 at 5:29 PM Cindy Lu wrote: > > > > Add a new UAPI to support setting the vhost device to > > use kthread mode. The user space application needs to use > > VHOST_SET_USE_KTHREAD to set the mode

Re: [RFC 0/7] vhost: Add support of kthread API

2024-08-28 Thread Cindy Lu
On Tue, 27 Aug 2024 at 10:35, Jason Wang wrote: > > On Mon, Aug 19, 2024 at 5:29 PM Cindy Lu wrote: > > > > In commit 6e890c5d5021 ("vhost: use vhost_tasks for worker threads"), > > vhost removed the support for the kthread API. However, there are > > stil

Re: [PATCH] vdpa/mlx5: Use random MAC address when no nic vport MAC set

2024-08-29 Thread Cindy Lu
On Wed, 28 Aug 2024 at 17:37, Dragos Tatulea wrote: > > > > On 28.08.24 11:00, Cindy Lu wrote: > > On Wed, 28 Aug 2024 at 09:51, Jason Wang wrote: > >> > >> On Wed, Aug 28, 2024 at 12:03 AM Dragos Tatulea > >> wrote: > >>> > &

Re: [PATCH] vdpa/mlx5: Use random MAC address when no nic vport MAC set

2024-08-30 Thread Cindy Lu
On Thu, 29 Aug 2024 at 18:00, Dragos Tatulea wrote: > > > > On 29.08.24 11:05, Cindy Lu wrote: > > On Wed, 28 Aug 2024 at 17:37, Dragos Tatulea wrote: > >> > >> > >> > >> On 28.08.24 11:00, Cindy Lu wrote: > >>> On Wed, 28 Aug 20

Re: [PATCH] vdpa/mlx5: Use random MAC address when no nic vport MAC set

2024-08-30 Thread Cindy Lu
On Fri, 30 Aug 2024 at 03:03, Dragos Tatulea wrote: > > > > On 29.08.24 12:00, Dragos Tatulea wrote: > > > > > > On 29.08.24 11:05, Cindy Lu wrote: > >> On Wed, 28 Aug 2024 at 17:37, Dragos Tatulea wrote: > >>> > >>> > >>>

[PATCH v1 0/7] vhost: Add support of kthread API

2024-09-08 Thread Cindy Lu
e there is a request to use kthread. In this PATCH, the support of kthread is added back. Additionally, a module_param is added to enforce which mode we are using, and a new UAPI is introduced to allow the userspace app to set the mode they want to use. Tested the userspace application with QEMU. C

[PATCH v1 1/7] vhost: Add a new module_param for enable kthread

2024-09-08 Thread Cindy Lu
Add a new module parameter to enable kthread while loading modules. This parameter will identify if the vhost will use kthread or a task. The default value will be true. Signed-off-by: Cindy Lu module_param --- drivers/vhost/vhost.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a

[PATCH v1 3/7] vhost: Add kthread support in function vhost_workers_free()

2024-09-08 Thread Cindy Lu
('vhost: use vhost_tasks for worker threads') also changed in commit a284f09effe ('vhost: Fix crash during early vhost_transport_send_pkt calls') change to xarray in commit 1cdaafa1b8b ('vhost: replace single worker pointer with xarray') Signed-off-by: Cindy Lu -

[PATCH v1 2/7] vhost: Add kthread support in function vhost_worker_queue()

2024-09-08 Thread Cindy Lu
('vhost: use vhost_tasks for worker threads') changed in commit f9010dbdc ('fork, vhost: Use CLONE_THREAD to fix freezer/ps regression') and also was change the name of function to vhost_worker_queue() in commit 0921dddcb5 (vhost: take worker or vq instead of dev for queueing)

[PATCH v1 4/7] vhost: Add the vhost_worker to support kthread

2024-09-08 Thread Cindy Lu
8b ('vhost: replace single worker pointer with xarray') Signed-off-by: Cindy Lu --- drivers/vhost/vhost.c | 38 ++ 1 file changed, 38 insertions(+) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 411e81a2925a..fd54ee323fb1 100644 --- a/d

[PATCH v1 5/7] vhost: Add the cgroup related function

2024-09-08 Thread Cindy Lu
ost: use vhost_tasks for worker threads') Signed-off-by: Cindy Lu --- drivers/vhost/vhost.c | 52 +++ 1 file changed, 52 insertions(+) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index fd54ee323fb1..f05545b125f0 100644 --- a/drivers/vhost/

[PATCH v1 6/7] vhost: Add kthread support in function vhost_worker_create

2024-09-08 Thread Cindy Lu
te vhost_worker') Signed-off-by: Cindy Lu --- drivers/vhost/vhost.c | 55 ++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index f05545b125f0..bf1e971cb06f 100644 --- a/drivers/vhost/vhost

[PATCH v1 7/7] vhost: Add new UAPI to support change to task mode

2024-09-08 Thread Cindy Lu
Add a new UAPI to support setting the vhost device to use task mode. The user space application needs to use VHOST_SET_ENFORCE_TASK to set the mode. This setting must be set before VHOST_SET_OWNER is set. Signed-off-by: Cindy Lu --- drivers/vhost/vhost.c | 16 +++- include/uapi

[RESEND PATCH v1 0/7]vhost: Add support of kthread API

2024-09-08 Thread Cindy Lu
to enforce which mode we are using, and a new UAPI is introduced to allow the userspace app to set the mode they want to use. Tested the user application with QEMU. Cindy Lu (7): vhost: Add a new module_param for enable kthread vhost: Add kthread support in function vhost_worker_queue()

  1   2   3   >