net: bridge: move the switchdev object replay helpers to "push" mode
[linux-2.6-microblaze.git] / include / linux / if_bridge.h
index b651c5e..bbf6800 100644 (file)
@@ -70,9 +70,6 @@ bool br_multicast_has_querier_adjacent(struct net_device *dev, int proto);
 bool br_multicast_has_router_adjacent(struct net_device *dev, int proto);
 bool br_multicast_enabled(const struct net_device *dev);
 bool br_multicast_router(const struct net_device *dev);
-int br_mdb_replay(struct net_device *br_dev, struct net_device *dev,
-                 const void *ctx, bool adding, struct notifier_block *nb,
-                 struct netlink_ext_ack *extack);
 #else
 static inline int br_multicast_list_adjacent(struct net_device *dev,
                                             struct list_head *br_ip_list)
@@ -104,13 +101,6 @@ static inline bool br_multicast_router(const struct net_device *dev)
 {
        return false;
 }
-static inline int br_mdb_replay(const struct net_device *br_dev,
-                               const struct net_device *dev, const void *ctx,
-                               bool adding, struct notifier_block *nb,
-                               struct netlink_ext_ack *extack)
-{
-       return -EOPNOTSUPP;
-}
 #endif
 
 #if IS_ENABLED(CONFIG_BRIDGE) && IS_ENABLED(CONFIG_BRIDGE_VLAN_FILTERING)
@@ -120,9 +110,6 @@ int br_vlan_get_pvid_rcu(const struct net_device *dev, u16 *p_pvid);
 int br_vlan_get_proto(const struct net_device *dev, u16 *p_proto);
 int br_vlan_get_info(const struct net_device *dev, u16 vid,
                     struct bridge_vlan_info *p_vinfo);
-int br_vlan_replay(struct net_device *br_dev, struct net_device *dev,
-                  const void *ctx, bool adding, struct notifier_block *nb,
-                  struct netlink_ext_ack *extack);
 #else
 static inline bool br_vlan_enabled(const struct net_device *dev)
 {
@@ -149,14 +136,6 @@ static inline int br_vlan_get_info(const struct net_device *dev, u16 vid,
 {
        return -EINVAL;
 }
-
-static inline int br_vlan_replay(struct net_device *br_dev,
-                                struct net_device *dev, const void *ctx,
-                                bool adding, struct notifier_block *nb,
-                                struct netlink_ext_ack *extack)
-{
-       return -EOPNOTSUPP;
-}
 #endif
 
 #if IS_ENABLED(CONFIG_BRIDGE)
@@ -167,8 +146,6 @@ void br_fdb_clear_offload(const struct net_device *dev, u16 vid);
 bool br_port_flag_is_set(const struct net_device *dev, unsigned long flag);
 u8 br_port_get_stp_state(const struct net_device *dev);
 clock_t br_get_ageing_time(const struct net_device *br_dev);
-int br_fdb_replay(const struct net_device *br_dev, const struct net_device *dev,
-                 const void *ctx, bool adding, struct notifier_block *nb);
 #else
 static inline struct net_device *
 br_fdb_find_port(const struct net_device *br_dev,
@@ -197,12 +174,38 @@ static inline clock_t br_get_ageing_time(const struct net_device *br_dev)
 {
        return 0;
 }
+#endif
+
+#if IS_ENABLED(CONFIG_BRIDGE) && IS_ENABLED(CONFIG_NET_SWITCHDEV)
+
+int switchdev_bridge_port_offload(struct net_device *brport_dev,
+                                 struct net_device *dev, const void *ctx,
+                                 struct notifier_block *atomic_nb,
+                                 struct notifier_block *blocking_nb,
+                                 struct netlink_ext_ack *extack);
+void switchdev_bridge_port_unoffload(struct net_device *brport_dev,
+                                    const void *ctx,
+                                    struct notifier_block *atomic_nb,
+                                    struct notifier_block *blocking_nb);
+
+#else
+
+static inline int
+switchdev_bridge_port_offload(struct net_device *brport_dev,
+                             struct net_device *dev, const void *ctx,
+                             struct notifier_block *atomic_nb,
+                             struct notifier_block *blocking_nb,
+                             struct netlink_ext_ack *extack)
+{
+       return -EINVAL;
+}
 
-static inline int br_fdb_replay(const struct net_device *br_dev,
-                               const struct net_device *dev, const void *ctx,
-                               bool adding, struct notifier_block *nb)
+static inline void
+switchdev_bridge_port_unoffload(struct net_device *brport_dev,
+                               const void *ctx,
+                               struct notifier_block *atomic_nb,
+                               struct notifier_block *blocking_nb)
 {
-       return -EOPNOTSUPP;
 }
 #endif