Displaying 20 results from an estimated 62 matches for "netdev_tx_busy".
2009 May 29
2
[PATCH 2/4] virtio_net: return NETDEV_TX_BUSY instead of queueing an extra skb.
This effectively reverts 99ffc696d10b28580fe93441d627cf290ac4484c
"virtio: wean net driver off NETDEV_TX_BUSY".
The complexity of queuing an skb (setting a tasklet to re-xmit) is
questionable, especially once we get rid of the other reason for the
tasklet in the next patch.
If the skb won't fit in the tx queue, just return NETDEV_TX_BUSY. It
might be frowned upon, but it's common and not go...
2009 May 29
2
[PATCH 2/4] virtio_net: return NETDEV_TX_BUSY instead of queueing an extra skb.
This effectively reverts 99ffc696d10b28580fe93441d627cf290ac4484c
"virtio: wean net driver off NETDEV_TX_BUSY".
The complexity of queuing an skb (setting a tasklet to re-xmit) is
questionable, especially once we get rid of the other reason for the
tasklet in the next patch.
If the skb won't fit in the tx queue, just return NETDEV_TX_BUSY. It
might be frowned upon, but it's common and not go...
2015 Apr 03
0
[PATCH net-next] netdevice: document NETDEV_TX_BUSY deprecation.
This paraphrases DaveM (and steals some of his words) explaining why
a device shouldn't return NETDEV_TX_BUSY, even though it looks so inviting
to driver authors.
See http://www.spinics.net/lists/netdev/msg322350.html
Inspired-by: David Miller <davem at davemloft.net>
Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
in...
2008 Apr 18
0
virtio: wean net driver off NETDEV_TX_BUSY
Herbert tells me that returning NETDEV_TX_BUSY from hard_start_xmit is
seen as a poor thing to do; we should cache the packet and stop the queue.
Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
---
drivers/net/virtio_net.c | 57 +++++++++++++++++++++++++++++++----------------
1 file changed, 38 insertions(+), 19 deletions(-)...
2008 Apr 18
0
virtio: wean net driver off NETDEV_TX_BUSY
Herbert tells me that returning NETDEV_TX_BUSY from hard_start_xmit is
seen as a poor thing to do; we should cache the packet and stop the queue.
Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
---
drivers/net/virtio_net.c | 57 +++++++++++++++++++++++++++++++----------------
1 file changed, 38 insertions(+), 19 deletions(-)...
2015 Apr 02
3
[PATCH net-next] virtio: document queue state logic
...e).
- * Since most packets only take 1 or 2 ring slots
- * this means 16 slots are typically wasted.
+ /* If running out of space, stop queue to avoid getting packets that we
+ * are then unable to transmit.
+ * An alternative would be to force queuing layer to requeue the skb by
+ * returning NETDEV_TX_BUSY. However, NETDEV_TX_BUSY should not be
+ * returned in a normal path of operation: it means that driver is not
+ * maintaining the TX queue stop/start state properly, and causes
+ * the stack to do a non-trivial amount of useless work.
+ * Since most packets only take 1 or 2 ring slots, stoppin...
2015 Apr 02
3
[PATCH net-next] virtio: document queue state logic
...e).
- * Since most packets only take 1 or 2 ring slots
- * this means 16 slots are typically wasted.
+ /* If running out of space, stop queue to avoid getting packets that we
+ * are then unable to transmit.
+ * An alternative would be to force queuing layer to requeue the skb by
+ * returning NETDEV_TX_BUSY. However, NETDEV_TX_BUSY should not be
+ * returned in a normal path of operation: it means that driver is not
+ * maintaining the TX queue stop/start state properly, and causes
+ * the stack to do a non-trivial amount of useless work.
+ * Since most packets only take 1 or 2 ring slots, stoppin...
2023 Mar 08
0
[PATCH net, stable v1 3/3] virtio_net: add checking sq is full inside xdp xmit
...r_queue(vi, sq - vi->sq))
> >>> + check_sq_full_and_disable(vi, dev, sq);
> >>> +
> >>
> >> Sorry if I missed something obvious here.
> >>
> >> As the comment in start_xmit(), the current skb is added to the sq->vq, so
> >> NETDEV_TX_BUSY can not be returned.
> >>
> >> /* If running out of space, stop queue to avoid getting packets that we
> >> * are then unable to transmit.
> >> * An alternative would be to force queuing layer to requeue the skb by
> >> * returning NETDEV_TX_BUSY....
2008 Apr 28
3
[PATCH 1/4] virtio: wean net driver off NETDEV_TX_BUSY
Herbert tells me that returning NETDEV_TX_BUSY from hard_start_xmit is
seen as a poor thing to do; we should cache the packet and stop the queue.
Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
---
drivers/net/virtio_net.c | 58 ++++++++++++++++++++++++++++++++---------------
1 file changed, 40 insertions(+), 18 deletions(-)...
2008 Apr 28
3
[PATCH 1/4] virtio: wean net driver off NETDEV_TX_BUSY
Herbert tells me that returning NETDEV_TX_BUSY from hard_start_xmit is
seen as a poor thing to do; we should cache the packet and stop the queue.
Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
---
drivers/net/virtio_net.c | 58 ++++++++++++++++++++++++++++++++---------------
1 file changed, 40 insertions(+), 18 deletions(-)...
2015 Mar 24
3
[PATCH net-next] virtio: change comment in transmit
The original comment was not really informative or funny
as well as sexist. Replace it with a better explanation of
why the driver does stop and what the impacts are.
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
--- a/drivers/net/virtio_net.c 2015-03-24 15:20:25.174671000 -0700
+++ b/drivers/net/virtio_net.c 2015-03-24 16:17:28.478525333 -0700
@@ -939,8 +939,12 @@
2015 Mar 24
3
[PATCH net-next] virtio: change comment in transmit
The original comment was not really informative or funny
as well as sexist. Replace it with a better explanation of
why the driver does stop and what the impacts are.
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
--- a/drivers/net/virtio_net.c 2015-03-24 15:20:25.174671000 -0700
+++ b/drivers/net/virtio_net.c 2015-03-24 16:17:28.478525333 -0700
@@ -939,8 +939,12 @@
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):
2010 Jun 10
1
[PATCH for-2.6.35] virtio_net: fix oom handling on tx
...dev);
- goto again;
+ if (net_ratelimit()) {
+ if (likely(capacity == -ENOMEM))
+ dev_warn(&dev->dev,
+ "TX queue failure: out of memory\n");
+ else
+ dev_warn(&dev->dev,
+ "Unexpected TX queue failure: %d\n",
+ capacity);
}
return NETDEV_TX_BUSY;
}
--
1.7.1.12.g42b7f
2010 Jun 10
1
[PATCH for-2.6.35] virtio_net: fix oom handling on tx
...dev);
- goto again;
+ if (net_ratelimit()) {
+ if (likely(capacity == -ENOMEM))
+ dev_warn(&dev->dev,
+ "TX queue failure: out of memory\n");
+ else
+ dev_warn(&dev->dev,
+ "Unexpected TX queue failure: %d\n",
+ capacity);
}
return NETDEV_TX_BUSY;
}
--
1.7.1.12.g42b7f
2009 Oct 25
1
[PATCH] virtio-net: fix data corruption with OOM
...queueing new ones. */
free_old_xmit_skbs(vi);
- /* Put new one in send queue and do transmit */
- __skb_queue_head(&vi->send, skb);
+ /* Try to transmit */
capacity = xmit_skb(vi, skb);
/* This can happen with OOM and indirect buffers. */
@@ -532,8 +531,11 @@ again:
}
return NETDEV_TX_BUSY;
}
-
vi->svq->vq_ops->kick(vi->svq);
+
+ /* Put new one in send queue */
+ __skb_queue_head(&vi->send, skb);
+
/* Don't wait up for transmitted skbs to be freed. */
skb_orphan(skb);
nf_reset(skb);
--
1.6.5.rc2
2009 Oct 25
1
[PATCH] virtio-net: fix data corruption with OOM
...queueing new ones. */
free_old_xmit_skbs(vi);
- /* Put new one in send queue and do transmit */
- __skb_queue_head(&vi->send, skb);
+ /* Try to transmit */
capacity = xmit_skb(vi, skb);
/* This can happen with OOM and indirect buffers. */
@@ -532,8 +531,11 @@ again:
}
return NETDEV_TX_BUSY;
}
-
vi->svq->vq_ops->kick(vi->svq);
+
+ /* Put new one in send queue */
+ __skb_queue_head(&vi->send, skb);
+
/* Don't wait up for transmitted skbs to be freed. */
skb_orphan(skb);
nf_reset(skb);
--
1.6.5.rc2
2009 May 29
3
[PATCH 1/4] net: skb_orphan on dev_hard_start_xmit
...).
DaveM points out that there are advantages to doing it generally (it's
more likely to be on same CPU than after xmit), and I couldn't find
any new starvation issues in simple benchmarking here.
This patch adds skb_orphan to the start of dev_hard_start_xmit(): it
can be premature in the NETDEV_TX_BUSY case, but that's uncommon.
I removed the drivers' skb_orphan(), though it's harmless.
Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
Cc: Divy Le Ray <divy at chelsio.com>
Cc: Roland Dreier <rolandd at cisco.com>
Cc: Pavel Emelianov <xemul at openvz.org>...
2009 May 29
3
[PATCH 1/4] net: skb_orphan on dev_hard_start_xmit
...).
DaveM points out that there are advantages to doing it generally (it's
more likely to be on same CPU than after xmit), and I couldn't find
any new starvation issues in simple benchmarking here.
This patch adds skb_orphan to the start of dev_hard_start_xmit(): it
can be premature in the NETDEV_TX_BUSY case, but that's uncommon.
I removed the drivers' skb_orphan(), though it's harmless.
Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
Cc: Divy Le Ray <divy at chelsio.com>
Cc: Roland Dreier <rolandd at cisco.com>
Cc: Pavel Emelianov <xemul at openvz.org>...