search for: xdp_queue_pairs

Displaying 20 results from an estimated 51 matches for "xdp_queue_pairs".

2017 Feb 15
3
[PATCH net-next] virito-net: set queues after reset during xdp_set
...depends on the old xdp queue pairs number to do the correct detection. So fix this by: - set queues after reset, to keep the old vi->curr_queue_pairs. (in fact setting queues before reset does not works since after feature set, all queue pairs were enabled by default during reset). - change xdp_queue_pairs only after virtnet_reset() is succeed. [1] [ 74.328168] general protection fault: 0000 [#1] SMP [ 74.328625] Modules linked in: nfsd xfs libcrc32c virtio_net virtio_pci [ 74.329117] CPU: 0 PID: 2849 Comm: xdp2 Not tainted 4.10.0-rc7+ #499 [ 74.329577] Hardware name: QEMU Standard PC (i440...
2017 Feb 15
3
[PATCH net-next] virito-net: set queues after reset during xdp_set
...depends on the old xdp queue pairs number to do the correct detection. So fix this by: - set queues after reset, to keep the old vi->curr_queue_pairs. (in fact setting queues before reset does not works since after feature set, all queue pairs were enabled by default during reset). - change xdp_queue_pairs only after virtnet_reset() is succeed. [1] [ 74.328168] general protection fault: 0000 [#1] SMP [ 74.328625] Modules linked in: nfsd xfs libcrc32c virtio_net virtio_pci [ 74.329117] CPU: 0 PID: 2849 Comm: xdp2 Not tainted 4.10.0-rc7+ #499 [ 74.329577] Hardware name: QEMU Standard PC (i440...
2017 Feb 17
0
[PATCH net-next] virito-net: set queues after reset during xdp_set
...airs > number to do the correct detection. So fix this by: > > - set queues after reset, to keep the old vi->curr_queue_pairs. (in > fact setting queues before reset does not works since after feature > set, all queue pairs were enabled by default during reset). > - change xdp_queue_pairs only after virtnet_reset() is succeed. > > [1] I'm guessing this occurs when enabling XDP while receiving lots of traffic? > > [ 74.328168] general protection fault: 0000 [#1] SMP > [ 74.328625] Modules linked in: nfsd xfs libcrc32c virtio_net virtio_pci > [ 74.32911...
2020 Sep 28
2
[PATCH 2/2] virtio-net: ethtool configurable RXCSUM
...eatures_t features) > { > struct virtnet_info *vi = netdev_priv(dev); > - u64 offloads; > + u64 offloads = vi->guest_offloads & > + vi->guest_offloads_capable; > int err; > > - if ((dev->features ^ features) & NETIF_F_LRO) { > - if (vi->xdp_queue_pairs) > - return -EBUSY; > + /* Don't allow configuration while XDP is active. */ > + if (vi->xdp_queue_pairs) > + return -EBUSY; > > + if ((dev->features ^ features) & NETIF_F_LRO) { > if (features & NETIF_F_LRO) > - offloads = vi->guest_offloads_c...
2020 Sep 28
2
[PATCH 2/2] virtio-net: ethtool configurable RXCSUM
...eatures_t features) > { > struct virtnet_info *vi = netdev_priv(dev); > - u64 offloads; > + u64 offloads = vi->guest_offloads & > + vi->guest_offloads_capable; > int err; > > - if ((dev->features ^ features) & NETIF_F_LRO) { > - if (vi->xdp_queue_pairs) > - return -EBUSY; > + /* Don't allow configuration while XDP is active. */ > + if (vi->xdp_queue_pairs) > + return -EBUSY; > > + if ((dev->features ^ features) & NETIF_F_LRO) { > if (features & NETIF_F_LRO) > - offloads = vi->guest_offloads_c...
2020 Sep 29
2
[PATCH 2/2] virtio-net: ethtool configurable RXCSUM
...floads; > > > + u64 offloads = vi->guest_offloads & > > > + vi->guest_offloads_capable; > > > int err; > > > > > > - if ((dev->features ^ features) & NETIF_F_LRO) { > > > - if (vi->xdp_queue_pairs) > > > - return -EBUSY; > > > + /* Don't allow configuration while XDP is active. */ > > > + if (vi->xdp_queue_pairs) > > > + return -EBUSY; > > > > > > + if ((dev->features ^ features) &...
2020 Sep 29
2
[PATCH 2/2] virtio-net: ethtool configurable RXCSUM
...floads; > > > + u64 offloads = vi->guest_offloads & > > > + vi->guest_offloads_capable; > > > int err; > > > > > > - if ((dev->features ^ features) & NETIF_F_LRO) { > > > - if (vi->xdp_queue_pairs) > > > - return -EBUSY; > > > + /* Don't allow configuration while XDP is active. */ > > > + if (vi->xdp_queue_pairs) > > > + return -EBUSY; > > > > > > + if ((dev->features ^ features) &...
2020 Sep 28
1
[PATCH 2/2] virtio-net: ethtool configurable RXCSUM
...t_info *vi = netdev_priv(dev); > - u64 offloads; > + u64 offloads = vi->guest_offloads & > + vi->guest_offloads_capable; > int err; > > - if ((dev->features ^ features) & NETIF_F_LRO) { > - if (vi->xdp_queue_pairs) > - return -EBUSY; > + /* Don't allow configuration while XDP is active. */ > + if (vi->xdp_queue_pairs) > + return -EBUSY; > > + if ((dev->features ^ features) & NETIF_F_LRO) { > if (features...
2020 Sep 29
2
[PATCH 2/2] virtio-net: ethtool configurable RXCSUM
...;guest_offloads & > > > > > + vi->guest_offloads_capable; > > > > > int err; > > > > > > > > > > - if ((dev->features ^ features) & NETIF_F_LRO) { > > > > > - if (vi->xdp_queue_pairs) > > > > > - return -EBUSY; > > > > > + /* Don't allow configuration while XDP is active. */ > > > > > + if (vi->xdp_queue_pairs) > > > > > + return -EBUSY; > > > > > > >...
2020 Sep 29
2
[PATCH 2/2] virtio-net: ethtool configurable RXCSUM
...;guest_offloads & > > > > > + vi->guest_offloads_capable; > > > > > int err; > > > > > > > > > > - if ((dev->features ^ features) & NETIF_F_LRO) { > > > > > - if (vi->xdp_queue_pairs) > > > > > - return -EBUSY; > > > > > + /* Don't allow configuration while XDP is active. */ > > > > > + if (vi->xdp_queue_pairs) > > > > > + return -EBUSY; > > > > > > >...
2020 Sep 28
7
[PATCH 1/2] virtio-net: don't disable guest csum when disable LRO
From: Tonghao Zhang <xiangxia.m.yue at gmail.com> Open vSwitch and Linux bridge will disable LRO of the interface when this interface added to them. Now when disable the LRO, the virtio-net csum is disable too. That drops the forwarding performance. Fixes: e59ff2c49ae1 ("virtio-net: disable guest csum during XDP set") Cc: Michael S. Tsirkin <mst at redhat.com> Cc: Jason
2020 Sep 28
7
[PATCH 1/2] virtio-net: don't disable guest csum when disable LRO
From: Tonghao Zhang <xiangxia.m.yue at gmail.com> Open vSwitch and Linux bridge will disable LRO of the interface when this interface added to them. Now when disable the LRO, the virtio-net csum is disable too. That drops the forwarding performance. Fixes: e59ff2c49ae1 ("virtio-net: disable guest csum during XDP set") Cc: Michael S. Tsirkin <mst at redhat.com> Cc: Jason
2017 Jul 18
1
[PATCH net-next 4/5] virtio-net: do not reset during XDP set
...(-) > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index e31b5b2..e732bd6 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -407,6 +407,67 @@ static unsigned int virtnet_get_headroom(struct virtnet_info *vi) > return vi->xdp_queue_pairs ? VIRTIO_XDP_HEADROOM : 0; > } > > +/* We copy and linearize packet in the following cases: > + * > + * 1) Packet across multiple buffers, this happens normally when rx > + * buffer size is underestimated. Rarely, since spec does not > + * forbid using more than one bu...
2017 Jul 18
1
[PATCH net-next 4/5] virtio-net: do not reset during XDP set
...(-) > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index e31b5b2..e732bd6 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -407,6 +407,67 @@ static unsigned int virtnet_get_headroom(struct virtnet_info *vi) > return vi->xdp_queue_pairs ? VIRTIO_XDP_HEADROOM : 0; > } > > +/* We copy and linearize packet in the following cases: > + * > + * 1) Packet across multiple buffers, this happens normally when rx > + * buffer size is underestimated. Rarely, since spec does not > + * forbid using more than one bu...
2017 Jan 02
2
[PATCH net 9/9] virtio-net: XDP support for small buffers
...ee_receive_page_frags(struct virtnet_info *vi) static bool is_xdp_queue(struct virtnet_info *vi, int q) { + /* For small receive mode always use kfree_skb variants */ + if (!vi->mergeable_rx_bufs) + return false; + if (q < (vi->curr_queue_pairs - vi->xdp_queue_pairs)) return false; else if (q < vi->curr_queue_pairs) patch is untested just spotted doing code review. Thanks, John
2017 Jan 02
2
[PATCH net 9/9] virtio-net: XDP support for small buffers
...ee_receive_page_frags(struct virtnet_info *vi) static bool is_xdp_queue(struct virtnet_info *vi, int q) { + /* For small receive mode always use kfree_skb variants */ + if (!vi->mergeable_rx_bufs) + return false; + if (q < (vi->curr_queue_pairs - vi->xdp_queue_pairs)) return false; else if (q < vi->curr_queue_pairs) patch is untested just spotted doing code review. Thanks, John
2017 Jul 17
0
[PATCH net-next 4/5] virtio-net: do not reset during XDP set
...d, 105 insertions(+), 125 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index e31b5b2..e732bd6 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -407,6 +407,67 @@ static unsigned int virtnet_get_headroom(struct virtnet_info *vi) return vi->xdp_queue_pairs ? VIRTIO_XDP_HEADROOM : 0; } +/* We copy and linearize packet in the following cases: + * + * 1) Packet across multiple buffers, this happens normally when rx + * buffer size is underestimated. Rarely, since spec does not + * forbid using more than one buffer even if a single buffer is + *...
2020 Sep 28
0
[PATCH 2/2] virtio-net: ethtool configurable RXCSUM
...eatures(struct net_device *dev, netdev_features_t features) { struct virtnet_info *vi = netdev_priv(dev); - u64 offloads; + u64 offloads = vi->guest_offloads & + vi->guest_offloads_capable; int err; - if ((dev->features ^ features) & NETIF_F_LRO) { - if (vi->xdp_queue_pairs) - return -EBUSY; + /* Don't allow configuration while XDP is active. */ + if (vi->xdp_queue_pairs) + return -EBUSY; + if ((dev->features ^ features) & NETIF_F_LRO) { if (features & NETIF_F_LRO) - offloads = vi->guest_offloads_capable; + offloads |= GUEST_OFFLOAD_LR...
2020 Sep 29
0
[PATCH 2/2] virtio-net: ethtool configurable RXCSUM
...v(dev); > > - u64 offloads; > > + u64 offloads = vi->guest_offloads & > > + vi->guest_offloads_capable; > > int err; > > > > - if ((dev->features ^ features) & NETIF_F_LRO) { > > - if (vi->xdp_queue_pairs) > > - return -EBUSY; > > + /* Don't allow configuration while XDP is active. */ > > + if (vi->xdp_queue_pairs) > > + return -EBUSY; > > > > + if ((dev->features ^ features) & NETIF_F_LRO) { > >...
2023 Mar 06
4
[PATCH net 0/2] add checking sq is full inside xdp xmit
If the queue of xdp xmit is not an independent queue, then when the xdp xmit used all the desc, the xmit from the __dev_queue_xmit() may encounter the following error. net ens4: Unexpected TXQ (0) queue failure: -28 This patch adds a check whether sq is full in XDP Xmit. Thanks. Xuan Zhuo (2): virtio_net: separate the logic of checking whether sq is full virtio_net: add checking sq is full