| .. | .. |
|---|
| 20 | 20 | struct hlist_head *h; |
|---|
| 21 | 21 | unsigned int count = 0, offset = get_offset(*pos); |
|---|
| 22 | 22 | |
|---|
| 23 | | - h = &net->dev_name_head[get_bucket(*pos)]; |
|---|
| 24 | | - hlist_for_each_entry_rcu(dev, h, name_hlist) { |
|---|
| 23 | + h = &net->dev_index_head[get_bucket(*pos)]; |
|---|
| 24 | + hlist_for_each_entry_rcu(dev, h, index_hlist) { |
|---|
| 25 | 25 | if (++count == offset) |
|---|
| 26 | 26 | return dev; |
|---|
| 27 | 27 | } |
|---|
| .. | .. |
|---|
| 116 | 116 | return 0; |
|---|
| 117 | 117 | } |
|---|
| 118 | 118 | |
|---|
| 119 | +static u32 softnet_backlog_len(struct softnet_data *sd) |
|---|
| 120 | +{ |
|---|
| 121 | + return skb_queue_len_lockless(&sd->input_pkt_queue) + |
|---|
| 122 | + skb_queue_len_lockless(&sd->process_queue); |
|---|
| 123 | +} |
|---|
| 124 | + |
|---|
| 119 | 125 | static struct softnet_data *softnet_get_online(loff_t *pos) |
|---|
| 120 | 126 | { |
|---|
| 121 | 127 | struct softnet_data *sd = NULL; |
|---|
| .. | .. |
|---|
| 159 | 165 | rcu_read_unlock(); |
|---|
| 160 | 166 | #endif |
|---|
| 161 | 167 | |
|---|
| 168 | + /* the index is the CPU id owing this sd. Since offline CPUs are not |
|---|
| 169 | + * displayed, it would be othrwise not trivial for the user-space |
|---|
| 170 | + * mapping the data a specific CPU |
|---|
| 171 | + */ |
|---|
| 162 | 172 | seq_printf(seq, |
|---|
| 163 | | - "%08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x\n", |
|---|
| 173 | + "%08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x\n", |
|---|
| 164 | 174 | sd->processed, sd->dropped, sd->time_squeeze, 0, |
|---|
| 165 | 175 | 0, 0, 0, 0, /* was fastroute */ |
|---|
| 166 | 176 | 0, /* was cpu_collision */ |
|---|
| 167 | | - sd->received_rps, flow_limit_count); |
|---|
| 177 | + sd->received_rps, flow_limit_count, |
|---|
| 178 | + softnet_backlog_len(sd), (int)seq->index); |
|---|
| 168 | 179 | return 0; |
|---|
| 169 | 180 | } |
|---|
| 170 | 181 | |
|---|
| .. | .. |
|---|
| 288 | 299 | else |
|---|
| 289 | 300 | seq_printf(seq, "%04x", ntohs(pt->type)); |
|---|
| 290 | 301 | |
|---|
| 291 | | - seq_printf(seq, " %-8s %pf\n", |
|---|
| 302 | + seq_printf(seq, " %-8s %ps\n", |
|---|
| 292 | 303 | pt->dev ? pt->dev->name : "", pt->func); |
|---|
| 293 | 304 | } |
|---|
| 294 | 305 | |
|---|