DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] Guidelines for stats_get ierrors in a media driver
@ 2017-05-16 21:25 Tom Hall
  2017-05-16 22:41 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Hall @ 2017-05-16 21:25 UTC (permalink / raw)
  To: dev

I'm trying to make sense of the stats_get ierrors value. It doesn't appear that there is any consistency between any of the net drivers for what this value truly represents. For example, the ixgbe driver calculates the value as


stats->ierrors  = hw_stats->crcerrs +
                          hw_stats->mspdc +
                          hw_stats->rlec +
                          hw_stats->ruc +
                          hw_stats->roc +
                          hw_stats->illerrc +
                          hw_stats->errbc +
                          hw_stats->rfc +
                          hw_stats->fccrc +
                          hw_stats->fclast;

While the vmxnet3 driver does the following

RTE_BUILD_BUG_ON(RTE_ETHDEV_QUEUE_STAT_CNTRS < VMXNET3_MAX_RX_QUEUES); for (i = 0; i < hw->num_rx_queues; i++) { struct UPT1_RxStats *rxStats = &hw->rqd_start[i].stats; stats->q_ipackets[i] = rxStats->ucastPktsRxOK + rxStats->mcastPktsRxOK + rxStats->bcastPktsRxOK; stats->q_ibytes[i] = rxStats->ucastBytesRxOK + rxStats->mcastBytesRxOK + rxStats->bcastBytesRxOK; stats->ipackets += stats->q_ipackets[i]; stats->ibytes += stats->q_ibytes[i]; stats->q_errors[i] = rxStats->pktsRxError; stats->ierrors += rxStats->pktsRxError; stats->rx_nombuf += rxStats->pktsRxOutOfBuf; }

The bnx2x driver sets the value in this way

stats->ierrors =
                HILO_U64(sc->eth_stats.error_bytes_received_hi,
                                sc->eth_stats.error_bytes_received_lo);

Can someone address this inconsistancY? What should stats->ierrors represent?

Tom Hall

Brocade Communications

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] Guidelines for stats_get ierrors in a media driver
  2017-05-16 21:25 [dpdk-dev] Guidelines for stats_get ierrors in a media driver Tom Hall
@ 2017-05-16 22:41 ` Stephen Hemminger
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2017-05-16 22:41 UTC (permalink / raw)
  To: Tom Hall; +Cc: dev

On Tue, 16 May 2017 21:25:37 +0000
Tom Hall <thall@Brocade.com> wrote:

> I'm trying to make sense of the stats_get ierrors value. It doesn't appear that there is any consistency between any of the net drivers for what this value truly represents. For example, the ixgbe driver calculates the value as
> 
> 
> stats->ierrors  = hw_stats->crcerrs +
>                           hw_stats->mspdc +
>                           hw_stats->rlec +
>                           hw_stats->ruc +
>                           hw_stats->roc +
>                           hw_stats->illerrc +
>                           hw_stats->errbc +
>                           hw_stats->rfc +
>                           hw_stats->fccrc +
>                           hw_stats->fclast;
> 
> While the vmxnet3 driver does the following
> 
> RTE_BUILD_BUG_ON(RTE_ETHDEV_QUEUE_STAT_CNTRS < VMXNET3_MAX_RX_QUEUES); for (i = 0; i < hw->num_rx_queues; i++) { struct UPT1_RxStats *rxStats = &hw->rqd_start[i].stats; stats->q_ipackets[i] = rxStats->ucastPktsRxOK + rxStats->mcastPktsRxOK + rxStats->bcastPktsRxOK; stats->q_ibytes[i] = rxStats->ucastBytesRxOK + rxStats->mcastBytesRxOK + rxStats->bcastBytesRxOK; stats->ipackets += stats->q_ipackets[i]; stats->ibytes += stats->q_ibytes[i]; stats->q_errors[i] = rxStats->pktsRxError; stats->ierrors += rxStats->pktsRxError; stats->rx_nombuf += rxStats->pktsRxOutOfBuf; }
> 
> The bnx2x driver sets the value in this way
> 
> stats->ierrors =
>                 HILO_U64(sc->eth_stats.error_bytes_received_hi,
>                                 sc->eth_stats.error_bytes_received_lo);
> 
> Can someone address this inconsistancY? What should stats->ierrors represent?
> 
> Tom Hall
> 
> Brocade Communications

IMHO the DPDK driver should give the same value for ierrors that shows up for the analogous
driver in Linux kernel. I.e DPDK ierrors == Linux rx_errors (== ifi_ierrors BSD).

What you see is different drivers combining different internal error counters to produce
the same effective result.

If you want to drill down into each device type. then there are xstats for that.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-16 22:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-16 21:25 [dpdk-dev] Guidelines for stats_get ierrors in a media driver Tom Hall
2017-05-16 22:41 ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).