From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <balazs.nemeth@intel.com>
Received: from mga11.intel.com (mga11.intel.com [192.55.52.93])
 by dpdk.org (Postfix) with ESMTP id 964001518
 for <dev@dpdk.org>; Fri, 28 Nov 2014 10:18:38 +0100 (CET)
Received: from fmsmga002.fm.intel.com ([10.253.24.26])
 by fmsmga102.fm.intel.com with ESMTP; 28 Nov 2014 01:18:37 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.07,475,1413270000"; d="scan'208";a="639469139"
Received: from bnemeth-mobl.ger.corp.intel.com (HELO bn-ivy12.localdomain)
 ([172.22.195.65])
 by fmsmga002.fm.intel.com with ESMTP; 28 Nov 2014 01:17:57 -0800
From: Balazs Nemeth <balazs.nemeth@intel.com>
To: dev@dpdk.org
Date: Fri, 28 Nov 2014 09:21:45 +0000
Message-Id: <1417166505-486-1-git-send-email-balazs.nemeth@intel.com>
X-Mailer: git-send-email 2.1.2
Cc: Balazs Nemeth <balazs.nemeth@intel.com>
Subject: [dpdk-dev] [PATCH] ixgbe: Add missing rx_mbuf_alloc_failed
	statistics for vector PMD
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Fri, 28 Nov 2014 09:18:39 -0000

The statistics that is reported through the rx_nombuf fields in struct
rte_eth_stats was not set when the vector PMD was used. The statistics
should report the number of mbufs that could _not_ be allocated during
rearm of the RX queue. The non-vector PMD reports it correctly. The
use of either vector PMD or non-vector PMD depends on runtime
configuration. Hence it is possible that a change in configuration
would disable this statistics. To prevent this from happening, the
statistics should be reported by both implementations.

Signed-off-by: Balazs Nemeth <balazs.nemeth@intel.com>
---
 lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
index 42c0f60..579bc46 100644
--- a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
+++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
@@ -71,6 +71,8 @@ ixgbe_rxq_rearm(struct igb_rx_queue *rxq)
 						dma_addr0);
 			}
 		}
+		rte_eth_devices[rxq->port_id].data->rx_mbuf_alloc_failed +=
+			RTE_IXGBE_RXQ_REARM_THRESH;
 		return;
 	}
 
-- 
2.1.2