Thread (5 messages) 5 messages, 2 authors, 2014-11-06

Re: [PATCHv2 net-next 2/2] sunvnet: Use one Tx queue per vnet_port

From: Ben Hutchings <hidden>
Date: 2014-11-06 16:32:58

On Thu, 2014-11-06 at 11:28 -0500, Sowmini Varadhan wrote:
On (11/06/14 16:19), Ben Hutchings wrote:
quoted
quoted
+	txq = netdev_get_tx_queue(port->vp->dev, port->q_index);
+	__netif_tx_lock(txq, smp_processor_id());
+	if (likely(netif_tx_queue_stopped(txq))) {
+		struct vio_dring_state *dr;
+
+		dr = &port->vio.drings[VIO_DRIVER_TX_RING];
You seem to have dropped the condition for the netif_tx_wake_queue(),
which I would guess based on the old code should be:

		if (vnet_tx_dring_avail(dr) >= VNET_TX_WAKEUP_THRESH(dr))
quoted
+			netif_tx_wake_queue(txq);
yes, this was deliberate.

As I indicated in the comments:

/* Got back a STOPPED LDC message on port. If the queue is stopped,
 * wake it up so that we'll send out another START message at the
 * next TX.
 */

We only call maybe_tx_wakeup() if the peer has sent us a STOPPED
ack (meaning that the peer is no longer reading the descriptor rings).
So if our tx queue is full and stopped, we need to poke the peer
on the next TX with a start message. (otherwise we'd never wake up!)
OK, then the indentation of the following line is wrong.

Ben.

-- 
Ben Hutchings
Beware of programmers who carry screwdrivers. - Leonard Brandwein

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help