Lines Matching full:struct

58 typedef struct bridge_id bridge_id;
59 typedef struct mac_addr mac_addr;
62 struct bridge_id {
67 struct mac_addr {
73 struct bridge_mcast_own_query {
74 struct timer_list timer;
79 struct bridge_mcast_other_query {
80 struct timer_list timer;
81 struct timer_list delay_timer;
85 struct bridge_mcast_querier {
86 struct br_ip addr;
92 struct bridge_mcast_stats {
93 struct br_mcast_stats mstats;
94 struct u64_stats_sync syncp;
97 struct br_mdb_src_entry {
98 struct br_ip addr;
101 struct br_mdb_config {
102 struct net_bridge *br;
103 struct net_bridge_port *p;
104 struct br_mdb_entry *entry;
105 struct br_ip group;
109 struct br_mdb_src_entry *src_entries;
116 struct net_bridge_mcast_port {
118 struct net_bridge_port *port;
119 struct net_bridge_vlan *vlan;
121 struct bridge_mcast_own_query ip4_own_query;
122 struct timer_list ip4_mc_router_timer;
123 struct hlist_node ip4_rlist;
125 struct bridge_mcast_own_query ip6_own_query;
126 struct timer_list ip6_mc_router_timer;
127 struct hlist_node ip6_rlist;
136 struct net_bridge_mcast {
138 struct net_bridge *br;
139 struct net_bridge_vlan *vlan;
156 struct hlist_head ip4_mc_router_list;
157 struct timer_list ip4_mc_router_timer;
158 struct bridge_mcast_other_query ip4_other_query;
159 struct bridge_mcast_own_query ip4_own_query;
160 struct bridge_mcast_querier ip4_querier;
162 struct hlist_head ip6_mc_router_list;
163 struct timer_list ip6_mc_router_timer;
164 struct bridge_mcast_other_query ip6_other_query;
165 struct bridge_mcast_own_query ip6_own_query;
166 struct bridge_mcast_querier ip6_querier;
171 struct br_tunnel_info {
173 struct metadata_dst __rcu *tunnel_dst;
186 * struct net_bridge_vlan - per-vlan entry
195 * @br: if MASTER flag set, this points to a bridge struct
196 * @port: if MASTER flag unset, this points to a port struct
213 struct net_bridge_vlan {
214 struct rhash_head vnode;
215 struct rhash_head tnode;
220 struct pcpu_sw_netstats __percpu *stats;
222 struct net_bridge *br;
223 struct net_bridge_port *port;
227 struct net_bridge_vlan *brvlan;
230 struct br_tunnel_info tinfo;
233 struct net_bridge_mcast br_mcast_ctx;
234 struct net_bridge_mcast_port port_mcast_ctx;
239 struct list_head vlist;
241 struct rcu_head rcu;
245 * struct net_bridge_vlan_group
259 struct net_bridge_vlan_group {
260 struct rhashtable vlan_hash;
261 struct rhashtable tunnel_hash;
262 struct list_head vlan_list;
282 struct net_bridge_fdb_key {
287 struct net_bridge_fdb_entry {
288 struct rhash_head rhnode;
289 struct net_bridge_port *dst;
291 struct net_bridge_fdb_key key;
292 struct hlist_node fdb_node;
299 struct rcu_head rcu;
302 struct net_bridge_fdb_flush_desc {
322 struct net_bridge_mcast_gc {
323 struct hlist_node gc_node;
324 void (*destroy)(struct net_bridge_mcast_gc *gc);
327 struct net_bridge_group_src {
328 struct hlist_node node;
330 struct br_ip addr;
331 struct net_bridge_port_group *pg;
334 struct timer_list timer;
336 struct net_bridge *br;
337 struct net_bridge_mcast_gc mcast_gc;
338 struct rcu_head rcu;
341 struct net_bridge_port_group_sg_key {
342 struct net_bridge_port *port;
343 struct br_ip addr;
346 struct net_bridge_port_group {
347 struct net_bridge_port_group __rcu *next;
348 struct net_bridge_port_group_sg_key key;
355 struct hlist_head src_list;
357 struct timer_list timer;
358 struct timer_list rexmit_timer;
359 struct hlist_node mglist;
360 struct rb_root eht_set_tree;
361 struct rb_root eht_host_tree;
363 struct rhash_head rhnode;
364 struct net_bridge_mcast_gc mcast_gc;
365 struct rcu_head rcu;
368 struct net_bridge_mdb_entry {
369 struct rhash_head rhnode;
370 struct net_bridge *br;
371 struct net_bridge_port_group __rcu *ports;
372 struct br_ip addr;
375 struct timer_list timer;
376 struct hlist_node mdb_node;
378 struct net_bridge_mcast_gc mcast_gc;
379 struct rcu_head rcu;
382 struct net_bridge_port {
383 struct net_bridge *br;
384 struct net_device *dev;
386 struct list_head list;
390 struct net_bridge_vlan_group __rcu *vlgrp;
392 struct net_bridge_port __rcu *backup_port;
409 struct timer_list forward_delay_timer;
410 struct timer_list hold_timer;
411 struct timer_list message_age_timer;
412 struct kobject kobj;
413 struct rcu_head rcu;
415 struct net_bridge_mcast_port multicast_ctx;
418 struct bridge_mcast_stats __percpu *mcast_stats;
422 struct hlist_head mglist;
430 struct netpoll *np;
438 struct netdev_phys_item_id ppid;
443 struct bridge_stp_xstats stp_xstats;
446 #define kobj_to_brport(obj) container_of(obj, struct net_bridge_port, kobj)
451 static inline struct net_bridge_port *br_port_get_rcu(const struct net_device *dev) in br_port_get_rcu()
456 static inline struct net_bridge_port *br_port_get_rtnl(const struct net_device *dev) in br_port_get_rtnl()
462 static inline struct net_bridge_port *br_port_get_rtnl_rcu(const struct net_device *dev) in br_port_get_rtnl_rcu()
488 struct net_bridge {
491 struct hlist_head frame_type_list;
492 struct net_device *dev;
498 struct net_bridge_vlan_group __rcu *vlgrp;
501 struct rhashtable fdb_hash_tbl;
502 struct list_head port_list;
505 struct rtable fake_rtable;
506 struct rt6_info fake_rt6_info;
536 struct net_bridge_mcast multicast_ctx;
539 struct bridge_mcast_stats __percpu *mcast_stats;
545 struct rhashtable mdb_hash_tbl;
546 struct rhashtable sg_port_tbl;
548 struct hlist_head mcast_gc_list;
549 struct hlist_head mdb_list;
551 struct work_struct mcast_gc_work;
554 struct timer_list hello_timer;
555 struct timer_list tcn_timer;
556 struct timer_list topology_change_timer;
557 struct delayed_work gc_work;
558 struct kobject *ifobj;
572 struct hlist_head fdb_list;
575 struct hlist_head mrp_list;
578 struct hlist_head mep_list;
582 struct br_input_skb_cb {
583 struct net_device *brdev;
620 #define BR_INPUT_SKB_CB(__skb) ((struct br_input_skb_cb *)(__skb)->cb)
644 static inline int br_is_root_bridge(const struct net_bridge *br) in br_is_root_bridge()
650 static inline bool br_vlan_is_master(const struct net_bridge_vlan *v) in br_vlan_is_master()
656 static inline bool br_vlan_is_brentry(const struct net_bridge_vlan *v) in br_vlan_is_brentry()
662 static inline bool br_vlan_should_use(const struct net_bridge_vlan *v) in br_vlan_should_use()
674 static inline bool nbp_state_should_learn(const struct net_bridge_port *p) in nbp_state_should_learn()
679 static inline bool br_vlan_valid_id(u16 vid, struct netlink_ext_ack *extack) in br_vlan_valid_id()
689 static inline bool br_vlan_valid_range(const struct bridge_vlan_info *cur, in br_vlan_valid_range()
690 const struct bridge_vlan_info *last, in br_vlan_valid_range()
691 struct netlink_ext_ack *extack) in br_vlan_valid_range()
726 static inline u8 br_vlan_multicast_router(const struct net_bridge_vlan *v) in br_vlan_multicast_router()
752 static inline int br_opt_get(const struct net_bridge *br, in br_opt_get()
758 int br_boolopt_toggle(struct net_bridge *br, enum br_boolopt_id opt, bool on,
759 struct netlink_ext_ack *extack);
760 int br_boolopt_get(const struct net_bridge *br, enum br_boolopt_id opt);
761 int br_boolopt_multi_toggle(struct net_bridge *br,
762 struct br_boolopt_multi *bm,
763 struct netlink_ext_ack *extack);
764 void br_boolopt_multi_get(const struct net_bridge *br,
765 struct br_boolopt_multi *bm);
766 void br_opt_toggle(struct net_bridge *br, enum net_bridge_opts opt, bool on);
769 static inline void br_tc_skb_miss_set(struct sk_buff *skb, bool miss) in br_tc_skb_miss_set()
771 struct tc_skb_ext *ext; in br_tc_skb_miss_set()
789 static inline void br_tc_skb_miss_set(struct sk_buff *skb, bool miss) in br_tc_skb_miss_set()
795 void br_dev_setup(struct net_device *dev);
796 void br_dev_delete(struct net_device *dev, struct list_head *list);
797 netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev);
799 static inline void br_netpoll_send_skb(const struct net_bridge_port *p, in br_netpoll_send_skb()
800 struct sk_buff *skb) in br_netpoll_send_skb()
805 int br_netpoll_enable(struct net_bridge_port *p);
806 void br_netpoll_disable(struct net_bridge_port *p);
808 static inline void br_netpoll_send_skb(const struct net_bridge_port *p, in br_netpoll_send_skb()
809 struct sk_buff *skb) in br_netpoll_send_skb()
813 static inline int br_netpoll_enable(struct net_bridge_port *p) in br_netpoll_enable()
818 static inline void br_netpoll_disable(struct net_bridge_port *p) in br_netpoll_disable()
831 int br_fdb_hash_init(struct net_bridge *br);
832 void br_fdb_hash_fini(struct net_bridge *br);
833 void br_fdb_flush(struct net_bridge *br,
834 const struct net_bridge_fdb_flush_desc *desc);
835 void br_fdb_find_delete_local(struct net_bridge *br,
836 const struct net_bridge_port *p,
838 void br_fdb_changeaddr(struct net_bridge_port *p, const unsigned char *newaddr);
839 void br_fdb_change_mac_address(struct net_bridge *br, const u8 *newaddr);
840 void br_fdb_cleanup(struct work_struct *work);
841 void br_fdb_delete_by_port(struct net_bridge *br,
842 const struct net_bridge_port *p, u16 vid, int do_all);
843 struct net_bridge_fdb_entry *br_fdb_find_rcu(struct net_bridge *br,
846 int br_fdb_test_addr(struct net_device *dev, unsigned char *addr);
847 int br_fdb_fillbuf(struct net_bridge *br, void *buf, unsigned long count,
849 int br_fdb_add_local(struct net_bridge *br, struct net_bridge_port *source,
851 void br_fdb_update(struct net_bridge *br, struct net_bridge_port *source,
854 int br_fdb_delete(struct ndmsg *ndm, struct nlattr *tb[],
855 struct net_device *dev, const unsigned char *addr, u16 vid,
856 struct netlink_ext_ack *extack);
857 int br_fdb_delete_bulk(struct nlmsghdr *nlh, struct net_device *dev,
858 struct netlink_ext_ack *extack);
859 int br_fdb_add(struct ndmsg *nlh, struct nlattr *tb[], struct net_device *dev,
861 struct netlink_ext_ack *extack);
862 int br_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb,
863 struct net_device *dev, struct net_device *fdev, int *idx);
864 int br_fdb_get(struct sk_buff *skb, struct nlattr *tb[], struct net_device *dev,
866 struct netlink_ext_ack *extack);
867 int br_fdb_sync_static(struct net_bridge *br, struct net_bridge_port *p);
868 void br_fdb_unsync_static(struct net_bridge *br, struct net_bridge_port *p);
869 int br_fdb_external_learn_add(struct net_bridge *br, struct net_bridge_port *p,
872 int br_fdb_external_learn_del(struct net_bridge *br, struct net_bridge_port *p,
875 void br_fdb_offloaded_set(struct net_bridge *br, struct net_bridge_port *p,
884 int br_dev_queue_push_xmit(struct net *net, struct sock *sk, struct sk_buff *skb);
885 void br_forward(const struct net_bridge_port *to, struct sk_buff *skb,
887 int br_forward_finish(struct net *net, struct sock *sk, struct sk_buff *skb);
888 void br_flood(struct net_bridge *br, struct sk_buff *skb,
893 static inline bool br_skb_isolated(const struct net_bridge_port *to, in br_skb_isolated()
894 const struct sk_buff *skb) in br_skb_isolated()
901 void br_port_carrier_check(struct net_bridge_port *p, bool *notified);
902 int br_add_bridge(struct net *net, const char *name);
903 int br_del_bridge(struct net *net, const char *name);
904 int br_add_if(struct net_bridge *br, struct net_device *dev,
905 struct netlink_ext_ack *extack);
906 int br_del_if(struct net_bridge *br, struct net_device *dev);
907 void br_mtu_auto_adjust(struct net_bridge *br);
908 netdev_features_t br_features_recompute(struct net_bridge *br,
910 void br_port_flags_change(struct net_bridge_port *port, unsigned long mask);
911 void br_manage_promisc(struct net_bridge *br);
912 int nbp_backup_change(struct net_bridge_port *p, struct net_device *backup_dev);
915 int br_handle_frame_finish(struct net *net, struct sock *sk, struct sk_buff *skb);
916 rx_handler_func_t *br_get_rx_handler(const struct net_device *dev);
918 struct br_frame_type {
920 int (*frame_handler)(struct net_bridge_port *port,
921 struct sk_buff *skb);
922 struct hlist_node list;
925 void br_add_frame(struct net_bridge *br, struct br_frame_type *ft);
926 void br_del_frame(struct net_bridge *br, struct br_frame_type *ft);
928 static inline bool br_rx_handler_check_rcu(const struct net_device *dev) in br_rx_handler_check_rcu()
933 static inline bool br_rx_handler_check_rtnl(const struct net_device *dev) in br_rx_handler_check_rtnl()
938 static inline struct net_bridge_port *br_port_get_check_rcu(const struct net_device *dev) in br_port_get_check_rcu()
943 static inline struct net_bridge_port *
944 br_port_get_check_rtnl(const struct net_device *dev) in br_port_get_check_rtnl()
950 int br_dev_siocdevprivate(struct net_device *dev, struct ifreq *rq,
952 int br_ioctl_stub(struct net *net, struct net_bridge *br, unsigned int cmd,
953 struct ifreq *ifr, void __user *uarg);
957 int br_multicast_rcv(struct net_bridge_mcast **brmctx,
958 struct net_bridge_mcast_port **pmctx,
959 struct net_bridge_vlan *vlan,
960 struct sk_buff *skb, u16 vid);
961 struct net_bridge_mdb_entry *
962 br_mdb_entry_skb_get(struct net_bridge_mcast *brmctx, struct sk_buff *skb,
964 int br_multicast_add_port(struct net_bridge_port *port);
965 void br_multicast_del_port(struct net_bridge_port *port);
966 void br_multicast_enable_port(struct net_bridge_port *port);
967 void br_multicast_disable_port(struct net_bridge_port *port);
968 void br_multicast_init(struct net_bridge *br);
969 void br_multicast_join_snoopers(struct net_bridge *br);
970 void br_multicast_leave_snoopers(struct net_bridge *br);
971 void br_multicast_open(struct net_bridge *br);
972 void br_multicast_stop(struct net_bridge *br);
973 void br_multicast_dev_del(struct net_bridge *br);
974 void br_multicast_flood(struct net_bridge_mdb_entry *mdst, struct sk_buff *skb,
975 struct net_bridge_mcast *brmctx,
977 int br_multicast_set_router(struct net_bridge_mcast *brmctx, unsigned long val);
978 int br_multicast_set_port_router(struct net_bridge_mcast_port *pmctx,
980 int br_multicast_set_vlan_router(struct net_bridge_vlan *v, u8 mcast_router);
981 int br_multicast_toggle(struct net_bridge *br, unsigned long val,
982 struct netlink_ext_ack *extack);
983 int br_multicast_set_querier(struct net_bridge_mcast *brmctx, unsigned long val);
984 int br_multicast_set_igmp_version(struct net_bridge_mcast *brmctx,
987 int br_multicast_set_mld_version(struct net_bridge_mcast *brmctx,
990 struct net_bridge_mdb_entry *
991 br_mdb_ip_get(struct net_bridge *br, struct br_ip *dst);
992 struct net_bridge_mdb_entry *
993 br_multicast_new_group(struct net_bridge *br, struct br_ip *group);
994 struct net_bridge_port_group *
995 br_multicast_new_port_group(struct net_bridge_port *port,
996 const struct br_ip *group,
997 struct net_bridge_port_group __rcu *next,
1000 struct netlink_ext_ack *extack);
1001 void br_multicast_del_port_group(struct net_bridge_port_group *p);
1002 int br_mdb_hash_init(struct net_bridge *br);
1003 void br_mdb_hash_fini(struct net_bridge *br);
1004 void br_mdb_notify(struct net_device *dev, struct net_bridge_mdb_entry *mp,
1005 struct net_bridge_port_group *pg, int type);
1006 void br_rtr_notify(struct net_device *dev, struct net_bridge_mcast_port *pmctx,
1008 void br_multicast_del_pg(struct net_bridge_mdb_entry *mp,
1009 struct net_bridge_port_group *pg,
1010 struct net_bridge_port_group __rcu **pp);
1011 void br_multicast_count(struct net_bridge *br,
1012 const struct net_bridge_port *p,
1013 const struct sk_buff *skb, u8 type, u8 dir);
1014 int br_multicast_init_stats(struct net_bridge *br);
1015 void br_multicast_uninit_stats(struct net_bridge *br);
1016 void br_multicast_get_stats(const struct net_bridge *br,
1017 const struct net_bridge_port *p,
1018 struct br_mcast_stats *dest);
1019 u32 br_multicast_ngroups_get(const struct net_bridge_mcast_port *pmctx);
1020 void br_multicast_ngroups_set_max(struct net_bridge_mcast_port *pmctx, u32 max);
1021 u32 br_multicast_ngroups_get_max(const struct net_bridge_mcast_port *pmctx);
1022 int br_mdb_add(struct net_device *dev, struct nlattr *tb[], u16 nlmsg_flags,
1023 struct netlink_ext_ack *extack);
1024 int br_mdb_del(struct net_device *dev, struct nlattr *tb[],
1025 struct netlink_ext_ack *extack);
1026 int br_mdb_del_bulk(struct net_device *dev, struct nlattr *tb[],
1027 struct netlink_ext_ack *extack);
1028 int br_mdb_dump(struct net_device *dev, struct sk_buff *skb,
1029 struct netlink_callback *cb);
1030 int br_mdb_get(struct net_device *dev, struct nlattr *tb[], u32 portid, u32 seq,
1031 struct netlink_ext_ack *extack);
1032 void br_multicast_host_join(const struct net_bridge_mcast *brmctx,
1033 struct net_bridge_mdb_entry *mp, bool notify);
1034 void br_multicast_host_leave(struct net_bridge_mdb_entry *mp, bool notify);
1035 void br_multicast_star_g_handle_mode(struct net_bridge_port_group *pg,
1037 void br_multicast_sg_add_exclude_ports(struct net_bridge_mdb_entry *star_mp,
1038 struct net_bridge_port_group *sg);
1039 struct net_bridge_group_src *
1040 br_multicast_find_group_src(struct net_bridge_port_group *pg, struct br_ip *ip);
1041 struct net_bridge_group_src *
1042 br_multicast_new_group_src(struct net_bridge_port_group *pg,
1043 struct br_ip *src_ip);
1044 void __br_multicast_del_group_src(struct net_bridge_group_src *src);
1045 void br_multicast_del_group_src(struct net_bridge_group_src *src,
1047 void br_multicast_ctx_init(struct net_bridge *br,
1048 struct net_bridge_vlan *vlan,
1049 struct net_bridge_mcast *brmctx);
1050 void br_multicast_ctx_deinit(struct net_bridge_mcast *brmctx);
1051 void br_multicast_port_ctx_init(struct net_bridge_port *port,
1052 struct net_bridge_vlan *vlan,
1053 struct net_bridge_mcast_port *pmctx);
1054 void br_multicast_port_ctx_deinit(struct net_bridge_mcast_port *pmctx);
1055 void br_multicast_toggle_one_vlan(struct net_bridge_vlan *vlan, bool on);
1056 int br_multicast_toggle_vlan_snooping(struct net_bridge *br, bool on,
1057 struct netlink_ext_ack *extack);
1058 bool br_multicast_toggle_global_vlan(struct net_bridge_vlan *vlan, bool on);
1060 int br_rports_fill_info(struct sk_buff *skb,
1061 const struct net_bridge_mcast *brmctx);
1062 int br_multicast_dump_querier_state(struct sk_buff *skb,
1063 const struct net_bridge_mcast *brmctx,
1066 size_t br_rports_size(const struct net_bridge_mcast *brmctx);
1067 void br_multicast_set_query_intvl(struct net_bridge_mcast *brmctx,
1069 void br_multicast_set_startup_query_intvl(struct net_bridge_mcast *brmctx,
1072 static inline bool br_group_is_l2(const struct br_ip *group) in br_group_is_l2()
1080 static inline struct hlist_node *
1081 br_multicast_get_first_rport_node(struct net_bridge_mcast *brmctx, in br_multicast_get_first_rport_node()
1082 struct sk_buff *skb) in br_multicast_get_first_rport_node()
1091 static inline struct net_bridge_port *
1092 br_multicast_rport_from_node_skb(struct hlist_node *rp, struct sk_buff *skb) in br_multicast_rport_from_node_skb()
1094 struct net_bridge_mcast_port *mctx; in br_multicast_rport_from_node_skb()
1098 mctx = hlist_entry_safe(rp, struct net_bridge_mcast_port, in br_multicast_rport_from_node_skb()
1102 mctx = hlist_entry_safe(rp, struct net_bridge_mcast_port, in br_multicast_rport_from_node_skb()
1111 static inline bool br_ip4_multicast_is_router(struct net_bridge_mcast *brmctx) in br_ip4_multicast_is_router()
1116 static inline bool br_ip6_multicast_is_router(struct net_bridge_mcast *brmctx) in br_ip6_multicast_is_router()
1126 br_multicast_is_router(struct net_bridge_mcast *brmctx, struct sk_buff *skb) in br_multicast_is_router()
1148 __br_multicast_querier_exists(struct net_bridge_mcast *brmctx, in __br_multicast_querier_exists()
1149 struct bridge_mcast_other_query *querier, in __br_multicast_querier_exists()
1167 static inline bool br_multicast_querier_exists(struct net_bridge_mcast *brmctx, in br_multicast_querier_exists()
1168 struct ethhdr *eth, in br_multicast_querier_exists()
1169 const struct net_bridge_mdb_entry *mdb) in br_multicast_querier_exists()
1185 static inline bool br_multicast_is_star_g(const struct br_ip *ip) in br_multicast_is_star_g()
1200 br_multicast_should_handle_mode(const struct net_bridge_mcast *brmctx, in br_multicast_should_handle_mode()
1215 static inline int br_multicast_igmp_type(const struct sk_buff *skb) in br_multicast_igmp_type()
1220 static inline unsigned long br_multicast_lmqt(const struct net_bridge_mcast *brmctx) in br_multicast_lmqt()
1226 static inline unsigned long br_multicast_gmi(const struct net_bridge_mcast *brmctx) in br_multicast_gmi()
1232 br_multicast_ctx_is_vlan(const struct net_bridge_mcast *brmctx) in br_multicast_ctx_is_vlan()
1238 br_multicast_port_ctx_is_vlan(const struct net_bridge_mcast_port *pmctx) in br_multicast_port_ctx_is_vlan()
1243 static inline struct net_bridge_mcast *
1244 br_multicast_port_ctx_get_global(const struct net_bridge_mcast_port *pmctx) in br_multicast_port_ctx_get_global()
1253 br_multicast_ctx_vlan_global_disabled(const struct net_bridge_mcast *brmctx) in br_multicast_ctx_vlan_global_disabled()
1261 br_multicast_ctx_vlan_disabled(const struct net_bridge_mcast *brmctx) in br_multicast_ctx_vlan_disabled()
1268 br_multicast_port_ctx_vlan_disabled(const struct net_bridge_mcast_port *pmctx) in br_multicast_port_ctx_vlan_disabled()
1275 br_multicast_port_ctx_state_disabled(const struct net_bridge_mcast_port *pmctx) in br_multicast_port_ctx_state_disabled()
1284 br_multicast_port_ctx_state_stopped(const struct net_bridge_mcast_port *pmctx) in br_multicast_port_ctx_state_stopped()
1293 br_rports_have_mc_router(const struct net_bridge_mcast *brmctx) in br_rports_have_mc_router()
1304 br_multicast_ctx_options_equal(const struct net_bridge_mcast *brmctx1, in br_multicast_ctx_options_equal()
1305 const struct net_bridge_mcast *brmctx2) in br_multicast_ctx_options_equal()
1337 br_multicast_ctx_matches_vlan_snooping(const struct net_bridge_mcast *brmctx) in br_multicast_ctx_matches_vlan_snooping()
1347 static inline int br_multicast_rcv(struct net_bridge_mcast **brmctx, in br_multicast_rcv()
1348 struct net_bridge_mcast_port **pmctx, in br_multicast_rcv()
1349 struct net_bridge_vlan *vlan, in br_multicast_rcv()
1350 struct sk_buff *skb, in br_multicast_rcv()
1356 static inline struct net_bridge_mdb_entry *
1357 br_mdb_entry_skb_get(struct net_bridge_mcast *brmctx, struct sk_buff *skb, in br_mdb_entry_skb_get()
1363 static inline int br_multicast_add_port(struct net_bridge_port *port) in br_multicast_add_port()
1368 static inline void br_multicast_del_port(struct net_bridge_port *port) in br_multicast_del_port()
1372 static inline void br_multicast_enable_port(struct net_bridge_port *port) in br_multicast_enable_port()
1376 static inline void br_multicast_disable_port(struct net_bridge_port *port) in br_multicast_disable_port()
1380 static inline void br_multicast_init(struct net_bridge *br) in br_multicast_init()
1384 static inline void br_multicast_join_snoopers(struct net_bridge *br) in br_multicast_join_snoopers()
1388 static inline void br_multicast_leave_snoopers(struct net_bridge *br) in br_multicast_leave_snoopers()
1392 static inline void br_multicast_open(struct net_bridge *br) in br_multicast_open()
1396 static inline void br_multicast_stop(struct net_bridge *br) in br_multicast_stop()
1400 static inline void br_multicast_dev_del(struct net_bridge *br) in br_multicast_dev_del()
1404 static inline void br_multicast_flood(struct net_bridge_mdb_entry *mdst, in br_multicast_flood()
1405 struct sk_buff *skb, in br_multicast_flood()
1406 struct net_bridge_mcast *brmctx, in br_multicast_flood()
1411 static inline bool br_multicast_is_router(struct net_bridge_mcast *brmctx, in br_multicast_is_router()
1412 struct sk_buff *skb) in br_multicast_is_router()
1417 static inline bool br_multicast_querier_exists(struct net_bridge_mcast *brmctx, in br_multicast_querier_exists()
1418 struct ethhdr *eth, in br_multicast_querier_exists()
1419 const struct net_bridge_mdb_entry *mdb) in br_multicast_querier_exists()
1424 static inline int br_mdb_add(struct net_device *dev, struct nlattr *tb[], in br_mdb_add()
1425 u16 nlmsg_flags, struct netlink_ext_ack *extack) in br_mdb_add()
1430 static inline int br_mdb_del(struct net_device *dev, struct nlattr *tb[], in br_mdb_del()
1431 struct netlink_ext_ack *extack) in br_mdb_del()
1436 static inline int br_mdb_del_bulk(struct net_device *dev, struct nlattr *tb[], in br_mdb_del_bulk()
1437 struct netlink_ext_ack *extack) in br_mdb_del_bulk()
1442 static inline int br_mdb_dump(struct net_device *dev, struct sk_buff *skb, in br_mdb_dump()
1443 struct netlink_callback *cb) in br_mdb_dump()
1448 static inline int br_mdb_get(struct net_device *dev, struct nlattr *tb[], in br_mdb_get()
1450 struct netlink_ext_ack *extack) in br_mdb_get()
1455 static inline int br_mdb_hash_init(struct net_bridge *br) in br_mdb_hash_init()
1460 static inline void br_mdb_hash_fini(struct net_bridge *br) in br_mdb_hash_fini()
1464 static inline void br_multicast_count(struct net_bridge *br, in br_multicast_count()
1465 const struct net_bridge_port *p, in br_multicast_count()
1466 const struct sk_buff *skb, in br_multicast_count()
1471 static inline int br_multicast_init_stats(struct net_bridge *br) in br_multicast_init_stats()
1476 static inline void br_multicast_uninit_stats(struct net_bridge *br) in br_multicast_uninit_stats()
1480 static inline int br_multicast_igmp_type(const struct sk_buff *skb) in br_multicast_igmp_type()
1485 static inline void br_multicast_ctx_init(struct net_bridge *br, in br_multicast_ctx_init()
1486 struct net_bridge_vlan *vlan, in br_multicast_ctx_init()
1487 struct net_bridge_mcast *brmctx) in br_multicast_ctx_init()
1491 static inline void br_multicast_ctx_deinit(struct net_bridge_mcast *brmctx) in br_multicast_ctx_deinit()
1495 static inline void br_multicast_port_ctx_init(struct net_bridge_port *port, in br_multicast_port_ctx_init()
1496 struct net_bridge_vlan *vlan, in br_multicast_port_ctx_init()
1497 struct net_bridge_mcast_port *pmctx) in br_multicast_port_ctx_init()
1501 static inline void br_multicast_port_ctx_deinit(struct net_bridge_mcast_port *pmctx) in br_multicast_port_ctx_deinit()
1505 static inline void br_multicast_toggle_one_vlan(struct net_bridge_vlan *vlan, in br_multicast_toggle_one_vlan()
1510 static inline int br_multicast_toggle_vlan_snooping(struct net_bridge *br, in br_multicast_toggle_vlan_snooping()
1512 struct netlink_ext_ack *extack) in br_multicast_toggle_vlan_snooping()
1517 static inline bool br_multicast_toggle_global_vlan(struct net_bridge_vlan *vlan, in br_multicast_toggle_global_vlan()
1524 br_multicast_ctx_options_equal(const struct net_bridge_mcast *brmctx1, in br_multicast_ctx_options_equal()
1525 const struct net_bridge_mcast *brmctx2) in br_multicast_ctx_options_equal()
1533 bool br_allowed_ingress(const struct net_bridge *br,
1534 struct net_bridge_vlan_group *vg, struct sk_buff *skb,
1536 struct net_bridge_vlan **vlan);
1537 bool br_allowed_egress(struct net_bridge_vlan_group *vg,
1538 const struct sk_buff *skb);
1539 bool br_should_learn(struct net_bridge_port *p, struct sk_buff *skb, u16 *vid);
1540 struct sk_buff *br_handle_vlan(struct net_bridge *br,
1541 const struct net_bridge_port *port,
1542 struct net_bridge_vlan_group *vg,
1543 struct sk_buff *skb);
1544 int br_vlan_add(struct net_bridge *br, u16 vid, u16 flags,
1545 bool *changed, struct netlink_ext_ack *extack);
1546 int br_vlan_delete(struct net_bridge *br, u16 vid);
1547 void br_vlan_flush(struct net_bridge *br);
1548 struct net_bridge_vlan *br_vlan_find(struct net_bridge_vlan_group *vg, u16 vid);
1549 void br_recalculate_fwd_mask(struct net_bridge *br);
1550 int br_vlan_filter_toggle(struct net_bridge *br, unsigned long val,
1551 struct netlink_ext_ack *extack);
1552 int __br_vlan_set_proto(struct net_bridge *br, __be16 proto,
1553 struct netlink_ext_ack *extack);
1554 int br_vlan_set_proto(struct net_bridge *br, unsigned long val,
1555 struct netlink_ext_ack *extack);
1556 int br_vlan_set_stats(struct net_bridge *br, unsigned long val);
1557 int br_vlan_set_stats_per_port(struct net_bridge *br, unsigned long val);
1558 int br_vlan_init(struct net_bridge *br);
1559 int br_vlan_set_default_pvid(struct net_bridge *br, unsigned long val,
1560 struct netlink_ext_ack *extack);
1561 int __br_vlan_set_default_pvid(struct net_bridge *br, u16 pvid,
1562 struct netlink_ext_ack *extack);
1563 int nbp_vlan_add(struct net_bridge_port *port, u16 vid, u16 flags,
1564 bool *changed, struct netlink_ext_ack *extack);
1565 int nbp_vlan_delete(struct net_bridge_port *port, u16 vid);
1566 void nbp_vlan_flush(struct net_bridge_port *port);
1567 int nbp_vlan_init(struct net_bridge_port *port, struct netlink_ext_ack *extack);
1568 int nbp_get_num_vlan_infos(struct net_bridge_port *p, u32 filter_mask);
1569 void br_vlan_get_stats(const struct net_bridge_vlan *v,
1570 struct pcpu_sw_netstats *stats);
1571 void br_vlan_port_event(struct net_bridge_port *p, unsigned long event);
1572 int br_vlan_bridge_event(struct net_device *dev, unsigned long event,
1576 void br_vlan_notify(const struct net_bridge *br,
1577 const struct net_bridge_port *p,
1580 bool br_vlan_can_enter_range(const struct net_bridge_vlan *v_curr,
1581 const struct net_bridge_vlan *range_end);
1583 void br_vlan_fill_forward_path_pvid(struct net_bridge *br,
1584 struct net_device_path_ctx *ctx,
1585 struct net_device_path *path);
1586 int br_vlan_fill_forward_path_mode(struct net_bridge *br,
1587 struct net_bridge_port *dst,
1588 struct net_device_path *path);
1590 static inline struct net_bridge_vlan_group *br_vlan_group( in br_vlan_group()
1591 const struct net_bridge *br) in br_vlan_group()
1596 static inline struct net_bridge_vlan_group *nbp_vlan_group( in nbp_vlan_group()
1597 const struct net_bridge_port *p) in nbp_vlan_group()
1602 static inline struct net_bridge_vlan_group *br_vlan_group_rcu( in br_vlan_group_rcu()
1603 const struct net_bridge *br) in br_vlan_group_rcu()
1608 static inline struct net_bridge_vlan_group *nbp_vlan_group_rcu( in nbp_vlan_group_rcu()
1609 const struct net_bridge_port *p) in nbp_vlan_group_rcu()
1617 static inline int br_vlan_get_tag(const struct sk_buff *skb, u16 *vid) in br_vlan_get_tag()
1631 static inline u16 br_get_pvid(const struct net_bridge_vlan_group *vg) in br_get_pvid()
1640 static inline u16 br_vlan_flags(const struct net_bridge_vlan *v, u16 pvid) in br_vlan_flags()
1645 static inline bool br_allowed_ingress(const struct net_bridge *br, in br_allowed_ingress()
1646 struct net_bridge_vlan_group *vg, in br_allowed_ingress()
1647 struct sk_buff *skb, in br_allowed_ingress()
1649 struct net_bridge_vlan **vlan) in br_allowed_ingress()
1656 static inline bool br_allowed_egress(struct net_bridge_vlan_group *vg, in br_allowed_egress()
1657 const struct sk_buff *skb) in br_allowed_egress()
1662 static inline bool br_should_learn(struct net_bridge_port *p, in br_should_learn()
1663 struct sk_buff *skb, u16 *vid) in br_should_learn()
1668 static inline struct sk_buff *br_handle_vlan(struct net_bridge *br, in br_handle_vlan()
1669 const struct net_bridge_port *port, in br_handle_vlan()
1670 struct net_bridge_vlan_group *vg, in br_handle_vlan()
1671 struct sk_buff *skb) in br_handle_vlan()
1676 static inline int br_vlan_add(struct net_bridge *br, u16 vid, u16 flags, in br_vlan_add()
1677 bool *changed, struct netlink_ext_ack *extack) in br_vlan_add()
1683 static inline int br_vlan_delete(struct net_bridge *br, u16 vid) in br_vlan_delete()
1688 static inline void br_vlan_flush(struct net_bridge *br) in br_vlan_flush()
1692 static inline void br_recalculate_fwd_mask(struct net_bridge *br) in br_recalculate_fwd_mask()
1696 static inline int br_vlan_init(struct net_bridge *br) in br_vlan_init()
1701 static inline int nbp_vlan_add(struct net_bridge_port *port, u16 vid, u16 flags, in nbp_vlan_add()
1702 bool *changed, struct netlink_ext_ack *extack) in nbp_vlan_add()
1708 static inline int nbp_vlan_delete(struct net_bridge_port *port, u16 vid) in nbp_vlan_delete()
1713 static inline void nbp_vlan_flush(struct net_bridge_port *port) in nbp_vlan_flush()
1717 static inline struct net_bridge_vlan *br_vlan_find(struct net_bridge_vlan_group *vg, in br_vlan_find()
1723 static inline int nbp_vlan_init(struct net_bridge_port *port, in nbp_vlan_init()
1724 struct netlink_ext_ack *extack) in nbp_vlan_init()
1729 static inline u16 br_vlan_get_tag(const struct sk_buff *skb, u16 *tag) in br_vlan_get_tag()
1734 static inline u16 br_get_pvid(const struct net_bridge_vlan_group *vg) in br_get_pvid()
1739 static inline int br_vlan_filter_toggle(struct net_bridge *br, in br_vlan_filter_toggle()
1741 struct netlink_ext_ack *extack) in br_vlan_filter_toggle()
1746 static inline int nbp_get_num_vlan_infos(struct net_bridge_port *p, in nbp_get_num_vlan_infos()
1752 static inline void br_vlan_fill_forward_path_pvid(struct net_bridge *br, in br_vlan_fill_forward_path_pvid()
1753 struct net_device_path_ctx *ctx, in br_vlan_fill_forward_path_pvid()
1754 struct net_device_path *path) in br_vlan_fill_forward_path_pvid()
1758 static inline int br_vlan_fill_forward_path_mode(struct net_bridge *br, in br_vlan_fill_forward_path_mode()
1759 struct net_bridge_port *dst, in br_vlan_fill_forward_path_mode()
1760 struct net_device_path *path) in br_vlan_fill_forward_path_mode()
1765 static inline struct net_bridge_vlan_group *br_vlan_group( in br_vlan_group()
1766 const struct net_bridge *br) in br_vlan_group()
1771 static inline struct net_bridge_vlan_group *nbp_vlan_group( in nbp_vlan_group()
1772 const struct net_bridge_port *p) in nbp_vlan_group()
1777 static inline struct net_bridge_vlan_group *br_vlan_group_rcu( in br_vlan_group_rcu()
1778 const struct net_bridge *br) in br_vlan_group_rcu()
1783 static inline struct net_bridge_vlan_group *nbp_vlan_group_rcu( in nbp_vlan_group_rcu()
1784 const struct net_bridge_port *p) in nbp_vlan_group_rcu()
1789 static inline void br_vlan_get_stats(const struct net_bridge_vlan *v, in br_vlan_get_stats()
1790 struct pcpu_sw_netstats *stats) in br_vlan_get_stats()
1794 static inline void br_vlan_port_event(struct net_bridge_port *p, in br_vlan_port_event()
1799 static inline int br_vlan_bridge_event(struct net_device *dev, in br_vlan_bridge_event()
1814 static inline void br_vlan_notify(const struct net_bridge *br, in br_vlan_notify()
1815 const struct net_bridge_port *p, in br_vlan_notify()
1821 static inline bool br_vlan_can_enter_range(const struct net_bridge_vlan *v_curr, in br_vlan_can_enter_range()
1822 const struct net_bridge_vlan *range_end) in br_vlan_can_enter_range()
1827 static inline u16 br_vlan_flags(const struct net_bridge_vlan *v, u16 pvid) in br_vlan_flags()
1836 bool br_vlan_opts_eq_range(const struct net_bridge_vlan *v_curr,
1837 const struct net_bridge_vlan *range_end);
1838 bool br_vlan_opts_fill(struct sk_buff *skb, const struct net_bridge_vlan *v,
1839 const struct net_bridge_port *p);
1841 int br_vlan_process_options(const struct net_bridge *br,
1842 const struct net_bridge_port *p,
1843 struct net_bridge_vlan *range_start,
1844 struct net_bridge_vlan *range_end,
1845 struct nlattr **tb,
1846 struct netlink_ext_ack *extack);
1847 int br_vlan_rtm_process_global_options(struct net_device *dev,
1848 const struct nlattr *attr,
1850 struct netlink_ext_ack *extack);
1851 bool br_vlan_global_opts_can_enter_range(const struct net_bridge_vlan *v_curr,
1852 const struct net_bridge_vlan *r_end);
1853 bool br_vlan_global_opts_fill(struct sk_buff *skb, u16 vid, u16 vid_range,
1854 const struct net_bridge_vlan *v_opts);
1857 static inline u8 br_vlan_get_state(const struct net_bridge_vlan *v) in br_vlan_get_state()
1862 static inline void br_vlan_set_state(struct net_bridge_vlan *v, u8 state) in br_vlan_set_state()
1867 static inline u8 br_vlan_get_pvid_state(const struct net_bridge_vlan_group *vg) in br_vlan_get_pvid_state()
1872 static inline void br_vlan_set_pvid_state(struct net_bridge_vlan_group *vg, in br_vlan_set_pvid_state()
1895 static inline bool br_mst_is_enabled(struct net_bridge *br) in br_mst_is_enabled()
1901 int br_mst_set_state(struct net_bridge_port *p, u16 msti, u8 state,
1902 struct netlink_ext_ack *extack);
1903 int br_mst_vlan_set_msti(struct net_bridge_vlan *v, u16 msti);
1904 void br_mst_vlan_init_state(struct net_bridge_vlan *v);
1905 int br_mst_set_enabled(struct net_bridge *br, bool on,
1906 struct netlink_ext_ack *extack);
1907 size_t br_mst_info_size(const struct net_bridge_vlan_group *vg);
1908 int br_mst_fill_info(struct sk_buff *skb,
1909 const struct net_bridge_vlan_group *vg);
1910 int br_mst_process(struct net_bridge_port *p, const struct nlattr *mst_attr,
1911 struct netlink_ext_ack *extack);
1913 static inline bool br_mst_is_enabled(struct net_bridge *br) in br_mst_is_enabled()
1918 static inline int br_mst_set_state(struct net_bridge_port *p, u16 msti, in br_mst_set_state()
1919 u8 state, struct netlink_ext_ack *extack) in br_mst_set_state()
1924 static inline int br_mst_set_enabled(struct net_bridge *br, bool on, in br_mst_set_enabled()
1925 struct netlink_ext_ack *extack) in br_mst_set_enabled()
1930 static inline size_t br_mst_info_size(const struct net_bridge_vlan_group *vg) in br_mst_info_size()
1935 static inline int br_mst_fill_info(struct sk_buff *skb, in br_mst_fill_info()
1936 const struct net_bridge_vlan_group *vg) in br_mst_fill_info()
1941 static inline int br_mst_process(struct net_bridge_port *p, in br_mst_process()
1942 const struct nlattr *mst_attr, in br_mst_process()
1943 struct netlink_ext_ack *extack) in br_mst_process()
1949 struct nf_br_ops {
1950 int (*br_dev_xmit_hook)(struct sk_buff *skb);
1952 extern const struct nf_br_ops __rcu *nf_br_ops;
1958 void br_netfilter_rtable_init(struct net_bridge *);
1966 void br_set_state(struct net_bridge_port *p, unsigned int state);
1967 struct net_bridge_port *br_get_port(struct net_bridge *br, u16 port_no);
1968 void br_init_port(struct net_bridge_port *p);
1969 void br_become_designated_port(struct net_bridge_port *p);
1971 void __br_set_forward_delay(struct net_bridge *br, unsigned long t);
1972 int br_set_forward_delay(struct net_bridge *br, unsigned long x);
1973 int br_set_hello_time(struct net_bridge *br, unsigned long x);
1974 int br_set_max_age(struct net_bridge *br, unsigned long x);
1975 int __set_ageing_time(struct net_device *dev, unsigned long t);
1976 int br_set_ageing_time(struct net_bridge *br, clock_t ageing_time);
1980 void br_stp_enable_bridge(struct net_bridge *br);
1981 void br_stp_disable_bridge(struct net_bridge *br);
1982 int br_stp_set_enabled(struct net_bridge *br, unsigned long val,
1983 struct netlink_ext_ack *extack);
1984 void br_stp_enable_port(struct net_bridge_port *p);
1985 void br_stp_disable_port(struct net_bridge_port *p);
1986 bool br_stp_recalculate_bridge_id(struct net_bridge *br);
1987 void br_stp_change_bridge_id(struct net_bridge *br, const unsigned char *a);
1988 void br_stp_set_bridge_priority(struct net_bridge *br, u16 newprio);
1989 int br_stp_set_port_priority(struct net_bridge_port *p, unsigned long newprio);
1990 int br_stp_set_path_cost(struct net_bridge_port *p, unsigned long path_cost);
1991 ssize_t br_show_bridge_id(char *buf, const struct bridge_id *id);
1994 struct stp_proto;
1995 void br_stp_rcv(const struct stp_proto *proto, struct sk_buff *skb,
1996 struct net_device *dev);
1999 void br_stp_timer_init(struct net_bridge *br);
2000 void br_stp_port_timer_init(struct net_bridge_port *p);
2001 unsigned long br_timer_value(const struct timer_list *timer);
2005 extern int (*br_fdb_test_addr_hook)(struct net_device *dev, unsigned char *addr);
2010 int br_mrp_parse(struct net_bridge *br, struct net_bridge_port *p,
2011 struct nlattr *attr, int cmd, struct netlink_ext_ack *extack);
2012 bool br_mrp_enabled(struct net_bridge *br);
2013 void br_mrp_port_del(struct net_bridge *br, struct net_bridge_port *p);
2014 int br_mrp_fill_info(struct sk_buff *skb, struct net_bridge *br);
2016 static inline int br_mrp_parse(struct net_bridge *br, struct net_bridge_port *p, in br_mrp_parse()
2017 struct nlattr *attr, int cmd, in br_mrp_parse()
2018 struct netlink_ext_ack *extack) in br_mrp_parse()
2023 static inline bool br_mrp_enabled(struct net_bridge *br) in br_mrp_enabled()
2028 static inline void br_mrp_port_del(struct net_bridge *br, in br_mrp_port_del()
2029 struct net_bridge_port *p) in br_mrp_port_del()
2033 static inline int br_mrp_fill_info(struct sk_buff *skb, struct net_bridge *br) in br_mrp_fill_info()
2042 int br_cfm_parse(struct net_bridge *br, struct net_bridge_port *p,
2043 struct nlattr *attr, int cmd, struct netlink_ext_ack *extack);
2044 bool br_cfm_created(struct net_bridge *br);
2045 void br_cfm_port_del(struct net_bridge *br, struct net_bridge_port *p);
2046 int br_cfm_config_fill_info(struct sk_buff *skb, struct net_bridge *br);
2047 int br_cfm_status_fill_info(struct sk_buff *skb,
2048 struct net_bridge *br,
2050 int br_cfm_mep_count(struct net_bridge *br, u32 *count);
2051 int br_cfm_peer_mep_count(struct net_bridge *br, u32 *count);
2053 static inline int br_cfm_parse(struct net_bridge *br, struct net_bridge_port *p, in br_cfm_parse()
2054 struct nlattr *attr, int cmd, in br_cfm_parse()
2055 struct netlink_ext_ack *extack) in br_cfm_parse()
2060 static inline bool br_cfm_created(struct net_bridge *br) in br_cfm_created()
2065 static inline void br_cfm_port_del(struct net_bridge *br, in br_cfm_port_del()
2066 struct net_bridge_port *p) in br_cfm_port_del()
2070 static inline int br_cfm_config_fill_info(struct sk_buff *skb, struct net_bridge *br) in br_cfm_config_fill_info()
2075 static inline int br_cfm_status_fill_info(struct sk_buff *skb, in br_cfm_status_fill_info()
2076 struct net_bridge *br, in br_cfm_status_fill_info()
2082 static inline int br_cfm_mep_count(struct net_bridge *br, u32 *count) in br_cfm_mep_count()
2088 static inline int br_cfm_peer_mep_count(struct net_bridge *br, u32 *count) in br_cfm_peer_mep_count()
2096 extern struct rtnl_link_ops br_link_ops;
2099 void br_ifinfo_notify(int event, const struct net_bridge *br,
2100 const struct net_bridge_port *port);
2101 void br_info_notify(int event, const struct net_bridge *br,
2102 const struct net_bridge_port *port, u32 filter);
2103 int br_setlink(struct net_device *dev, struct nlmsghdr *nlmsg, u16 flags,
2104 struct netlink_ext_ack *extack);
2105 int br_dellink(struct net_device *dev, struct nlmsghdr *nlmsg, u16 flags);
2106 int br_getlink(struct sk_buff *skb, u32 pid, u32 seq, struct net_device *dev,
2108 int br_process_vlan_info(struct net_bridge *br,
2109 struct net_bridge_port *p, int cmd,
2110 struct bridge_vlan_info *vinfo_curr,
2111 struct bridge_vlan_info **vinfo_last,
2113 struct netlink_ext_ack *extack);
2117 extern const struct sysfs_ops brport_sysfs_ops;
2118 int br_sysfs_addif(struct net_bridge_port *p);
2119 int br_sysfs_renameif(struct net_bridge_port *p);
2122 int br_sysfs_addbr(struct net_device *dev);
2123 void br_sysfs_delbr(struct net_device *dev);
2127 static inline int br_sysfs_addif(struct net_bridge_port *p) { return 0; } in br_sysfs_addif()
2128 static inline int br_sysfs_renameif(struct net_bridge_port *p) { return 0; } in br_sysfs_renameif()
2129 static inline int br_sysfs_addbr(struct net_device *dev) { return 0; } in br_sysfs_addbr()
2130 static inline void br_sysfs_delbr(struct net_device *dev) { return; } in br_sysfs_delbr()
2135 int br_switchdev_port_offload(struct net_bridge_port *p,
2136 struct net_device *dev, const void *ctx,
2137 struct notifier_block *atomic_nb,
2138 struct notifier_block *blocking_nb,
2140 struct netlink_ext_ack *extack);
2142 void br_switchdev_port_unoffload(struct net_bridge_port *p, const void *ctx,
2143 struct notifier_block *atomic_nb,
2144 struct notifier_block *blocking_nb);
2146 int br_switchdev_port_replay(struct net_bridge_port *p,
2147 struct net_device *dev, const void *ctx,
2148 struct notifier_block *atomic_nb,
2149 struct notifier_block *blocking_nb,
2150 struct netlink_ext_ack *extack);
2152 bool br_switchdev_frame_uses_tx_fwd_offload(struct sk_buff *skb);
2154 void br_switchdev_frame_set_offload_fwd_mark(struct sk_buff *skb);
2156 void nbp_switchdev_frame_mark_tx_fwd_offload(const struct net_bridge_port *p,
2157 struct sk_buff *skb);
2158 void nbp_switchdev_frame_mark_tx_fwd_to_hwdom(const struct net_bridge_port *p,
2159 struct sk_buff *skb);
2160 void nbp_switchdev_frame_mark(const struct net_bridge_port *p,
2161 struct sk_buff *skb);
2162 bool nbp_switchdev_allowed_egress(const struct net_bridge_port *p,
2163 const struct sk_buff *skb);
2164 int br_switchdev_set_port_flag(struct net_bridge_port *p,
2167 struct netlink_ext_ack *extack);
2168 void br_switchdev_fdb_notify(struct net_bridge *br,
2169 const struct net_bridge_fdb_entry *fdb, int type);
2170 void br_switchdev_mdb_notify(struct net_device *dev,
2171 struct net_bridge_mdb_entry *mp,
2172 struct net_bridge_port_group *pg,
2174 int br_switchdev_port_vlan_add(struct net_device *dev, u16 vid, u16 flags,
2175 bool changed, struct netlink_ext_ack *extack);
2176 int br_switchdev_port_vlan_del(struct net_device *dev, u16 vid);
2177 void br_switchdev_init(struct net_bridge *br);
2179 static inline void br_switchdev_frame_unmark(struct sk_buff *skb) in br_switchdev_frame_unmark()
2185 br_switchdev_port_offload(struct net_bridge_port *p, in br_switchdev_port_offload()
2186 struct net_device *dev, const void *ctx, in br_switchdev_port_offload()
2187 struct notifier_block *atomic_nb, in br_switchdev_port_offload()
2188 struct notifier_block *blocking_nb, in br_switchdev_port_offload()
2190 struct netlink_ext_ack *extack) in br_switchdev_port_offload()
2196 br_switchdev_port_unoffload(struct net_bridge_port *p, const void *ctx, in br_switchdev_port_unoffload()
2197 struct notifier_block *atomic_nb, in br_switchdev_port_unoffload()
2198 struct notifier_block *blocking_nb) in br_switchdev_port_unoffload()
2203 br_switchdev_port_replay(struct net_bridge_port *p, in br_switchdev_port_replay()
2204 struct net_device *dev, const void *ctx, in br_switchdev_port_replay()
2205 struct notifier_block *atomic_nb, in br_switchdev_port_replay()
2206 struct notifier_block *blocking_nb, in br_switchdev_port_replay()
2207 struct netlink_ext_ack *extack) in br_switchdev_port_replay()
2212 static inline bool br_switchdev_frame_uses_tx_fwd_offload(struct sk_buff *skb) in br_switchdev_frame_uses_tx_fwd_offload()
2217 static inline void br_switchdev_frame_set_offload_fwd_mark(struct sk_buff *skb) in br_switchdev_frame_set_offload_fwd_mark()
2222 nbp_switchdev_frame_mark_tx_fwd_offload(const struct net_bridge_port *p, in nbp_switchdev_frame_mark_tx_fwd_offload()
2223 struct sk_buff *skb) in nbp_switchdev_frame_mark_tx_fwd_offload()
2228 nbp_switchdev_frame_mark_tx_fwd_to_hwdom(const struct net_bridge_port *p, in nbp_switchdev_frame_mark_tx_fwd_to_hwdom()
2229 struct sk_buff *skb) in nbp_switchdev_frame_mark_tx_fwd_to_hwdom()
2233 static inline void nbp_switchdev_frame_mark(const struct net_bridge_port *p, in nbp_switchdev_frame_mark()
2234 struct sk_buff *skb) in nbp_switchdev_frame_mark()
2238 static inline bool nbp_switchdev_allowed_egress(const struct net_bridge_port *p, in nbp_switchdev_allowed_egress()
2239 const struct sk_buff *skb) in nbp_switchdev_allowed_egress()
2244 static inline int br_switchdev_set_port_flag(struct net_bridge_port *p, in br_switchdev_set_port_flag()
2247 struct netlink_ext_ack *extack) in br_switchdev_set_port_flag()
2252 static inline int br_switchdev_port_vlan_add(struct net_device *dev, u16 vid, in br_switchdev_port_vlan_add()
2254 struct netlink_ext_ack *extack) in br_switchdev_port_vlan_add()
2259 static inline int br_switchdev_port_vlan_del(struct net_device *dev, u16 vid) in br_switchdev_port_vlan_del()
2265 br_switchdev_fdb_notify(struct net_bridge *br, in br_switchdev_fdb_notify()
2266 const struct net_bridge_fdb_entry *fdb, int type) in br_switchdev_fdb_notify()
2270 static inline void br_switchdev_mdb_notify(struct net_device *dev, in br_switchdev_mdb_notify()
2271 struct net_bridge_mdb_entry *mp, in br_switchdev_mdb_notify()
2272 struct net_bridge_port_group *pg, in br_switchdev_mdb_notify()
2277 static inline void br_switchdev_frame_unmark(struct sk_buff *skb) in br_switchdev_frame_unmark()
2281 static inline void br_switchdev_init(struct net_bridge *br) in br_switchdev_init()
2288 void br_recalculate_neigh_suppress_enabled(struct net_bridge *br);
2289 void br_do_proxy_suppress_arp(struct sk_buff *skb, struct net_bridge *br,
2290 u16 vid, struct net_bridge_port *p);
2291 void br_do_suppress_nd(struct sk_buff *skb, struct net_bridge *br,
2292 u16 vid, struct net_bridge_port *p, struct nd_msg *msg);
2293 struct nd_msg *br_is_nd_neigh_msg(struct sk_buff *skb, struct nd_msg *m);
2294 bool br_is_neigh_suppress_enabled(const struct net_bridge_port *p, u16 vid);