DENG Qingfang
2021-Aug-11 13:52 UTC
[Bridge] [PATCH net-next] net: bridge: switchdev: allow port isolation to be offloaded
Add BR_ISOLATED flag to BR_PORT_FLAGS_HW_OFFLOAD, to allow switchdev drivers to offload port isolation. Suggested-by: Vladimir Oltean <olteanv at gmail.com> Signed-off-by: DENG Qingfang <dqfext at gmail.com> --- net/bridge/br_switchdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/bridge/br_switchdev.c b/net/bridge/br_switchdev.c index 6bf518d78f02..898257153883 100644 --- a/net/bridge/br_switchdev.c +++ b/net/bridge/br_switchdev.c @@ -71,7 +71,8 @@ bool nbp_switchdev_allowed_egress(const struct net_bridge_port *p, /* Flags that can be offloaded to hardware */ #define BR_PORT_FLAGS_HW_OFFLOAD (BR_LEARNING | BR_FLOOD | \ - BR_MCAST_FLOOD | BR_BCAST_FLOOD) + BR_MCAST_FLOOD | BR_BCAST_FLOOD | \ + BR_ISOLATED) int br_switchdev_set_port_flag(struct net_bridge_port *p, unsigned long flags, -- 2.25.1
Ido Schimmel
2021-Aug-11 21:38 UTC
[Bridge] [PATCH net-next] net: bridge: switchdev: allow port isolation to be offloaded
On Wed, Aug 11, 2021 at 09:52:46PM +0800, DENG Qingfang wrote:> Add BR_ISOLATED flag to BR_PORT_FLAGS_HW_OFFLOAD, to allow switchdev > drivers to offload port isolation. > > Suggested-by: Vladimir Oltean <olteanv at gmail.com> > Signed-off-by: DENG Qingfang <dqfext at gmail.com> > --- > net/bridge/br_switchdev.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/net/bridge/br_switchdev.c b/net/bridge/br_switchdev.c > index 6bf518d78f02..898257153883 100644 > --- a/net/bridge/br_switchdev.c > +++ b/net/bridge/br_switchdev.c > @@ -71,7 +71,8 @@ bool nbp_switchdev_allowed_egress(const struct net_bridge_port *p, > > /* Flags that can be offloaded to hardware */ > #define BR_PORT_FLAGS_HW_OFFLOAD (BR_LEARNING | BR_FLOOD | \ > - BR_MCAST_FLOOD | BR_BCAST_FLOOD) > + BR_MCAST_FLOOD | BR_BCAST_FLOOD | \ > + BR_ISOLATED)Why add it now and not as part of a patchset that actually makes use of the flag in a driver that offloads port isolation?> > int br_switchdev_set_port_flag(struct net_bridge_port *p, > unsigned long flags, > -- > 2.25.1 >