9eb97422 | 28-Apr-2020 |
Wei Hu (Xavier) <xavier.huwei@huawei.com> |
app/testpmd: fix statistics after reset
Currently, when running start/clear stats&xstats/stop command many times based on testpmd application, there are incorrect forward Rx/Tx-packets stats as belo
app/testpmd: fix statistics after reset
Currently, when running start/clear stats&xstats/stop command many times based on testpmd application, there are incorrect forward Rx/Tx-packets stats as below: ---------------------- Forward statistics for port 0 -------------- RX-packets: 18446744073709544808 RX-dropped: 0 <snip> TX-packets: 18446744073709536616 TX-dropped: 0 <snip> --------------------------------------------------------------------
The root cause as below: 1. The struct rte_port of testpmd.h has a member variable "struct rte_eth_stats stats" to store the last port statistics. 2. When running start command, it execute cmd_start_parsed -> start_packet_forwarding -> fwd_stats_reset, which call rte_eth_stats_get API function to save current port statistics. 3. When running stop command, it execute fwd_stats_display, which call rte_eth_stats_get to get current port statistics, and then minus last port statistics. 4. If we run clear stats or xstats after start command, then run stop, it may display above incorrect stats because the current Rx/Tx-packets is lower than the last saved RX/TX-packets(uint64_t overflow).
This patch fixes it by clearing last port statistics when executing "clear stats/xstats" command.
Fixes: af75078fece3 ("first public release") Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com> Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
show more ...
|
b57b66a9 | 16-Jan-2020 |
Ori Kam <orika@mellanox.com> |
app/testpmd: support mbuf dynamic flag
DPDK now supports registration of dynamic flags (dynf) to the mbuf. dynf can be given any name, and can be used with a supporting PMD or supporting application
app/testpmd: support mbuf dynamic flag
DPDK now supports registration of dynamic flags (dynf) to the mbuf. dynf can be given any name, and can be used with a supporting PMD or supporting application.
Due to the generic concept of the dynf, it is impossible and meaningless, to define register set/get function for each flag. This commit introduce a generic way to register and set/clear such flags.
The basic syntax: port config <port id> dynf <name> <set|clear>
The first step the new flag is registered. Regardless if the action is set or clear. There is no way to unregister the flag, after registering it.
The second step, if the action is set then we set the requested flag. If this is the first flag that is enabled we also register a call back for the Tx. In this call back we set the flag. If the action is clear the requested flag is cleared, and if there are no more flags that are set, the call back is removed.
The reason that the set is only applied in Tx is that in case of Rx it is assumed that the value comes from the PMD.
If log is enabled the name of the flag, and value will be printed in the packet info. In order for the log to work correctly the registration of the flag must be done before setting verbose.
Signed-off-by: Ori Kam <orika@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
show more ...
|
fb1a5a0f | 10-Oct-2019 |
Vivek Sharma <viveksharma@marvell.com> |
app/testpmd: introduce Rx offloads option
Introduce boot time argument for configuring all rx offloads.
Signed-off-by: Vivek Sharma <viveksharma@marvell.com> Reviewed-by: Ferruh Yigit <ferruh.yigit
app/testpmd: introduce Rx offloads option
Introduce boot time argument for configuring all rx offloads.
Signed-off-by: Vivek Sharma <viveksharma@marvell.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
show more ...
|