From patchwork Tue May 10 21:21:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "John Daley (johndale)" X-Patchwork-Id: 12671 X-Patchwork-Delegate: bruce.richardson@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 469FFC312; Tue, 10 May 2016 23:21:29 +0200 (CEST) Received: from rcdn-iport-6.cisco.com (rcdn-iport-6.cisco.com [173.37.86.77]) by dpdk.org (Postfix) with ESMTP id 96A75ADF6 for ; Tue, 10 May 2016 23:21:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1308; q=dns/txt; s=iport; t=1462915287; x=1464124887; h=from:to:cc:subject:date:message-id; bh=b9GXZjUVHJ3ZZI9HedT/AlE/ryVCtP6NgFUDTNOrHZI=; b=FTp8XHmGl6UX7ZSBSTsb+mRlJtkF9jZE2TkgK7Um2b3lc/wFjlClGdQq vOkVNfjX71pO0lK2U3HK4rZrl/SlD5I+xSjTLQCD/+OVInx5RR+Kw0pHK E5yO5lqr/JKQdv1dbcfsiLoTV5ZVx+zKRIInQ6vsW4/CKEBTchmdJ4ahg c=; X-IronPort-AV: E=Sophos;i="5.24,606,1454976000"; d="scan'208";a="102916111" Received: from alln-core-9.cisco.com ([173.36.13.129]) by rcdn-iport-6.cisco.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 10 May 2016 21:21:26 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by alln-core-9.cisco.com (8.14.5/8.14.5) with ESMTP id u4ALLQ3c007359; Tue, 10 May 2016 21:21:26 GMT Received: by cisco.com (Postfix, from userid 392789) id 8E2FB3FAADC5; Tue, 10 May 2016 14:21:26 -0700 (PDT) From: John Daley To: dev@dpdk.org Cc: bruce.richardson@intel.com, John Daley Date: Tue, 10 May 2016 14:21:12 -0700 Message-Id: <1462915272-29965-1-git-send-email-johndale@cisco.com> X-Mailer: git-send-email 2.7.0 Subject: [dpdk-dev] [PATCH v2] enic: fix 'imissed' to count drops due to no RX buffers X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The enic rx_no_bufs counter is a hardware counter of packets dropped on the interface due to no host buffers being available. Use this counter to update the r_stats->imissed counter. Also, include the rx_drop enic counter in the r_stats->ierrors count. Rx_drop plus rx_errors are the total number of packets dropped on by the enic on the Rx interface for reasons other than no host buffers. Fixes: 7182d3e7d177 ("enic: expose Rx missed packets counter") Signed-off-by: John Daley --- v2: improved commit message drivers/net/enic/enic_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index 60fe765..be4e9e5 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c @@ -243,10 +243,10 @@ void enic_dev_stats_get(struct enic *enic, struct rte_eth_stats *r_stats) r_stats->ibytes = stats->rx.rx_bytes_ok; r_stats->obytes = stats->tx.tx_bytes_ok; - r_stats->ierrors = stats->rx.rx_errors; + r_stats->ierrors = stats->rx.rx_errors + stats->rx.rx_drop; r_stats->oerrors = stats->tx.tx_errors; - r_stats->imissed = stats->rx.rx_drop; + r_stats->imissed = stats->rx.rx_no_bufs; r_stats->rx_nombuf = stats->rx.rx_no_bufs; }