[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190823123929.ta4ikozz7jwkwbo2@soft-dev3.microsemi.net>
Date: Fri, 23 Aug 2019 14:39:30 +0200
From: Horatiu Vultur <horatiu.vultur@...rochip.com>
To: Andrew Lunn <andrew@...n.ch>
CC: <roopa@...ulusnetworks.com>, <nikolay@...ulusnetworks.com>,
<davem@...emloft.net>, <UNGLinuxDriver@...rochip.com>,
<alexandre.belloni@...tlin.com>, <allan.nielsen@...rochip.com>,
<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<bridge@...ts.linux-foundation.org>
Subject: Re: [PATCH 1/3] net: Add HW_BRIDGE offload feature
The 08/22/2019 22:08, Andrew Lunn wrote:
> External E-Mail
>
>
> > +/* Determin if the SW bridge can be offloaded to HW. Return true if all
> > + * the interfaces of the bridge have the feature NETIF_F_HW_SWITCHDEV set
> > + * and have the same netdev_ops.
> > + */
>
> Hi Horatiu
>
> Why do you need these restrictions. The HW bridge should be able to
> learn that a destination MAC address can be reached via the SW
> bridge. The software bridge can then forward it out the correct
> interface.
>
> Or are you saying your hardware cannot learn from frames which come
> from the CPU?
>
> Andrew
>
Hi Andrew,
I do not believe that our HW can learn from frames which comes from the
CPU, at least not in the way they are injected today. But in case of Ocelot
(and the next chip we are working on), we have other issues in mixing with
foreign interfaces which is why we have the check in
ocelot_netdevice_dev_check.
More important, as we responded to Nikolay, we properly introduced this
restriction for the wrong reasons.
In SW bridge I will remove all these restrictions and only set ports in
promisc mode only if NETIF_F_HW_BRIDGE is not set.
Then in the network driver I can see if a foreign interface is added to
the bridge, and when that happens I can set the port in promisc mode.
Then the frames will be flooded to the SW bridge which eventually will
send to the foreign interface.
--
/Horatiu
Powered by blists - more mailing lists