mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
drivers/net/vsc9953: Add command to show/clear port counters
The new added command: ethsw [port <port_no>] statistics { [help] | [clear] } will print counters like the number of Rx/Tx frames, number of Rx/Tx bytes, number of Rx/Tx unicast frames, etc. This patch also adds this commnd in the genereric ethsw parser from cmd_ethsw.c Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@freescale.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: York Sun <yorksun@freescale.com>
This commit is contained in:
parent
24a23deb90
commit
86719f0cd5
4 changed files with 415 additions and 3 deletions
|
@ -20,6 +20,8 @@ enum ethsw_keyword_id {
|
|||
ethsw_id_port,
|
||||
ethsw_id_enable,
|
||||
ethsw_id_disable,
|
||||
ethsw_id_statistics,
|
||||
ethsw_id_clear,
|
||||
ethsw_id_count, /* keep last */
|
||||
};
|
||||
|
||||
|
@ -41,6 +43,8 @@ struct ethsw_command_func {
|
|||
int (*port_enable)(struct ethsw_command_def *parsed_cmd);
|
||||
int (*port_disable)(struct ethsw_command_def *parsed_cmd);
|
||||
int (*port_show)(struct ethsw_command_def *parsed_cmd);
|
||||
int (*port_stats)(struct ethsw_command_def *parsed_cmd);
|
||||
int (*port_stats_clear)(struct ethsw_command_def *parsed_cmd);
|
||||
};
|
||||
|
||||
int ethsw_define_functions(const struct ethsw_command_func *cmd_func);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue