[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100528055154.GB2823@psychotron.redhat.com>
Date: Fri, 28 May 2010 07:51:55 +0200
From: Jiri Pirko <jpirko@...hat.com>
To: Stephen Hemminger <shemminger@...tta.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, kaber@...sh.net,
eric.dumazet@...il.com
Subject: Re: [PATCH net-next-2.6] net: replace hooks in __netif_receive_skb V2
Thu, May 27, 2010 at 10:08:22PM CEST, shemminger@...tta.com wrote:
>On Thu, 27 May 2010 20:08:24 +0200
>Jiri Pirko <jpirko@...hat.com> wrote:
>
>> changelog:
>> v1->v2
>> - writers are locked by rtnl_lock (removed unnecessary spinlock)
>> - using call_rcu in unregister
>> - nicer macvlan_port_create cleanup
>> - struct rx_hanler is made const in funtion parameters
>>
>> What this patch does is it removes two receive frame hooks (for bridge and for
>> macvlan) from __netif_receive_skb. These are replaced them with a general
>> list of rx_handlers which is iterated thru instead.
>>
>> Then a network driver (of virtual netdev like macvlan or bridge) can register
>> an rx_handler for needed net device.
>>
>> Signed-off-by: Jiri Pirko <jpirko@...hat.com>
>
>I wonder if we really need the chaining. What about allowing only one
>hook per device (and return -EBUSY)? That also gets rid of the allocation,
>and the extra overhead.
Hmm, that's a good question. I thought about it already. But I'm also wondering
if there is a possible scenario, when the chaining can be necessary. Also I do
not see any -significant- downside of having multiple handlers in a list, so I
would probably go this way now. Opinions?
>
>The handler hook, has to be export GPL, since we really don't want more
>network stack abuse by 3rd parties.
Noted, will be in the next patch version.
Jirka
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists