From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rcdn-iport-8.cisco.com (rcdn-iport-8.cisco.com [173.37.86.79]) by dpdk.org (Postfix) with ESMTP id 12C1AAD93 for ; Wed, 15 Jun 2016 01:55:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1163; q=dns/txt; s=iport; t=1465948544; x=1467158144; h=from:to:cc:subject:date:message-id; bh=DTCkfTXTg+PqW0gSxT2w0OruXr2sU8CGe3tl8np/aZE=; b=D3rH7gohj8B0fuc5ysUUH002Ezruwtw39VTkBYszMLok0TQVdFovBa5K Q7/jyfZaYwv9qnubWGrvCU6/bygjxZTorm4pHwgrLXsCBgPo5m8i7hOu2 otCfmb0z/FK7hiMnU8AtWMnzLgDAC9Dp+InuwhlbcUytNes+sq87+UiN3 E=; X-IronPort-AV: E=Sophos;i="5.26,473,1459814400"; d="scan'208";a="113333277" Received: from alln-core-5.cisco.com ([173.36.13.138]) by rcdn-iport-8.cisco.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 14 Jun 2016 23:55:43 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by alln-core-5.cisco.com (8.14.5/8.14.5) with ESMTP id u5ENthkx030687; Tue, 14 Jun 2016 23:55:43 GMT Received: by cisco.com (Postfix, from userid 412739) id 284443FAADFF; Tue, 14 Jun 2016 16:55:43 -0700 (PDT) From: Nelson Escobar To: dev@dpdk.org Cc: bruce.richardson@intel.com, johndale@cisco.com, Nelson Escobar Date: Tue, 14 Jun 2016 16:55:34 -0700 Message-Id: <1465948534-14427-1-git-send-email-neescoba@cisco.com> X-Mailer: git-send-email 2.7.0 Subject: [dpdk-dev] [PATCH] enic: fix releasing of mbufs when tearing down rq 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: , X-List-Received-Date: Tue, 14 Jun 2016 23:55:44 -0000 When trying to release the mbufs, the function was incorrectly iterating over the max size configured instead of the actual size of the ring. Fixes: cbb44dddcade ("enic: receive path performance improvements") Signed-off-by: Nelson Escobar Reviewed-by: John Daley --- 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 0576a6e..9b6fe36 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c @@ -80,7 +80,7 @@ static int is_eth_addr_valid(uint8_t *addr) } static void -enic_rxmbuf_queue_release(struct enic *enic, struct vnic_rq *rq) +enic_rxmbuf_queue_release(__rte_unused struct enic *enic, struct vnic_rq *rq) { uint16_t i; @@ -89,7 +89,7 @@ enic_rxmbuf_queue_release(struct enic *enic, struct vnic_rq *rq) return; } - for (i = 0; i < enic->config.rq_desc_count; i++) { + for (i = 0; i < rq->ring.desc_count; i++) { if (rq->mbuf_ring[i]) { rte_pktmbuf_free_seg(rq->mbuf_ring[i]); rq->mbuf_ring[i] = NULL; -- 2.7.0