From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Hall Subject: Guidelines for stats_get ierrors in a media driver Date: Tue, 16 May 2017 21:25:37 +0000 Message-ID: <1494969873552.80827@Brocade.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: "dev@dpdk.org" Return-path: Received: from mx0a-000f0801.pphosted.com (mx0a-000f0801.pphosted.com [67.231.144.122]) by dpdk.org (Postfix) with ESMTP id AE01920F for ; Tue, 16 May 2017 23:25:40 +0200 (CEST) Received: from pps.filterd (m0000542.ppops.net [127.0.0.1]) by mx0a-000f0801.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v4GLNbC9004395 for ; Tue, 16 May 2017 14:25:39 -0700 Received: from hq1wp-exmb12.corp.brocade.com ([144.49.131.13]) by mx0a-000f0801.pphosted.com with ESMTP id 2afebhxpss-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Tue, 16 May 2017 14:25:39 -0700 Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "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 =3D 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 =3D 0; i < hw->num_rx_queues; i++) { struct UPT1_RxStats *rxStats =3D &h= w->rqd_start[i].stats; stats->q_ipackets[i] =3D rxStats->ucastPktsRxOK + rx= Stats->mcastPktsRxOK + rxStats->bcastPktsRxOK; stats->q_ibytes[i] =3D rxSta= ts->ucastBytesRxOK + rxStats->mcastBytesRxOK + rxStats->bcastBytesRxOK; sta= ts->ipackets +=3D stats->q_ipackets[i]; stats->ibytes +=3D stats->q_ibytes[= i]; stats->q_errors[i] =3D rxStats->pktsRxError; stats->ierrors +=3D rxStat= s->pktsRxError; stats->rx_nombuf +=3D rxStats->pktsRxOutOfBuf; } The bnx2x driver sets the value in this way stats->ierrors =3D 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 represen= t? Tom Hall Brocade Communications