netdev
[Top] [All Lists]

Re: [PATCH] NETIF_F_LLTX for devices 2

To: hadi@xxxxxxxxxx
Subject: Re: [PATCH] NETIF_F_LLTX for devices 2
From: "David S. Miller" <davem@xxxxxxxxxxxxx>
Date: Sat, 11 Sep 2004 17:45:35 -0700
Cc: ak@xxxxxxx, herbert@xxxxxxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <1094933731.2343.109.camel@xxxxxxxxxxxxxxxx>
References: <20040908065152.GC27886@xxxxxxxxxxxxx> <E1C4wYe-0005qT-00@xxxxxxxxxxxxxxxxxxxxxxxx> <20040908072408.GI27886@xxxxxxxxxxxxx> <1094629677.1089.155.camel@xxxxxxxxxxxxxxxx> <20040908134713.1bcd46d3.davem@xxxxxxxxxxxxx> <1094823215.1121.129.camel@xxxxxxxxxxxxxxxx> <20040911142116.GL4431@xxxxxxxxxxxxx> <1094933731.2343.109.camel@xxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
On 11 Sep 2004 16:15:32 -0400
jamal <hadi@xxxxxxxxxx> wrote:

> If i was the one who had thought of the need for this new lock-riddance
> then i would have done it as follows:
> - have a devices xmit_lock as an alias to this other lock in case of
> NETIF_F_LLTX 
> Then you wouldnt have to touch this code. Infact if it is not too late
> why not do it like that?

If you turn dev->xmit_lock into a spinlock pointer, that would
incur much deeper changes across the tree than Andi's version
because there are a lot of xmit_lock explicit references out
there.

I think Andi made the right choice for his implementation.
And frankly I don't what is worrying about the
"-1" return value, it can occur in only one spot in a very
specific controlled case and it's behavior is incredibly well
defined (if not by accurate comments then by the code itself :-)

<Prev in Thread] Current Thread [Next in Thread>