DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/sfc: fix Tx reap behaviour on port stop on EF10 datapath
@ 2017-10-18  9:39 Andrew Rybchenko
  2017-10-23 18:08 ` Ferruh Yigit
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Rybchenko @ 2017-10-18  9:39 UTC (permalink / raw)
  To: dev; +Cc: Ivan Malov

From: Ivan Malov <ivan.malov@oktetlabs.ru>

Tx reap mechanism on EF10 native datapath was altered by one
of the recent patches to introduce performance optimisations
using the common technique of freeing mbuf segments in bulks.

>From this perspective, the way of associating SW descriptors
with individual mbuf segments rather than with whole packets
was adopted as a key requirement for the entire optimisation.

However, only the fast path reap function was amended to fit
the new scheme whilst the corresponding function on the port
stop path was left intact by mistake. This implies incorrect
usage of rte_pktmbuf_free() with regard to separate segments
rather than calling rte_pktmbuf_free_seg() and must be fixed.

Fixes: d321954343c8 ("net/sfc: free mbufs in bulks on EF10 native Tx reap")

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
---
 drivers/net/sfc/sfc_ef10_tx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/sfc/sfc_ef10_tx.c b/drivers/net/sfc/sfc_ef10_tx.c
index 9047b3e..167c91d 100644
--- a/drivers/net/sfc/sfc_ef10_tx.c
+++ b/drivers/net/sfc/sfc_ef10_tx.c
@@ -602,7 +602,7 @@ sfc_ef10_tx_qreap(struct sfc_dp_txq *dp_txq)
 
 		txd = &txq->sw_ring[completed & txq->ptr_mask];
 		if (txd->mbuf != NULL) {
-			rte_pktmbuf_free(txd->mbuf);
+			rte_pktmbuf_free_seg(txd->mbuf);
 			txd->mbuf = NULL;
 		}
 	}
-- 
2.7.4

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

* Re: [dpdk-dev] [PATCH] net/sfc: fix Tx reap behaviour on port stop on EF10 datapath
  2017-10-18  9:39 [dpdk-dev] [PATCH] net/sfc: fix Tx reap behaviour on port stop on EF10 datapath Andrew Rybchenko
@ 2017-10-23 18:08 ` Ferruh Yigit
  0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2017-10-23 18:08 UTC (permalink / raw)
  To: Andrew Rybchenko, dev; +Cc: Ivan Malov

On 10/18/2017 2:39 AM, Andrew Rybchenko wrote:
> From: Ivan Malov <ivan.malov@oktetlabs.ru>
> 
> Tx reap mechanism on EF10 native datapath was altered by one
> of the recent patches to introduce performance optimisations
> using the common technique of freeing mbuf segments in bulks.
> 
> From this perspective, the way of associating SW descriptors
> with individual mbuf segments rather than with whole packets
> was adopted as a key requirement for the entire optimisation.
> 
> However, only the fast path reap function was amended to fit
> the new scheme whilst the corresponding function on the port
> stop path was left intact by mistake. This implies incorrect
> usage of rte_pktmbuf_free() with regard to separate segments
> rather than calling rte_pktmbuf_free_seg() and must be fixed.

Good to know you are OK Ivan, I was worried when previous a few
commit logs were not perfectly aligned :)

> 
> Fixes: d321954343c8 ("net/sfc: free mbufs in bulks on EF10 native Tx reap")
> 
> Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
> Reviewed-by: Andy Moreton <amoreton@solarflare.com>

Applied to dpdk-next-net/master, thanks.

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

end of thread, other threads:[~2017-10-23 18:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-18  9:39 [dpdk-dev] [PATCH] net/sfc: fix Tx reap behaviour on port stop on EF10 datapath Andrew Rybchenko
2017-10-23 18:08 ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).