blob: 47bcda234310b57b59a413d331c0d7c80a1bc1e6 [file] [log] [blame]
John Lo55bf5c92016-07-04 23:23:32 -04001From 3f276178609472585a85fe440b549013a64d9327 Mon Sep 17 00:00:00 2001
2From: Nelson Escobar <neescoba@cisco.com>
3Date: Tue, 14 Jun 2016 16:55:34 -0700
4Subject: [PATCH 20/25] net/enic: fix releasing mbufs when tearing down Rx
5 queue
6
7When trying to release the mbufs, the function was incorrectly
8iterating over the max size configured instead of the actual size
9of the ring.
10
11Fixes: 947d860c821f ("enic: improve Rx performance")
12
13Signed-off-by: Nelson Escobar <neescoba@cisco.com>
14Reviewed-by: John Daley <johndale@cisco.com>
15---
16 drivers/net/enic/enic_main.c | 4 ++--
17 1 file changed, 2 insertions(+), 2 deletions(-)
18
19diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
20index 68532d3..56ec96e 100644
21--- a/drivers/net/enic/enic_main.c
22+++ b/drivers/net/enic/enic_main.c
23@@ -91,7 +91,7 @@ static int is_eth_addr_valid(uint8_t *addr)
24 }
25
26 static void
27-enic_rxmbuf_queue_release(struct enic *enic, struct vnic_rq *rq)
28+enic_rxmbuf_queue_release(__rte_unused struct enic *enic, struct vnic_rq *rq)
29 {
30 uint16_t i;
31
32@@ -100,7 +100,7 @@ enic_rxmbuf_queue_release(struct enic *enic, struct vnic_rq *rq)
33 return;
34 }
35
36- for (i = 0; i < enic->config.rq_desc_count; i++) {
37+ for (i = 0; i < rq->ring.desc_count; i++) {
38 if (rq->mbuf_ring[i]) {
39 rte_pktmbuf_free_seg(rq->mbuf_ring[i]);
40 rq->mbuf_ring[i] = NULL;
41--
422.7.0
43