]> git.ipfire.org Git - thirdparty/u-boot.git/commit
cmd: net: add a 'net stats' command to dump network statistics
authorIoana Ciornei <ioana.ciornei@nxp.com>
Tue, 23 May 2023 13:47:47 +0000 (16:47 +0300)
committerPeng Fan <peng.fan@nxp.com>
Wed, 14 Jun 2023 10:40:16 +0000 (18:40 +0800)
commitc85e96d0d1e53196abc389f6b1bfabefb3336aea
tree8f750eaf3178938c51991389fc160c37256f3842
parent22df08d82eeb0ffd5aa3b7f15ca978dfb5cc8377
cmd: net: add a 'net stats' command to dump network statistics

Add a new option to the 'net' command which can be used to dump network
statistics.

To do this, 3 new callbacks are added to the eth_ops structure:
.get_sset_count(), .get_strings(), .get_stats(). These callbacks
have the same functions as in Linux: to return the number of counters,
the strings which describe those counters and the actual values.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
cmd/net.c
include/net.h