From: Nelson Escobar Date: Tue, 14 Jun 2016 23:55:34 +0000 (-0700) Subject: net/enic: fix releasing mbufs when tearing down Rx queue X-Git-Tag: spdx-start~6428 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=a44a1724abbe2842217d3bc5cd95ab41c36a3f48;p=dpdk.git net/enic: fix releasing mbufs when tearing down Rx queue 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: 947d860c821f ("enic: improve Rx performance") Signed-off-by: Nelson Escobar Reviewed-by: John Daley --- diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index 32ecdae6d2..e583b90b49 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;