Lines Matching +full:3 +full:br

33 				 int (*set)(struct net_bridge *br, unsigned long val,  in store_bridge_parm()  argument
36 struct net_bridge *br = to_bridge(d); in store_bridge_parm() local
41 if (!ns_capable(dev_net(br->dev)->user_ns, CAP_NET_ADMIN)) in store_bridge_parm()
51 err = (*set)(br, val, &extack); in store_bridge_parm()
53 netdev_state_change(br->dev); in store_bridge_parm()
56 br_err(br, "%s\n", extack._msg); in store_bridge_parm()
58 br_warn(br, "%s\n", extack._msg); in store_bridge_parm()
69 struct net_bridge *br = to_bridge(d); in forward_delay_show() local
70 return sprintf(buf, "%lu\n", jiffies_to_clock_t(br->forward_delay)); in forward_delay_show()
73 static int set_forward_delay(struct net_bridge *br, unsigned long val, in set_forward_delay() argument
76 return br_set_forward_delay(br, val); in set_forward_delay()
94 static int set_hello_time(struct net_bridge *br, unsigned long val, in set_hello_time() argument
97 return br_set_hello_time(br, val); in set_hello_time()
115 static int set_max_age(struct net_bridge *br, unsigned long val, in set_max_age() argument
118 return br_set_max_age(br, val); in set_max_age()
131 struct net_bridge *br = to_bridge(d); in ageing_time_show() local
132 return sprintf(buf, "%lu\n", jiffies_to_clock_t(br->ageing_time)); in ageing_time_show()
135 static int set_ageing_time(struct net_bridge *br, unsigned long val, in set_ageing_time() argument
138 return br_set_ageing_time(br, val); in set_ageing_time()
152 struct net_bridge *br = to_bridge(d); in stp_state_show() local
153 return sprintf(buf, "%d\n", br->stp_enabled); in stp_state_show()
157 static int set_stp_state(struct net_bridge *br, unsigned long val, in set_stp_state() argument
160 return br_stp_set_enabled(br, val, extack); in set_stp_state()
175 struct net_bridge *br = to_bridge(d); in group_fwd_mask_show() local
176 return sprintf(buf, "%#x\n", br->group_fwd_mask); in group_fwd_mask_show()
179 static int set_group_fwd_mask(struct net_bridge *br, unsigned long val, in set_group_fwd_mask() argument
185 br->group_fwd_mask = val; in set_group_fwd_mask()
202 struct net_bridge *br = to_bridge(d); in priority_show() local
204 (br->bridge_id.prio[0] << 8) | br->bridge_id.prio[1]); in priority_show()
207 static int set_priority(struct net_bridge *br, unsigned long val, in set_priority() argument
210 br_stp_set_bridge_priority(br, (u16) val); in set_priority()
260 struct net_bridge *br = to_bridge(d); in topology_change_detected_show() local
261 return sprintf(buf, "%d\n", br->topology_change_detected); in topology_change_detected_show()
268 struct net_bridge *br = to_bridge(d); in hello_timer_show() local
269 return sprintf(buf, "%ld\n", br_timer_value(&br->hello_timer)); in hello_timer_show()
276 struct net_bridge *br = to_bridge(d); in tcn_timer_show() local
277 return sprintf(buf, "%ld\n", br_timer_value(&br->tcn_timer)); in tcn_timer_show()
285 struct net_bridge *br = to_bridge(d); in topology_change_timer_show() local
286 return sprintf(buf, "%ld\n", br_timer_value(&br->topology_change_timer)); in topology_change_timer_show()
293 struct net_bridge *br = to_bridge(d); in gc_timer_show() local
294 return sprintf(buf, "%ld\n", br_timer_value(&br->gc_work.timer)); in gc_timer_show()
301 struct net_bridge *br = to_bridge(d); in group_addr_show() local
302 return sprintf(buf, "%pM\n", br->group_addr); in group_addr_show()
309 struct net_bridge *br = to_bridge(d); in group_addr_store() local
312 if (!ns_capable(dev_net(br->dev)->user_ns, CAP_NET_ADMIN)) in group_addr_store()
323 new_addr[5] == 3) /* 802.1X PAE address */ in group_addr_store()
329 spin_lock_bh(&br->lock); in group_addr_store()
330 ether_addr_copy(br->group_addr, new_addr); in group_addr_store()
331 spin_unlock_bh(&br->lock); in group_addr_store()
333 br_opt_toggle(br, BROPT_GROUP_ADDR_SET, true); in group_addr_store()
334 br_recalculate_fwd_mask(br); in group_addr_store()
335 netdev_state_change(br->dev); in group_addr_store()
344 static int set_flush(struct net_bridge *br, unsigned long val, in set_flush() argument
351 br_fdb_flush(br, &desc); in set_flush()
367 struct net_bridge *br = to_bridge(d); in no_linklocal_learn_show() local
368 return sprintf(buf, "%d\n", br_boolopt_get(br, BR_BOOLOPT_NO_LL_LEARN)); in no_linklocal_learn_show()
371 static int set_no_linklocal_learn(struct net_bridge *br, unsigned long val, in set_no_linklocal_learn() argument
374 return br_boolopt_toggle(br, BR_BOOLOPT_NO_LL_LEARN, !!val, extack); in set_no_linklocal_learn()
389 struct net_bridge *br = to_bridge(d); in multicast_router_show() local
390 return sprintf(buf, "%d\n", br->multicast_ctx.multicast_router); in multicast_router_show()
393 static int set_multicast_router(struct net_bridge *br, unsigned long val, in set_multicast_router() argument
396 return br_multicast_set_router(&br->multicast_ctx, val); in set_multicast_router()
411 struct net_bridge *br = to_bridge(d); in multicast_snooping_show() local
412 return sprintf(buf, "%d\n", br_opt_get(br, BROPT_MULTICAST_ENABLED)); in multicast_snooping_show()
427 struct net_bridge *br = to_bridge(d); in multicast_query_use_ifaddr_show() local
429 br_opt_get(br, BROPT_MULTICAST_QUERY_USE_IFADDR)); in multicast_query_use_ifaddr_show()
432 static int set_query_use_ifaddr(struct net_bridge *br, unsigned long val, in set_query_use_ifaddr() argument
435 br_opt_toggle(br, BROPT_MULTICAST_QUERY_USE_IFADDR, !!val); in set_query_use_ifaddr()
452 struct net_bridge *br = to_bridge(d); in multicast_querier_show() local
453 return sprintf(buf, "%d\n", br->multicast_ctx.multicast_querier); in multicast_querier_show()
456 static int set_multicast_querier(struct net_bridge *br, unsigned long val, in set_multicast_querier() argument
459 return br_multicast_set_querier(&br->multicast_ctx, val); in set_multicast_querier()
476 static int set_elasticity(struct net_bridge *br, unsigned long val, in set_elasticity() argument
496 struct net_bridge *br = to_bridge(d); in hash_max_show() local
497 return sprintf(buf, "%u\n", br->hash_max); in hash_max_show()
500 static int set_hash_max(struct net_bridge *br, unsigned long val, in set_hash_max() argument
503 br->hash_max = val; in set_hash_max()
518 struct net_bridge *br = to_bridge(d); in multicast_igmp_version_show() local
520 return sprintf(buf, "%u\n", br->multicast_ctx.multicast_igmp_version); in multicast_igmp_version_show()
523 static int set_multicast_igmp_version(struct net_bridge *br, unsigned long val, in set_multicast_igmp_version() argument
526 return br_multicast_set_igmp_version(&br->multicast_ctx, val); in set_multicast_igmp_version()
541 struct net_bridge *br = to_bridge(d); in multicast_last_member_count_show() local
542 return sprintf(buf, "%u\n", br->multicast_ctx.multicast_last_member_count); in multicast_last_member_count_show()
545 static int set_last_member_count(struct net_bridge *br, unsigned long val, in set_last_member_count() argument
548 br->multicast_ctx.multicast_last_member_count = val; in set_last_member_count()
563 struct net_bridge *br = to_bridge(d); in multicast_startup_query_count_show() local
564 return sprintf(buf, "%u\n", br->multicast_ctx.multicast_startup_query_count); in multicast_startup_query_count_show()
567 static int set_startup_query_count(struct net_bridge *br, unsigned long val, in set_startup_query_count() argument
570 br->multicast_ctx.multicast_startup_query_count = val; in set_startup_query_count()
585 struct net_bridge *br = to_bridge(d); in multicast_last_member_interval_show() local
587 jiffies_to_clock_t(br->multicast_ctx.multicast_last_member_interval)); in multicast_last_member_interval_show()
590 static int set_last_member_interval(struct net_bridge *br, unsigned long val, in set_last_member_interval() argument
593 br->multicast_ctx.multicast_last_member_interval = clock_t_to_jiffies(val); in set_last_member_interval()
608 struct net_bridge *br = to_bridge(d); in multicast_membership_interval_show() local
610 jiffies_to_clock_t(br->multicast_ctx.multicast_membership_interval)); in multicast_membership_interval_show()
613 static int set_membership_interval(struct net_bridge *br, unsigned long val, in set_membership_interval() argument
616 br->multicast_ctx.multicast_membership_interval = clock_t_to_jiffies(val); in set_membership_interval()
632 struct net_bridge *br = to_bridge(d); in multicast_querier_interval_show() local
634 jiffies_to_clock_t(br->multicast_ctx.multicast_querier_interval)); in multicast_querier_interval_show()
637 static int set_querier_interval(struct net_bridge *br, unsigned long val, in set_querier_interval() argument
640 br->multicast_ctx.multicast_querier_interval = clock_t_to_jiffies(val); in set_querier_interval()
656 struct net_bridge *br = to_bridge(d); in multicast_query_interval_show() local
658 jiffies_to_clock_t(br->multicast_ctx.multicast_query_interval)); in multicast_query_interval_show()
661 static int set_query_interval(struct net_bridge *br, unsigned long val, in set_query_interval() argument
664 br_multicast_set_query_intvl(&br->multicast_ctx, val); in set_query_interval()
679 struct net_bridge *br = to_bridge(d); in multicast_query_response_interval_show() local
682 jiffies_to_clock_t(br->multicast_ctx.multicast_query_response_interval)); in multicast_query_response_interval_show()
685 static int set_query_response_interval(struct net_bridge *br, unsigned long val, in set_query_response_interval() argument
688 br->multicast_ctx.multicast_query_response_interval = clock_t_to_jiffies(val); in set_query_response_interval()
703 struct net_bridge *br = to_bridge(d); in multicast_startup_query_interval_show() local
706 jiffies_to_clock_t(br->multicast_ctx.multicast_startup_query_interval)); in multicast_startup_query_interval_show()
709 static int set_startup_query_interval(struct net_bridge *br, unsigned long val, in set_startup_query_interval() argument
712 br_multicast_set_startup_query_intvl(&br->multicast_ctx, val); in set_startup_query_interval()
728 struct net_bridge *br = to_bridge(d); in multicast_stats_enabled_show() local
731 br_opt_get(br, BROPT_MULTICAST_STATS_ENABLED)); in multicast_stats_enabled_show()
734 static int set_stats_enabled(struct net_bridge *br, unsigned long val, in set_stats_enabled() argument
737 br_opt_toggle(br, BROPT_MULTICAST_STATS_ENABLED, !!val); in set_stats_enabled()
755 struct net_bridge *br = to_bridge(d); in multicast_mld_version_show() local
757 return sprintf(buf, "%u\n", br->multicast_ctx.multicast_mld_version); in multicast_mld_version_show()
760 static int set_multicast_mld_version(struct net_bridge *br, unsigned long val, in set_multicast_mld_version() argument
763 return br_multicast_set_mld_version(&br->multicast_ctx, val); in set_multicast_mld_version()
779 struct net_bridge *br = to_bridge(d); in nf_call_iptables_show() local
780 return sprintf(buf, "%u\n", br_opt_get(br, BROPT_NF_CALL_IPTABLES)); in nf_call_iptables_show()
783 static int set_nf_call_iptables(struct net_bridge *br, unsigned long val, in set_nf_call_iptables() argument
786 br_opt_toggle(br, BROPT_NF_CALL_IPTABLES, !!val); in set_nf_call_iptables()
801 struct net_bridge *br = to_bridge(d); in nf_call_ip6tables_show() local
802 return sprintf(buf, "%u\n", br_opt_get(br, BROPT_NF_CALL_IP6TABLES)); in nf_call_ip6tables_show()
805 static int set_nf_call_ip6tables(struct net_bridge *br, unsigned long val, in set_nf_call_ip6tables() argument
808 br_opt_toggle(br, BROPT_NF_CALL_IP6TABLES, !!val); in set_nf_call_ip6tables()
823 struct net_bridge *br = to_bridge(d); in nf_call_arptables_show() local
824 return sprintf(buf, "%u\n", br_opt_get(br, BROPT_NF_CALL_ARPTABLES)); in nf_call_arptables_show()
827 static int set_nf_call_arptables(struct net_bridge *br, unsigned long val, in set_nf_call_arptables() argument
830 br_opt_toggle(br, BROPT_NF_CALL_ARPTABLES, !!val); in set_nf_call_arptables()
847 struct net_bridge *br = to_bridge(d); in vlan_filtering_show() local
848 return sprintf(buf, "%d\n", br_opt_get(br, BROPT_VLAN_ENABLED)); in vlan_filtering_show()
863 struct net_bridge *br = to_bridge(d); in vlan_protocol_show() local
864 return sprintf(buf, "%#06x\n", ntohs(br->vlan_proto)); in vlan_protocol_show()
879 struct net_bridge *br = to_bridge(d); in default_pvid_show() local
880 return sprintf(buf, "%d\n", br->default_pvid); in default_pvid_show()
895 struct net_bridge *br = to_bridge(d); in vlan_stats_enabled_show() local
896 return sprintf(buf, "%u\n", br_opt_get(br, BROPT_VLAN_STATS_ENABLED)); in vlan_stats_enabled_show()
899 static int set_vlan_stats_enabled(struct net_bridge *br, unsigned long val, in set_vlan_stats_enabled() argument
902 return br_vlan_set_stats(br, val); in set_vlan_stats_enabled()
917 struct net_bridge *br = to_bridge(d); in vlan_stats_per_port_show() local
918 return sprintf(buf, "%u\n", br_opt_get(br, BROPT_VLAN_STATS_PER_PORT)); in vlan_stats_per_port_show()
921 static int set_vlan_stats_per_port(struct net_bridge *br, unsigned long val, in set_vlan_stats_per_port() argument
924 return br_vlan_set_stats_per_port(br, val); in set_vlan_stats_per_port()
1009 struct net_bridge *br = to_bridge(dev); in brforward_read() local
1016 n = br_fdb_fillbuf(br, buf, in brforward_read()
1046 struct net_bridge *br = netdev_priv(dev); in br_sysfs_addbr() local
1063 br->ifobj = kobject_create_and_add(SYSFS_BRIDGE_PORT_SUBDIR, brobj); in br_sysfs_addbr()
1064 if (!br->ifobj) { in br_sysfs_addbr()
1083 struct net_bridge *br = netdev_priv(dev); in br_sysfs_delbr() local
1085 kobject_put(br->ifobj); in br_sysfs_delbr()