Home
last modified time | relevance | path

Searched refs:br (Results 1 – 25 of 243) sorted by relevance

12345678910

/kernel/linux/linux-5.10/net/bridge/
Dbr_stp.c48 br_warn(p->br, "error setting offload STP state on port %u(%s)\n", in br_set_state()
51 br_info(p->br, "port %u(%s) entered %s state\n", in br_set_state()
55 if (p->br->stp_enabled == BR_KERNEL_STP) { in br_set_state()
68 struct net_bridge_port *br_get_port(struct net_bridge *br, u16 port_no) in br_get_port() argument
72 list_for_each_entry_rcu(p, &br->port_list, list, in br_get_port()
73 lockdep_is_held(&br->lock)) { in br_get_port()
85 struct net_bridge *br; in br_should_become_root_port() local
89 br = p->br; in br_should_become_root_port()
94 if (memcmp(&br->bridge_id, &p->designated_root, 8) <= 0) in br_should_become_root_port()
100 rp = br_get_port(br, root_port); in br_should_become_root_port()
[all …]
Dbr_stp_if.c43 err = __set_ageing_time(p->dev, p->br->ageing_time); in br_init_port()
49 void br_stp_enable_bridge(struct net_bridge *br) in br_stp_enable_bridge() argument
53 spin_lock_bh(&br->lock); in br_stp_enable_bridge()
54 if (br->stp_enabled == BR_KERNEL_STP) in br_stp_enable_bridge()
55 mod_timer(&br->hello_timer, jiffies + br->hello_time); in br_stp_enable_bridge()
56 mod_delayed_work(system_long_wq, &br->gc_work, HZ / 10); in br_stp_enable_bridge()
58 br_config_bpdu_generation(br); in br_stp_enable_bridge()
60 list_for_each_entry(p, &br->port_list, list) { in br_stp_enable_bridge()
65 spin_unlock_bh(&br->lock); in br_stp_enable_bridge()
69 void br_stp_disable_bridge(struct net_bridge *br) in br_stp_disable_bridge() argument
[all …]
Dbr_stp_timer.c17 static int br_is_designated_for_some_port(const struct net_bridge *br) in br_is_designated_for_some_port() argument
21 list_for_each_entry(p, &br->port_list, list) { in br_is_designated_for_some_port()
23 !memcmp(&p->designated_bridge, &br->bridge_id, 8)) in br_is_designated_for_some_port()
32 struct net_bridge *br = from_timer(br, t, hello_timer); in br_hello_timer_expired() local
34 br_debug(br, "hello timer expired\n"); in br_hello_timer_expired()
35 spin_lock(&br->lock); in br_hello_timer_expired()
36 if (br->dev->flags & IFF_UP) { in br_hello_timer_expired()
37 br_config_bpdu_generation(br); in br_hello_timer_expired()
39 if (br->stp_enabled == BR_KERNEL_STP) in br_hello_timer_expired()
40 mod_timer(&br->hello_timer, in br_hello_timer_expired()
[all …]
Dbr_device.c30 struct net_bridge *br = netdev_priv(dev); in br_dev_xmit() local
33 struct pcpu_sw_netstats *brstats = this_cpu_ptr(br->stats); in br_dev_xmit()
60 if (!br_allowed_ingress(br, br_vlan_group_rcu(br), skb, &vid, &state)) in br_dev_xmit()
66 br_opt_get(br, BROPT_NEIGH_SUPPRESS_ENABLED)) { in br_dev_xmit()
67 br_do_proxy_suppress_arp(skb, br, vid, NULL); in br_dev_xmit()
70 br_opt_get(br, BROPT_NEIGH_SUPPRESS_ENABLED) && in br_dev_xmit()
78 br_do_suppress_nd(skb, br, vid, NULL, msg); in br_dev_xmit()
83 br_flood(br, skb, BR_PKT_BROADCAST, false, true); in br_dev_xmit()
86 br_flood(br, skb, BR_PKT_MULTICAST, false, true); in br_dev_xmit()
89 if (br_multicast_rcv(br, NULL, skb, vid)) { in br_dev_xmit()
[all …]
Dbr_multicast.c51 static void br_multicast_start_querier(struct net_bridge *br,
53 static void br_multicast_add_router(struct net_bridge *br,
55 static void br_ip4_multicast_leave_group(struct net_bridge *br,
64 static void br_ip6_multicast_leave_group(struct net_bridge *br,
70 __br_multicast_add_group(struct net_bridge *br,
77 static void br_multicast_find_del_pg(struct net_bridge *br,
81 br_sg_port_find(struct net_bridge *br, in br_sg_port_find() argument
84 lockdep_assert_held_once(&br->multicast_lock); in br_sg_port_find()
86 return rhashtable_lookup_fast(&br->sg_port_tbl, sg_p, in br_sg_port_find()
90 static struct net_bridge_mdb_entry *br_mdb_ip_get_rcu(struct net_bridge *br, in br_mdb_ip_get_rcu() argument
[all …]
Dbr_if.c67 struct net_bridge *br = p->br; in br_port_carrier_check() local
74 if (!netif_running(br->dev)) in br_port_carrier_check()
77 spin_lock_bh(&br->lock); in br_port_carrier_check()
89 spin_unlock_bh(&br->lock); in br_port_carrier_check()
103 br_fdb_unsync_static(p->br, p); in br_port_set_promisc()
122 err = br_fdb_sync_static(p->br, p); in br_port_clear_promisc()
135 void br_manage_promisc(struct net_bridge *br) in br_manage_promisc() argument
143 if ((br->dev->flags & IFF_PROMISC) || !br_vlan_enabled(br->dev)) in br_manage_promisc()
146 list_for_each_entry(p, &br->port_list, list) { in br_manage_promisc()
160 if (br->auto_cnt == 0 || in br_manage_promisc()
[all …]
Dbr_fdb.c35 static int fdb_insert(struct net_bridge *br, struct net_bridge_port *source,
37 static void fdb_notify(struct net_bridge *br,
57 int br_fdb_hash_init(struct net_bridge *br) in br_fdb_hash_init() argument
59 return rhashtable_init(&br->fdb_hash_tbl, &br_fdb_rht_params); in br_fdb_hash_init()
62 void br_fdb_hash_fini(struct net_bridge *br) in br_fdb_hash_fini() argument
64 rhashtable_destroy(&br->fdb_hash_tbl); in br_fdb_hash_fini()
70 static inline unsigned long hold_time(const struct net_bridge *br) in hold_time() argument
72 return br->topology_change ? br->forward_delay : br->ageing_time; in hold_time()
75 static inline int has_expired(const struct net_bridge *br, in has_expired() argument
80 time_before_eq(fdb->updated + hold_time(br), jiffies); in has_expired()
[all …]
Dbr_sysfs_br.c31 struct net_bridge *br = to_bridge(d); in store_bridge_parm() local
36 if (!ns_capable(dev_net(br->dev)->user_ns, CAP_NET_ADMIN)) in store_bridge_parm()
46 err = (*set)(br, val); in store_bridge_parm()
48 netdev_state_change(br->dev); in store_bridge_parm()
58 struct net_bridge *br = to_bridge(d); in forward_delay_show() local
59 return sprintf(buf, "%lu\n", jiffies_to_clock_t(br->forward_delay)); in forward_delay_show()
102 struct net_bridge *br = to_bridge(d); in ageing_time_show() local
103 return sprintf(buf, "%lu\n", jiffies_to_clock_t(br->ageing_time)); in ageing_time_show()
106 static int set_ageing_time(struct net_bridge *br, unsigned long val) in set_ageing_time() argument
108 return br_set_ageing_time(br, val); in set_ageing_time()
[all …]
Dbr_private.h142 struct net_bridge *br; member
239 struct net_bridge *br; member
271 struct net_bridge *br; member
284 struct net_bridge *br; member
518 #define br_printk(level, br, format, args...) \ argument
519 printk(level "%s: " format, (br)->dev->name, ##args)
530 #define br_debug(br, format, args...) \ argument
531 pr_debug("%s: " format, (br)->dev->name, ##args)
534 static inline int br_is_root_bridge(const struct net_bridge *br) in br_is_root_bridge() argument
536 return !memcmp(&br->bridge_id, &br->designated_root, 8); in br_is_root_bridge()
[all …]
Dbr_vlan.c69 vg = br_vlan_group(v->br); in __vlan_add_flags()
86 static int __vlan_vid_add(struct net_device *dev, struct net_bridge *br, in __vlan_vid_add() argument
97 return vlan_vid_add(dev, br->vlan_proto, v->vid); in __vlan_vid_add()
109 vg = br_vlan_group(v->br); in __vlan_add_list()
129 static int __vlan_vid_del(struct net_device *dev, struct net_bridge *br, in __vlan_vid_del() argument
139 vlan_vid_del(dev, br->vlan_proto, v->vid); in __vlan_vid_del()
147 br_vlan_get_master(struct net_bridge *br, u16 vid, in br_vlan_get_master() argument
153 vg = br_vlan_group(br); in br_vlan_get_master()
159 if (br_vlan_add(br, vid, 0, &changed, extack)) in br_vlan_get_master()
190 vg = br_vlan_group(masterv->br); in br_vlan_put_master()
[all …]
Dbr.c34 struct net_bridge *br; in br_device_event() local
59 br = p->br; in br_device_event()
63 br_mtu_auto_adjust(br); in br_device_event()
67 if (br->dev->addr_assign_type == NET_ADDR_SET) in br_device_event()
70 err = dev_pre_changeaddr_notify(br->dev, in br_device_event()
78 spin_lock_bh(&br->lock); in br_device_event()
80 changed_addr = br_stp_recalculate_bridge_id(br); in br_device_event()
81 spin_unlock_bh(&br->lock); in br_device_event()
84 call_netdevice_notifiers(NETDEV_CHANGEADDR, br->dev); in br_device_event()
93 netdev_update_features(br->dev); in br_device_event()
[all …]
Dbr_ioctl.c38 static void get_port_ifindices(struct net_bridge *br, int *ifindices, int num) in get_port_ifindices() argument
42 list_for_each_entry(p, &br->port_list, list) { in get_port_ifindices()
55 static int get_fdb_entries(struct net_bridge *br, void __user *userbuf, in get_fdb_entries() argument
72 num = br_fdb_fillbuf(br, buf, maxnum, offset); in get_fdb_entries()
83 static int add_del_if(struct net_bridge *br, int ifindex, int isadd) in add_del_if() argument
85 struct net *net = dev_net(br->dev); in add_del_if()
97 ret = br_add_if(br, dev, NULL); in add_del_if()
99 ret = br_del_if(br, dev); in add_del_if()
111 struct net_bridge *br = netdev_priv(dev); in old_dev_ioctl() local
122 return add_del_if(br, args[1], args[0] == BRCTL_ADD_IF); in old_dev_ioctl()
[all …]
Dbr_netlink.c96 struct net_bridge *br; in br_get_link_af_size_filtered() local
106 br = netdev_priv(dev); in br_get_link_af_size_filtered()
107 vg = br_vlan_group_rcu(br); in br_get_link_af_size_filtered()
385 struct net_bridge *br; in br_fill_ifinfo() local
390 br = port->br; in br_fill_ifinfo()
392 br = netdev_priv(dev); in br_fill_ifinfo()
394 br_debug(br, "br_fill_info event %d port %s master %s\n", in br_fill_ifinfo()
395 event, dev->name, br->dev->name); in br_fill_ifinfo()
410 nla_put_u32(skb, IFLA_MASTER, br->dev->ifindex) || in br_fill_ifinfo()
447 vg = br_vlan_group_rcu(br); in br_fill_ifinfo()
[all …]
Dbr_mrp_switchdev.c7 int br_mrp_switchdev_add(struct net_bridge *br, struct br_mrp *mrp) in br_mrp_switchdev_add() argument
10 .obj.orig_dev = br->dev, in br_mrp_switchdev_add()
19 err = switchdev_port_obj_add(br->dev, &mrp_obj.obj, NULL); in br_mrp_switchdev_add()
27 int br_mrp_switchdev_del(struct net_bridge *br, struct br_mrp *mrp) in br_mrp_switchdev_del() argument
30 .obj.orig_dev = br->dev, in br_mrp_switchdev_del()
38 err = switchdev_port_obj_del(br->dev, &mrp_obj.obj); in br_mrp_switchdev_del()
46 int br_mrp_switchdev_set_ring_role(struct net_bridge *br, in br_mrp_switchdev_set_ring_role() argument
51 .obj.orig_dev = br->dev, in br_mrp_switchdev_set_ring_role()
59 err = switchdev_port_obj_del(br->dev, &mrp_role.obj); in br_mrp_switchdev_set_ring_role()
61 err = switchdev_port_obj_add(br->dev, &mrp_role.obj, NULL); in br_mrp_switchdev_set_ring_role()
[all …]
Dbr_mrp.c29 static struct net_bridge_port *br_mrp_get_port(struct net_bridge *br, in br_mrp_get_port() argument
35 list_for_each_entry(port, &br->port_list, list) { in br_mrp_get_port()
45 static struct br_mrp *br_mrp_find_id(struct net_bridge *br, u32 ring_id) in br_mrp_find_id() argument
50 list_for_each_entry_rcu(mrp, &br->mrp_list, list, in br_mrp_find_id()
61 static struct br_mrp *br_mrp_find_in_id(struct net_bridge *br, u32 in_id) in br_mrp_find_in_id() argument
66 list_for_each_entry_rcu(mrp, &br->mrp_list, list, in br_mrp_find_in_id()
77 static bool br_mrp_unique_ifindex(struct net_bridge *br, u32 ifindex) in br_mrp_unique_ifindex() argument
81 list_for_each_entry_rcu(mrp, &br->mrp_list, list, in br_mrp_unique_ifindex()
101 static struct br_mrp *br_mrp_find_port(struct net_bridge *br, in br_mrp_find_port() argument
107 list_for_each_entry_rcu(mrp, &br->mrp_list, list, in br_mrp_find_port()
[all …]
Dbr_private_mrp.h50 int br_mrp_add(struct net_bridge *br, struct br_mrp_instance *instance);
51 int br_mrp_del(struct net_bridge *br, struct br_mrp_instance *instance);
56 int br_mrp_set_ring_state(struct net_bridge *br,
58 int br_mrp_set_ring_role(struct net_bridge *br, struct br_mrp_ring_role *role);
59 int br_mrp_start_test(struct net_bridge *br, struct br_mrp_start_test *test);
60 int br_mrp_set_in_state(struct net_bridge *br, struct br_mrp_in_state *state);
61 int br_mrp_set_in_role(struct net_bridge *br, struct br_mrp_in_role *role);
62 int br_mrp_start_in_test(struct net_bridge *br,
66 int br_mrp_switchdev_add(struct net_bridge *br, struct br_mrp *mrp);
67 int br_mrp_switchdev_del(struct net_bridge *br, struct br_mrp *mrp);
[all …]
Dbr_input.c36 struct net_bridge *br = netdev_priv(brdev); in br_pass_frame_up() local
38 struct pcpu_sw_netstats *brstats = this_cpu_ptr(br->stats); in br_pass_frame_up()
45 vg = br_vlan_group_rcu(br); in br_pass_frame_up()
65 skb = br_handle_vlan(br, NULL, vg, skb); in br_pass_frame_up()
69 br_multicast_count(br, NULL, skb, br_multicast_igmp_type(skb), in br_pass_frame_up()
85 struct net_bridge *br; in br_handle_frame_finish() local
93 if (!br_allowed_ingress(p->br, nbp_vlan_group_rcu(p), skb, &vid, in br_handle_frame_finish()
100 br = p->br; in br_handle_frame_finish()
102 br_fdb_update(br, p, eth_hdr(skb)->h_source, vid, 0); in br_handle_frame_finish()
104 local_rcv = !!(br->dev->flags & IFF_PROMISC); in br_handle_frame_finish()
[all …]
Dbr_mdb.c22 struct net_bridge *br = netdev_priv(dev); in br_rports_fill_info() local
26 if (!br->multicast_router || hlist_empty(&br->router_list)) in br_rports_fill_info()
33 hlist_for_each_entry_rcu(p, &br->router_list, rlist) { in br_rports_fill_info()
108 lockdep_is_held(&p->key.port->br->multicast_lock)) { in __mdb_fill_srcs()
167 ifindex = mp->br->dev->ifindex; in __mdb_fill_info()
194 dump_srcs_mode = !!(mp->br->multicast_igmp_version == 3); in __mdb_fill_info()
204 dump_srcs_mode = !!(mp->br->multicast_mld_version == 2); in __mdb_fill_info()
236 struct net_bridge *br = netdev_priv(dev); in br_mdb_fill_info() local
240 if (!br_opt_get(br, BROPT_MULTICAST_ENABLED)) in br_mdb_fill_info()
247 hlist_for_each_entry_rcu(mp, &br->mdb_list, mdb_node) { in br_mdb_fill_info()
[all …]
Dbr_mrp_netlink.c31 static int br_mrp_instance_parse(struct net_bridge *br, struct nlattr *attr, in br_mrp_instance_parse() argument
62 return br_mrp_add(br, &inst); in br_mrp_instance_parse()
64 return br_mrp_del(br, &inst); in br_mrp_instance_parse()
134 static int br_mrp_ring_state_parse(struct net_bridge *br, struct nlattr *attr, in br_mrp_ring_state_parse() argument
158 return br_mrp_set_ring_state(br, &state); in br_mrp_ring_state_parse()
168 static int br_mrp_ring_role_parse(struct net_bridge *br, struct nlattr *attr, in br_mrp_ring_role_parse() argument
192 return br_mrp_set_ring_role(br, &role); in br_mrp_ring_role_parse()
205 static int br_mrp_start_test_parse(struct net_bridge *br, struct nlattr *attr, in br_mrp_start_test_parse() argument
238 return br_mrp_start_test(br, &test); in br_mrp_start_test_parse()
248 static int br_mrp_in_state_parse(struct net_bridge *br, struct nlattr *attr, in br_mrp_in_state_parse() argument
[all …]
/kernel/linux/linux-5.10/drivers/base/regmap/
Dregmap-spi-avmm.c184 static int br_trans_tx_prepare(struct spi_avmm_bridge *br, bool is_read, u32 reg, in br_trans_tx_prepare() argument
205 header = (struct trans_req_header *)br->trans_buf; in br_trans_tx_prepare()
215 if (trans_len > sizeof(br->trans_buf)) in br_trans_tx_prepare()
218 data = (__le32 *)(br->trans_buf + TRANS_REQ_HD_SIZE); in br_trans_tx_prepare()
225 br->trans_len = trans_len; in br_trans_tx_prepare()
253 static int br_pkt_phy_tx_prepare(struct spi_avmm_bridge *br) in br_pkt_phy_tx_prepare() argument
259 tb = br->trans_buf; in br_pkt_phy_tx_prepare()
260 tb_end = tb + br->trans_len; in br_pkt_phy_tx_prepare()
261 pb = br->phy_buf; in br_pkt_phy_tx_prepare()
262 pb_limit = pb + ARRAY_SIZE(br->phy_buf); in br_pkt_phy_tx_prepare()
[all …]
/kernel/linux/linux-5.10/drivers/clk/qcom/
Dclk-branch.c16 static bool clk_branch_in_hwcg_mode(const struct clk_branch *br) in clk_branch_in_hwcg_mode() argument
20 if (!br->hwcg_reg) in clk_branch_in_hwcg_mode()
23 regmap_read(br->clkr.regmap, br->hwcg_reg, &val); in clk_branch_in_hwcg_mode()
25 return !!(val & BIT(br->hwcg_bit)); in clk_branch_in_hwcg_mode()
28 static bool clk_branch_check_halt(const struct clk_branch *br, bool enabling) in clk_branch_check_halt() argument
30 bool invert = (br->halt_check == BRANCH_HALT_ENABLE); in clk_branch_check_halt()
33 regmap_read(br->clkr.regmap, br->halt_reg, &val); in clk_branch_check_halt()
35 val &= BIT(br->halt_bit); in clk_branch_check_halt()
47 static bool clk_branch2_check_halt(const struct clk_branch *br, bool enabling) in clk_branch2_check_halt() argument
55 regmap_read(br->clkr.regmap, br->halt_reg, &val); in clk_branch2_check_halt()
[all …]
/kernel/linux/linux-5.10/fs/xfs/scrub/
Dbitmap.c104 struct xbitmap_range *br; in xbitmap_disunion() local
131 br = list_entry(lp, struct xbitmap_range, list); in xbitmap_disunion()
137 while (sub_br->start + sub_br->len <= br->start) { in xbitmap_disunion()
142 if (sub_br->start >= br->start + br->len) { in xbitmap_disunion()
150 if (sub_br->start < br->start) { in xbitmap_disunion()
151 sub_len -= br->start - sub_br->start; in xbitmap_disunion()
152 sub_start = br->start; in xbitmap_disunion()
154 if (sub_len > br->len) in xbitmap_disunion()
155 sub_len = br->len; in xbitmap_disunion()
158 if (sub_start == br->start) in xbitmap_disunion()
[all …]
/kernel/linux/linux-5.10/arch/s390/kernel/
Dnospec-branch.c102 u8 *instr, *thunk, *br; in __nospec_revert() local
118 br = thunk + (*(int *)(thunk + 2)) * 2; in __nospec_revert()
124 br = thunk + (*(int *)(thunk + 2)) * 2; in __nospec_revert()
128 if ((br[0] & 0xbf) != 0x07 || (br[1] & 0xf0) != 0xf0) in __nospec_revert()
134 insnbuf[0] = br[0]; in __nospec_revert()
135 insnbuf[1] = (instr[1] & 0xf0) | (br[1] & 0x0f); in __nospec_revert()
136 if (br[0] == 0x47) { in __nospec_revert()
138 insnbuf[2] = br[2]; in __nospec_revert()
139 insnbuf[3] = br[3]; in __nospec_revert()
145 insnbuf[1] = (instr[1] & 0xf0) | (br[1] & 0x0f); in __nospec_revert()
[all …]
/kernel/linux/linux-5.10/arch/ia64/lib/
Dcopy_user.S90 (p8) br.ret.spnt.many rp // empty mempcy()
108 (p10) br.cond.dptk .long_copy_user
117 br.ctop.dptk.few 1b
122 br.ret.sptk.many rp // end of short memcpy
158 (p15) br.cond.spnt 1f
168 br.cond.spnt .word_copy_user
199 br.ctop.dptk.few 2b
205 (p9) br.cond.spnt 4f // if (16 > len1) skip 8-byte copy
237 (pred) br.cond.spnt .copy_user_bit##shift
245 br.ctop.dptk 1b; \
[all …]
/kernel/linux/linux-5.10/include/trace/events/
Dbridge.h44 TP_PROTO(struct net_bridge *br, struct net_bridge_port *p,
47 TP_ARGS(br, p, addr, vid),
50 __string(br_dev, br->dev->name)
57 __assign_str(br_dev, br->dev->name);
71 TP_PROTO(struct net_bridge *br, struct net_bridge_fdb_entry *f),
73 TP_ARGS(br, f),
76 __string(br_dev, br->dev->name)
83 __assign_str(br_dev, br->dev->name);
97 TP_PROTO(struct net_bridge *br, struct net_bridge_port *source,
100 TP_ARGS(br, source, addr, vid, flags),
[all …]

12345678910