search for: xdp_rxq

Displaying 20 results from an estimated 62 matches for "xdp_rxq".

2020 Jun 05
2
[PATCH] virtio_net: Unregister and re-register xdp_rxq across freeze/restore
Unregister each queue's xdp_rxq during freeze, and re-register the new instance during restore. All queues are released during free and recreated during restore, i.e. the pre-freeze xdp_rxq will be lost. The bug is detected by WARNs in xdp_rxq_info_unreg() and xdp_rxq_info_unreg_mem_model() that fire after a suspend/resume cycl...
2020 Jun 05
2
[PATCH] virtio_net: Unregister and re-register xdp_rxq across freeze/restore
Unregister each queue's xdp_rxq during freeze, and re-register the new instance during restore. All queues are released during free and recreated during restore, i.e. the pre-freeze xdp_rxq will be lost. The bug is detected by WARNs in xdp_rxq_info_unreg() and xdp_rxq_info_unreg_mem_model() that fire after a suspend/resume cycl...
2020 Jun 07
0
[PATCH] virtio_net: Unregister and re-register xdp_rxq across freeze/restore
On Fri, Jun 05, 2020 at 02:46:24PM -0700, Sean Christopherson wrote: > Unregister each queue's xdp_rxq during freeze, and re-register the new > instance during restore. All queues are released during free and > recreated during restore, i.e. the pre-freeze xdp_rxq will be lost. > > The bug is detected by WARNs in xdp_rxq_info_unreg() and > xdp_rxq_info_unreg_mem_model() that fire af...
2023 May 12
4
[PATCH net v6] virtio_net: Fix error unwinding of XDP initialization
...itialization to avoid leaks in error unwinding of init code. Also extract helper functions of disable and enable queue pairs. Use newly introduced disable helper function in error unwinding and virtnet_close. Use enable helper function in virtnet_open. Fixes: 754b8a21a96d ("virtio_net: setup xdp_rxq_info") Signed-off-by: Feng Liu <feliu at nvidia.com> Reviewed-by: Jiri Pirko <jiri at nvidia.com> Reviewed-by: William Tu <witu at nvidia.com> --- v5 -> v6 feedbacks from Xuan Zhuo - add disable_delayed_refill and cancel_delayed_work_sync v4 -> v5 feedbacks from Michae...
2023 May 10
2
[PATCH net v3] virtio_net: Fix error unwinding of XDP initialization
...;> Also extract a helper function of disable queue pairs, and use newly >>>>>> introduced helper function in error unwinding and virtnet_close; >>>>>> >>>>>> Issue: 3383038 >>>>>> Fixes: 754b8a21a96d ("virtio_net: setup xdp_rxq_info") >>>>>> Signed-off-by: Feng Liu <feliu at nvidia.com> >>>>>> Reviewed-by: William Tu <witu at nvidia.com> >>>>>> Reviewed-by: Parav Pandit <parav at nvidia.com> >>>>>> Reviewed-by: Simon Horman <...
2023 May 02
1
[PATCH net v2] virtio_net: Fix error unwinding of XDP initialization
...he expected behavior. Need to roll back the previous rq initialization to avoid leaks in error unwinding of init code. Also extract a helper function of disable queue pairs, and use newly introduced helper function in error unwinding and virtnet_close; Fixes: 754b8a21a96d ("virtio_net: setup xdp_rxq_info") Signed-off-by: Feng Liu <feliu at nvidia.com> Reviewed-by: William Tu <witu at nvidia.com> Reviewed-by: Parav Pandit <parav at nvidia.com> Reviewed-by: Simon Horman <simon.horman at corigine.com> Acked-by: Michael S. Tsirkin <mst at redhat.com> --- drivers...
2023 May 09
1
[PATCH net v3] virtio_net: Fix error unwinding of XDP initialization
...>>>> Also extract a helper function of disable queue pairs, and use newly > >>>> introduced helper function in error unwinding and virtnet_close; > >>>> > >>>> Issue: 3383038 > >>>> Fixes: 754b8a21a96d ("virtio_net: setup xdp_rxq_info") > >>>> Signed-off-by: Feng Liu <feliu at nvidia.com> > >>>> Reviewed-by: William Tu <witu at nvidia.com> > >>>> Reviewed-by: Parav Pandit <parav at nvidia.com> > >>>> Reviewed-by: Simon Horman <simon.horman...
2023 May 02
1
[PATCH net v2] virtio_net: Fix error unwinding of XDP initialization
...roll back the previous rq initialization > to avoid leaks in error unwinding of init code. > > Also extract a helper function of disable queue pairs, and use newly > introduced helper function in error unwinding and virtnet_close; > > Fixes: 754b8a21a96d ("virtio_net: setup xdp_rxq_info") > Signed-off-by: Feng Liu <feliu at nvidia.com> > Reviewed-by: William Tu <witu at nvidia.com> > Reviewed-by: Parav Pandit <parav at nvidia.com> > Reviewed-by: Simon Horman <simon.horman at corigine.com> > Acked-by: Michael S. Tsirkin <mst at re...
2023 May 06
1
[PATCH net v3] virtio_net: Fix error unwinding of XDP initialization
...ious rq initialization > to avoid leaks in error unwinding of init code. > > Also extract a helper function of disable queue pairs, and use newly > introduced helper function in error unwinding and virtnet_close; > > Issue: 3383038 > Fixes: 754b8a21a96d ("virtio_net: setup xdp_rxq_info") > Signed-off-by: Feng Liu <feliu at nvidia.com> > Reviewed-by: William Tu <witu at nvidia.com> > Reviewed-by: Parav Pandit <parav at nvidia.com> > Reviewed-by: Simon Horman <simon.horman at corigine.com> > Acked-by: Michael S. Tsirkin <mst at re...
2023 May 03
2
[PATCH net v3] virtio_net: Fix error unwinding of XDP initialization
...avior. Need to roll back the previous rq initialization to avoid leaks in error unwinding of init code. Also extract a helper function of disable queue pairs, and use newly introduced helper function in error unwinding and virtnet_close; Issue: 3383038 Fixes: 754b8a21a96d ("virtio_net: setup xdp_rxq_info") Signed-off-by: Feng Liu <feliu at nvidia.com> Reviewed-by: William Tu <witu at nvidia.com> Reviewed-by: Parav Pandit <parav at nvidia.com> Reviewed-by: Simon Horman <simon.horman at corigine.com> Acked-by: Michael S. Tsirkin <mst at redhat.com> Change-Id: I...
2023 Apr 28
1
[PATCH net v1 1/2] virtio_net: Fix error unwinding of XDP initialization
...on may hit an error causing net device open failed. However, previous rqs have already initialized XDP and enabled NAPI, which is not the expected behavior. Need to roll back the previous rq initialization to avoid leaks in error unwinding of init code. Fixes: 754b8a21a96d ("virtio_net: setup xdp_rxq_info") Signed-off-by: Feng Liu <feliu at nvidia.com> Reviewed-by: William Tu <witu at nvidia.com> Reviewed-by: Parav Pandit <parav at nvidia.com> --- drivers/net/virtio_net.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/driver...
2023 May 06
1
[PATCH net v3] virtio_net: Fix error unwinding of XDP initialization
...gt; to avoid leaks in error unwinding of init code. >> >> Also extract a helper function of disable queue pairs, and use newly >> introduced helper function in error unwinding and virtnet_close; >> >> Issue: 3383038 >> Fixes: 754b8a21a96d ("virtio_net: setup xdp_rxq_info") >> Signed-off-by: Feng Liu <feliu at nvidia.com> >> Reviewed-by: William Tu <witu at nvidia.com> >> Reviewed-by: Parav Pandit <parav at nvidia.com> >> Reviewed-by: Simon Horman <simon.horman at corigine.com> >> Acked-by: Michael S. T...
2017 Dec 31
1
[bpf-next V3 PATCH 11/14] virtio_net: setup xdp_rxq_info
The virtio_net driver doesn't dynamically change the RX-ring queue layout and backing pages, but instead reject XDP setup if all the conditions for XDP is not meet. Thus, the xdp_rxq_info also remains fairly static. This allow us to simply add the reg/unreg to net_device open/close functions. Driver hook points for xdp_rxq_info: * reg : virtnet_open * unreg: virtnet_close V3: - bugfix, also setup xdp.rxq in receive_mergeable() - Tested bpf-sample prog inside guest on a...
2017 Dec 13
0
[bpf-next V1-RFC PATCH 11/14] virtio_net: setup xdp_rxq_info
The virtio_net driver doesn't dynamically change the RX-ring queue layout and backing pages, but instead reject XDP setup if all the conditions for XDP is not meet. Thus, the xdp_rxq_info also remains fairly static. This allow us to simply add the init+reg/unreg to net_device open/close functions. Driver hook points for xdp_rxq_info: * init+reg: virtnet_open * unreg : virtnet_close Cc: "Michael S. Tsirkin" <mst at redhat.com> Cc: Jason Wang <jasowang a...
2017 Dec 13
0
[bpf-next V1-RFC PATCH 11/14] virtio_net: setup xdp_rxq_info
The virtio_net driver doesn't dynamically change the RX-ring queue layout and backing pages, but instead reject XDP setup if all the conditions for XDP is not meet. Thus, the xdp_rxq_info also remains fairly static. This allow us to simply add the init+reg/unreg to net_device open/close functions. Driver hook points for xdp_rxq_info: * init+reg: virtnet_open * unreg : virtnet_close Cc: "Michael S. Tsirkin" <mst at redhat.com> Cc: Jason Wang <jasowang a...
2018 Jan 03
0
[bpf-next V4 PATCH 11/14] virtio_net: setup xdp_rxq_info
The virtio_net driver doesn't dynamically change the RX-ring queue layout and backing pages, but instead reject XDP setup if all the conditions for XDP is not meet. Thus, the xdp_rxq_info also remains fairly static. This allow us to simply add the reg/unreg to net_device open/close functions. Driver hook points for xdp_rxq_info: * reg : virtnet_open * unreg: virtnet_close V3: - bugfix, also setup xdp.rxq in receive_mergeable() - Tested bpf-sample prog inside guest on a...
2017 Dec 22
1
[bpf-next V2 PATCH 11/14] virtio_net: setup xdp_rxq_info
The virtio_net driver doesn't dynamically change the RX-ring queue layout and backing pages, but instead reject XDP setup if all the conditions for XDP is not meet. Thus, the xdp_rxq_info also remains fairly static. This allow us to simply add the reg/unreg to net_device open/close functions. Driver hook points for xdp_rxq_info: * reg : virtnet_open * unreg: virtnet_close Cc: "Michael S. Tsirkin" <mst at redhat.com> Cc: Jason Wang <jasowang at redhat.co...
2023 Feb 02
3
[PATCH 0/2] virtio-net: close() to follow mirror of open()
Hi, This two small patches improves ndo_close() callback to follow the mirror sequence of ndo_open() callback. This improves the code auditing and also ensure that xdp rxq info is not unregistered while NAPI on RXQ is ongoing. Please review. Patch summary: patch-1 ensures that xdp rq info is unregistered after rq napi is disabled patch-2 keeps the mirror sequence for close() be mirror of open()
2020 May 06
6
[PATCH net-next 1/2] virtio-net: don't reserve space for vnet header for XDP
..._start = buf + VIRTNET_RX_PAD + vi->hdr_len; - xdp.data = xdp.data_hard_start + xdp_headroom; + xdp.data_hard_start = buf + VIRTNET_RX_PAD; + xdp.data = xdp.data_hard_start + xdp_headroom + vi->hdr_len; xdp.data_end = xdp.data + len; xdp.data_meta = xdp.data; xdp.rxq = &rq->xdp_rxq; @@ -845,7 +845,7 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, * the descriptor on if we get an XDP_TX return code. */ data = page_address(xdp_page) + offset; - xdp.data_hard_start = data - VIRTIO_XDP_HEADROOM + vi->hdr_len; + xdp.data_hard_start = data - VIRT...
2020 May 06
6
[PATCH net-next 1/2] virtio-net: don't reserve space for vnet header for XDP
..._start = buf + VIRTNET_RX_PAD + vi->hdr_len; - xdp.data = xdp.data_hard_start + xdp_headroom; + xdp.data_hard_start = buf + VIRTNET_RX_PAD; + xdp.data = xdp.data_hard_start + xdp_headroom + vi->hdr_len; xdp.data_end = xdp.data + len; xdp.data_meta = xdp.data; xdp.rxq = &rq->xdp_rxq; @@ -845,7 +845,7 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, * the descriptor on if we get an XDP_TX return code. */ data = page_address(xdp_page) + offset; - xdp.data_hard_start = data - VIRTIO_XDP_HEADROOM + vi->hdr_len; + xdp.data_hard_start = data - VIRT...