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:
70bdb18657da ("ethdev: add Rx error counters for missed, badcrc and badlen packets")
Fixes:
6bfe648406b5 ("i40e: add Rx error statistics")
Fixes:
856505d303f4 ("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>
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 (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);
}
printf(" RX-error: %-"PRIu64"\n", stats->ierrors);
printf(" RX-nombufs: %-14"PRIu64"\n", stats->rx_nombuf);
}
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 (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);
printf(" RX-error:%"PRIu64"\n", stats->ierrors);
printf(" RX-nombufs: %14"PRIu64"\n",
stats->rx_nombuf);
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_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;
/* TX Stats */
eth_stats->opackets = ps.tx_frames;
/* TX Stats */
eth_stats->opackets = ps.tx_frames;
rte_stats->imissed = stats->mpc;
rte_stats->ierrors = stats->crcerrs +
stats->rlec + stats->ruc + stats->roc +
rte_stats->imissed = stats->mpc;
rte_stats->ierrors = stats->crcerrs +
stats->rlec + stats->ruc + stats->roc +
stats->rxerrc + stats->algnerrc + stats->cexterr;
/* Tx Errors */
stats->rxerrc + stats->algnerrc + stats->cexterr;
/* Tx Errors */
rte_stats->imissed = stats->mpc;
rte_stats->ierrors = stats->crcerrs +
stats->rlec + stats->ruc + stats->roc +
rte_stats->imissed = stats->mpc;
rte_stats->ierrors = stats->crcerrs +
stats->rlec + stats->ruc + stats->roc +
stats->rxerrc + stats->algnerrc + stats->cexterr;
/* Tx Errors */
stats->rxerrc + stats->algnerrc + stats->cexterr;
/* Tx Errors */
pf->main_vsi->eth_stats.rx_discards;
stats->ierrors = ns->crc_errors +
ns->rx_length_errors + ns->rx_undersize +
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);
PMD_DRV_LOG(DEBUG, "***************** PF stats start *******************");
PMD_DRV_LOG(DEBUG, "rx_bytes: %"PRIu64"", ns->eth.rx_bytes);
hw_stats->rlec +
hw_stats->ruc +
hw_stats->roc +
hw_stats->rlec +
hw_stats->ruc +
hw_stats->roc +
hw_stats->illerrc +
hw_stats->errbc +
hw_stats->rfc +
hw_stats->illerrc +
hw_stats->errbc +
hw_stats->rfc +