netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: davem@davemloft.net, linux-omap@vger.kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	jiri@mellanox.com, andrew@lunn.ch
Subject: Re: [RFC PATCH net-next 2/5] net: 8021q: vlan_dev: add vid tag for uc and mc address lists
Date: Tue, 4 Dec 2018 11:49:27 -0800	[thread overview]
Message-ID: <756cbb25-3062-91e8-0613-66bb887f937e@gmail.com> (raw)
In-Reply-To: <20181204185720.GI23230@khorivan>

On 12/4/18 10:57 AM, Ivan Khoronzhuk wrote:
> On Mon, Dec 03, 2018 at 03:57:03PM -0800, Florian Fainelli wrote:
>> On 12/3/18 3:51 PM, Ivan Khoronzhuk wrote:
>>> On Mon, Dec 03, 2018 at 02:17:00PM -0800, Florian Fainelli wrote:
>>>> On 12/3/18 10:40 AM, Ivan Khoronzhuk wrote:
>>>>> Update vlan mc and uc addresses with VID tag while propagating address
>>>>> set to lower devices, do this only if address is not synched. It
>>>>> allows
>>>>> on end driver level to distinguish address belonging to vlans.
>>>>
>>>> Underlying driver for the real device would be able to properly
>>>> identify
>>>> that you are attempting to add an address to a virtual device, which
>>>> happens to be of VLAN kind so I am really not sure this is the right
>>>> approach here.
>>>>
>>>> From there, it seems to me that we have two situations:
>>>>
>>>> - each of your network devices expose VLAN devices directly on top of
>>>> the real device, in which case your driver should support
>>>> ndo_vlan_rx_add_vid and ndo_vlan_rx_kill_vid to know when VLAN devices
>>>> are create and maintain a VLAN device to VID correspondence if it needs
>>>> to when being called while setting the addresses
>>>>
>>>> - you are setting up a bridge that is VLAN aware on one of your bridge
>>>> ports, and there you can use switchdev to learn about such events and
>>>> know about both addresses as well as VIDs that must be programmed into
>>>> your real device
>>> No limits to have any "middle" device between real end device and
>>> virtual one, not only a bridge, but also other kind. And as it's generic
>>> change, it should cover all such cases, the simplest example is:
>>> real_dev/macvlan/vlan.
>>
>> It is not generic if the additional information is a VLAN ID, that
>> construct does not apply to all types of virtual devices, that is part
>> of my issue with the extra VID that is being added. If this was a void *
>> priv and any virtual device could pass up/down information that might be
>> more acceptable.
> 
> You mean to create smth like common struct pinned to "an address" and
> pass information not only like vid, but in parallel what ever user wanted.
> Even if pass vlan device pointer it still considered like an address
> continuation and same sync method is used w/o modification. And here vid
> is considered as part of address, by a big account address+vid it's a
> separate address, same happens with the pointer, address+pointer it's
> still separate address.

That depends on the HW implementation, some switches do individual VLAN
learning (IVL) and some do shared VLAN learning (SVL) so whether the VID
becomes part of the address resolution logic is HW dependent, obviously
the more capable, the better (IVL).

> 
> I was thinking also about pinned list of vlans to the address, but in
> this case this information also has to be synced by members of device
> chain,
> because it can be modified on any device level and it looks not very
> friendly,
> and at the end address space has addresses with pinned lists of vlans with
> their pointers. But keeping this stuff in sync is not simplest decision.
> 
> 

I really think we are not communicating properly, it really seems to me
that if you had the information about the upper device trying to add an
address to the lower device filter's either through notification or call
to ndo_set_rxmode, you could be solving your problems. What are we
missing here?
--
Florian

  reply	other threads:[~2018-12-04 19:49 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-03 18:40 [RFC PATCH net-next 0/5] net: allow hw addresses for virtual devices Ivan Khoronzhuk
2018-12-03 18:40 ` [RFC PATCH net-next 1/5] net: core: dev_addr_lists: add VID to device address space Ivan Khoronzhuk
2018-12-03 18:40 ` [RFC PATCH net-next 2/5] net: 8021q: vlan_dev: add vid tag for uc and mc address lists Ivan Khoronzhuk
2018-12-03 22:17   ` Florian Fainelli
2018-12-03 23:51     ` Ivan Khoronzhuk
2018-12-03 23:57       ` Florian Fainelli
2018-12-04  1:32         ` Ivan Khoronzhuk
2018-12-04 18:57         ` Ivan Khoronzhuk
2018-12-04 19:49           ` Florian Fainelli [this message]
2018-12-04 23:42             ` Ivan Khoronzhuk
2019-01-21 23:37               ` Florian Fainelli
2019-01-22 13:12                 ` Ivan Khoronzhuk
2019-02-13 16:17                   ` Ivan Khoronzhuk
2019-02-14  4:49                     ` Florian Fainelli
2019-02-14 13:03                       ` Ivan Khoronzhuk
2018-12-05  0:04             ` Ivan Khoronzhuk
2019-01-08  5:01               ` Florian Fainelli
2019-01-08 18:21                 ` Florian Fainelli
2019-01-22 14:15                   ` Ivan Khoronzhuk
2018-12-03 18:40 ` [RFC PATCH net-next 3/5] net: 8021q: vlan_dev: add vid tag for vlan device mac address Ivan Khoronzhuk
2018-12-03 18:40 ` [RFC PATCH net-next 4/5] net: ethernet: add default vid len for all ehternet kind devices Ivan Khoronzhuk
2018-12-03 18:40 ` [RFC PATCH net-next 5/5] net: ethernet: ti: cpsw: update mc vlan and add uc vlan support based on addr vids Ivan Khoronzhuk
2018-12-03 22:25 ` [RFC PATCH net-next 0/5] net: allow hw addresses for virtual devices Florian Fainelli
2018-12-04  1:15   ` Ivan Khoronzhuk

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=756cbb25-3062-91e8-0613-66bb887f937e@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --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;
as well as URLs for NNTP newsgroup(s).