From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f52.google.com (mail-pg0-f52.google.com [74.125.83.52]) by dpdk.org (Postfix) with ESMTP id 9DEFE20F for ; Wed, 17 May 2017 00:41:45 +0200 (CEST) Received: by mail-pg0-f52.google.com with SMTP id x64so63547636pgd.3 for ; Tue, 16 May 2017 15:41:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jL2SWDcIOuE7Aw4xwDZNzkNQAOCi2bupLUpUpBL8Uow=; b=BZ+plfJjdXrMoO+mqVMZIyajjG372sphyEtmNZHFkqpW6f2pyUz+vwL135GtBOqC8a UNjDKarZyt9k87Bi99lOojMBQmvFJ4lBMT5AEXjDargkVoKd+60/WIQfKeCpc5V/QfHZ 1uFsYp1Gd9JAea4QIXchpjNqNsv4HajriWqHGee3MYhf9AF58cPyUmy+CL+cb5tlDR79 YoUt3EG4SZwcAsSd+vNoX2b79kCTip46yuAQC7EQA5UjLq63zTFgSFJO6EdfHodrb9QX kRkr1nEG+Ioq6hwAQJbaW2e4GRLgQmmXNRBGT5PQRQ9sQUQTP6obzRr+wP7y1sj12iA0 +1Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jL2SWDcIOuE7Aw4xwDZNzkNQAOCi2bupLUpUpBL8Uow=; b=Qs9NUBQCnsuj6q071qKM27PAcYNfnSnrCDORskQe/sCiVwAoYBoHu34dzRweZuhV27 cHC0OBo/c9e/oJcX6FulSMuqaK7JPZuyqDHhQCApVj1BwHKbi1JztNueYU1byJYBWaDS m2mfpGc4d6t0vWtTiVdoDm6zfcFarWxc+MNuMAm/fiA7mrfhH4YANolrdp7Uuser8ndC 85os7VmVE8bQIH1x8UNWhGoyrc7eDg6jFrwOwqKXHyLSyL6+v0iiYEZGFhVaBEwU6WkG k43Vzhh/ux+APEWW92xxtYZ6Ptez+5u0w5fvc8FJlwsYZvxXy/XbYERtwQhkEUDlaWuG zP+w== X-Gm-Message-State: AODbwcDLrKeHQa2ye8FaMU9+ziZJk28FRKCUC2wGaAwMgO19DzvGP+UG DYRtgbcEgk9w+NZeNGC+7w== X-Received: by 10.99.101.130 with SMTP id z124mr375550pgb.8.1494974504187; Tue, 16 May 2017 15:41:44 -0700 (PDT) Received: from xeon-e3 (76-14-207-240.or.wavecable.com. [76.14.207.240]) by smtp.gmail.com with ESMTPSA id p68sm160064pga.6.2017.05.16.15.41.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 May 2017 15:41:44 -0700 (PDT) Date: Tue, 16 May 2017 15:41:36 -0700 From: Stephen Hemminger To: Tom Hall Cc: "dev@dpdk.org" Message-ID: <20170516154136.7e5c8baf@xeon-e3> In-Reply-To: <1494969873552.80827@Brocade.com> References: <1494969873552.80827@Brocade.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] Guidelines for stats_get ierrors in a media driver X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 22:41:46 -0000 On Tue, 16 May 2017 21:25:37 +0000 Tom Hall 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.