From: Eric Dumazet <eric.dumazet@gmail.com>
To: Alexander Duyck <alexander.h.duyck@intel.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
jeffrey.t.kirsher@intel.com, edumazet@google.com,
bhutchings@solarflare.com, therbert@google.com,
alexander.duyck@gmail.com
Subject: Re: [RFC PATCH 1/2] net: Add new network device function to allow for MMIO batching
Date: Fri, 13 Jul 2012 18:18:32 +0200 [thread overview]
Message-ID: <1342196312.3265.8476.camel@edumazet-glaptop> (raw)
In-Reply-To: <50004376.7060703@intel.com>
On Fri, 2012-07-13 at 08:49 -0700, Alexander Duyck wrote:
> On 07/13/2012 12:19 AM, Eric Dumazet wrote:
> > On Wed, 2012-07-11 at 17:26 -0700, Alexander Duyck wrote:
> >
> >> +static inline void netdev_complete_xmit(struct netdev_queue *txq)
> >> +{
> >> + struct net_device *dev = txq->dev;
> >> + const struct net_device_ops *ops = dev->netdev_ops;
> >> +
> >> + if (txq->dispatch_pending < txq->dispatch_limit) {
> >> + if (netif_tx_queue_delayed(txq)) {
> >> + txq->dispatch_pending++;
> >> + return;
> >> + }
> >> +
> >> + /* start of delayed write sequence */
> >> + netif_tx_delay_queue(txq);
> > I dont understand this part. Isnt a return missing here ?
> >
> >> + }
> >> +
> >> + txq->dispatch_pending = 0;
> >> +
> >> + ops->ndo_complete_xmit(dev, txq - &dev->_tx[0]);
> >> +}
> >> +
> >
> There is intentionally no return there. The idea is that the first
> packet always gets through. It is what is going to later force the
> interrupt that will force the final flush if it is needed. That is one
> of the ways I am helping to reduce the latency of things such as TSO
> which will only be using one or two frames per interrupt anyway.
So for a single packet, we only trigger TX softirq do do nothing at all,
or worse the ndo_complete_xmit() is done twice ?
It looks like you need to add comments, because if I dont understand
this code, who will ?
next prev parent reply other threads:[~2012-07-13 16:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-12 0:25 [RFC PATCH 0/2] Coalesce MMIO writes for transmits Alexander Duyck
2012-07-12 0:26 ` [RFC PATCH 1/2] net: Add new network device function to allow for MMIO batching Alexander Duyck
2012-07-12 7:14 ` Eric Dumazet
2012-07-12 15:39 ` Alexander Duyck
2012-07-13 7:38 ` Eric Dumazet
2012-07-13 15:37 ` Alexander Duyck
2012-07-13 15:50 ` Stephen Hemminger
2012-07-13 16:23 ` Eric Dumazet
2012-07-13 7:19 ` Eric Dumazet
2012-07-13 15:49 ` Alexander Duyck
2012-07-13 16:18 ` Eric Dumazet [this message]
2012-07-12 0:26 ` [RFC PATCH 2/2] ixgbe: Add functionality for delaying the MMIO write for Tx Alexander Duyck
2012-07-12 17:23 ` [RFC PATCH 0/2] Coalesce MMIO writes for transmits Stephen Hemminger
2012-07-12 19:01 ` Alexander Duyck
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=1342196312.3265.8476.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=alexander.duyck@gmail.com \
--cc=alexander.h.duyck@intel.com \
--cc=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=netdev@vger.kernel.org \
--cc=therbert@google.com \
/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