From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: Re: [PATCH] net/thunderx: Block sq door writes on zero pkts Date: Wed, 11 Jul 2018 13:07:54 +0530 Message-ID: <20180711073752.GA23709@jerin> References: <1531293723-930-1-git-send-email-kkokkilagadda@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org, maciej.czekaj@caviumnetworks.com To: Kiran Kumar Return-path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0050.outbound.protection.outlook.com [104.47.40.50]) by dpdk.org (Postfix) with ESMTP id 2E1F11B466 for ; Wed, 11 Jul 2018 09:38:06 +0200 (CEST) Content-Disposition: inline In-Reply-To: <1531293723-930-1-git-send-email-kkokkilagadda@caviumnetworks.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" -----Original Message----- > Date: Wed, 11 Jul 2018 12:52:03 +0530 > From: Kiran Kumar > To: dev@dpdk.org > Cc: jerin.jacob@caviumnetworks.com, maciej.czekaj@caviumnetworks.com, Kiran > Kumar > Subject: [dpdk-dev] [PATCH] net/thunderx: Block sq door writes on zero pkts > X-Mailer: git-send-email 2.7.4 Use small letter to start the comment.(s/Block/block) I think, we can change the subject to "avoid sq door bell writes on zero packet" > > With current code, we are performing sq door writes even with 0 pkts. > this will create pressure on register bus. This patch will block these > writes. Could rename to: 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") add Cc: stable@dpdk.org > > Signed-off-by: Kiran Kumar > --- > drivers/net/thunderx/nicvf_rxtx.c | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > > diff --git a/drivers/net/thunderx/nicvf_rxtx.c b/drivers/net/thunderx/nicvf_rxtx.c > index 72305d9..8075a8e 100644 > --- a/drivers/net/thunderx/nicvf_rxtx.c > +++ b/drivers/net/thunderx/nicvf_rxtx.c > @@ -162,12 +162,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); > + } Please add same logic for nicvf_xmit_pkts_multiseg function. With above changes: Acked-by: Jerin Jacob > return i; > } > > -- > 2.7.4 >