search for: virtnet_reset

Displaying 20 results from an estimated 46 matches for "virtnet_reset".

2017 Oct 13
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
From: Willem de Bruijn <willemb at google.com> Implement the reset communication request defined in the VIRTIO 1.0 specification and introduces in Linux in commit c00bbcf862896 ("virtio: add VIRTIO_CONFIG_S_NEEDS_RESET device status bit"). Use the virtnet_reset function introduced in commit 2de2f7f40ef9 ("virtio_net: XDP support for adjust_head"). That was removed in commit 4941d472bf95 ("virtio-net: do not reset during XDP set"), because no longer used. Bring it back, minus the xdp specific code. Before tearing down any state, virtne...
2017 Oct 13
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
From: Willem de Bruijn <willemb at google.com> Implement the reset communication request defined in the VIRTIO 1.0 specification and introduces in Linux in commit c00bbcf862896 ("virtio: add VIRTIO_CONFIG_S_NEEDS_RESET device status bit"). Use the virtnet_reset function introduced in commit 2de2f7f40ef9 ("virtio_net: XDP support for adjust_head"). That was removed in commit 4941d472bf95 ("virtio-net: do not reset during XDP set"), because no longer used. Bring it back, minus the xdp specific code. Before tearing down any state, virtne...
2017 Oct 15
0
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...gt; From: Willem de Bruijn <willemb at google.com> > > Implement the reset communication request defined in the VIRTIO 1.0 > specification and introduces in Linux in commit c00bbcf862896 ("virtio: > add VIRTIO_CONFIG_S_NEEDS_RESET device status bit"). > > Use the virtnet_reset function introduced in commit 2de2f7f40ef9 > ("virtio_net: XDP support for adjust_head"). That was removed in > commit 4941d472bf95 ("virtio-net: do not reset during XDP set"), > because no longer used. Bring it back, minus the xdp specific code. > > Before teari...
2019 Nov 22
2
[PATCH net-next v2] drivers: net: virtio_net: Implement a dev_watchdog handler
Driver virtio_net is not handling error events for TX provided by dev_watchdog. This event is reached when transmission queue is having problems to transmit packets. This could happen for any reason. To enable it, driver should have .ndo_tx_timeout implemented. This commit brings back virtnet_reset method to recover TX queues from a error state. That function is called by schedule_work method and it puts the reset function into work queue. As the error cause is unknown at this moment, it would be better to reset all queues. Signed-off-by: Julio Faracco <jcfaracco at gmail.com> Signed-...
2019 Nov 22
2
[PATCH net-next v2] drivers: net: virtio_net: Implement a dev_watchdog handler
Driver virtio_net is not handling error events for TX provided by dev_watchdog. This event is reached when transmission queue is having problems to transmit packets. This could happen for any reason. To enable it, driver should have .ndo_tx_timeout implemented. This commit brings back virtnet_reset method to recover TX queues from a error state. That function is called by schedule_work method and it puts the reset function into work queue. As the error cause is unknown at this moment, it would be better to reset all queues. Signed-off-by: Julio Faracco <jcfaracco at gmail.com> Signed-...
2017 Oct 16
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...com> wrote: > On Mon, Oct 16, 2017 at 12:04:57PM -0400, Willem de Bruijn wrote: >> On Mon, Oct 16, 2017 at 11:31 AM, Michael S. Tsirkin <mst at redhat.com> wrote: >> > On Mon, Oct 16, 2017 at 11:03:18AM -0400, Willem de Bruijn wrote: >> >> >> +static int virtnet_reset(struct virtnet_info *vi) >> >> >> +{ >> >> >> + struct virtio_device *dev = vi->vdev; >> >> >> + int ret; >> >> >> + >> >> >> + virtio_config_disable(dev); >> >> >> + dev-&...
2017 Oct 16
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...com> wrote: > On Mon, Oct 16, 2017 at 12:04:57PM -0400, Willem de Bruijn wrote: >> On Mon, Oct 16, 2017 at 11:31 AM, Michael S. Tsirkin <mst at redhat.com> wrote: >> > On Mon, Oct 16, 2017 at 11:03:18AM -0400, Willem de Bruijn wrote: >> >> >> +static int virtnet_reset(struct virtnet_info *vi) >> >> >> +{ >> >> >> + struct virtio_device *dev = vi->vdev; >> >> >> + int ret; >> >> >> + >> >> >> + virtio_config_disable(dev); >> >> >> + dev-&...
2017 Feb 15
3
[PATCH net-next] virito-net: set queues after reset during xdp_set
...e 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 (i440FX + PIIX, 1996), BIOS re...
2017 Feb 15
3
[PATCH net-next] virito-net: set queues after reset during xdp_set
...e 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 (i440FX + PIIX, 1996), BIOS re...
2017 Oct 17
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...2017 at 12:04:57PM -0400, Willem de Bruijn wrote: > > > > On Mon, Oct 16, 2017 at 11:31 AM, Michael S. Tsirkin <mst at redhat.com> wrote: > > > > > On Mon, Oct 16, 2017 at 11:03:18AM -0400, Willem de Bruijn wrote: > > > > > > > > +static int virtnet_reset(struct virtnet_info *vi) > > > > > > > > +{ > > > > > > > > + struct virtio_device *dev = vi->vdev; > > > > > > > > + int ret; > > > > > > > > + > > > > > > > > + v...
2017 Oct 05
0
[PATCH RFC 1/2] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...>> Implement the reset communication request defined in the VIRTIO 1.0 >> specification and introduces in Linux in commit c00bbcf862896 ("virtio: >> add VIRTIO_CONFIG_S_NEEDS_RESET device status bit"). >> >> Since that patch, the virtio-net driver has added a virtnet_reset >> function that implements the requested behavior through calls to the >> power management freeze and restore functions. >> >> That function has recently been reverted when its sole caller was >> updated. Bring it back and listen for the request from the host on >&...
2017 Oct 05
0
[PATCH RFC 1/2] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...>> Implement the reset communication request defined in the VIRTIO 1.0 >> specification and introduces in Linux in commit c00bbcf862896 ("virtio: >> add VIRTIO_CONFIG_S_NEEDS_RESET device status bit"). >> >> Since that patch, the virtio-net driver has added a virtnet_reset >> function that implements the requested behavior through calls to the >> power management freeze and restore functions. >> >> That function has recently been reverted when its sole caller was >> updated. Bring it back and listen for the request from the host on >&...
2014 Aug 27
2
[PATCH 1/1] add selftest for virtio-net
...EIGHT; module_param(napi_weight, int, 0444); @@ -51,6 +52,23 @@ module_param(gso, bool, 0444); #define MERGEABLE_BUFFER_ALIGN max(L1_CACHE_BYTES, 256) #define VIRTNET_DRIVER_VERSION "1.0.0" +#define __VIRTNET_TESTING 0 + +enum { + VIRTNET_LOOPBACK_TEST, + VIRTNET_FEATURE_NEG_TEST, + VIRTNET_RESET_TEST, +}; + +static const struct { + const char string[ETH_GSTRING_LEN]; +} virtnet_gstrings_test[] = { + [VIRTNET_LOOPBACK_TEST] = { "loopback test (offline)" }, + [VIRTNET_FEATURE_NEG_TEST] = { "negotiate test (offline)" }, + [VIRTNET_RESET_TEST] = { "reset test (o...
2014 Aug 27
2
[PATCH 1/1] add selftest for virtio-net
...EIGHT; module_param(napi_weight, int, 0444); @@ -51,6 +52,23 @@ module_param(gso, bool, 0444); #define MERGEABLE_BUFFER_ALIGN max(L1_CACHE_BYTES, 256) #define VIRTNET_DRIVER_VERSION "1.0.0" +#define __VIRTNET_TESTING 0 + +enum { + VIRTNET_LOOPBACK_TEST, + VIRTNET_FEATURE_NEG_TEST, + VIRTNET_RESET_TEST, +}; + +static const struct { + const char string[ETH_GSTRING_LEN]; +} virtnet_gstrings_test[] = { + [VIRTNET_LOOPBACK_TEST] = { "loopback test (offline)" }, + [VIRTNET_FEATURE_NEG_TEST] = { "negotiate test (offline)" }, + [VIRTNET_RESET_TEST] = { "reset test (o...
2019 Nov 26
0
[net-next V3 2/2] drivers: net: virtio_net: Implement a dev_watchdog handler
Driver virtio_net is not handling error events for TX provided by dev_watchdog. This event is reached when transmission queue is having problems to transmit packets. This could happen for any reason. To enable it, driver should have .ndo_tx_timeout implemented. This commit brings back virtnet_reset method to recover TX queues from a error state. That function is called by schedule_work method and it puts the reset function into work queue. As the error cause is unknown at this moment, it would be better to reset all queues, including RX (because we don't have control of this). Signed-of...
2019 Nov 22
0
[PATCH] drivers: net: virtio_net: Implement a dev_watchdog handler
Driver virtio_net is not handling error events for TX provided by dev_watchdog. This event is reached when transmission queue is having problems to transmit packets. This could happen for any reason. To enable it, driver should have .ndo_tx_timeout implemented. This commit brings back virtnet_reset method to recover TX queues from a error state. That function is called by schedule_work method and it puts the reset function into work queue. As the error cause is unknown at this moment, it would be better to reset all queues. Signed-off-by: Julio Faracco <jcfaracco at gmail.com> Signed-...
2017 Oct 16
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
On Mon, Oct 16, 2017 at 11:31 AM, Michael S. Tsirkin <mst at redhat.com> wrote: > On Mon, Oct 16, 2017 at 11:03:18AM -0400, Willem de Bruijn wrote: >> >> +static int virtnet_reset(struct virtnet_info *vi) >> >> +{ >> >> + struct virtio_device *dev = vi->vdev; >> >> + int ret; >> >> + >> >> + virtio_config_disable(dev); >> >> + dev->failed = dev->config->get_status(dev) & V...
2017 Oct 16
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
On Mon, Oct 16, 2017 at 11:31 AM, Michael S. Tsirkin <mst at redhat.com> wrote: > On Mon, Oct 16, 2017 at 11:03:18AM -0400, Willem de Bruijn wrote: >> >> +static int virtnet_reset(struct virtnet_info *vi) >> >> +{ >> >> + struct virtio_device *dev = vi->vdev; >> >> + int ret; >> >> + >> >> + virtio_config_disable(dev); >> >> + dev->failed = dev->config->get_status(dev) & V...
2019 Nov 22
0
[PATCH net-next v2] drivers: net: virtio_net: Implement a dev_watchdog handler
...o_net is not handling error events for TX provided by > dev_watchdog. This event is reached when transmission queue is having > problems to transmit packets. This could happen for any reason. To > enable it, driver should have .ndo_tx_timeout implemented. > > This commit brings back virtnet_reset method to recover TX queues from a > error state. That function is called by schedule_work method and it puts > the reset function into work queue. > > As the error cause is unknown at this moment, it would be better to > reset all queues. > > Signed-off-by: Julio Faracco &lt...
2017 Oct 16
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
>> +static int virtnet_reset(struct virtnet_info *vi) >> +{ >> + struct virtio_device *dev = vi->vdev; >> + int ret; >> + >> + virtio_config_disable(dev); >> + dev->failed = dev->config->get_status(dev) & VIRTIO_CONFIG_S_FAILED; >> + virtnet_freeze_d...