netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grygorii Strashko <grygorii.strashko@ti.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Ivan Vecera <ivecera@redhat.com>, Jiri Pirko <jiri@resnulli.us>,
	<netdev@vger.kernel.org>, <ivan.khoronzhuk@linaro.org>,
	<nsekhar@ti.com>, <francois.ozog@linaro.org>, <yogeshs@ti.com>,
	<spatton@ti.com>
Subject: Re: [PATCH 0/4] RFC CPSW switchdev mode
Date: Tue, 5 Jun 2018 17:45:49 -0500	[thread overview]
Message-ID: <06981861-01aa-90c8-9b30-68426cbef447@ti.com> (raw)
In-Reply-To: <20180603004937.GD14515@lunn.ch>

Hi Andrew,

Thanks a lot for you comments.

On 06/02/2018 07:49 PM, Andrew Lunn wrote:
> Hi Grygorii
> 
>> Don't know howto:
>> 1) add FDB entry with "blocked" flag - ALE can discard all packets with SRC/DST
>> address = blocked MAC
>> 2) add multicast MAC address with Supervisory Packet flag set.
>> Such packets will bypass most of checks inside ALE and will be forwarded in all port's
>> states except "disabled".
>> 3) add "unknown vlan configuration" : ALE provides possibility to configure
>> default behavior for tagged packets with "unknown vlan" by configuring
>> - Unknown VLAN Force Untagged Egress ports Mask.
>> - Unknown VLAN Registered Multicast Flood Ports Mask
>> - Unknown VLAN Multicast Flood ports Mask
>> - Unknown VLAN Member ports List
>> 4) The way to detect "brctl stp br0 on/off"
> 
> You are probably looking at this from the wrong direction. Yes, the
> switch can do these things. But the real question is, why would the
> network stack want to do this? As i've said before, you are
> accelerating the network stack by offloading things to the hardware.

Right. Thanks. 

> 
> Does the software bridge support FDB with a blocked flag? I don't
> think it does. So you first need to extend the software bridge with
> this concept. Then you can offload it to the hardware to accelerate
> it.

Sry, for possible misunderstanding: in "Don't know howto" i've listed
things I was not able to discover from code or documentation with hope
that expert opinion will help to confirm if this this a real/possible gap
or I/we've just missed smth. And if this is a real gap - get "green" or "red"
flag for future work (which need to be planned somehow). 

So, my understanding for (1) "blocked FDB entry support" is reasonable
extension for bridge/switchdev ("green").

> 
> Does the network stack need for forward specific multicast MAC
> addresses between bridge ports independent of the state? If there is
> no need for it, you don't need to accelerate it.

Assume this is about item 2 - this question is related to STP packets.
CPSW/ALE will drop STP packets if receiving port is in blocking/learning states 
unless corresponding  mcast entry exist in ALE entry with (Supervisory Packet) flag set
(Actually ALE mcast entry has two fields (TRM): 
Supervisory Packet (SUPER): When set, this field indicates that the packet
 with a matching multicast destination address is a supervisory packet.
Multicast Forward State (MCAST_FWD_STATE): Indicates the port state(s) required for the received port
on a destination address lookup in order for the multicast packet to be forwarded to
the transmit port(s). A transmit port must be in the Forwarding state in
order to forward the packet.)

Question 4 was asked with assumption that if (2) not supported and "red" flag
- then option (4) can be used as w/a (again if "green" flag) and STP mcast address
can be added in ALE on event "stp on".


** "unknown vlan configuration"

This is about following use case. Non static network configuration when
CPSW based device knows what traffic it can accept (Host port 0), but
it has no knowledge (or limited) about network segments attached to Port 1 and Port 2.

For example: Host 0 can accept only vlan 100 traffic coming from Port 1.
ALE entry: vid =100, port_mask 0x3

But there can be vlan 50 created in attached network segments.
Unknown VLAN Force Untagged Egress ports Mask = 0x0
Unknown VLAN Registered Multicast Flood Ports Mask = 0x6 (P1|P2)
Unknown VLAN Multicast Flood ports Mask = 0x6 (P1|P2)
Unknown VLAN Member ports List  = 0x6 (P1|P2)

with above configuration packets with "unknown vlan" (no ALE entry) will
still be forwarded between port 1 and 2, but not Port 0. 

So, is it reasonable to add "unknown vlan configuration" to bridge/switchdev
if not exist yet? will any other hw known benefit from it?

-- 
regards,
-grygorii

  reply	other threads:[~2018-06-05 22:46 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-24  6:56 [PATCH 0/4] RFC CPSW switchdev mode Ilias Apalodimas
2018-05-24  6:56 ` [PATCH 1/4] cpsw: move common headers definitions to cpsw_priv.h Ilias Apalodimas
2018-05-24  6:56 ` [PATCH 2/4] cpsw_ale: add support functions for switchdev Ilias Apalodimas
2018-05-24  6:56 ` [PATCH 3/4] cpsw_switchdev: add switchdev support files Ilias Apalodimas
2018-05-24 10:00   ` Maxim Uvarov
2018-05-27  4:39   ` kbuild test robot
2018-05-24  6:56 ` [PATCH 4/4] cpsw: add switchdev support Ilias Apalodimas
2018-05-24 13:12   ` Andrew Lunn
2018-05-24 13:32     ` Ilias Apalodimas
2018-05-24 16:39       ` Andrew Lunn
2018-05-25  4:56         ` Ilias Apalodimas
2018-06-01 21:48           ` Florian Fainelli
2018-06-02 10:34             ` Ilias Apalodimas
2018-06-02 16:10               ` Florian Fainelli
2018-06-02 16:52                 ` Ilias Apalodimas
2018-06-05 21:03               ` Grygorii Strashko
2018-06-05 21:37                 ` Florian Fainelli
2018-05-24  8:05 ` [PATCH 0/4] RFC CPSW switchdev mode Jiri Pirko
2018-05-24  8:48   ` Ilias Apalodimas
2018-05-24 12:54     ` Andrew Lunn
2018-05-24 13:44       ` Ivan Vecera
2018-05-24 14:08         ` Ilias Apalodimas
2018-05-24 14:54           ` Andrew Lunn
2018-05-24 15:07             ` Ilias Apalodimas
2018-05-24 15:25               ` Andrew Lunn
2018-05-24 16:02                 ` Ilias Apalodimas
2018-05-24 16:33                   ` Andrew Lunn
2018-05-25  6:29                     ` Ilias Apalodimas
2018-05-25 10:28                       ` Ilias Apalodimas
2018-05-25 11:59                         ` Andrew Lunn
2018-05-25 12:09                       ` Andrew Lunn
2018-05-31 15:27                         ` Ilias Apalodimas
2018-06-02 23:28           ` Grygorii Strashko
2018-06-03  0:08             ` Andrew Lunn
2018-06-05 21:18               ` Grygorii Strashko
2018-06-05 21:28                 ` Andrew Lunn
2018-06-05 21:42                   ` Grygorii Strashko
2018-06-05 21:55                     ` Andrew Lunn
2018-06-03  0:26             ` Andrew Lunn
2018-06-05 23:23               ` Grygorii Strashko
2018-06-05 23:49                 ` Andrew Lunn
2018-06-06  8:23                 ` Ivan Khoronzhuk
2018-06-03  0:37             ` Andrew Lunn
2018-06-05 21:31               ` Grygorii Strashko
2018-06-05 21:37                 ` Andrew Lunn
2018-06-03  0:49             ` Andrew Lunn
2018-06-05 22:45               ` Grygorii Strashko [this message]
2018-06-05 23:40                 ` Andrew Lunn
2018-06-01 21:29 ` Grygorii Strashko
2018-06-02 14:08   ` Andrew Lunn
2018-06-05 22:59     ` Grygorii Strashko
2018-06-05 23:53       ` Andrew Lunn
2018-06-06  6:42         ` Ilias Apalodimas

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=06981861-01aa-90c8-9b30-68426cbef447@ti.com \
    --to=grygorii.strashko@ti.com \
    --cc=andrew@lunn.ch \
    --cc=francois.ozog@linaro.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=ivan.khoronzhuk@linaro.org \
    --cc=ivecera@redhat.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=nsekhar@ti.com \
    --cc=spatton@ti.com \
    --cc=yogeshs@ti.com \
    /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).