1 From 3f276178609472585a85fe440b549013a64d9327 Mon Sep 17 00:00:00 2001
2 From: Nelson Escobar <neescoba@cisco.com>
3 Date: Tue, 14 Jun 2016 16:55:34 -0700
4 Subject: [PATCH 20/25] net/enic: fix releasing mbufs when tearing down Rx
7 When trying to release the mbufs, the function was incorrectly
8 iterating over the max size configured instead of the actual size
11 Fixes: 947d860c821f ("enic: improve Rx performance")
13 Signed-off-by: Nelson Escobar <neescoba@cisco.com>
14 Reviewed-by: John Daley <johndale@cisco.com>
16 drivers/net/enic/enic_main.c | 4 ++--
17 1 file changed, 2 insertions(+), 2 deletions(-)
19 diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
20 index 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)
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)
32 @@ -100,7 +100,7 @@ enic_rxmbuf_queue_release(struct enic *enic, struct vnic_rq *rq)
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;