search for: virtnet_close

Displaying 20 results from an estimated 199 matches for "virtnet_close".

2023 May 10
2
[PATCH net v3] virtio_net: Fix error unwinding of XDP initialization
...k 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 nvidi...
2023 May 09
1
[PATCH net v3] virtio_net: Fix error unwinding of XDP initialization
...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> >...
2023 May 06
1
[PATCH net v3] virtio_net: Fix error unwinding of XDP initialization
...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. > > 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 06
1
[PATCH net v3] virtio_net: Fix error unwinding of XDP initialization
...I, which is not the >> 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; >> >> 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> >&gt...
2023 May 03
2
[PATCH net v3] virtio_net: Fix error unwinding of XDP initialization
...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. 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&g...
2012 Apr 04
2
question about napi_disable (was Re: [PATCH] virtio_net: set/cancel work on ndo_open/ndo_stop)
...1030, Rusty Russell wrote: > Michael S. Tsirkin noticed that we could run the refill work after > ndo_close, which can re-enable napi - we don't disable it until > virtnet_remove. This is clearly wrong, so move the workqueue control > to ndo_open and ndo_stop (aka. virtnet_open and virtnet_close). > > One subtle point: virtnet_probe() could simply fail if it couldn't > allocate a receive buffer, but that's less polite in virtnet_open() so > we schedule a refill as we do in the normal receive path if we run out > of memory. > > Signed-off-by: Rusty Russell &lt...
2012 Apr 04
2
question about napi_disable (was Re: [PATCH] virtio_net: set/cancel work on ndo_open/ndo_stop)
...1030, Rusty Russell wrote: > Michael S. Tsirkin noticed that we could run the refill work after > ndo_close, which can re-enable napi - we don't disable it until > virtnet_remove. This is clearly wrong, so move the workqueue control > to ndo_open and ndo_stop (aka. virtnet_open and virtnet_close). > > One subtle point: virtnet_probe() could simply fail if it couldn't > allocate a receive buffer, but that's less polite in virtnet_open() so > we schedule a refill as we do in the normal receive path if we run out > of memory. > > Signed-off-by: Rusty Russell &lt...
2023 May 12
4
[PATCH net v6] virtio_net: Fix error unwinding of XDP initialization
...nitialized 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. 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 Xua...
2023 May 02
1
[PATCH net v2] virtio_net: Fix error unwinding of XDP initialization
...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. 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: Mi...
2017 Dec 31
1
[bpf-next V3 PATCH 11/14] virtio_net: setup xdp_rxq_info
...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 virtio_net device Cc: "Michael S. Tsirkin" <mst at redhat.com> Cc: Jason Wang <jasowang at redhat.com> Cc: virtualization at lists.linux-foundation.org Signed-off-by: Jesper...
2020 Jun 05
2
[PATCH] virtio_net: Unregister and re-register xdp_rxq across freeze/restore
...ng 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 cycle as virtnet_close() attempts to unregister an uninitialized xdp_rxq object. ------------[ cut here ]------------ Driver BUG WARNING: CPU: 0 PID: 880 at net/core/xdp.c:163 xdp_rxq_info_unreg+0x48/0x50 Modules linked in: CPU: 0 PID: 880 Comm: ip Not tainted 5.7.0-rc5+ #80 Hardware name: QEMU Standard PC (...
2020 Jun 05
2
[PATCH] virtio_net: Unregister and re-register xdp_rxq across freeze/restore
...ng 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 cycle as virtnet_close() attempts to unregister an uninitialized xdp_rxq object. ------------[ cut here ]------------ Driver BUG WARNING: CPU: 0 PID: 880 at net/core/xdp.c:163 xdp_rxq_info_unreg+0x48/0x50 Modules linked in: CPU: 0 PID: 880 Comm: ip Not tainted 5.7.0-rc5+ #80 Hardware name: QEMU Standard PC (...
2023 May 02
1
[PATCH net v2] virtio_net: Fix error unwinding of XDP initialization
...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. > > 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...
2017 Dec 22
1
[bpf-next V2 PATCH 11/14] virtio_net: setup xdp_rxq_info
...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.com> Cc: virtualization at lists.linux-foundation.org Signed-off-by: Jesper Dangaard Brouer <brouer at redhat.com> --- drivers/net/virtio_net.c | 12 +++++++++++- 1 file changed, 11 inser...
2017 Apr 25
3
[PATCH net-next] virtio-net: on tx, only call napi_disable if tx napi is on
...ruct virtnet_info *vi, return virtnet_napi_enable(vq, napi); } +static void virtnet_napi_tx_disable(struct napi_struct *napi) +{ + if (napi->weight) + napi_disable(napi); +} + static void refill_work(struct work_struct *work) { struct virtnet_info *vi = @@ -1445,7 +1451,7 @@ static int virtnet_close(struct net_device *dev) for (i = 0; i < vi->max_queue_pairs; i++) { napi_disable(&vi->rq[i].napi); - napi_disable(&vi->sq[i].napi); + virtnet_napi_tx_disable(&vi->sq[i].napi); } return 0; @@ -1803,7 +1809,7 @@ static void virtnet_freeze_down(struct virtio_d...
2017 Apr 25
3
[PATCH net-next] virtio-net: on tx, only call napi_disable if tx napi is on
...ruct virtnet_info *vi, return virtnet_napi_enable(vq, napi); } +static void virtnet_napi_tx_disable(struct napi_struct *napi) +{ + if (napi->weight) + napi_disable(napi); +} + static void refill_work(struct work_struct *work) { struct virtnet_info *vi = @@ -1445,7 +1451,7 @@ static int virtnet_close(struct net_device *dev) for (i = 0; i < vi->max_queue_pairs; i++) { napi_disable(&vi->rq[i].napi); - napi_disable(&vi->sq[i].napi); + virtnet_napi_tx_disable(&vi->sq[i].napi); } return 0; @@ -1803,7 +1809,7 @@ static void virtnet_freeze_down(struct virtio_d...
2019 Oct 07
3
[PATCH RFC net-next 2/2] drivers: net: virtio_net: Add tx_timeout function
...#39;t look right. also - there's already a warning in this case in the core. do we need another one? > + dev->stats.tx_errors++; > + } > +} > + > static const struct net_device_ops virtnet_netdev = { > .ndo_open = virtnet_open, > .ndo_stop = virtnet_close, > @@ -2600,6 +2623,7 @@ static const struct net_device_ops virtnet_netdev = { > .ndo_features_check = passthru_features_check, > .ndo_get_phys_port_name = virtnet_get_phys_port_name, > .ndo_set_features = virtnet_set_features, > + .ndo_tx_timeout = virtnet_tx_timeout, > }...
2019 Oct 07
3
[PATCH RFC net-next 2/2] drivers: net: virtio_net: Add tx_timeout function
...#39;t look right. also - there's already a warning in this case in the core. do we need another one? > + dev->stats.tx_errors++; > + } > +} > + > static const struct net_device_ops virtnet_netdev = { > .ndo_open = virtnet_open, > .ndo_stop = virtnet_close, > @@ -2600,6 +2623,7 @@ static const struct net_device_ops virtnet_netdev = { > .ndo_features_check = passthru_features_check, > .ndo_get_phys_port_name = virtnet_get_phys_port_name, > .ndo_set_features = virtnet_set_features, > + .ndo_tx_timeout = virtnet_tx_timeout, > }...
2017 Apr 25
1
[PATCH net-next v3 2/5] virtio-net: transmit napi
On 2017?04?25? 01:49, Willem de Bruijn wrote: > @@ -1371,8 +1419,10 @@ static int virtnet_close(struct net_device *dev) > /* Make sure refill_work doesn't re-enable napi! */ > cancel_delayed_work_sync(&vi->refill); > > - for (i = 0; i < vi->max_queue_pairs; i++) > + for (i = 0; i < vi->max_queue_pairs; i++) { > napi_disable(&vi->rq[...
2017 Dec 13
0
[bpf-next V1-RFC PATCH 11/14] virtio_net: setup xdp_rxq_info
...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 at redhat.com> Cc: virtualization at lists.linux-foundation.org Signed-off-by: Jesper Dangaard Brouer <brouer at redhat.com> --- drivers/net/virtio_net.c | 12 ++++++++++++ 1 file changed, 12 inser...