Displaying 20 results from an estimated 111 matches for "netif_device_attach".
2018 Oct 12
0
[PATCH] virtio_net: enable tx after resuming from suspend
...5f81 100644
>>>>> --- a/drivers/net/virtio_net.c
>>>>> +++ b/drivers/net/virtio_net.c
>>>>> @@ -2256,6 +2256,7 @@ static int virtnet_restore_up(struct
>>>>> virtio_device *vdev)
>>>>> ?????? }
>>>>> ?? ????? netif_device_attach(vi->dev);
>>>>> +??? netif_start_queue(vi->dev);
>>>> I believe this is duplicated with netif_tx_wake_all_queues() in
>>>> netif_device_attach() above?
>>> Thank you for your review.
>>>
>>> If both netif_tx_wake_all_queues() a...
2018 Oct 11
0
[PATCH] virtio_net: enable tx after resuming from suspend
...io_net.c
>>> index dab504ec5e50..3453d80f5f81 100644
>>> --- a/drivers/net/virtio_net.c
>>> +++ b/drivers/net/virtio_net.c
>>> @@ -2256,6 +2256,7 @@ static int virtnet_restore_up(struct
>>> virtio_device *vdev)
>>> ????? }
>>> ? ????? netif_device_attach(vi->dev);
>>> +??? netif_start_queue(vi->dev);
>> I believe this is duplicated with netif_tx_wake_all_queues() in
>> netif_device_attach() above?
> Thank you for your review.
>
> If both netif_tx_wake_all_queues() and netif_start_queue() result in
> clearing _...
2018 Oct 16
0
[PATCH] virtio_net: enable tx after resuming from suspend
...c
>>>>>>>> +++ b/drivers/net/virtio_net.c
>>>>>>>> @@ -2256,6 +2256,7 @@ static int virtnet_restore_up(struct
>>>>>>>> virtio_device *vdev)
>>>>>>>> ??????? }
>>>>>>>> ??? ????? netif_device_attach(vi->dev);
>>>>>>>> +??? netif_start_queue(vi->dev);
>>>>>>> I believe this is duplicated with netif_tx_wake_all_queues() in
>>>>>>> netif_device_attach() above?
>>>>>> Thank you for your review.
>>>&g...
2018 Oct 11
0
[PATCH] virtio_net: enable tx after resuming from suspend
...;
> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> index dab504ec5e50..3453d80f5f81 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@ -2256,6 +2256,7 @@ static int virtnet_restore_up(struct virtio_device *vdev)
> }
>
> netif_device_attach(vi->dev);
> + netif_start_queue(vi->dev);
I believe this is duplicated with netif_tx_wake_all_queues() in
netif_device_attach() above?
Thanks
> return err;
> }
>
2015 Jun 24
2
[RFC] virtio_net: Adding tx_timeout function.
...if (netif_running(vi->dev)) {
+ for (i = 0; i < vi->curr_queue_pairs; i++)
+ if (!try_fill_recv(vi, &vi->rq[i], GFP_KERNEL))
+ schedule_delayed_work(&vi->refill, 0);
+
+ for (i = 0; i < vi->max_queue_pairs; i++)
+ virtnet_napi_enable(&vi->rq[i]);
+ }
+
+ netif_device_attach(vi->dev);
+
+ rtnl_lock();
+ virtnet_set_queues(vi, vi->curr_queue_pairs);
+ rtnl_unlock();
+}
+
static struct virtio_device_id id_table[] = {
{ VIRTIO_ID_NET, VIRTIO_DEV_ANY_ID },
{ 0 },
--
1.7.10.4
2015 Jun 24
2
[RFC] virtio_net: Adding tx_timeout function.
...if (netif_running(vi->dev)) {
+ for (i = 0; i < vi->curr_queue_pairs; i++)
+ if (!try_fill_recv(vi, &vi->rq[i], GFP_KERNEL))
+ schedule_delayed_work(&vi->refill, 0);
+
+ for (i = 0; i < vi->max_queue_pairs; i++)
+ virtnet_napi_enable(&vi->rq[i]);
+ }
+
+ netif_device_attach(vi->dev);
+
+ rtnl_lock();
+ virtnet_set_queues(vi, vi->curr_queue_pairs);
+ rtnl_unlock();
+}
+
static struct virtio_device_id id_table[] = {
{ VIRTIO_ID_NET, VIRTIO_DEV_ANY_ID },
{ 0 },
--
1.7.10.4
2020 Jun 05
2
[PATCH] virtio_net: Unregister and re-register xdp_rxq across freeze/restore
...if (err)
+ goto free_vqs;
+
virtnet_napi_enable(vi->rq[i].vq, &vi->rq[i].napi);
virtnet_napi_tx_enable(vi, vi->sq[i].vq,
&vi->sq[i].napi);
@@ -2340,6 +2355,12 @@ static int virtnet_restore_up(struct virtio_device *vdev)
netif_tx_lock_bh(vi->dev);
netif_device_attach(vi->dev);
netif_tx_unlock_bh(vi->dev);
+ return 0;
+
+free_vqs:
+ cancel_delayed_work_sync(&vi->refill);
+ free_receive_page_frags(vi);
+ virtnet_del_vqs(vi);
return err;
}
--
2.26.0
2020 Jun 05
2
[PATCH] virtio_net: Unregister and re-register xdp_rxq across freeze/restore
...if (err)
+ goto free_vqs;
+
virtnet_napi_enable(vi->rq[i].vq, &vi->rq[i].napi);
virtnet_napi_tx_enable(vi, vi->sq[i].vq,
&vi->sq[i].napi);
@@ -2340,6 +2355,12 @@ static int virtnet_restore_up(struct virtio_device *vdev)
netif_tx_lock_bh(vi->dev);
netif_device_attach(vi->dev);
netif_tx_unlock_bh(vi->dev);
+ return 0;
+
+free_vqs:
+ cancel_delayed_work_sync(&vi->refill);
+ free_receive_page_frags(vi);
+ virtnet_del_vqs(vi);
return err;
}
--
2.26.0
2015 Jun 25
3
[RFC] virtio_net: Adding tx_timeout function.
...FP_KERNEL))
> > + schedule_delayed_work(&vi->refill, 0);
> > +
> > + for (i = 0; i < vi->max_queue_pairs; i++)
> > + virtnet_napi_enable(&vi->rq[i]);
> > + }
> > +
> > + netif_device_attach(vi->dev);
> > +
> > + rtnl_lock();
> > + virtnet_set_queues(vi, vi->curr_queue_pairs);
> > + rtnl_unlock();
>
> Won't this lose a bunch of state, like mac addresses,
> multicast, rx mode, etc etc?
I will rebase this patch with the properly cha...
2015 Jun 25
3
[RFC] virtio_net: Adding tx_timeout function.
...FP_KERNEL))
> > + schedule_delayed_work(&vi->refill, 0);
> > +
> > + for (i = 0; i < vi->max_queue_pairs; i++)
> > + virtnet_napi_enable(&vi->rq[i]);
> > + }
> > +
> > + netif_device_attach(vi->dev);
> > +
> > + rtnl_lock();
> > + virtnet_set_queues(vi, vi->curr_queue_pairs);
> > + rtnl_unlock();
>
> Won't this lose a bunch of state, like mac addresses,
> multicast, rx mode, etc etc?
I will rebase this patch with the properly cha...
2015 Jul 02
1
[RFC] virtio_net: Adding tx_timeout function.
..._delayed_work(&vi->refill, 0);
> > > > +
> > > > + for (i = 0; i < vi->max_queue_pairs; i++)
> > > > + virtnet_napi_enable(&vi->rq[i]);
> > > > + }
> > > > +
> > > > + netif_device_attach(vi->dev);
> > > > +
> > > > + rtnl_lock();
> > > > + virtnet_set_queues(vi, vi->curr_queue_pairs);
> > > > + rtnl_unlock();
> > >
> > > Won't this lose a bunch of state, like mac addresses,
> > > multic...
2015 Jul 02
1
[RFC] virtio_net: Adding tx_timeout function.
..._delayed_work(&vi->refill, 0);
> > > > +
> > > > + for (i = 0; i < vi->max_queue_pairs; i++)
> > > > + virtnet_napi_enable(&vi->rq[i]);
> > > > + }
> > > > +
> > > > + netif_device_attach(vi->dev);
> > > > +
> > > > + rtnl_lock();
> > > > + virtnet_set_queues(vi, vi->curr_queue_pairs);
> > > > + rtnl_unlock();
> > >
> > > Won't this lose a bunch of state, like mac addresses,
> > > multic...
2016 Jun 02
1
[PATCH -next 2/2] virtio_net: Read the advised MTU
...i < vi->curr_queue_pairs; i++)
2039 if (!try_fill_recv(vi, &vi->rq[i], GFP_KERNEL))
2040 schedule_delayed_work(&vi->refill, 0);
2041
2042 for (i = 0; i < vi->max_queue_pairs; i++)
2043 virtnet_napi_enable(&vi->rq[i]);
2044 }
2045
2046 netif_device_attach(vi->dev);
2047
2048 rtnl_lock();
2049 virtnet_set_queues(vi, vi->curr_queue_pairs);
2050 rtnl_unlock();
2051
2052 err = register_hotcpu_notifier(&vi->nb);
2053 if (err)
2054 return err;
2055
2056 return 0;
2057 }
2058 #endif
2059
2060 static stru...
2016 Jun 02
1
[PATCH -next 2/2] virtio_net: Read the advised MTU
...i < vi->curr_queue_pairs; i++)
2039 if (!try_fill_recv(vi, &vi->rq[i], GFP_KERNEL))
2040 schedule_delayed_work(&vi->refill, 0);
2041
2042 for (i = 0; i < vi->max_queue_pairs; i++)
2043 virtnet_napi_enable(&vi->rq[i]);
2044 }
2045
2046 netif_device_attach(vi->dev);
2047
2048 rtnl_lock();
2049 virtnet_set_queues(vi, vi->curr_queue_pairs);
2050 rtnl_unlock();
2051
2052 err = register_hotcpu_notifier(&vi->nb);
2053 if (err)
2054 return err;
2055
2056 return 0;
2057 }
2058 #endif
2059
2060 static stru...
2013 Dec 30
1
[PATCH net] virtio-net: fix refill races during restore
...)
+ if (netif_running(vi->dev)) {
+ for (i = 0; i < vi->curr_queue_pairs; i++)
+ if (!try_fill_recv(&vi->rq[i], GFP_KERNEL))
+ schedule_delayed_work(&vi->refill, 0);
+
for (i = 0; i < vi->max_queue_pairs; i++)
virtnet_napi_enable(&vi->rq[i]);
+ }
netif_device_attach(vi->dev);
- for (i = 0; i < vi->curr_queue_pairs; i++)
- if (!try_fill_recv(&vi->rq[i], GFP_KERNEL))
- schedule_delayed_work(&vi->refill, 0);
-
mutex_lock(&vi->config_lock);
vi->config_enable = true;
mutex_unlock(&vi->config_lock);
--
1.8.3.2
2014 Oct 05
0
[PATCH 08/16] virtio_net: drop config_enable
...t;dev);
cancel_delayed_work_sync(&vi->refill);
@@ -1916,8 +1903,6 @@ static int virtnet_freeze(struct virtio_device *vdev)
remove_vq_common(vi);
- flush_work(&vi->config_work);
-
return 0;
}
@@ -1941,10 +1926,6 @@ static int virtnet_restore(struct virtio_device *vdev)
netif_device_attach(vi->dev);
- mutex_lock(&vi->config_lock);
- vi->config_enable = true;
- mutex_unlock(&vi->config_lock);
-
rtnl_lock();
virtnet_set_queues(vi, vi->curr_queue_pairs);
rtnl_unlock();
--
MST
2014 Oct 06
0
[PATCH v2 07/15] virtio_net: drop config_enable
...t;dev);
cancel_delayed_work_sync(&vi->refill);
@@ -1916,8 +1903,6 @@ static int virtnet_freeze(struct virtio_device *vdev)
remove_vq_common(vi);
- flush_work(&vi->config_work);
-
return 0;
}
@@ -1941,10 +1926,6 @@ static int virtnet_restore(struct virtio_device *vdev)
netif_device_attach(vi->dev);
- mutex_lock(&vi->config_lock);
- vi->config_enable = true;
- mutex_unlock(&vi->config_lock);
-
rtnl_lock();
virtnet_set_queues(vi, vi->curr_queue_pairs);
rtnl_unlock();
--
MST
2013 Dec 30
1
[PATCH net] virtio-net: fix refill races during restore
...)
+ if (netif_running(vi->dev)) {
+ for (i = 0; i < vi->curr_queue_pairs; i++)
+ if (!try_fill_recv(&vi->rq[i], GFP_KERNEL))
+ schedule_delayed_work(&vi->refill, 0);
+
for (i = 0; i < vi->max_queue_pairs; i++)
virtnet_napi_enable(&vi->rq[i]);
+ }
netif_device_attach(vi->dev);
- for (i = 0; i < vi->curr_queue_pairs; i++)
- if (!try_fill_recv(&vi->rq[i], GFP_KERNEL))
- schedule_delayed_work(&vi->refill, 0);
-
mutex_lock(&vi->config_lock);
vi->config_enable = true;
mutex_unlock(&vi->config_lock);
--
1.8.3.2
2014 Oct 14
4
[PATCH RFC] virtio_net: enable tx interrupt
...ry_fill_recv(&vi->rq[i], GFP_KERNEL))
schedule_delayed_work(&vi->refill, 0);
- for (i = 0; i < vi->max_queue_pairs; i++)
+ for (i = 0; i < vi->max_queue_pairs; i++) {
virtnet_napi_enable(&vi->rq[i]);
+ napi_enable(&vi->sq[i].napi);
+ }
}
netif_device_attach(vi->dev);
--
MST
2014 Oct 14
4
[PATCH RFC] virtio_net: enable tx interrupt
...ry_fill_recv(&vi->rq[i], GFP_KERNEL))
schedule_delayed_work(&vi->refill, 0);
- for (i = 0; i < vi->max_queue_pairs; i++)
+ for (i = 0; i < vi->max_queue_pairs; i++) {
virtnet_napi_enable(&vi->rq[i]);
+ napi_enable(&vi->sq[i].napi);
+ }
}
netif_device_attach(vi->dev);
--
MST