From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 2C584D1E4 for ; Tue, 28 Mar 2017 10:52:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490691161; x=1522227161; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=m+IC9KfV2jVgmwFgg5Do6lZM0HJu9uX1EuzONFH/hlw=; b=wJkS6SlkWWNfRR+Q9PCwcrog0UeAkigFVZrchct2uc4NfLnm3/2x24Ip 9EEwK6BNcejqQzbuTMNxzsUiJIKNEw==; Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Mar 2017 01:52:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,236,1486454400"; d="scan'208";a="839215781" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by FMSMGA003.fm.intel.com with ESMTP; 28 Mar 2017 01:52:26 -0700 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 28 Mar 2017 01:52:26 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 28 Mar 2017 01:52:26 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.253]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.224]) with mapi id 14.03.0248.002; Tue, 28 Mar 2017 16:52:23 +0800 From: "Zhang, Helin" To: "Legacy, Allain (Wind River)" , "Wu, Jingjing" CC: "dev@dpdk.org" , "Peters, Matt (Wind River)" Thread-Topic: [PATCH] net/i40e: mbuf alloc failed counter not incremented Thread-Index: AQHSpxeBwlsRsxzjZkuniZdXRGI926Gp8ovg Date: Tue, 28 Mar 2017 08:52:23 +0000 Message-ID: References: <20170327163035.76744-1-allain.legacy@windriver.com> In-Reply-To: <20170327163035.76744-1-allain.legacy@windriver.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/i40e: mbuf alloc failed counter not incremented 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, 28 Mar 2017 08:52:41 -0000 > -----Original Message----- > From: Allain Legacy [mailto:allain.legacy@windriver.com] > Sent: Tuesday, March 28, 2017 12:31 AM > To: Zhang, Helin; Wu, Jingjing > Cc: dev@dpdk.org; Peters, Matt (Wind River) > Subject: [PATCH] net/i40e: mbuf alloc failed counter not incremented >=20 > From: Matt Peters >=20 > When an mbuf alloc fails during the mempool get operation for the i40e bu= lk > alloc receive function, the rx_mbuf_alloc_failed counter is not increment= ed to > record the error. >=20 > This fix ensures consistency with the other i40e receive procedures and o= ther > net drivers. >=20 > Signed-off-by: Matt Peters > Signed-off-by: Allain Legacy > --- > drivers/net/i40e/i40e_rxtx.c | 5 +++++ > 1 file changed, 5 insertions(+) >=20 > diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c = index > ec64a20eb..794d8717e 100644 > --- a/drivers/net/i40e/i40e_rxtx.c > +++ b/drivers/net/i40e/i40e_rxtx.c > @@ -610,6 +610,7 @@ static inline uint16_t rx_recv_pkts(void *rx_queue, > struct rte_mbuf **rx_pkts, uint16_t nb_pkts) { > struct i40e_rx_queue *rxq =3D (struct i40e_rx_queue *)rx_queue; > + struct rte_eth_dev *dev; > uint16_t nb_rx =3D 0; >=20 > if (!nb_pkts) > @@ -630,6 +631,10 @@ rx_recv_pkts(void *rx_queue, struct rte_mbuf > **rx_pkts, uint16_t nb_pkts) > PMD_RX_LOG(DEBUG, "Rx mbuf alloc failed for " > "port_id=3D%u, queue_id=3D%u", > rxq->port_id, rxq->queue_id); > + > + dev =3D &rte_eth_devices[rxq->port_id]; > + dev->data->rx_mbuf_alloc_failed +=3D rxq- > >rx_free_thresh; > + I think there are more places to have the similar code. Would you help to c= omplete all? e.g. rte_mbuf_raw_alloc() in i40e_recv_pkts. Thank you very much for the helps! /Helin > rxq->rx_nb_avail =3D 0; > rxq->rx_tail =3D (uint16_t)(rxq->rx_tail - nb_rx); > for (i =3D 0, j =3D rxq->rx_tail; i < nb_rx; i++, j++) > -- > 2.12.1