lkml.org 
[lkml]   [2016]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH net 2/4] net-procfs: show rx_unhandled counters
Date
The rx_unhandled counters get output here in a column after drop with
a heading name of unh. I'm not sure if perhaps /proc/net/dev should be
considered a stable interface that shouldn't be mucked with. If so,
this can certainly be dropped, without impacting the core functionality.

CC: netdev@vger.kernel.org
Signed-off-by: Jarod Wilson <jarod@redhat.com>
---
net/core/net-procfs.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/net/core/net-procfs.c b/net/core/net-procfs.c
index 2bf8329..9f88f34 100644
--- a/net/core/net-procfs.c
+++ b/net/core/net-procfs.c
@@ -79,11 +79,12 @@ static void dev_seq_printf_stats(struct seq_file *seq, struct net_device *dev)
struct rtnl_link_stats64 temp;
const struct rtnl_link_stats64 *stats = dev_get_stats(dev, &temp);

- seq_printf(seq, "%6s: %7llu %7llu %4llu %4llu %4llu %5llu %10llu %9llu "
- "%8llu %7llu %4llu %4llu %4llu %5llu %7llu %10llu\n",
+ seq_printf(seq, "%6s: %7llu %7llu %4llu %4llu %4llu %4llu %5llu %10llu "
+ "%9llu %8llu %7llu %4llu %4llu %4llu %5llu %7llu %10llu\n",
dev->name, stats->rx_bytes, stats->rx_packets,
stats->rx_errors,
stats->rx_dropped + stats->rx_missed_errors,
+ stats->rx_unhandled,
stats->rx_fifo_errors,
stats->rx_length_errors + stats->rx_over_errors +
stats->rx_crc_errors + stats->rx_frame_errors,
@@ -107,9 +108,9 @@ static int dev_seq_show(struct seq_file *seq, void *v)
if (v == SEQ_START_TOKEN)
seq_puts(seq, "Inter-| Receive "
" | Transmit\n"
- " face |bytes packets errs drop fifo frame "
- "compressed multicast|bytes packets errs "
- "drop fifo colls carrier compressed\n");
+ " face |bytes packets errs drop unh fifo "
+ "frame compressed multicast|bytes packets "
+ "errs drop fifo colls carrier compressed\n");
else
dev_seq_printf_stats(seq, v);
return 0;
--
1.8.3.1
\
 
 \ /
  Last update: 2016-01-27 22:01    [W:0.185 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site