Re: [PATCH vhost v3 11/16] vdpa/mlx5: Move mr mutex out of mr struct

2023-10-09 Thread Jason Wang
a more appropriate name. > > Signed-off-by: Dragos Tatulea > Acked-by: Eugenio Pérez Acked-by: Jason Wang Thanks ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH vhost v3 12/16] vdpa/mlx5: Improve mr update flow

2023-10-09 Thread Jason Wang
NULL when not initialized. > > Acked-by: Eugenio Pérez > Signed-off-by: Dragos Tatulea > --- Acked-by: Jason Wang Thanks ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH vhost v3 13/16] vdpa/mlx5: Introduce mr for vq descriptor

2023-10-09 Thread Jason Wang
es will add hardware support for mapping the vq descriptors. > > Acked-by: Eugenio Pérez > Signed-off-by: Dragos Tatulea > --- Acked-by: Jason Wang Thanks ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://l

Re: [PATCH vhost v3 14/16] vdpa/mlx5: Enable hw support for vq descriptor mapping

2023-10-09 Thread Jason Wang
r ASID 1. > > This patch fills in both the vq data and vq descriptor mkeys based on > group ASID mapping. > > The feature is signaled to the vdpa core through the presence of the > .get_vq_desc_group op. > > Acked-by: Eugenio Pérez > Signed-off-by: D

Re: [PATCH vhost v3 15/16] vdpa/mlx5: Make iotlb helper functions more generic

2023-10-09 Thread Jason Wang
On Mon, Oct 9, 2023 at 7:25 PM Dragos Tatulea wrote: > > They will be used in a follow-up patch. > > For dup_iotlb, avoid the src == dst case. This is an error. > > Acked-by: Eugenio Pérez > Signed-off-by: Dragos Tatulea Acked-by

Re: [PATCH vhost v3 16/16] vdpa/mlx5: Update cvq iotlb mapping on ASID change

2023-10-09 Thread Jason Wang
t; This patch adds support for the above mentioned flow by saving the iotlb > on each .set_map and updating the cvq iotlb with it on a cvq group change. > > Acked-by: Eugenio Pérez > Signed-off-by: Dragos Tatulea > --- Acked-by: Jason Wang Thanks __

Re: [PATCH vhost v3 3/4] virtio_pci: add check for common cfg size

2023-10-09 Thread Jason Wang
On Tue, Oct 10, 2023 at 11:11 AM Xuan Zhuo wrote: > > Some buggy devices, the common cfg size may not match the features. > > This patch checks the common cfg size for the > features(VIRTIO_F_NOTIF_CONFIG_DATA, VIRTIO_F_RING_RESET). When the > common cfg size does not match the corresponding featu

Re: [PATCH vhost v3 2/4] virtio_pci: fix the common cfg map size

2023-10-09 Thread Jason Wang
tio_pci_common_cfg, but some feature(such > as the _F_RING_RESET) needs the virtio_pci_modern_common_cfg, so this > commit changes the size to the size of virtio_pci_modern_common_cfg. > > Fixes: 0b50cece0b78 ("virtio_pci: introduce helper to get/set queue reset") > Sign

Re: [PATCH vhost v3 1/4] virtio: add definition of VIRTIO_F_NOTIF_CONFIG_DATA feature bit

2023-10-09 Thread Jason Wang
n available buffer notifications. > > It comes from here: > https://github.com/oasis-tcs/virtio-spec/issues/89 > > Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Thanks > --- > include/uapi/linux/virtio_config.h | 5 + > 1 file changed, 5 insertions(+) > > diff --git a

Re: [PATCH 2/2] virtio-mmio: Support multiple interrupts per device

2023-10-09 Thread Jason Wang
On Sat, Sep 30, 2023 at 4:46 AM Jakub Sitnicki wrote: > > Some virtual devices, such as the virtio network device, can use multiple > virtqueues (or multiple pairs of virtqueues in the case of a vNIC). In such > case, when there are multiple vCPUs present, it is possible to process > virtqueue eve

Re: [RFC PATCH 5/7] tun: Introduce virtio-net hashing feature

2023-10-10 Thread Jason Wang
On Tue, Oct 10, 2023 at 2:19 PM Akihiko Odaki wrote: > > On 2023/10/10 15:00, Jason Wang wrote: > > On Tue, Oct 10, 2023 at 1:51 PM Akihiko Odaki > > wrote: > >> > >> On 2023/10/10 14:45, Jason Wang wrote: > >>> On Tue, Oct 10, 2023 at 9:52 AM Ak

Re: [PATCH vhost v3 3/4] virtio_pci: add check for common cfg size

2023-10-10 Thread Jason Wang
On Tue, Oct 10, 2023 at 3:58 PM Xuan Zhuo wrote: > > On Tue, 10 Oct 2023 14:41:39 +0800, Jason Wang wrote: > > On Tue, Oct 10, 2023 at 11:11 AM Xuan Zhuo > > wrote: > > > > > > Some buggy devices, the common cfg size may not match the features. > > >

Re: [PATCH vhost 00/22] virtio-net: support AF_XDP zero copy

2023-10-12 Thread Jason Wang
On Thu, Oct 12, 2023 at 9:58 AM Xuan Zhuo wrote: > > On Wed, 11 Oct 2023 10:00:57 -0700, Jakub Kicinski wrote: > > On Wed, 11 Oct 2023 17:27:06 +0800 Xuan Zhuo wrote: > > > ## AF_XDP > > > > > > XDP socket(AF_XDP) is an excellent bypass kernel network framework. The > > > zero > > > copy feature

Re: Report a possible vhost bug in stable branches

2023-10-12 Thread Jason Wang
On Thu, Oct 12, 2023 at 9:43 AM Xianting Tian wrote: > > cgroup attach work and dev flush work will both be added to dev work > list in vhost_attach_cgroups() when set dev owner: > static int vhost_attach_cgroups(struct vhost_dev *dev) > { > struct vh

Re: [PATCH net-next 0/5] virtio-net: support dynamic coalescing moderation

2023-10-12 Thread Jason Wang
On Thu, Oct 12, 2023 at 3:44 PM Heng Qi wrote: > > Now, virtio-net already supports per-queue moderation parameter > setting. Based on this, we use the netdim library of linux to support > dynamic coalescing moderation for virtio-net. > > Due to hardware scheduling issues, we only tested rx dim.

Re: Report a possible vhost bug in stable branches

2023-10-12 Thread Jason Wang
On Thu, Oct 12, 2023 at 6:44 PM Xianting Tian wrote: > > > 在 2023/10/12 下午3:55, Jason Wang 写道: > > On Thu, Oct 12, 2023 at 9:43 AM Xianting Tian > > wrote: > >> cgroup attach work and dev flush work will both be added to dev work > >> list in vh

Re: [PATCH net-next 0/5] virtio-net: support dynamic coalescing moderation

2023-10-12 Thread Jason Wang
On Thu, Oct 12, 2023 at 4:29 PM Jason Wang wrote: > > On Thu, Oct 12, 2023 at 3:44 PM Heng Qi wrote: > > > > Now, virtio-net already supports per-queue moderation parameter > > setting. Based on this, we use the netdim library of linux to support > > dynamic coales

Re: [PATCH 1/4] vdpa: introduce .reset_map operation callback

2023-10-12 Thread Jason Wang
a > * Returns integer: success (0) or error (< 0) > + * @reset_map: Reset device memory mapping to the default > + * state (optional) I think we need to mention that this is a must for parents that use set_map()? Ot

Re: [PATCH 2/4] vhost-vdpa: reset vendor specific mapping to initial state in .release

2023-10-12 Thread Jason Wang
On Tue, Oct 10, 2023 at 5:05 PM Si-Wei Liu wrote: > > Devices with on-chip IOMMU or vendor specific IOTLB implementation > may need to restore iotlb mapping to the initial or default state > using the .reset_map op, as it's desirable for some parent devices > to solely manipulate mappings by its o

Re: [PATCH 4/4] vdpa/mlx5: implement .reset_map driver op

2023-10-12 Thread Jason Wang
On Tue, Oct 10, 2023 at 5:05 PM Si-Wei Liu wrote: > > Since commit 6f5312f80183 ("vdpa/mlx5: Add support for running with > virtio_vdpa"), mlx5_vdpa starts with preallocate 1:1 DMA MR at device > creation time. This 1:1 DMA MR will be implicitly destroyed while > the first .set_map call is invoked

Re: [PATCH 1/4] vdpa: introduce .reset_map operation callback

2023-10-15 Thread Jason Wang
On Fri, Oct 13, 2023 at 3:36 PM Si-Wei Liu wrote: > > > > On 10/12/2023 7:49 PM, Jason Wang wrote: > > On Tue, Oct 10, 2023 at 5:05 PM Si-Wei Liu wrote: > >> Device specific IOMMU parent driver who wishes to see mapping to be > >> decoupled from virtio or

Re: [PATCH 2/4] vhost-vdpa: reset vendor specific mapping to initial state in .release

2023-10-15 Thread Jason Wang
On Fri, Oct 13, 2023 at 3:36 PM Si-Wei Liu wrote: > > > > On 10/12/2023 8:01 PM, Jason Wang wrote: > > On Tue, Oct 10, 2023 at 5:05 PM Si-Wei Liu wrote: > >> Devices with on-chip IOMMU or vendor specific IOTLB implementation > >> may need to restore iotlb map

Re: [PATCH 2/4] vhost-vdpa: reset vendor specific mapping to initial state in .release

2023-10-16 Thread Jason Wang
On Tue, Oct 17, 2023 at 4:30 AM Si-Wei Liu wrote: > > > > On 10/16/2023 4:28 AM, Eugenio Perez Martin wrote: > > On Mon, Oct 16, 2023 at 8:33 AM Jason Wang wrote: > >> On Fri, Oct 13, 2023 at 3:36 PM Si-Wei Liu wrote: > >>> > >>> > >>&

Re: [RFC PATCH v2 1/7] bpf: Introduce BPF_PROG_TYPE_VNET_HASH

2023-10-16 Thread Jason Wang
On Tue, Oct 17, 2023 at 7:53 AM Alexei Starovoitov wrote: > > On Sun, Oct 15, 2023 at 10:10 AM Akihiko Odaki > wrote: > > > > On 2023/10/16 1:07, Alexei Starovoitov wrote: > > > On Sun, Oct 15, 2023 at 7:17 AM Akihiko Odaki > > > wrote: > > >> > > >> diff --git a/include/uapi/linux/bpf.h b/inc

Re: [PATCH net-next v1 00/19] virtio-net: support AF_XDP zero copy

2023-10-16 Thread Jason Wang
On Mon, Oct 16, 2023 at 8:00 PM Xuan Zhuo wrote: > > ## AF_XDP > > XDP socket(AF_XDP) is an excellent bypass kernel network framework. The zero > copy feature of xsk (XDP socket) needs to be supported by the driver. The > performance of zero copy is very good. mlx5 and intel ixgbe already support

Re: [PATCH net-next v1 00/19] virtio-net: support AF_XDP zero copy

2023-10-16 Thread Jason Wang
On Tue, Oct 17, 2023 at 11:11 AM Xuan Zhuo wrote: > > On Tue, 17 Oct 2023 10:53:44 +0800, Jason Wang wrote: > > On Mon, Oct 16, 2023 at 8:00 PM Xuan Zhuo > > wrote: > > > > > > ## AF_XDP > > > > > > XDP socket(AF_XDP) is an excellent bypas

Re: [PATCH net-next v1 00/19] virtio-net: support AF_XDP zero copy

2023-10-16 Thread Jason Wang
On Tue, Oct 17, 2023 at 11:26 AM Xuan Zhuo wrote: > > On Tue, 17 Oct 2023 11:20:41 +0800, Jason Wang wrote: > > On Tue, Oct 17, 2023 at 11:11 AM Xuan Zhuo > > wrote: > > > > > > On Tue, 17 Oct 2023 10:53:44 +0800, Jason Wang > > > wrote: >

Re: [PATCH net-next v1 00/19] virtio-net: support AF_XDP zero copy

2023-10-16 Thread Jason Wang
On Tue, Oct 17, 2023 at 11:28 AM Jason Wang wrote: > > On Tue, Oct 17, 2023 at 11:26 AM Xuan Zhuo wrote: > > > > On Tue, 17 Oct 2023 11:20:41 +0800, Jason Wang wrote: > > > On Tue, Oct 17, 2023 at 11:11 AM Xuan Zhuo > > > wrote: > > > > > &

Re: [PATCH net-next v1 00/19] virtio-net: support AF_XDP zero copy

2023-10-16 Thread Jason Wang
On Tue, Oct 17, 2023 at 2:17 PM Xuan Zhuo wrote: > > On Tue, 17 Oct 2023 13:27:47 +0800, Jason Wang wrote: > > On Tue, Oct 17, 2023 at 11:28 AM Jason Wang wrote: > > > > > > On Tue, Oct 17, 2023 at 11:26 AM Xuan Zhuo > > > wrote: > > > > >

Re: [PATCH net-next v1 00/19] virtio-net: support AF_XDP zero copy

2023-10-17 Thread Jason Wang
On Tue, Oct 17, 2023 at 3:00 PM Xuan Zhuo wrote: > > On Tue, 17 Oct 2023 14:26:01 +0800, Jason Wang wrote: > > On Tue, Oct 17, 2023 at 2:17 PM Xuan Zhuo > > wrote: > > > > > > On Tue, 17 Oct 2023 13:27:47 +0800, Jason Wang > > > wrote: > &

Re: [PATCH net-next v1 00/19] virtio-net: support AF_XDP zero copy

2023-10-17 Thread Jason Wang
On Tue, Oct 17, 2023 at 7:28 PM Xuan Zhuo wrote: > > On Tue, 17 Oct 2023 14:43:33 +0800, Xuan Zhuo > wrote: > > On Tue, 17 Oct 2023 14:26:01 +0800, Jason Wang wrote: > > > On Tue, Oct 17, 2023 at 2:17 PM Xuan Zhuo > > > wrote: > > > > > >

Re: [PATCH net-next v1 00/19] virtio-net: support AF_XDP zero copy

2023-10-17 Thread Jason Wang
On Wed, Oct 18, 2023 at 11:38 AM Xuan Zhuo wrote: > > On Tue, 17 Oct 2023 19:19:41 +0800, Xuan Zhuo > wrote: > > On Tue, 17 Oct 2023 14:43:33 +0800, Xuan Zhuo > > wrote: > > > On Tue, 17 Oct 2023 14:26:01 +0800, Jason Wang > > > wrote: > >

Re: [PATCH 2/4] vhost-vdpa: reset vendor specific mapping to initial state in .release

2023-10-17 Thread Jason Wang
On Wed, Oct 18, 2023 at 12:36 PM Si-Wei Liu wrote: > > > > On 10/16/2023 7:35 PM, Jason Wang wrote: > > On Tue, Oct 17, 2023 at 4:30 AM Si-Wei Liu wrote: > >> > >> > >> On 10/16/2023 4:28 AM, Eugenio Perez Martin wrote: > >>> On Mon, Oct

Re: [PATCH 2/4] vhost-vdpa: reset vendor specific mapping to initial state in .release

2023-10-18 Thread Jason Wang
On Wed, Oct 18, 2023 at 1:27 PM Jason Wang wrote: > > On Wed, Oct 18, 2023 at 12:36 PM Si-Wei Liu wrote: > > > > > > > > On 10/16/2023 7:35 PM, Jason Wang wrote: > > > On Tue, Oct 17, 2023 at 4:30 AM Si-Wei Liu wrote: > > >> > > &g

Re: [PATCH 2/4] vhost-vdpa: reset vendor specific mapping to initial state in .release

2023-10-18 Thread Jason Wang
On Thu, Oct 19, 2023 at 7:21 AM Si-Wei Liu wrote: > > > > On 10/18/2023 4:14 AM, Eugenio Perez Martin wrote: > > On Wed, Oct 18, 2023 at 10:44 AM Si-Wei Liu wrote: > >> > >> > >> On 10/17/2023 10:27 PM, Jason Wang wrote: > >>> On Wed, Oct

Re: [PATCH 2/4] vhost-vdpa: reset vendor specific mapping to initial state in .release

2023-10-18 Thread Jason Wang
On Wed, Oct 18, 2023 at 4:49 PM Si-Wei Liu wrote: > > > > On 10/18/2023 12:00 AM, Jason Wang wrote: > >> Unfortunately, it's a must to stick to ABI. I agree it's a mess but we > >> don't have a better choice. Or we can fail the probe if userspace >

Re: [PATCH net-next v1 01/19] virtio_net: rename free_old_xmit_skbs to free_old_xmit

2023-10-18 Thread Jason Wang
On Mon, Oct 16, 2023 at 8:00 PM Xuan Zhuo wrote: > > Since free_old_xmit_skbs not only deals with skb, but also xdp frame and > subsequent added xsk, so change the name of this function to > free_old_xmit. > > Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Thanks &g

Re: [PATCH net-next v1 02/19] virtio_net: unify the code for recycling the xmit ptr

2023-10-18 Thread Jason Wang
er old xmit ptr. > > Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Thanks > --- > drivers/net/virtio_net.c | 76 +--- > 1 file changed, 33 insertions(+), 43 deletions(-) > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c >

Re: [PATCH net-next v1 03/19] virtio_net: independent directory

2023-10-18 Thread Jason Wang
On Mon, Oct 16, 2023 at 8:01 PM Xuan Zhuo wrote: > > Create a separate directory for virtio-net. AF_XDP support will be added > later, then a separate xsk.c file will be added, so we should create a > directory for virtio-net. > > Signed-off-by: Xuan Zhuo Acked-by: J

Re: [PATCH net-next v1 04/19] virtio_net: move to virtio_net.h

2023-10-18 Thread Jason Wang
On Mon, Oct 16, 2023 at 8:00 PM Xuan Zhuo wrote: > > Move some structure definitions and inline functions into the > virtio_net.h file. Some of the functions are not inline one before the moving. I'm not sure what's the criteria to choose the function to be moved. > > Signed-off-by: Xuan Zhuo

Re: [PATCH net-next v1 05/19] virtio_net: add prefix virtnet to all struct/api inside virtio_net.h

2023-10-18 Thread Jason Wang
On Mon, Oct 16, 2023 at 8:01 PM Xuan Zhuo wrote: > > We move some structures and APIs to the header file, but these > structures and APIs do not prefixed with virtnet. This patch adds > virtnet for these. What's the benefit of doing this? AFAIK virtio-net is the only user for virtio-net.h? THank

Re: [PATCH net-next v1 06/19] virtio_net: separate virtnet_rx_resize()

2023-10-18 Thread Jason Wang
On Mon, Oct 16, 2023 at 8:00 PM Xuan Zhuo wrote: > > This patch separates two sub-functions from virtnet_rx_resize(): > > * virtnet_rx_pause > * virtnet_rx_resume > > Then the subsequent reset rx for xsk can share these two functions. > > Signed-off-by: Xuan Zhuo Ac

Re: [PATCH net-next v1 07/19] virtio_net: separate virtnet_tx_resize()

2023-10-18 Thread Jason Wang
On Mon, Oct 16, 2023 at 8:00 PM Xuan Zhuo wrote: > > This patch separates two sub-functions from virtnet_tx_resize(): > > * virtnet_tx_pause > * virtnet_tx_resume > > Then the subsequent virtnet_tx_reset() can share these two functions. > > Signed-off-by: Xuan Zhuo Ac

Re: [PATCH 2/4] vhost-vdpa: reset vendor specific mapping to initial state in .release

2023-10-19 Thread Jason Wang
On Thu, Oct 19, 2023 at 2:47 PM Si-Wei Liu wrote: > > > > On 10/18/2023 7:53 PM, Jason Wang wrote: > > On Wed, Oct 18, 2023 at 4:49 PM Si-Wei Liu wrote: > >> > >> > >> On 10/18/2023 12:00 AM, Jason Wang wrote: > >>>> Unfortunat

Re: [PATCH 2/4] vhost-vdpa: reset vendor specific mapping to initial state in .release

2023-10-19 Thread Jason Wang
On Fri, Oct 20, 2023 at 6:28 AM Si-Wei Liu wrote: > > > > On 10/19/2023 7:39 AM, Eugenio Perez Martin wrote: > > On Thu, Oct 19, 2023 at 10:27 AM Jason Wang wrote: > >> On Thu, Oct 19, 2023 at 2:47 PM Si-Wei Liu wrote: > >>> > >>> > >

Re: [PATCH net-next v1 08/19] virtio_net: sq support premapped mode

2023-10-19 Thread Jason Wang
On Mon, Oct 16, 2023 at 8:01 PM Xuan Zhuo wrote: > > If the xsk is enabling, the xsk tx will share the send queue. > But the xsk requires that the send queue use the premapped mode. > So the send queue must support premapped mode. > > Signed-off-by: Xuan Zhuo > --- > drivers/net/virtio/main.c

Re: [PATCH net-next v1 09/19] virtio_net: xsk: bind/unbind xsk

2023-10-19 Thread Jason Wang
On Mon, Oct 16, 2023 at 8:01 PM Xuan Zhuo wrote: > > This patch implement the logic of bind/unbind xsk pool to sq and rq. > > Signed-off-by: Xuan Zhuo > --- > drivers/net/virtio/Makefile | 2 +- > drivers/net/virtio/main.c | 10 +- > drivers/net/virtio/virtio_net.h | 18 > dri

Re: [PATCH net-next v1 10/19] virtio_net: xsk: prevent disable tx napi

2023-10-19 Thread Jason Wang
On Mon, Oct 16, 2023 at 8:01 PM Xuan Zhuo wrote: > > Since xsk's TX queue is consumed by TX NAPI, if sq is bound to xsk, then > we must stop tx napi from being disabled. > > Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Thanks > --- > drivers/net/virtio/main.c

Re: [PATCH net-next v1 11/19] virtio_net: xsk: tx: support tx

2023-10-19 Thread Jason Wang
On Mon, Oct 16, 2023 at 8:01 PM Xuan Zhuo wrote: > > The driver's tx napi is very important for XSK. It is responsible for > obtaining data from the XSK queue and sending it out. > > At the beginning, we need to trigger tx napi. > > Signed-off-by: Xuan Zhuo > --- > drivers/net/virtio/main.c

Re: [PATCH net-next v1 12/19] virtio_net: xsk: tx: support wakeup

2023-10-19 Thread Jason Wang
On Mon, Oct 16, 2023 at 8:01 PM Xuan Zhuo wrote: > > xsk wakeup is used to trigger the logic for xsk xmit by xsk framework or > user. > > Virtio-Net does not support to actively generate an interruption, so it > tries to trigger tx NAPI on the tx interrupt cpu. > > Consider the effect of cache. Wh

Re: [PATCH net-next v1 14/19] virtio_net: xsk: tx: virtnet_sq_free_unused_buf() check xsk buffer

2023-10-19 Thread Jason Wang
On Mon, Oct 16, 2023 at 8:01 PM Xuan Zhuo wrote: > > virtnet_sq_free_unused_buf() check xsk buffer. > > Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Thanks > --- > drivers/net/virtio/main.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff

Re: [PATCH net-next v1 15/19] virtio_net: xsk: rx: introduce add_recvbuf_xsk()

2023-10-19 Thread Jason Wang
On Mon, Oct 16, 2023 at 8:01 PM Xuan Zhuo wrote: > > Implement the logic of filling vq with XSK buffer. > > Signed-off-by: Xuan Zhuo > --- > drivers/net/virtio/main.c | 13 +++ > drivers/net/virtio/virtio_net.h | 5 +++ > drivers/net/virtio/xsk.c| 66 ++

Re: [PATCH net-next v1 16/19] virtio_net: xsk: rx: introduce receive_xsk() to recv xsk buffer

2023-10-19 Thread Jason Wang
On Mon, Oct 16, 2023 at 8:01 PM Xuan Zhuo wrote: > > Implementing the logic of xsk rx. If this packet is not for XSK > determined in XDP, then we need to copy once to generate a SKB. > If it is for XSK, it is a zerocopy receive packet process. > > Signed-off-by: Xuan Zhuo > --- > drivers/net/vir

Re: [PATCH net-next v1 18/19] virtio_net: update tx timeout record

2023-10-19 Thread Jason Wang
On Mon, Oct 16, 2023 at 8:01 PM Xuan Zhuo wrote: > > If send queue sent some packets, we update the tx timeout > record to prevent the tx timeout. > > Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Thanks > --- > drivers/net/virtio/xsk.c | 10 ++ > 1 fil

Re: [PATCH net-next v1 04/19] virtio_net: move to virtio_net.h

2023-10-20 Thread Jason Wang
On Thu, Oct 19, 2023 at 3:20 PM Xuan Zhuo wrote: > > On Thu, 19 Oct 2023 14:12:55 +0800, Jason Wang wrote: > > On Mon, Oct 16, 2023 at 8:00 PM Xuan Zhuo > > wrote: > > > > > > Move some structure definitions and inline functions into the > > > vir

Re: [PATCH v4 3/4] vduse: Temporarily disable control queue features

2023-10-22 Thread Jason Wang
On Fri, Oct 20, 2023 at 11:58 PM Maxime Coquelin wrote: > > Virtio-net driver control queue implementation is not safe > when used with VDUSE. If the VDUSE application does not > reply to control queue messages, it currently ends up > hanging the kernel thread sending this command. > > Some work i

Re: [PATCH v4 4/4] vduse: Add LSM hooks to check Virtio device type

2023-10-22 Thread Jason Wang
On Fri, Oct 20, 2023 at 11:58 PM Maxime Coquelin wrote: > > This patch introduces LSM hooks for devices creation, > destruction and opening operations, checking the > application is allowed to perform these operations for > the Virtio device type. > > Signed-off-by: Maxime Coquelin > --- Hi Maxi

Re: [PATCH v4 0/7] vdpa: decouple reset of iotlb mapping from device reset

2023-10-22 Thread Jason Wang
Hi Si-Wei: On Sat, Oct 21, 2023 at 5:28 PM Si-Wei Liu wrote: > > In order to reduce needlessly high setup and teardown cost > of iotlb mapping during live migration, it's crucial to > decouple the vhost-vdpa iotlb abstraction from the virtio > device life cycle, i.e. iotlb mappings should be left

Re: [RFC] vhost: vmap virtio descriptor table kernel/kvm

2023-10-23 Thread Jason Wang
a shadow page table instead of the userspace one to avoid things like spec barriers or SMAP. I've tried this in the past: commit 7f466032dc9e5a61217f22ea34b2df932786bbfc (HEAD) Author: Jason Wang Date: Fri May 24 04:12:18 2019 -0400 vhost: access vq metadata through kernel virtual a

Re: [PATCH v4 5/7] vhost-vdpa: clean iotlb map during reset for older userspace

2023-10-23 Thread Jason Wang
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 quirk is limited to > those drivers that used to

Re: [PATCH v4 5/7] vhost-vdpa: clean iotlb map during reset for older userspace

2023-10-24 Thread Jason Wang
On Wed, Oct 25, 2023 at 12:25 AM Si-Wei Liu wrote: > > > > 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: > >>> Usin

Re: [PATCH net-next 0/5] virtio-net: support dynamic coalescing moderation

2023-10-24 Thread Jason Wang
On Tue, Oct 24, 2023 at 8:03 PM Heng Qi wrote: > > > > 在 2023/10/12 下午4:29, Jason Wang 写道: > > On Thu, Oct 12, 2023 at 3:44 PM Heng Qi wrote: > >> Now, virtio-net already supports per-queue moderation parameter > >> setting. Based on this, we use th

Re: [PATCH net-next 1/5] virtio-net: returns whether napi is complete

2023-10-24 Thread Jason Wang
rsa. > > Signed-off-by: Heng Qi Acked-by: Jason Wang Thanks > --- > drivers/net/virtio_net.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index a52fd743504a..cf5d2ef4bd24 100644 &

Re: [PATCH net-next 3/5] virtio-net: extract virtqueue coalescig cmd for reuse

2023-10-24 Thread Jason Wang
On Thu, Oct 12, 2023 at 3:44 PM Heng Qi wrote: > > Extract commands to set virtqueue coalescing parameters for reuse > by ethtool -Q, vq resize and netdim. > > Signed-off-by: Heng Qi Acked-by: Jason Wang Thanks > --- > drivers/n

Re: [PATCH net-next 4/5] virtio-net: support rx netdim

2023-10-24 Thread Jason Wang
On Thu, Oct 12, 2023 at 3:44 PM Heng Qi wrote: > > By comparing the traffic information in the complete napi processes, > let the virtio-net driver automatically adjust the coalescing > moderation parameters of each receive queue. > > Signed-off-by: Heng Qi > --- > drivers/net/virtio_net.c | 147

Re: [PATCH net-next 5/5] virtio-net: support tx netdim

2023-10-24 Thread Jason Wang
On Thu, Oct 12, 2023 at 3:44 PM Heng Qi wrote: > > Similar to rx netdim, this patch supports adaptive tx > coalescing moderation for the virtio-net. > > Signed-off-by: Heng Qi > --- > drivers/net/virtio_net.c | 143 --- > 1 file changed, 119 insertions(+), 24

Re: [RFC] vdpa/mlx5: preserve CVQ vringh index

2023-10-26 Thread Jason Wang
On Fri, Oct 27, 2023 at 4:07 AM Steve Sistare wrote: > > mlx5_vdpa does not preserve userland's view of vring base for the control > queue in the following sequence: > > ioctl VHOST_SET_VRING_BASE > ioctl VHOST_VDPA_SET_STATUS VIRTIO_CONFIG_S_DRIVER_OK > mlx5_vdpa_set_status() > setup_cvq_vr

Re: [RFC] vdpa/mlx5: preserve CVQ vringh index

2023-10-30 Thread Jason Wang
On Mon, Oct 30, 2023 at 10:06 PM Steven Sistare wrote: > > On 10/27/2023 2:31 AM, Jason Wang wrote: > > On Fri, Oct 27, 2023 at 4:07 AM Steve Sistare > > wrote: > >> > >> mlx5_vdpa does not preserve userland's view of vring base for the con

Re: [PATCH] vdpa_sim_blk: allocate the buffer zeroed

2023-10-31 Thread Jason Wang
uffers > > completely zeroed out. > > > > Fixes: abebb16254b3 ("vdpa_sim_blk: support shared backend") > > Suggested-by: Qing Wang > > Acked-by: Eugenio Pérez Acked-by: Jason Wang Thanks > > > Signed-off-by: Stefano Garzarella > > --- > > dr

Re: [PATCH] virtio_pci: move structure to a header

2023-10-31 Thread Jason Wang
of the existing structure > staying unchanged. Add a warning to avoid using sizeof. > > Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang Thanks > --- > drivers/virtio/virtio_pci_modern_dev.c | 7 --- > include/linux/virtio_pci_modern.h | 7 --- > include

Re: [PATCH net-XXX] vhost-vdpa: fix use after free in vhost_vdpa_probe()

2023-10-31 Thread Jason Wang
host-vdpa: Call ida_simple_remove() when failed") > Signed-off-by: Dan Carpenter Acked-by: Jason Wang Thanks > --- > drivers/vhost/vdpa.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c > index 9a2343c45df0..1aa67729e18

Re: [PATCH net-next 4/5] virtio-net: support rx netdim

2023-11-01 Thread Jason Wang
On Wed, Nov 1, 2023 at 6:55 PM Heng Qi wrote: > > > > 在 2023/10/25 上午11:34, Jason Wang 写道: > > On Thu, Oct 12, 2023 at 3:44 PM Heng Qi wrote: > >> By comparing the traffic information in the complete napi processes, > >> let the virtio-net driver

Re: [PATCH net-next 0/5] virtio-net: support dynamic coalescing moderation

2023-11-01 Thread Jason Wang
On Wed, Nov 1, 2023 at 7:03 PM Heng Qi wrote: > > > > 在 2023/10/25 下午1:53, Michael S. Tsirkin 写道: > > On Wed, Oct 25, 2023 at 09:18:27AM +0800, Jason Wang wrote: > >> On Tue, Oct 24, 2023 at 8:03 PM Heng Qi wrote: > >>> > >>> > >>>

Re: [PATCH net-next 0/5] virtio-net: support dynamic coalescing moderation

2023-11-01 Thread Jason Wang
On Wed, Nov 1, 2023 at 5:38 PM Heng Qi wrote: > > > > 在 2023/10/25 上午9:18, Jason Wang 写道: > > On Tue, Oct 24, 2023 at 8:03 PM Heng Qi wrote: > >> > >> > >> 在 2023/10/12 下午4:29, Jason Wang 写道: > >>> On Thu, Oct 12, 2023 at 3:44 PM Heng Qi

Re: [PATCH V2] vdpa/mlx5: preserve CVQ vringh index

2023-11-02 Thread Jason Wang
T_VRING_BASE > > > > To fix, restore the value of cvq->vring.last_avail_idx after calling > > vringh_init_iotlb. > > > > Fixes tag missing? +1 > > Apart from that, > > Acked-by: Eugenio Pérez With the fix tag added. Acked-by: Jason Wang Thanks

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

2023-11-05 Thread Jason Wang
On Sat, Nov 4, 2023 at 1:16 AM 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 support. > rebase on kernel > v6,6-rc3 > Test passed in the physical device (vp_vdpa), but there are still s

Re: [RFC v1 7/8] vp_vdpa::Add support for iommufd

2023-11-05 Thread Jason Wang
On Sat, Nov 4, 2023 at 1:17 AM Cindy Lu wrote: > > Add new vdpa_config_ops function to support iommufd > > Signed-off-by: Cindy Lu > --- > drivers/vdpa/virtio_pci/vp_vdpa.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/drivers/vdpa/virtio_pci/vp_vdpa.c > b/drivers/vdpa/virtio_pci

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

2023-11-05 Thread Jason Wang
On Sat, Nov 4, 2023 at 1:18 AM Cindy Lu wrote: > > Expose the function iommu_device_use_default_domain() and > iommu_device_unuse_default_domain(), > While vdpa bind the iommufd device and detach the iommu device, > vdpa need to call the function > iommu_device_unuse_default_domain() to release th

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

2023-11-05 Thread Jason Wang
On Sat, Nov 4, 2023 at 1:17 AM Cindy Lu wrote: > > VHOST_VDPA_SET_IOMMU_FD: bind the device to iommufd device > > VDPA_DEVICE_ATTACH_IOMMUFD_AS: Attach a vdpa device to an iommufd > address space specified by IOAS id. > > VDPA_DEVICE_DETACH_IOMMUFD_AS: Detach a vdpa device > from the iommufd addre

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

2023-11-05 Thread Jason Wang
On Sat, Nov 4, 2023 at 1:17 AM Cindy Lu wrote: > > VHOST_VDPA_SET_IOMMU_FD: bind the device to iommufd device > > VDPA_DEVICE_ATTACH_IOMMUFD_AS: Attach a vdpa device to an iommufd > address space specified by IOAS id. > > VDPA_DEVICE_DETACH_IOMMUFD_AS: Detach a vdpa device > from the iommufd addre

[rfc net-next v6 0/3] Multiqueue virtio-net

2012-10-30 Thread Jason Wang
1%/ -18% 4096/ 1/ +2%/0% 4096/ 2/ +3%/ -19% 4096/ 4/ -1%/ -19% 16384/ 1/ -3%/ -1% 16384/ 2/0%/ -12% 16384/ 4/0%/ -10% Jason Wang (2): virtio_net: multiqueue support virtio-net: change the number of queues through ethtool Krishna Kumar (1): vi

[rfc net-next v6 1/3] virtio_net: Introduce VIRTIO_NET_F_MULTIQUEUE

2012-10-30 Thread Jason Wang
From: Krishna Kumar Introduce VIRTIO_NET_F_MULTIQUEUE. Signed-off-by: Krishna Kumar Signed-off-by: Jason Wang --- include/uapi/linux/virtio_net.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/uapi/linux/virtio_net.h b/include/uapi/linux/virtio_net.h index

[rfc net-next v6 2/3] virtio_net: multiqueue support

2012-10-30 Thread Jason Wang
ckets from the same flow, driver would let the device (usually tuntap) to use the 'rx follows tx' packet steering rules when working in multiqueue mode. In this mode, the device would select the rxq based on the last queue where the packet of the flow were sent. Signed-off-by: Jason Wang -

[rfc net-next v6 3/3] virtio-net: change the number of queues through ethtool

2012-10-30 Thread Jason Wang
This patch implement the {set|get}_channels method of ethool to allow user to change the number of queues dymaically when the device is running. This would let the user to tune the device for specific applications. Signed-off-by: Jason Wang --- drivers/net/virtio_net.c | 43

Re: [rfc net-next v6 0/3] Multiqueue virtio-net

2012-10-31 Thread Jason Wang
On 10/31/2012 03:05 AM, Rick Jones wrote: On 10/30/2012 03:03 AM, Jason Wang wrote: Hi all: This series is an update version of multiqueue virtio-net driver based on Krishna Kumar's work to let virtio-net use multiple rx/tx queues to do the packets reception and transmission. Please r

Re: [rfc net-next v6 2/3] virtio_net: multiqueue support

2012-11-18 Thread Jason Wang
On 11/05/2012 07:16 AM, Rusty Russell wrote: Jason Wang writes: This addes multiqueue support to virtio_net driver. There's two mode supported: single queue pair mode and multiple queue pairs mode. An obvious difference compared with a physical mq card is that virtio-net reserve firs

Re: [rfc net-next v6 3/3] virtio-net: change the number of queues through ethtool

2012-11-18 Thread Jason Wang
On 11/05/2012 07:46 AM, Rusty Russell wrote: Jason Wang writes: This patch implement the {set|get}_channels method of ethool to allow user to change the number of queues dymaically when the device is running. This would let the user to tune the device for specific applications

Re: [rfc net-next v6 2/3] virtio_net: multiqueue support

2012-11-18 Thread Jason Wang
On 11/05/2012 09:08 AM, Rusty Russell wrote: Jason Wang writes: +struct virtnet_info { + u16 num_queue_pairs;/* # of RX/TX vq pairs */ + u16 total_queue_pairs; + + struct send_queue *sq; + struct receive_queue *rq; + struct virtqueue *cvq

Re: [PATCHv4] virtio-spec: virtio network device RFS support

2012-11-22 Thread Jason Wang
On 11/22/2012 10:46 PM, Michael S. Tsirkin wrote: Add RFS support to virtio network device. Add a new feature flag VIRTIO_NET_F_RFS for this feature, a new configuration field max_virtqueue_pairs to detect supported number of virtqueues as well as a new command VIRTIO_NET_CTRL_RFS to program pack

[net-next RFC] pktgen: don't wait for the device who doesn't free skb immediately after sent

2012-11-26 Thread Jason Wang
skb if no other pakcet will be sent afterwards. Solving this issue by introducing a new flag IFF_TX_SKB_FREE_DELAY which could notify the pktgen that the device does not free skb immediately after it has been sent and let it not to wait for the refcount to be one. Signed-off-by: Jason Wang

Re: [net-next RFC] pktgen: don't wait for the device who doesn't free skb immediately after sent

2012-11-26 Thread Jason Wang
On 11/27/2012 01:37 AM, Stephen Hemminger wrote: On Mon, 26 Nov 2012 15:56:52 +0800 Jason Wang wrote: Some deivces do not free the old tx skbs immediately after it has been sent (usually in tx interrupt). One such example is virtio-net which optimizes for virt and only free the possible old

[net-next rfc v7 0/3] Multiqueue virtio-net

2012-11-27 Thread Jason Wang
/127 - V5: http://lwn.net/Articles/505388/ - V4: https://lkml.org/lkml/2012/6/25/120 - V2: http://lwn.net/Articles/467283/ Perf Numbers: Will do some basic test and post as a reply to this mail. Jason Wang (3): virtio-net: separate fields of sending/receiving queue from virtnet_info virtio_

[net-next rfc v7 1/3] virtio-net: separate fields of sending/receiving queue from virtnet_info

2012-11-27 Thread Jason Wang
-off-by: Jason Wang --- drivers/net/virtio_net.c | 289 +- 1 files changed, 158 insertions(+), 131 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 26c502e..7975133 100644 --- a/drivers/net/virtio_net.c +++ b/drivers

[net-next rfc v7 2/3] virtio_net: multiqueue support

2012-11-27 Thread Jason Wang
processor id. - smp affinity hint were set to the vcpu that owns the queue pairs. Signed-off-by: Krishna Kumar Signed-off-by: Jason Wang --- drivers/net/virtio_net.c| 454 ++- include/uapi/linux/virtio_net.h | 16 ++ 2 files changed, 371 insertions

[net-next rfc v7 3/3] virtio-net: change the number of queues through ethtool

2012-11-27 Thread Jason Wang
This patch implement the {set|get}_channels method of ethool to allow user to change the number of queues dymaically when the device is running. This would let the user to configure it on demand. Signed-off-by: Jason Wang --- drivers/net/virtio_net.c | 41

Re: [net-next RFC] pktgen: don't wait for the device who doesn't free skb immediately after sent

2012-11-27 Thread Jason Wang
On 11/28/2012 12:49 AM, Stephen Hemminger wrote: On Tue, 27 Nov 2012 14:45:13 +0800 Jason Wang wrote: On 11/27/2012 01:37 AM, Stephen Hemminger wrote: On Mon, 26 Nov 2012 15:56:52 +0800 Jason Wang wrote: Some deivces do not free the old tx skbs immediately after it has been sent (usually

Re: [net-next RFC] pktgen: don't wait for the device who doesn't free skb immediately after sent

2012-11-29 Thread Jason Wang
On Wednesday, November 28, 2012 08:53:05 AM Stephen Hemminger wrote: > On Wed, 28 Nov 2012 14:48:52 +0800 > > Jason Wang wrote: > > On 11/28/2012 12:49 AM, Stephen Hemminger wrote: > > > On Tue, 27 Nov 2012 14:45:13 +0800 > > > > > > Jason Wang wro

Re: [net-next rfc v7 1/3] virtio-net: separate fields of sending/receiving queue from virtnet_info

2012-12-02 Thread Jason Wang
On Monday, December 03, 2012 12:25:42 PM Rusty Russell wrote: > Jason Wang writes: > > To support multiqueue transmitq/receiveq, the first step is to separate > > queue related structure from virtnet_info. This patch introduce > > send_queue and receive_queue structure and us

Re: [net-next rfc v7 2/3] virtio_net: multiqueue support

2012-12-02 Thread Jason Wang
On Sunday, December 02, 2012 06:06:31 PM Michael S. Tsirkin wrote: > On Tue, Nov 27, 2012 at 06:15:59PM +0800, Jason Wang wrote: > > This addes multiqueue support to virtio_net driver. In multiple queue > > modes, the driver expects the number of queue paris is equal to the > >

Re: [net-next rfc v7 2/3] virtio_net: multiqueue support

2012-12-02 Thread Jason Wang
On Monday, December 03, 2012 12:34:08 PM Rusty Russell wrote: > Jason Wang writes: > > +static const struct ethtool_ops virtnet_ethtool_ops; > > + > > +/* > > + * Converting between virtqueue no. and kernel tx/rx queue no. > > + * 0:rx0 1:tx0 2:cvq

<    1   2   3   4   5   6   7   8   9   10   >