Displaying 20 results from an estimated 34 matches for "virtqueue_napi_schedule".
2017 Dec 07
2
[PATCH net-next] virtio_net: Disable interrupts if napi_complete_done rescheduled napi
.../drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -261,9 +261,12 @@ static void virtqueue_napi_complete(struct napi_struct *napi,
int opaque;
opaque = virtqueue_enable_cb_prepare(vq);
- if (napi_complete_done(napi, processed) &&
- unlikely(virtqueue_poll(vq, opaque)))
- virtqueue_napi_schedule(napi, vq);
+ if (napi_complete_done(napi, processed)) {
+ if (unlikely(virtqueue_poll(vq, opaque)))
+ virtqueue_napi_schedule(napi, vq);
+ } else {
+ virtqueue_disable_cb(vq);
+ }
}
static void skb_xmit_done(struct virtqueue *vq)
--
1.8.3.1
2017 Dec 07
2
[PATCH net-next] virtio_net: Disable interrupts if napi_complete_done rescheduled napi
.../drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -261,9 +261,12 @@ static void virtqueue_napi_complete(struct napi_struct *napi,
int opaque;
opaque = virtqueue_enable_cb_prepare(vq);
- if (napi_complete_done(napi, processed) &&
- unlikely(virtqueue_poll(vq, opaque)))
- virtqueue_napi_schedule(napi, vq);
+ if (napi_complete_done(napi, processed)) {
+ if (unlikely(virtqueue_poll(vq, opaque)))
+ virtqueue_napi_schedule(napi, vq);
+ } else {
+ virtqueue_disable_cb(vq);
+ }
}
static void skb_xmit_done(struct virtqueue *vq)
--
1.8.3.1
2017 Dec 07
0
[PATCH net-next] virtio_net: Disable interrupts if napi_complete_done rescheduled napi
...vers/net/virtio_net.c
> @@ -261,9 +261,12 @@ static void virtqueue_napi_complete(struct napi_struct *napi,
> int opaque;
>
> opaque = virtqueue_enable_cb_prepare(vq);
> - if (napi_complete_done(napi, processed) &&
> - unlikely(virtqueue_poll(vq, opaque)))
> - virtqueue_napi_schedule(napi, vq);
> + if (napi_complete_done(napi, processed)) {
> + if (unlikely(virtqueue_poll(vq, opaque)))
> + virtqueue_napi_schedule(napi, vq);
> + } else {
> + virtqueue_disable_cb(vq);
> + }
> }
>
> static void skb_xmit_done(struct virtqueue *vq)
> --
> 1....
2017 Apr 02
5
[PATCH net-next 0/3] virtio-net tx napi
From: Willem de Bruijn <willemb at google.com>
Add napi for virtio-net transmit completion processing.
Based on previous patchsets by Jason Wang:
[RFC V7 PATCH 0/7] enable tx interrupts for virtio-net
http://lkml.iu.edu/hypermail/linux/kernel/1505.3/00245.html
Changes:
RFC -> v1:
- dropped vhost interrupt moderation patch:
not needed and likely expensive at light
2017 Apr 02
5
[PATCH net-next 0/3] virtio-net tx napi
From: Willem de Bruijn <willemb at google.com>
Add napi for virtio-net transmit completion processing.
Based on previous patchsets by Jason Wang:
[RFC V7 PATCH 0/7] enable tx interrupts for virtio-net
http://lkml.iu.edu/hypermail/linux/kernel/1505.3/00245.html
Changes:
RFC -> v1:
- dropped vhost interrupt moderation patch:
not needed and likely expensive at light
2017 Dec 07
1
[PATCH net-next] virtio_net: Disable interrupts if napi_complete_done rescheduled napi
...@@ -261,9 +261,12 @@ static void virtqueue_napi_complete(struct napi_struct *napi,
>> int opaque;
>>
>> opaque = virtqueue_enable_cb_prepare(vq);
>> - if (napi_complete_done(napi, processed) &&
>> - unlikely(virtqueue_poll(vq, opaque)))
>> - virtqueue_napi_schedule(napi, vq);
>> + if (napi_complete_done(napi, processed)) {
>> + if (unlikely(virtqueue_poll(vq, opaque)))
>> + virtqueue_napi_schedule(napi, vq);
>> + } else {
>> + virtqueue_disable_cb(vq);
>> + }
>> }
>>
>> static void skb_xmit_done...
2017 Dec 07
1
[PATCH net-next] virtio_net: Disable interrupts if napi_complete_done rescheduled napi
...@@ -261,9 +261,12 @@ static void virtqueue_napi_complete(struct napi_struct *napi,
>> int opaque;
>>
>> opaque = virtqueue_enable_cb_prepare(vq);
>> - if (napi_complete_done(napi, processed) &&
>> - unlikely(virtqueue_poll(vq, opaque)))
>> - virtqueue_napi_schedule(napi, vq);
>> + if (napi_complete_done(napi, processed)) {
>> + if (unlikely(virtqueue_poll(vq, opaque)))
>> + virtqueue_napi_schedule(napi, vq);
>> + } else {
>> + virtqueue_disable_cb(vq);
>> + }
>> }
>>
>> static void skb_xmit_done...
2017 Apr 18
8
[PATCH net-next v2 0/5] virtio-net tx napi
From: Willem de Bruijn <willemb at google.com>
Add napi for virtio-net transmit completion processing.
Changes:
v1 -> v2:
- disable by default
- disable unless affinity_hint_set
because cache misses add up to a third higher cycle cost,
e.g., in TCP_RR tests. This is not limited to the patch
that enables tx completion cleaning in rx napi.
- use trylock to
2017 Apr 18
8
[PATCH net-next v2 0/5] virtio-net tx napi
From: Willem de Bruijn <willemb at google.com>
Add napi for virtio-net transmit completion processing.
Changes:
v1 -> v2:
- disable by default
- disable unless affinity_hint_set
because cache misses add up to a third higher cycle cost,
e.g., in TCP_RR tests. This is not limited to the patch
that enables tx completion cleaning in rx napi.
- use trylock to
2017 Apr 24
8
[PATCH net-next v3 0/5] virtio-net tx napi
From: Willem de Bruijn <willemb at google.com>
Add napi for virtio-net transmit completion processing.
Changes:
v2 -> v3:
- convert __netif_tx_trylock to __netif_tx_lock on tx napi poll
ensure that the handler always cleans, to avoid deadlock
- unconditionally clean in start_xmit
avoid adding an unnecessary "if (use_napi)" branch
- remove
2017 Apr 24
8
[PATCH net-next v3 0/5] virtio-net tx napi
From: Willem de Bruijn <willemb at google.com>
Add napi for virtio-net transmit completion processing.
Changes:
v2 -> v3:
- convert __netif_tx_trylock to __netif_tx_lock on tx napi poll
ensure that the handler always cleans, to avoid deadlock
- unconditionally clean in start_xmit
avoid adding an unnecessary "if (use_napi)" branch
- remove
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
2023 Mar 08
3
[PATCH net, stable v1 0/3] 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.
v1:
1. rename to check_sq_full_and_disable
2. reorder some funcs to avoid declaration
Xuan Zhuo (3):
2023 May 24
1
[PATCH V3 net-next 1/2] virtio-net: convert rx mode setting to use workqueue
..._lock);
}
+static void enable_rx_mode_work(struct virtnet_info *vi)
+{
+ rtnl_lock();
+ vi->rx_mode_work_enabled = true;
+ rtnl_unlock();
+}
+
+static void disable_rx_mode_work(struct virtnet_info *vi)
+{
+ rtnl_lock();
+ vi->rx_mode_work_enabled = false;
+ rtnl_unlock();
+}
+
static void virtqueue_napi_schedule(struct napi_struct *napi,
struct virtqueue *vq)
{
@@ -2341,9 +2361,11 @@ static int virtnet_close(struct net_device *dev)
return 0;
}
-static void virtnet_set_rx_mode(struct net_device *dev)
+static void virtnet_rx_mode_work(struct work_struct *work)
{
- struct virtnet_info *vi = ne...
2020 Aug 02
0
[PATCH -next v2] virtio_net: Avoid loop in virtnet_poll
...acket, it will lead cpu usage(si) to 100%.
>
> call trace as below:
> virtnet_poll
> virtnet_receive
> virtqueue_get_buf_ctx
> virtqueue_get_buf_ctx_packed
> virtqueue_get_buf_ctx_split
> virtqueue_napi_complete
> virtqueue_poll //return true
> virtqueue_napi_schedule //it will reschedule napi
>
> To fix this, return false if vq is broken in virtqueue_poll.
>
> Signed-off-by: Mao Wenan <wenan.mao at linux.alibaba.com>
Looks good:
Acked-by: Michael S. Tsirkin <mst at redhat.com>
> ---
> v1->v2: fix it in virtqueue_poll sugges...
2020 Aug 02
0
[PATCH -next v2] virtio_net: Avoid loop in virtnet_poll
...acket, it will lead cpu usage(si) to 100%.
>
> call trace as below:
> virtnet_poll
> virtnet_receive
> virtqueue_get_buf_ctx
> virtqueue_get_buf_ctx_packed
> virtqueue_get_buf_ctx_split
> virtqueue_napi_complete
> virtqueue_poll //return true
> virtqueue_napi_schedule //it will reschedule napi
>
> To fix this, return false if vq is broken in virtqueue_poll.
>
> Signed-off-by: Mao Wenan <wenan.mao at linux.alibaba.com>
> ---
> v1->v2: fix it in virtqueue_poll suggested by Michael S. Tsirkin <mst at redhat.com>
> drivers/vir...
2020 Aug 04
0
[PATCH -next v3] virtio_ring: Avoid loop when vq is broken in virtqueue_poll
...packet, it will lead cpu usage(si) to 100%.
>
> call trace as below:
> virtnet_poll
> virtnet_receive
> virtqueue_get_buf_ctx
> virtqueue_get_buf_ctx_packed
> virtqueue_get_buf_ctx_split
> virtqueue_napi_complete
> virtqueue_poll //return true
> virtqueue_napi_schedule //it will reschedule napi
>
> to fix this, return false if vq is broken in virtqueue_poll.
>
> Signed-off-by: Mao Wenan <wenan.mao at linux.alibaba.com>
> Acked-by: Michael S. Tsirkin <mst at redhat.com>
> ---
> v2->v3: change subject, original is : "virti...
2020 Aug 20
0
[PATCH AUTOSEL 5.8 21/27] virtio_ring: Avoid loop when vq is broken in virtqueue_poll
...so virtnet_poll will reschedule napi to
receive packet, it will lead cpu usage(si) to 100%.
call trace as below:
virtnet_poll
virtnet_receive
virtqueue_get_buf_ctx
virtqueue_get_buf_ctx_packed
virtqueue_get_buf_ctx_split
virtqueue_napi_complete
virtqueue_poll //return true
virtqueue_napi_schedule //it will reschedule napi
to fix this, return false if vq is broken in virtqueue_poll.
Signed-off-by: Mao Wenan <wenan.mao at linux.alibaba.com>
Acked-by: Michael S. Tsirkin <mst at redhat.com>
Link: https://lore.kernel.org/r/1596354249-96204-1-git-send-email-wenan.mao at linux.alibab...
2020 Aug 20
0
[PATCH AUTOSEL 5.7 19/24] virtio_ring: Avoid loop when vq is broken in virtqueue_poll
...so virtnet_poll will reschedule napi to
receive packet, it will lead cpu usage(si) to 100%.
call trace as below:
virtnet_poll
virtnet_receive
virtqueue_get_buf_ctx
virtqueue_get_buf_ctx_packed
virtqueue_get_buf_ctx_split
virtqueue_napi_complete
virtqueue_poll //return true
virtqueue_napi_schedule //it will reschedule napi
to fix this, return false if vq is broken in virtqueue_poll.
Signed-off-by: Mao Wenan <wenan.mao at linux.alibaba.com>
Acked-by: Michael S. Tsirkin <mst at redhat.com>
Link: https://lore.kernel.org/r/1596354249-96204-1-git-send-email-wenan.mao at linux.alibab...
2020 Aug 20
0
[PATCH AUTOSEL 5.4 17/22] virtio_ring: Avoid loop when vq is broken in virtqueue_poll
...so virtnet_poll will reschedule napi to
receive packet, it will lead cpu usage(si) to 100%.
call trace as below:
virtnet_poll
virtnet_receive
virtqueue_get_buf_ctx
virtqueue_get_buf_ctx_packed
virtqueue_get_buf_ctx_split
virtqueue_napi_complete
virtqueue_poll //return true
virtqueue_napi_schedule //it will reschedule napi
to fix this, return false if vq is broken in virtqueue_poll.
Signed-off-by: Mao Wenan <wenan.mao at linux.alibaba.com>
Acked-by: Michael S. Tsirkin <mst at redhat.com>
Link: https://lore.kernel.org/r/1596354249-96204-1-git-send-email-wenan.mao at linux.alibab...