Re: [PATCH net-next v4 08/15] virtio_net: sq support premapped mode

2024-06-12 Thread Xuan Zhuo
On Wed, 12 Jun 2024 19:41:51 -0400, "Michael S. Tsirkin" wrote: > On Tue, Jun 11, 2024 at 07:41:40PM +0800, 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 pr

Re: [PATCH net-next v4 09/15] virtio_net: xsk: bind/unbind xsk

2024-06-12 Thread Xuan Zhuo
On Wed, 12 Jun 2024 19:43:01 -0400, "Michael S. Tsirkin" wrote: > On Tue, Jun 11, 2024 at 07:41:41PM +0800, Xuan Zhuo wrote: > > This patch implement the logic of bind/unbind xsk pool to sq and rq. > > > > Signed-off-by: Xuan Zhuo > > I'd just squash with previous patch. This one is hard to revi

Re: [PATCH net-next v4 11/15] virtio_net: xsk: tx: support xmit xsk buffer

2024-06-12 Thread Xuan Zhuo
On Wed, 12 Jun 2024 16:25:05 -0700, Jakub Kicinski wrote: > On Tue, 11 Jun 2024 19:41:43 +0800 Xuan Zhuo wrote: > > @@ -534,10 +534,13 @@ enum virtnet_xmit_type { > > VIRTNET_XMIT_TYPE_SKB, > > VIRTNET_XMIT_TYPE_XDP, > > VIRTNET_XMIT_TYPE_DMA, > > + VIRTNET_XMIT_TYPE_XSK, > > Again,

Re: [PATCH net-next v4 08/15] virtio_net: sq support premapped mode

2024-06-12 Thread Xuan Zhuo
On Wed, 12 Jun 2024 16:23:37 -0700, Jakub Kicinski wrote: > On Tue, 11 Jun 2024 19:41:40 +0800 Xuan Zhuo wrote: > > +static int virtnet_sq_set_premapped(struct send_queue *sq, bool premapped) > > Could you try to add __maybe_unused or some such and then remove it > in the patch which calls this fu

Re: [PATCH net-next v4 01/15] virtio_ring: introduce dma map api for page

2024-06-12 Thread Xuan Zhuo
On Wed, 12 Jun 2024 16:20:11 -0700, Jakub Kicinski wrote: > On Tue, 11 Jun 2024 19:41:33 +0800 Xuan Zhuo wrote: > > +/** > > + * virtqueue_dma_map_page_attrs - map DMA for _vq > > + * @_vq: the struct virtqueue we're talking about. > > + * @page: the page to do dma > > + * @offset: the offset insi

Re: [PATCH net-next v4 11/15] virtio_net: xsk: tx: support xmit xsk buffer

2024-06-12 Thread Michael S. Tsirkin
On Wed, Jun 12, 2024 at 04:25:05PM -0700, Jakub Kicinski wrote: > On Tue, 11 Jun 2024 19:41:43 +0800 Xuan Zhuo wrote: > > @@ -534,10 +534,13 @@ enum virtnet_xmit_type { > > VIRTNET_XMIT_TYPE_SKB, > > VIRTNET_XMIT_TYPE_XDP, > > VIRTNET_XMIT_TYPE_DMA, > > + VIRTNET_XMIT_TYPE_XSK, > > A

Re: [PATCH net-next v4 09/15] virtio_net: xsk: bind/unbind xsk

2024-06-12 Thread Michael S. Tsirkin
On Tue, Jun 11, 2024 at 07:41:41PM +0800, Xuan Zhuo wrote: > This patch implement the logic of bind/unbind xsk pool to sq and rq. > > Signed-off-by: Xuan Zhuo I'd just squash with previous patch. This one is hard to review in isolation. > --- > drivers/net/virtio_net.c | 199 ++

Re: [PATCH net-next v4 08/15] virtio_net: sq support premapped mode

2024-06-12 Thread Michael S. Tsirkin
On Tue, Jun 11, 2024 at 07:41:40PM +0800, 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 when it is bound to > af-xdp. > > * virtnet_sq_set_premapped

Re: [PATCH net-next v4 11/15] virtio_net: xsk: tx: support xmit xsk buffer

2024-06-12 Thread Jakub Kicinski
On Tue, 11 Jun 2024 19:41:43 +0800 Xuan Zhuo wrote: > @@ -534,10 +534,13 @@ enum virtnet_xmit_type { > VIRTNET_XMIT_TYPE_SKB, > VIRTNET_XMIT_TYPE_XDP, > VIRTNET_XMIT_TYPE_DMA, > + VIRTNET_XMIT_TYPE_XSK, Again, would be great to avoid the transient warning (if it can be done c

Re: [PATCH net-next v4 08/15] virtio_net: sq support premapped mode

2024-06-12 Thread Jakub Kicinski
On Tue, 11 Jun 2024 19:41:40 +0800 Xuan Zhuo wrote: > +static int virtnet_sq_set_premapped(struct send_queue *sq, bool premapped) Could you try to add __maybe_unused or some such and then remove it in the patch which calls this function? Having warnings during bisection is not great.

Re: [PATCH net-next v4 01/15] virtio_ring: introduce dma map api for page

2024-06-12 Thread Jakub Kicinski
On Tue, 11 Jun 2024 19:41:33 +0800 Xuan Zhuo wrote: > +/** > + * virtqueue_dma_map_page_attrs - map DMA for _vq > + * @_vq: the struct virtqueue we're talking about. > + * @page: the page to do dma > + * @offset: the offset inside the page > + * @size: the size of the page to do dma > + * @dir: DMA

Re: [PATCH net-next v2] virtio_net: add support for Byte Queue Limits

2024-06-12 Thread Michael S. Tsirkin
On Wed, Jun 12, 2024 at 07:08:51PM +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Add support for Byte Queue Limits (BQL). > > Tested on qemu emulated virtio_net device with 1, 2 and 4 queues. > Tested with fq_codel and pfifo_fast. Super netperf with 50 threads is > running in background. Netpe

[PATCH net-next v2] virtio_net: add support for Byte Queue Limits

2024-06-12 Thread Jiri Pirko
From: Jiri Pirko Add support for Byte Queue Limits (BQL). Tested on qemu emulated virtio_net device with 1, 2 and 4 queues. Tested with fq_codel and pfifo_fast. Super netperf with 50 threads is running in background. Netperf TCP_RR results: NOBQL FQC 1q: 159.56 159.33 158.50 154.31agv: