From: Prashant <prashant@broadcom.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>, <bpoirier@suse.de>,
<mchan@broadcom.com>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net v6 4/4] tg3: Fix tx_pending checks for tg3_tso_bug
Date: Wed, 1 Oct 2014 11:29:43 -0700 [thread overview]
Message-ID: <542C4817.60301@broadcom.com> (raw)
In-Reply-To: <1412137489.16704.26.camel@edumazet-glaptop2.roam.corp.google.com>
On 9/30/2014 9:24 PM, Eric Dumazet wrote:
> On Tue, 2014-09-30 at 20:14 -0700, Prashant wrote:
>
>> Sorry about the late reply, out of all the HW bug conditions checked in
>> tg3_tx_frag_set() the most frequently hit condition is the short 8 byte
>> dma bug, where the chip cannot handle TX descriptors whose data buffer
>> is 8 bytes or less. Most of the LSO skb's given to the driver has their
>> fragments filled upto PAGE_SIZE (expect the last fragment depending on
>> skb->len). And if such a LSO skb's last fragment meets the 8 bytes HW
>> bug condition the above routine will not help workaround this particular
>> case.
>
> Thats pretty easy to work around.
>
> Say rebuilt skb has N frags (N > 1 given your description)
>
> They are numbered 0, ... N-2, N-1
>
> Instead of filling N-2 completely, fill it to PAGE_SIZE-8, so that last
> frag has at least 8 bytes in it.
definitely it can be tweaked to match what is needed with additional
workarounds.
>
> Also take a look at commit 2e4e44107176d552f8bb1bb76053e850e3809841
> ("net: add alloc_skb_with_frags() helper")
>
>
This helper is much modular/flexible than the initial proposed one. Thanks.
>
prev parent reply other threads:[~2014-10-01 18:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-05 1:30 [PATCH net v6 0/4] tg3: tx_pending fixes Benjamin Poirier
2014-09-05 1:30 ` [PATCH net v6 1/4] tg3: Limit minimum tx queue wakeup threshold Benjamin Poirier
2014-09-05 1:30 ` [PATCH net v6 2/4] tg3: Fix tx_pending check for MAX_SKB_FRAGS Benjamin Poirier
2014-09-05 1:30 ` [PATCH net v6 3/4] tg3: Move tx queue stop logic to its own function Benjamin Poirier
2014-09-05 1:30 ` [PATCH net v6 4/4] tg3: Fix tx_pending checks for tg3_tso_bug Benjamin Poirier
2014-09-05 23:35 ` Prashant Sreedharan
2014-09-06 0:03 ` Eric Dumazet
2014-09-06 0:13 ` David Miller
2014-09-06 4:39 ` David Miller
2014-10-01 3:14 ` Prashant
2014-10-01 4:24 ` Eric Dumazet
2014-10-01 18:29 ` Prashant [this message]
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=542C4817.60301@broadcom.com \
--to=prashant@broadcom.com \
--cc=bpoirier@suse.de \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mchan@broadcom.com \
--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