bridge: add new brport flag LEARNING_SYNC
authorScott Feldman <sfeldma@gmail.com>
Fri, 28 Nov 2014 13:34:23 +0000 (14:34 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 3 Dec 2014 04:01:23 +0000 (20:01 -0800)
This policy flag controls syncing of learned FDB entries to bridge's FDB.  If
on, FDB entries learned on bridge port device will be synced.  If off, device
may still learn new FDB entries but they will not be synced with bridge's FDB.

Signed-off-by: Scott Feldman <sfeldma@gmail.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Acked-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Acked-by: Andy Gospodarek <gospo@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/if_bridge.h
include/uapi/linux/if_link.h

index 2c81a8efd24d7254bb7e5f33056a7cf1997a7450..0a8ce762a47fded2031d83ec3535feaed062806a 100644 (file)
@@ -43,6 +43,7 @@ struct br_ip_list {
 #define BR_AUTO_MASK           (BR_FLOOD | BR_LEARNING)
 #define BR_PROMISC             BIT(7)
 #define BR_PROXYARP            BIT(8)
+#define BR_LEARNING_SYNC       BIT(9)
 
 extern void brioctl_set(int (*ioctl_hook)(struct net *, unsigned int, void __user *));
 
index 623f1a7c7627b94339946c924dee95de4e73e1eb..f7d0d2d7173aea9840ffe2a60d43021a9fed742a 100644 (file)
@@ -245,6 +245,7 @@ enum {
        IFLA_BRPORT_LEARNING,   /* mac learning */
        IFLA_BRPORT_UNICAST_FLOOD, /* flood unicast traffic */
        IFLA_BRPORT_PROXYARP,   /* proxy ARP */
+       IFLA_BRPORT_LEARNING_SYNC, /* mac learning sync from device */
        __IFLA_BRPORT_MAX
 };
 #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)