ethdev: remove missed packets from error counter
Comment for "ierrors" counter says that it counts erroneous received packets. But for some reason "imissed" counter is added to "ierrors" counter in most drivers. It is a mistake, because missed packets are obviously not received. This patch fixes it. Fixes:70bdb18657
("ethdev: add Rx error counters for missed, badcrc and badlen packets") Fixes:6bfe648406
("i40e: add Rx error statistics") Fixes:856505d303
("cxgbe: add port statistics") Signed-off-by: Igor Ryzhov <iryzhov@nfware.com> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com> Acked-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com> Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
This commit is contained in:
parent
42bd7cc8b3
commit
86057c9992
@ -759,7 +759,7 @@ fwd_port_stats_display(portid_t port_id, struct rte_eth_stats *stats)
|
||||
if (cur_fwd_eng == &csum_fwd_engine)
|
||||
printf(" Bad-ipcsum: %-14"PRIu64" Bad-l4csum: %-14"PRIu64" \n",
|
||||
port->rx_bad_ip_csum, port->rx_bad_l4_csum);
|
||||
if (((stats->ierrors - stats->imissed) + stats->rx_nombuf) > 0) {
|
||||
if ((stats->ierrors + stats->rx_nombuf) > 0) {
|
||||
printf(" RX-error: %-"PRIu64"\n", stats->ierrors);
|
||||
printf(" RX-nombufs: %-14"PRIu64"\n", stats->rx_nombuf);
|
||||
}
|
||||
@ -778,7 +778,7 @@ fwd_port_stats_display(portid_t port_id, struct rte_eth_stats *stats)
|
||||
if (cur_fwd_eng == &csum_fwd_engine)
|
||||
printf(" Bad-ipcsum:%14"PRIu64" Bad-l4csum:%14"PRIu64"\n",
|
||||
port->rx_bad_ip_csum, port->rx_bad_l4_csum);
|
||||
if (((stats->ierrors - stats->imissed) + stats->rx_nombuf) > 0) {
|
||||
if ((stats->ierrors + stats->rx_nombuf) > 0) {
|
||||
printf(" RX-error:%"PRIu64"\n", stats->ierrors);
|
||||
printf(" RX-nombufs: %14"PRIu64"\n",
|
||||
stats->rx_nombuf);
|
||||
|
@ -662,7 +662,7 @@ static void cxgbe_dev_stats_get(struct rte_eth_dev *eth_dev,
|
||||
ps.rx_trunc2 + ps.rx_trunc3;
|
||||
eth_stats->ierrors = ps.rx_symbol_err + ps.rx_fcs_err +
|
||||
ps.rx_jabber + ps.rx_too_long + ps.rx_runt +
|
||||
ps.rx_len_err + eth_stats->imissed;
|
||||
ps.rx_len_err;
|
||||
|
||||
/* TX Stats */
|
||||
eth_stats->opackets = ps.tx_frames;
|
||||
|
@ -945,7 +945,6 @@ eth_em_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *rte_stats)
|
||||
rte_stats->imissed = stats->mpc;
|
||||
rte_stats->ierrors = stats->crcerrs +
|
||||
stats->rlec + stats->ruc + stats->roc +
|
||||
rte_stats->imissed +
|
||||
stats->rxerrc + stats->algnerrc + stats->cexterr;
|
||||
|
||||
/* Tx Errors */
|
||||
|
@ -1651,7 +1651,6 @@ eth_igb_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *rte_stats)
|
||||
rte_stats->imissed = stats->mpc;
|
||||
rte_stats->ierrors = stats->crcerrs +
|
||||
stats->rlec + stats->ruc + stats->roc +
|
||||
rte_stats->imissed +
|
||||
stats->rxerrc + stats->algnerrc + stats->cexterr;
|
||||
|
||||
/* Tx Errors */
|
||||
|
@ -2092,8 +2092,7 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
|
||||
pf->main_vsi->eth_stats.rx_discards;
|
||||
stats->ierrors = ns->crc_errors +
|
||||
ns->rx_length_errors + ns->rx_undersize +
|
||||
ns->rx_oversize + ns->rx_fragments + ns->rx_jabber +
|
||||
stats->imissed;
|
||||
ns->rx_oversize + ns->rx_fragments + ns->rx_jabber;
|
||||
|
||||
PMD_DRV_LOG(DEBUG, "***************** PF stats start *******************");
|
||||
PMD_DRV_LOG(DEBUG, "rx_bytes: %"PRIu64"", ns->eth.rx_bytes);
|
||||
|
@ -2646,7 +2646,6 @@ ixgbe_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
|
||||
hw_stats->rlec +
|
||||
hw_stats->ruc +
|
||||
hw_stats->roc +
|
||||
total_missed_rx +
|
||||
hw_stats->illerrc +
|
||||
hw_stats->errbc +
|
||||
hw_stats->rfc +
|
||||
|
Loading…
Reference in New Issue
Block a user