Re: [PATCH] atl1: disable TSO by default

From: David Miller
Date: Tue Aug 19 2008 - 18:59:33 EST


From: Jay Cliburn <jacliburn@xxxxxxxxxxxxx>
Date: Tue, 19 Aug 2008 17:53:34 -0500

> On Tue, 19 Aug 2008 23:10:37 +1000
> Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> wrote:
>
> > Jay Cliburn <jacliburn@xxxxxxxxxxxxx> wrote:
>
> > > netdev->features |= NETIF_F_LLTX;
> >
> > Another new driver using LLTX, this is not good when we're trying
> > to get rid of it.
>
> The atl1 driver was merged in the spring of 2007, so I'm not sure I
> consider it new (but your kernel development time horizon is undoubtedly
> *way* longer than mine, so you may indeed consider it new). It was
> basically a vendor driver that we modified to conform to kernel coding
> standards. It started life, we believe, as pretty much a clone of the
> e1000 driver circa 2005, so that's likely where it's use of LLTX
> came from.

You'll have to forgive us, as we often have a knee jerk reaction
to seeing LLTX anywhere :-)

> > Perhaps we could just kill it by ignoring the LLTX flag and always
> > grabbing the xmit lock. That should be safe as long as none of these
> > drivers grab the xmit lock within their private locks.
>
> I'd be happy to gin up a patch if you could point me to a driver that
> implements properly what you're asking.

TG3 is a good example, but that's just my heavily slanted opinion.

What your work should amount to is:

1) Eliminate local driver TX spinlock.

2) Stop taking #1 in ->hard_start_xmit()

3) Where you take #1 elsewhere, replace with netif_tx_lock()
and friends.

4) Stop setting NETIF_F_LLTX.

That should do it, but of course there are usually other details.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/