Lines Matching +full:half +full:- +full:duplex +full:- +full:capable
1 // SPDX-License-Identifier: GPL-2.0
14 struct bonding *bond = pde_data(file_inode(seq->file)); in bond_info_seq_start()
33 struct bonding *bond = pde_data(file_inode(seq->file)); in bond_info_seq_next()
60 struct bonding *bond = pde_data(file_inode(seq->file)); in bond_info_show_master()
65 curr = rcu_dereference(bond->curr_active_slave); in bond_info_show_master()
71 bond->params.fail_over_mac) { in bond_info_show_master()
73 bond->params.fail_over_mac); in bond_info_show_master()
74 seq_printf(seq, " (fail_over_mac %s)", optval->string); in bond_info_show_master()
81 bond->params.xmit_policy); in bond_info_show_master()
83 optval->string, bond->params.xmit_policy); in bond_info_show_master()
87 primary = rcu_dereference(bond->primary_slave); in bond_info_show_master()
89 primary ? primary->dev->name : "None"); in bond_info_show_master()
92 bond->params.primary_reselect); in bond_info_show_master()
94 optval->string); in bond_info_show_master()
98 (curr) ? curr->dev->name : "None"); in bond_info_show_master()
101 seq_printf(seq, "MII Status: %s\n", netif_carrier_ok(bond->dev) ? in bond_info_show_master()
103 seq_printf(seq, "MII Polling Interval (ms): %d\n", bond->params.miimon); in bond_info_show_master()
105 bond->params.updelay * bond->params.miimon); in bond_info_show_master()
107 bond->params.downdelay * bond->params.miimon); in bond_info_show_master()
109 bond->params.peer_notif_delay * bond->params.miimon); in bond_info_show_master()
113 if (bond->params.arp_interval > 0) { in bond_info_show_master()
117 bond->params.arp_interval); in bond_info_show_master()
119 bond->params.missed_max); in bond_info_show_master()
124 if (!bond->params.arp_targets[i]) in bond_info_show_master()
128 seq_printf(seq, " %pI4", &bond->params.arp_targets[i]); in bond_info_show_master()
138 if (ipv6_addr_any(&bond->params.ns_targets[i])) in bond_info_show_master()
142 seq_printf(seq, " %pI6c", &bond->params.ns_targets[i]); in bond_info_show_master()
154 (bond->params.lacp_active) ? "on" : "off"); in bond_info_show_master()
156 (bond->params.lacp_fast) ? "fast" : "slow"); in bond_info_show_master()
157 seq_printf(seq, "Min links: %d\n", bond->params.min_links); in bond_info_show_master()
159 bond->params.ad_select); in bond_info_show_master()
161 optval->string); in bond_info_show_master()
162 if (capable(CAP_NET_ADMIN)) { in bond_info_show_master()
171 bond->dev->name); in bond_info_show_master()
193 struct bonding *bond = pde_data(file_inode(seq->file)); in bond_info_show_slave()
195 seq_printf(seq, "\nSlave Interface: %s\n", slave->dev->name); in bond_info_show_slave()
196 seq_printf(seq, "MII Status: %s\n", bond_slave_link_status(slave->link)); in bond_info_show_slave()
197 if (slave->speed == SPEED_UNKNOWN) in bond_info_show_slave()
200 seq_printf(seq, "Speed: %d Mbps\n", slave->speed); in bond_info_show_slave()
202 if (slave->duplex == DUPLEX_UNKNOWN) in bond_info_show_slave()
203 seq_printf(seq, "Duplex: %s\n", "Unknown"); in bond_info_show_slave()
205 seq_printf(seq, "Duplex: %s\n", slave->duplex ? "full" : "half"); in bond_info_show_slave()
208 slave->link_failure_count); in bond_info_show_slave()
211 slave->dev->addr_len, slave->perm_hwaddr); in bond_info_show_slave()
212 seq_printf(seq, "Slave queue ID: %d\n", READ_ONCE(slave->queue_id)); in bond_info_show_slave()
215 const struct port *port = &SLAVE_AD_INFO(slave)->port; in bond_info_show_slave()
216 const struct aggregator *agg = port->aggregator; in bond_info_show_slave()
220 agg->aggregator_identifier); in bond_info_show_slave()
222 bond_3ad_churn_desc(port->sm_churn_actor_state)); in bond_info_show_slave()
224 bond_3ad_churn_desc(port->sm_churn_partner_state)); in bond_info_show_slave()
226 port->churn_actor_count); in bond_info_show_slave()
228 port->churn_partner_count); in bond_info_show_slave()
230 if (capable(CAP_NET_ADMIN)) { in bond_info_show_slave()
233 port->actor_system_priority); in bond_info_show_slave()
235 &port->actor_system); in bond_info_show_slave()
237 port->actor_oper_port_key); in bond_info_show_slave()
239 port->actor_port_priority); in bond_info_show_slave()
241 port->actor_port_number); in bond_info_show_slave()
243 port->actor_oper_port_state); in bond_info_show_slave()
247 port->partner_oper.system_priority); in bond_info_show_slave()
249 &port->partner_oper.system); in bond_info_show_slave()
251 port->partner_oper.key); in bond_info_show_slave()
253 port->partner_oper.port_priority); in bond_info_show_slave()
255 port->partner_oper.port_number); in bond_info_show_slave()
257 port->partner_oper.port_state); in bond_info_show_slave()
285 struct net_device *bond_dev = bond->dev; in bond_create_proc_entry()
288 if (bn->proc_dir) { in bond_create_proc_entry()
289 bond->proc_entry = proc_create_seq_data(bond_dev->name, 0444, in bond_create_proc_entry()
290 bn->proc_dir, &bond_info_seq_ops, bond); in bond_create_proc_entry()
291 if (bond->proc_entry == NULL) in bond_create_proc_entry()
293 DRV_NAME, bond_dev->name); in bond_create_proc_entry()
295 memcpy(bond->proc_file_name, bond_dev->name, IFNAMSIZ); in bond_create_proc_entry()
301 struct net_device *bond_dev = bond->dev; in bond_remove_proc_entry()
304 if (bn->proc_dir && bond->proc_entry) { in bond_remove_proc_entry()
305 remove_proc_entry(bond->proc_file_name, bn->proc_dir); in bond_remove_proc_entry()
306 memset(bond->proc_file_name, 0, IFNAMSIZ); in bond_remove_proc_entry()
307 bond->proc_entry = NULL; in bond_remove_proc_entry()
316 if (!bn->proc_dir) { in bond_create_proc_dir()
317 bn->proc_dir = proc_mkdir(DRV_NAME, bn->net->proc_net); in bond_create_proc_dir()
318 if (!bn->proc_dir) in bond_create_proc_dir()
328 if (bn->proc_dir) { in bond_destroy_proc_dir()
329 remove_proc_entry(DRV_NAME, bn->net->proc_net); in bond_destroy_proc_dir()
330 bn->proc_dir = NULL; in bond_destroy_proc_dir()