All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] enic: fix releasing of mbufs when tearing down rq
@ 2016-06-14 23:55 Nelson Escobar
  2016-06-23 11:41 ` Bruce Richardson
  0 siblings, 1 reply; 2+ messages in thread
From: Nelson Escobar @ 2016-06-14 23:55 UTC (permalink / raw)
  To: dev; +Cc: bruce.richardson, johndale, Nelson Escobar

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 <neescoba@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
---
 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] enic: fix releasing of mbufs when tearing down rq
  2016-06-14 23:55 [PATCH] enic: fix releasing of mbufs when tearing down rq Nelson Escobar
@ 2016-06-23 11:41 ` Bruce Richardson
  0 siblings, 0 replies; 2+ messages in thread
From: Bruce Richardson @ 2016-06-23 11:41 UTC (permalink / raw)
  To: Nelson Escobar; +Cc: dev, johndale

On Tue, Jun 14, 2016 at 04:55:34PM -0700, Nelson Escobar wrote:
> 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 <neescoba@cisco.com>
> Reviewed-by: John Daley <johndale@cisco.com>

Applied to dpdk-next-net/rel_16_07 with corrected fixes line.

/Bruce

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-06-23 11:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-14 23:55 [PATCH] enic: fix releasing of mbufs when tearing down rq Nelson Escobar
2016-06-23 11:41 ` Bruce Richardson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.