From: Ben Hutchings <bhutchings@solarflare.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: <freddy@asix.com.tw>, <davem@davemloft.net>,
<netdev@vger.kernel.org>, <grundler@google.com>,
<linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<louis@asix.com.tw>, <allan@asix.com.tw>
Subject: Re: [PATCH 1/1] TX throttling bug-fixing patch of AX88179_178A
Date: Mon, 22 Jul 2013 18:11:15 +0100 [thread overview]
Message-ID: <1374513075.1635.14.camel@bwh-desktop.uk.level5networks.com> (raw)
In-Reply-To: <1374512879.4990.19.camel@edumazet-glaptop>
On Mon, 2013-07-22 at 10:07 -0700, Eric Dumazet wrote:
> On Sat, 2013-07-20 at 17:16 +0800, freddy@asix.com.tw wrote:
> > From: Freddy Xin <freddy@asix.com.tw>
> >
> > Disable TSO and SG network features in reset() and bind() functions,
> > and check the return value of skb_linearize() in tx_fixup() to prevent
> > TX throttling.
> >
> > Signed-off-by: Freddy Xin <freddy@asix.com.tw>
> > ---
> > drivers/net/usb/ax88179_178a.c | 8 +++++---
> > 1 file changed, 5 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c
> > index 1e3c302..eb71331 100644
> > --- a/drivers/net/usb/ax88179_178a.c
> > +++ b/drivers/net/usb/ax88179_178a.c
> > @@ -1029,7 +1029,7 @@ static int ax88179_bind(struct usbnet *dev, struct usb_interface *intf)
> > dev->mii.supports_gmii = 1;
> >
> > dev->net->features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
> > - NETIF_F_RXCSUM | NETIF_F_SG | NETIF_F_TSO;
> > + NETIF_F_RXCSUM;
> >
> > dev->net->hw_features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
> > NETIF_F_RXCSUM | NETIF_F_SG | NETIF_F_TSO;
> > @@ -1173,7 +1173,9 @@ ax88179_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags)
> > if (((skb->len + 8) % frame_size) == 0)
> > tx_hdr2 |= 0x80008000; /* Enable padding */
> >
> > - skb_linearize(skb);
> > + if (skb_linearize(skb))
> > + return NULL;
> > +
> >
>
> I guess that if a driver does not advertise NETIF_F_SG, this
> skb_linearize() call is not needed : All frames reaching your xmit
> function should already be linear
Look at the hw_features initialisation...
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
next prev parent reply other threads:[~2013-07-22 17:11 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-20 9:16 [PATCH 1/1] TX throttling bug-fixing patch of AX88179_178A freddy
2013-07-22 17:07 ` Eric Dumazet
2013-07-22 17:11 ` Ben Hutchings [this message]
2013-07-22 18:29 ` Grant Grundler
2013-07-22 18:38 ` Ben Hutchings
2013-07-22 18:47 ` Eric Dumazet
2013-07-22 19:47 ` Ben Hutchings
[not found] ` <1374522471.1635.48.camel-/LGg1Z1CJKQ+9kgCwbf1HqK4ta4zdZpAajtMo4Cw6ucAvxtiuMwx3w@public.gmane.org>
2013-07-23 6:10 ` Eric Dumazet
2013-07-23 23:46 ` David Miller
2013-07-23 23:56 ` Eric Dumazet
2013-07-24 0:05 ` Eric Dumazet
2013-07-24 0:15 ` [PATCH] usbnet: do not pretend to support SG/TSO Eric Dumazet
2013-07-26 20:48 ` David Miller
2013-07-24 0:17 ` [PATCH 1/1] TX throttling bug-fixing patch of AX88179_178A David Miller
2013-07-24 2:29 ` Grant Grundler
[not found] ` <CANEJEGtLavwdPdq_Qojz_x-DQ3KXfZp0vPYr6imKtNxN0Hf_2Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-07-24 2:32 ` Grant Grundler
2013-07-25 2:28 ` Ming Lei
2013-07-25 5:10 ` Eric Dumazet
2013-07-25 5:25 ` Ming Lei
[not found] ` <CACVXFVNyFk0Zpi4tC0ENiq8RcrtrjYW-Dhs+A56+Pw4BKm8y8A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-07-25 11:01 ` Eric Dumazet
2013-07-25 14:52 ` Ming Lei
2013-07-25 15:00 ` Ben Hutchings
[not found] ` <CACVXFVNre5SsJhaVqFNRcop7ahqxabWqHZkjBZccj1ZqOAUZ9A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-07-25 15:11 ` Eric Dumazet
2013-07-25 13:34 ` Ben Hutchings
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=1374513075.1635.14.camel@bwh-desktop.uk.level5networks.com \
--to=bhutchings@solarflare.com \
--cc=allan@asix.com.tw \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=freddy@asix.com.tw \
--cc=grundler@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=louis@asix.com.tw \
--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).