From: "Nicolas de Pesloüan" <nicolas.2p.debian@gmail•com>
To: "Michał Mirosław" <mirqus@gmail•com>
Cc: Jiri Pirko <jpirko@redhat•com>,
Stephen Hemminger <shemminger@vyatta•com>,
netdev@vger•kernel.org, davem@davemloft•net, kaber@trash•net,
fubar@us•ibm.com, eric.dumazet@gmail•com, andy@greyhouse•net
Subject: Re: [RFC patch net-next-2.6] net: allow multiple rx_handler registration
Date: Fri, 01 Jul 2011 16:57:07 +0200 [thread overview]
Message-ID: <4E0DE043.4030701@gmail.com> (raw)
In-Reply-To: <BANLkTik6mj=8zvYPN-NNvHP-GPcTNHo31Q@mail.gmail.com>
Le 01/07/2011 08:36, Michał Mirosław a écrit :
> 2011/6/30 Jiri Pirko<jpirko@redhat•com>:
>> Thu, Jun 30, 2011 at 06:27:12PM CEST, shemminger@vyatta•com wrote:
>>> On Thu, 30 Jun 2011 17:16:49 +0200
>>> Jiri Pirko<jpirko@redhat•com> wrote:
>>>
>>>> For some net topos it is necessary to have multiple "soft-net-devices"
>>>> hooked on one netdev. For example very common is to have
>>>> eth<->(br+vlan). Vlan is not using rh_handler (yet) but also for example
>>>> macvlan would be useful to have hooked on same netdev as br.
>>>>
>>>> This patch introduces rx_handler list. size struct net_device stays
>>>> intact. Measured performance regression on eth-br topo is ~1% (on received
>>>> pkts generated by pktgen) and on eth-bond topo it is ~0.25%
>>>>
>>>> On br I think that the performance can be brought back maybe by using per-cpu
>>>> variables to store port in rx_path (I must check this)
>>>>
>>>> Please comment.
>>>>
>>>> Signed-off-by: Jiri Pirko<jpirko@redhat•com>
>>>
>>> I am ok with the infrastructure, but why should Vlan use rh_handle.
>>
>> Well why it shoudln't. It would fit into what rx_handler is here for - the
>> code would be more unified. Also net_device struct would lose struct
>> vlan_group __rcu *vlgrp pointer (and reducing net_device size is always
>> good thing).
>>
>>> It is wrong to allow macvlan and bridge to share same device.
>>> Right now the code blocks users from doing lots of stupid things.
>>
>> Right, this is since rx_handler was introduced. Before that all these
>> stupid configs were allowed. It's possible easily to forbid unwanted
>> configs by checking priv flags.
>
> We could introduce a catch-all macvlan/vlan device that would take
> addresses/VLANs which are not covered by other configured
> macvlans/vlans. This would allow clearer configuration and would make
> the evaluation order explicit. As a bonus, this will give another
> device to put tcpdump on. ;-)
'Sounds like what I had in mind in http://marc.info/?l=linux-netdev&m=130622112921245&w=2 .
Nicolas.
next prev parent reply other threads:[~2011-07-01 14:57 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-30 15:16 [RFC patch net-next-2.6] net: allow multiple rx_handler registration Jiri Pirko
2011-06-30 16:27 ` Stephen Hemminger
2011-06-30 17:22 ` Jiri Pirko
2011-06-30 17:29 ` Ben Greear
2011-06-30 17:32 ` Jiri Pirko
2011-07-01 6:36 ` Michał Mirosław
2011-07-01 14:57 ` Nicolas de Pesloüan [this message]
2011-07-01 15:00 ` Jiri Pirko
2011-07-01 15:01 ` Michał Mirosław
2011-07-01 16:45 ` Nicolas de Pesloüan
2011-07-01 16:49 ` Ben Greear
2011-07-01 16:58 ` Nicolas de Pesloüan
2011-07-01 17:08 ` David Lamparter
2011-07-01 17:50 ` Michał Mirosław
2011-06-30 18:13 ` Ben Greear
2011-06-30 18:28 ` Jiri Pirko
2011-06-30 18:53 ` Ben Greear
2011-06-30 19:50 ` Nicolas de Pesloüan
2011-07-01 5:45 ` Jiri Pirko
2011-07-01 16:55 ` David Lamparter
2011-07-01 12:48 ` Jiri Pirko
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=4E0DE043.4030701@gmail.com \
--to=nicolas.2p.debian@gmail$(echo .)com \
--cc=andy@greyhouse$(echo .)net \
--cc=davem@davemloft$(echo .)net \
--cc=eric.dumazet@gmail$(echo .)com \
--cc=fubar@us$(echo .)ibm.com \
--cc=jpirko@redhat$(echo .)com \
--cc=kaber@trash$(echo .)net \
--cc=mirqus@gmail$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=shemminger@vyatta$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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