2 #include <linux/export.h>
8 static void *bond_info_seq_start(
struct seq_file *seq, loff_t *
pos)
32 static void *bond_info_seq_next(
struct seq_file *seq,
void *
v, loff_t *
pos)
35 struct slave *slave =
v;
46 static void bond_info_seq_stop(
struct seq_file *seq,
void *v)
56 static void bond_info_show_master(
struct seq_file *seq)
70 bond->
params.fail_over_mac)
78 seq_printf(seq,
"Transmit Hash Policy: %s (%d)\n",
91 seq_printf(seq,
"\nCurrently Active Slave: %s\n",
92 (curr) ? curr->
dev->name :
"None");
95 seq_printf(seq,
"MII Status: %s\n", netif_carrier_ok(bond->
dev) ?
105 if (bond->
params.arp_interval > 0) {
107 seq_printf(seq,
"ARP Polling Interval (ms): %d\n",
108 bond->
params.arp_interval);
110 seq_printf(seq,
"ARP IP target/s (n.n.n.n form):");
113 if (!bond->
params.arp_targets[i])
128 (bond->
params.lacp_fast) ?
"fast" :
"slow");
130 seq_printf(seq,
"Aggregator selection policy (ad_select): %s\n",
134 seq_printf(seq,
"bond %s has no active aggregator\n",
147 seq_printf(seq,
"\tPartner Mac Address: %pM\n",
153 static const char *bond_slave_link_status(
s8 link)
155 static const char *
const status[] = {
165 static void bond_info_show_slave(
struct seq_file *seq,
166 const struct slave *slave)
170 seq_printf(seq,
"\nSlave Interface: %s\n", slave->
dev->name);
171 seq_printf(seq,
"MII Status: %s\n", bond_slave_link_status(slave->
link));
195 seq_puts(seq,
"Aggregator ID: N/A\n");
200 static int bond_info_seq_show(
struct seq_file *seq,
void *v)
204 bond_info_show_master(seq);
206 bond_info_show_slave(seq, v);
212 .start = bond_info_seq_start,
213 .next = bond_info_seq_next,
214 .stop = bond_info_seq_stop,
215 .show = bond_info_seq_show,
224 res =
seq_open(file, &bond_info_seq_ops);
237 .open = bond_info_open,
251 &bond_info_fops, bond);
252 if (bond->proc_entry ==
NULL)
253 pr_warning(
"Warning: Cannot create /proc/net/%s/%s\n",
265 if (bn->proc_dir && bond->proc_entry) {
268 bond->proc_entry =
NULL;
280 pr_warning(
"Warning: cannot create /proc/net/%s\n",