From: Jesse Brandeburg <jesse.brandeburg@intel.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Tom Herbert <therbert@google.com>,
Linux Netdev List <netdev@vger.kernel.org>,
David Miller <davem@davemloft.net>,
alexander.h.duyck@intel.com
Subject: Re: Bug in computing data_len in tcp_sendmsg?
Date: Thu, 1 Dec 2011 09:29:50 -0800 [thread overview]
Message-ID: <20111201092950.00006ce8@unknown> (raw)
In-Reply-To: <1322730937.2335.6.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC>
On Thu, 1 Dec 2011 01:15:37 -0800
Eric Dumazet <eric.dumazet@gmail.com> wrote:
> Le mercredi 30 novembre 2011 à 21:09 -0800, Tom Herbert a écrit :
> > > We recently added commit f07d960df33c5aef
> > > (tcp: avoid frag allocation for small frames)
> >
> > Yes, reverting that patch seems to fix the problem. Eric, do you have
> > an idea what should be used to determine length of headers in an skb
> > now (mac through transport).
Tom, thanks very much for finding this subtle bug! I bet that this
commit (which I had missed) broke a lot of other drivers in
very subtle ways due to changing a long standing behavior. Auditing
every driver's tx path is going to be a lot of work unless a way can be
discovered to automate finding incorrect assumptions in drivers.
> I dont know why its even necessary :
>
> TSO enabled NIC all provide hardware counters, so why even bother
> computing tx_bytes ourself ?
because we have runtime logic for adjusting interrupt rate that depends
on knowing how many bytes and packets were cleaned up in an interrupt
and reading MMIO to get latest stats causes CPU stall in hot path.
Counting the bytes sent on the wire via a segmented SKB was hard to get
right to begin with, I think we took a different approach in ixgbe
(recent versions) and compute the math in hard_start_xmit instead of tx
cleanup.
> skb->len is appropriate for BQL, as long as producers/consumer use the
> same skb->len. 1 or 2% error is not a problem if not cumulative ?
if skb->len access doesn't cause a cache miss in hot path (or at
least doesn't increase misses) then I say sure.
next prev parent reply other threads:[~2011-12-01 17:29 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-01 1:48 Bug in computing data_len in tcp_sendmsg? Tom Herbert
2011-12-01 3:42 ` Eric Dumazet
2011-12-01 4:06 ` Tom Herbert
2011-12-01 4:16 ` David Miller
2011-12-01 4:17 ` Eric Dumazet
2011-12-01 5:09 ` Tom Herbert
2011-12-01 9:15 ` Eric Dumazet
2011-12-01 17:29 ` Jesse Brandeburg [this message]
2011-12-01 18:04 ` David Miller
2011-12-01 20:37 ` Eric Dumazet
2011-12-01 22:18 ` Vijay Subramanian
2011-12-01 22:30 ` Eric Dumazet
2011-12-02 6:18 ` Vijay Subramanian
2011-12-02 11:59 ` Eric Dumazet
2011-12-02 15:44 ` Eric Dumazet
2011-12-02 16:05 ` Eric Dumazet
2011-12-02 18:13 ` David Miller
2011-12-02 18:36 ` Eric Dumazet
2011-12-02 18:40 ` David Miller
2011-12-02 20:22 ` Eric Dumazet
2011-12-02 20:24 ` David Miller
2011-12-02 20:45 ` Eric Dumazet
2011-12-02 20:48 ` Eric Dumazet
2011-12-02 21:30 ` David Miller
2011-12-03 15:09 ` Eric Dumazet
2011-12-04 7:39 ` [PATCH] tcp: take care of misalignments Eric Dumazet
2011-12-04 18:21 ` David Miller
2011-12-04 18:51 ` Eric Dumazet
2011-12-05 23:45 ` David Miller
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=20111201092950.00006ce8@unknown \
--to=jesse.brandeburg@intel.com \
--cc=alexander.h.duyck@intel.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.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;
as well as URLs for NNTP newsgroup(s).