netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sowmini Varadhan <sowmini.varadhan@oracle.com>
To: Ben Hutchings <ben@decadent.org.uk>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCHv2 net-next 2/2] sunvnet: Use one Tx queue per vnet_port
Date: Thu, 6 Nov 2014 11:28:22 -0500	[thread overview]
Message-ID: <20141106162822.GL15665@oracle.com> (raw)
In-Reply-To: <1415290773.3398.61.camel@decadent.org.uk>

On (11/06/14 16:19), Ben Hutchings wrote:
> > +	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))
> 
> > +			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!)

--Sowmini

  reply	other threads:[~2014-11-06 16:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-30 16:46 [PATCHv2 net-next 2/2] sunvnet: Use one Tx queue per vnet_port Sowmini Varadhan
2014-11-06 16:19 ` Ben Hutchings
2014-11-06 16:28   ` Sowmini Varadhan [this message]
2014-11-06 16:32     ` Ben Hutchings
2014-11-06 16:46       ` Sowmini Varadhan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141106162822.GL15665@oracle.com \
    --to=sowmini.varadhan@oracle.com \
    --cc=ben@decadent.org.uk \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).