DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andrew Rybchenko <arybchenko@solarflare.com>
To: <dev@dpdk.org>
Cc: Ivan Malov <ivan.malov@oktetlabs.ru>
Subject: [dpdk-dev] [PATCH] net/sfc: fix Tx reap behaviour on port stop on EF10 datapath
Date: Wed, 18 Oct 2017 10:39:57 +0100	[thread overview]
Message-ID: <1508319597-21039-1-git-send-email-arybchenko@solarflare.com> (raw)

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

             reply	other threads:[~2017-10-18  9:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-18  9:39 Andrew Rybchenko [this message]
2017-10-23 18:08 ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1508319597-21039-1-git-send-email-arybchenko@solarflare.com \
    --to=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=ivan.malov@oktetlabs.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).