]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
net: bridge: Add support for offloading of locked port flag
authorHans Schultz <schultz.hans@gmail.com>
Wed, 23 Feb 2022 10:16:47 +0000 (11:16 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 23 Feb 2022 12:52:34 +0000 (12:52 +0000)
Various switchcores support setting ports in locked mode, so that
clients behind locked ports cannot send traffic through the port
unless a fdb entry is added with the clients MAC address.

Signed-off-by: Hans Schultz <schultz.hans+netdev@gmail.com>
Acked-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_switchdev.c

index 59fcabd08ef1db89ebc918d5465a5be71e1764bc..6f6a70121a5e75306cfa5cbef786116b908f6cb9 100644 (file)
@@ -72,7 +72,7 @@ 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_PORT_LOCKED)
 
 int br_switchdev_set_port_flag(struct net_bridge_port *p,
                               unsigned long flags,