From patchwork Wed Oct 12 20:11:29 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: 16520 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 6D1F06936; Wed, 12 Oct 2016 22:11:35 +0200 (CEST) Received: from alln-iport-5.cisco.com (alln-iport-5.cisco.com [173.37.142.92]) by dpdk.org (Postfix) with ESMTP id 7D3F256AB for ; Wed, 12 Oct 2016 22:11:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1191; q=dns/txt; s=iport; t=1476303093; x=1477512693; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=m+Zf7cv3IghlWaMB0VJX/BUJqfZ2PTGPeEaRPFZnVBI=; b=SWf234oGlqPxGKnMji341Qcd2vYddkWyYENh7EX0vT9tozrYxtAxQN/F mSJFfh6rc14IlCUW4FASgAwxw7ecz0ellIqYNqDiPBicOJ2x0y97ihw9E oB8scs607MBWA2HzenlKHkmnc0qOJrQMajNO2dS3Hjd2LuRJoThVOBZ0w s=; X-IronPort-AV: E=Sophos;i="5.31,336,1473120000"; d="scan'208";a="333096554" Received: from rcdn-core-6.cisco.com ([173.37.93.157]) by alln-iport-5.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Oct 2016 20:11:31 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by rcdn-core-6.cisco.com (8.14.5/8.14.5) with ESMTP id u9CKBVSQ005585; Wed, 12 Oct 2016 20:11:31 GMT Received: by cisco.com (Postfix, from userid 392789) id 390363FAAE49; Wed, 12 Oct 2016 13:11:31 -0700 (PDT) From: John Daley To: bruce.richardson@intel.com Cc: dev@dpdk.org, Nelson Escobar Date: Wed, 12 Oct 2016 13:11:29 -0700 Message-Id: <20161012201129.31611-2-johndale@cisco.com> X-Mailer: git-send-email 2.10.0 In-Reply-To: <20161012201129.31611-1-johndale@cisco.com> References: <20161012201129.31611-1-johndale@cisco.com> Subject: [dpdk-dev] [PATCH 2/2] net/enic: revert "fix calculation of truncated packets" 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" From: Nelson Escobar The reason this commit was needed was because of a misconfiguration of the receive queue when not using Rx scatter. This patch is unnecessary if the receive queue is configured correctly. Fixes: d142e1ac1089 ("net/enic: fix calculation of truncated packets") Signed-off-by: Nelson Escobar Reviewed-by: John Daley --- drivers/net/enic/enic_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index 836dcfe..b65a079 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c @@ -174,8 +174,7 @@ void enic_dev_stats_get(struct enic *enic, struct rte_eth_stats *r_stats) * which can make ibytes be slightly higher than it should be. */ rx_packet_errors = rte_atomic64_read(&soft_stats->rx_packet_errors); - rx_truncated = rx_packet_errors - stats->rx.rx_errors - - stats->rx.rx_no_bufs; + rx_truncated = rx_packet_errors - stats->rx.rx_errors; r_stats->ipackets = stats->rx.rx_frames_ok - rx_truncated; r_stats->opackets = stats->tx.tx_frames_ok;