From: Florian Fainelli <f.fainelli@gmail.com>
To: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>,
davem@davemloft.net, grygorii.strashko@ti.com
Cc: linux-omap@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, jiri@mellanox.com,
ilias.apalodimas@linaro.org
Subject: Re: [PATCH net-next 0/6] net: add individual virtual device filtering
Date: Wed, 27 Feb 2019 16:23:29 -0800 [thread overview]
Message-ID: <7995609f-49b6-69ce-c798-963854fe6db9@gmail.com> (raw)
In-Reply-To: <20190226184556.16082-1-ivan.khoronzhuk@linaro.org>
Hi Ivan,
On 2/26/19 10:45 AM, Ivan Khoronzhuk wrote:
> One of the reasons of this proposition is safety and performance -
> host should not receive traffic which is not designated for it.
>
> Some network devices can hold separate address tables for vlans and
> real device, but for some reason there is no possibility to apply it
> with generic net addressing scheme easily. At this moment the fastest
> solution is to add mcast/ucast entries for every created vlan
> including real device. But it not only consumes forwarding table but
> also adds holes in the filtering and thus wastes cpus cycles.
>
> This patchseries tries to correct core to assign mcast and ucast
> addresses only for vlans that really require it and as result an end
> driver can exclusively and simply set its rx filters. As an example
> it's implemented on cpsw TI driver, but generic changes provided by
> this series can be reused by other ethernet drivers having similar
> rx filter address possibilities.
>
> An address+vid is considered as separate address. The reserved device
> address length is 32 Bytes, for ethernet devices it's additional
> opportunity to pass auxiliary address info, like virtual ID
> identifying a device the address belongs to. This series makes it
> possible at least for ETH_P_8021Q.
>
> Thus end real device can setup separate tables for virtual devices
> just retrieving VID from the address. A device address space can
> maintain addresses and references on them separately for each virtual
> device if it needs so, or only addresses for real device (and all its
> vlans) it holds usually.
>
> A vlan device can be in any place of device chain upper real device,
> say smth like rdevice/bonding/vlan or even rdevice/macvlan/vlan.
>
> This series is verified on TI am572x EVM that can hold separate tables
> for vlans. Potentially it can be easily extended to netcp driver for
> keystone 2 boards (including k2g) and also new am6 chipsets. As a
> simple test case, different combinations of vlan+macvlan, macvlan+vlan
> were used and tested as with unicast as multicast addresses.
>
> Based on net-next/master
Thanks a lot for posting this patch series, I will take a look later
tonight.
>
> It's continuation of RFC:
>
> [RFC PATCH net-next 0/5] net: allow hw addresses for virtual device
> https://lkml.org/lkml/2018/12/3/817
>
> Ivan Khoronzhuk (6):
> net: core: dev_addr_lists: add VID to device address
> net: 8021q: vlan_dev: add vid tag to addresses of uc and mc lists
> net: 8021q: vlan_dev: add vid tag for vlan device own address
> ethernet: eth: add default vid len for all ehternet kind devices
> net: ethernet: ti: cpsw: update mc filtering to use IVDF
> net: ethernet: ti: cpsw: add macvlan and ucast/vlan filtering support
>
> drivers/net/ethernet/ti/Kconfig | 1 +
> drivers/net/ethernet/ti/cpsw.c | 139 ++++++++++++--------------------
> include/linux/if_vlan.h | 2 +
> include/linux/netdevice.h | 4 +
> net/8021q/Kconfig | 12 +++
> net/8021q/vlan.c | 3 +
> net/8021q/vlan.h | 2 +
> net/8021q/vlan_core.c | 25 ++++++
> net/8021q/vlan_dev.c | 103 ++++++++++++++++++-----
> net/core/dev_addr_lists.c | 124 ++++++++++++++++++++++------
> net/ethernet/eth.c | 10 ++-
> 11 files changed, 292 insertions(+), 133 deletions(-)
>
--
Florian
prev parent reply other threads:[~2019-02-28 0:23 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-26 18:45 [PATCH net-next 0/6] net: add individual virtual device filtering Ivan Khoronzhuk
2019-02-26 18:45 ` [PATCH net-next 1/6] net: core: dev_addr_lists: add VID to device address Ivan Khoronzhuk
2019-02-28 4:24 ` Florian Fainelli
2019-03-01 12:21 ` Ivan Khoronzhuk
2019-02-26 18:45 ` [PATCH net-next 2/6] net: 8021q: vlan_dev: add vid tag to addresses of uc and mc lists Ivan Khoronzhuk
2019-02-28 4:09 ` Florian Fainelli
2019-03-01 12:24 ` Ivan Khoronzhuk
2019-03-02 3:19 ` Florian Fainelli
2019-02-26 18:45 ` [PATCH net-next 3/6] net: 8021q: vlan_dev: add vid tag for vlan device own address Ivan Khoronzhuk
2019-02-28 4:13 ` Florian Fainelli
2019-03-01 12:28 ` Ivan Khoronzhuk
2019-03-02 3:24 ` Florian Fainelli
2019-02-26 18:45 ` [PATCH net-next 4/6] ethernet: eth: add default vid len for all ehternet kind devices Ivan Khoronzhuk
2019-02-28 4:29 ` Florian Fainelli
2019-03-01 13:11 ` Ivan Khoronzhuk
2019-03-02 3:33 ` Florian Fainelli
2019-02-26 18:45 ` [PATCH net-next 5/6] net: ethernet: ti: cpsw: update mc filtering to use IVDF Ivan Khoronzhuk
2019-02-28 4:17 ` Florian Fainelli
2019-02-26 18:45 ` [PATCH net-next 6/6] net: ethernet: ti: cpsw: add macvlan and ucast/vlan filtering support Ivan Khoronzhuk
2019-02-28 0:23 ` Florian Fainelli [this message]
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=7995609f-49b6-69ce-c798-963854fe6db9@gmail.com \
--to=f.fainelli@gmail.com \
--cc=davem@davemloft.net \
--cc=grygorii.strashko@ti.com \
--cc=ilias.apalodimas@linaro.org \
--cc=ivan.khoronzhuk@linaro.org \
--cc=jiri@mellanox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--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