patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Yongseok Koh <yskoh@mellanox.com>
To: Kiran Kumar <kkokkilagadda@caviumnetworks.com>
Cc: Jerin Jacob <jerin.jacob@caviumnetworks.com>,
	dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'net/thunderx: avoid sq door bell write on zero packet' has been queued to LTS release 17.11.4
Date: Thu, 26 Jul 2018 19:31:00 -0700	[thread overview]
Message-ID: <20180727023108.38699-2-yskoh@mellanox.com> (raw)
In-Reply-To: <20180727023108.38699-1-yskoh@mellanox.com>

Hi,

FYI, your patch has been queued to LTS release 17.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/18. So please
shout if anyone has objections.

Thanks.

Yongseok

---
>From 998da59e9e3cc06f565c648e9e870a93d0a7ad37 Mon Sep 17 00:00:00 2001
From: Kiran Kumar <kkokkilagadda@caviumnetworks.com>
Date: Wed, 11 Jul 2018 13:54:36 +0530
Subject: [PATCH] net/thunderx: avoid sq door bell write on zero packet

[ upstream commit 47636efe878dd8885bb47b142765c9ccae6babe3 ]

Avoid sq door bell write on zero packet case to reduce additional
traffic on register bus.

Fixes: 1c421f18e0 ("net/thunderx: add single and multi-segment Tx")

Signed-off-by: Kiran Kumar <kkokkilagadda@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 drivers/net/thunderx/nicvf_rxtx.c | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/drivers/net/thunderx/nicvf_rxtx.c b/drivers/net/thunderx/nicvf_rxtx.c
index 9d69cf4e2..06cbc4635 100644
--- a/drivers/net/thunderx/nicvf_rxtx.c
+++ b/drivers/net/thunderx/nicvf_rxtx.c
@@ -190,12 +190,14 @@ nicvf_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 		free_desc -= TX_DESC_PER_PKT;
 	}
 
-	sq->tail = tail;
-	sq->xmit_bufs += i;
-	rte_wmb();
+	if (likely(i)) {
+		sq->tail = tail;
+		sq->xmit_bufs += i;
+		rte_wmb();
 
-	/* Inform HW to xmit the packets */
-	nicvf_addr_write(sq->sq_door, i * TX_DESC_PER_PKT);
+		/* Inform HW to xmit the packets */
+		nicvf_addr_write(sq->sq_door, i * TX_DESC_PER_PKT);
+	}
 	return i;
 }
 
@@ -246,12 +248,14 @@ nicvf_xmit_pkts_multiseg(void *tx_queue, struct rte_mbuf **tx_pkts,
 		}
 	}
 
-	sq->tail = tail;
-	sq->xmit_bufs += used_bufs;
-	rte_wmb();
+	if (likely(used_desc)) {
+		sq->tail = tail;
+		sq->xmit_bufs += used_bufs;
+		rte_wmb();
 
-	/* Inform HW to xmit the packets */
-	nicvf_addr_write(sq->sq_door, used_desc);
+		/* Inform HW to xmit the packets */
+		nicvf_addr_write(sq->sq_door, used_desc);
+	}
 	return i;
 }
 
-- 
2.11.0

  reply	other threads:[~2018-07-27  2:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-27  2:30 [dpdk-stable] patch 'net/cxgbe: fix init failure due to new flash parts' " Yongseok Koh
2018-07-27  2:31 ` Yongseok Koh [this message]
2018-07-27  2:31 ` [dpdk-stable] patch 'net/sfc: fix assert in set multicast address list' " Yongseok Koh
2018-07-27  2:31 ` [dpdk-stable] patch 'net/mlx5: fix TCI mask filter' " Yongseok Koh
2018-07-27  2:31 ` [dpdk-stable] patch 'ring: fix sign conversion warning' " Yongseok Koh
2018-07-27  2:31 ` [dpdk-stable] patch 'event/octeontx: remove unnecessary port start and stop' " Yongseok Koh
2018-07-27  2:31 ` [dpdk-stable] patch 'app/testpmd: fix buffer leak in TM command' " Yongseok Koh
2018-07-27  2:31 ` [dpdk-stable] patch 'examples/exception_path: fix out-of-bounds read' " Yongseok Koh
2018-07-27  2:31 ` [dpdk-stable] patch 'examples/l3fwd: remove useless include' " Yongseok Koh
2018-07-27  2:31 ` [dpdk-stable] patch 'bitrate: add sanity check on parameters' " Yongseok Koh

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=20180727023108.38699-2-yskoh@mellanox.com \
    --to=yskoh@mellanox.com \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=kkokkilagadda@caviumnetworks.com \
    --cc=stable@dpdk.org \
    /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).