DPDK patches and discussions
 help / color / mirror / Atom feed
From: Shreyansh Jain <shreyansh.jain@nxp.com>
To: dev@dpdk.org, ferruh.yigit@intel.com
Cc: thomas@monjalon.net, Hemant Agrawal <hemant.agrawal@nxp.com>
Subject: [dpdk-dev] [PATCH v2 12/15] net/dpaa2: optimize the fd reset in Tx path
Date: Wed, 26 Sep 2018 23:34:37 +0530	[thread overview]
Message-ID: <20180926180440.31726-13-shreyansh.jain@nxp.com> (raw)
In-Reply-To: <20180926180440.31726-1-shreyansh.jain@nxp.com>

From: Hemant Agrawal <hemant.agrawal@nxp.com>

various field of FD structure was getting reset in scattered
fashion. This patch align them in single macro.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 6 ++++++
 drivers/net/dpaa2/dpaa2_rxtx.c          | 8 +++-----
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
index ec8f42806..2129b9154 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
@@ -209,6 +209,12 @@ enum qbman_fd_format {
 #define DPAA2_RESET_FD_CTRL(fd)	 ((fd)->simple.ctrl = 0)
 
 #define	DPAA2_SET_FD_ASAL(fd, asal)	((fd)->simple.ctrl |= (asal << 16))
+
+#define DPAA2_RESET_FD_FLC(fd)	do {	\
+	(fd)->simple.flc_lo = 0;	\
+	(fd)->simple.flc_hi = 0;	\
+} while (0)
+
 #define DPAA2_SET_FD_FLC(fd, addr)	do { \
 	(fd)->simple.flc_lo = lower_32_bits((size_t)(addr));	\
 	(fd)->simple.flc_hi = upper_32_bits((uint64_t)(addr));	\
diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c
index e96e84871..fcd48b389 100644
--- a/drivers/net/dpaa2/dpaa2_rxtx.c
+++ b/drivers/net/dpaa2/dpaa2_rxtx.c
@@ -30,7 +30,9 @@
 	DPAA2_SET_FD_LEN(_fd, _mbuf->data_len); \
 	DPAA2_SET_ONLY_FD_BPID(_fd, _bpid); \
 	DPAA2_SET_FD_OFFSET(_fd, _mbuf->data_off); \
-	DPAA2_SET_FD_ASAL(_fd, DPAA2_ASAL_VAL); \
+	DPAA2_SET_FD_FRC(_fd, 0);		\
+	DPAA2_RESET_FD_CTRL(_fd);		\
+	DPAA2_RESET_FD_FLC(_fd);		\
 } while (0)
 
 static inline void __attribute__((hot))
@@ -689,7 +691,6 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 	/*Prepare enqueue descriptor*/
 	qbman_eq_desc_clear(&eqdesc);
 	qbman_eq_desc_set_no_orp(&eqdesc, DPAA2_EQ_RESP_ERR_FQ);
-	qbman_eq_desc_set_response(&eqdesc, 0, 0);
 	qbman_eq_desc_set_qd(&eqdesc, priv->qdid,
 			     dpaa2_q->flow_id, dpaa2_q->tc_index);
 	/*Clear the unused FD fields before sending*/
@@ -717,9 +718,6 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 				(*bufs)->seqn = DPAA2_INVALID_MBUF_SEQN;
 			}
 
-			fd_arr[loop].simple.frc = 0;
-			DPAA2_RESET_FD_CTRL((&fd_arr[loop]));
-			DPAA2_SET_FD_FLC((&fd_arr[loop]), (size_t)NULL);
 			if (likely(RTE_MBUF_DIRECT(*bufs))) {
 				mp = (*bufs)->pool;
 				/* Check the basic scenario and set
-- 
2.17.1

  parent reply	other threads:[~2018-09-26 18:06 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-17 10:36 [dpdk-dev] [PATCH 00/11] Upgrade DPAA2 FW and other feature/bug fixes Shreyansh Jain
2018-09-17 10:36 ` [dpdk-dev] [PATCH 01/11] bus/fslmc: upgrade mc FW APIs to 10.10.0 Shreyansh Jain
2018-09-17 10:36 ` [dpdk-dev] [PATCH 02/11] bus/fslmc: upgrade qdma " Shreyansh Jain
2018-09-17 10:36 ` [dpdk-dev] [PATCH 03/11] net/dpaa2: upgrade dpni to " Shreyansh Jain
2018-09-17 10:36 ` [dpdk-dev] [PATCH 04/11] crypto/dpaa2_sec: upgarde " Shreyansh Jain
2018-09-17 10:36 ` [dpdk-dev] [PATCH 05/11] bus/fslmc: support memory backed portals with QBMAN 5.0 Shreyansh Jain
2018-09-17 10:36 ` [dpdk-dev] [PATCH 06/11] bus/fslmc: support 32 enq and deq for LX2 platform Shreyansh Jain
2018-09-17 10:36 ` [dpdk-dev] [PATCH 07/11] bus/fslmc: disable annotation prefetch for LX2 Shreyansh Jain
2018-09-17 10:36 ` [dpdk-dev] [PATCH 08/11] net/dpaa2: fix IOVA conversion for congestion memory Shreyansh Jain
2018-09-17 10:36 ` [dpdk-dev] [PATCH 09/11] net/dpaa2: read hardware provided MAC for DPNI devices Shreyansh Jain
2018-09-17 10:36 ` [dpdk-dev] [PATCH 10/11] net/dpaa2: add per queue stats get and reset support Shreyansh Jain
2018-09-17 10:36 ` [dpdk-dev] [PATCH 11/11] net/dpaa2: fix VLAN filter enablement Shreyansh Jain
2018-09-26 18:04 ` [dpdk-dev] [PATCH v2 00/15] Upgrade DPAA2 FW and other feature/bug fixes Shreyansh Jain
2018-09-26 18:04   ` [dpdk-dev] [PATCH v2 01/15] net/dpaa2: fix IOVA conversion for congestion memory Shreyansh Jain
2018-09-26 18:04   ` [dpdk-dev] [PATCH v2 02/15] net/dpaa2: fix VLAN filter enablement Shreyansh Jain
2018-09-26 18:04   ` [dpdk-dev] [PATCH v2 03/15] bus/fslmc: upgrade mc FW APIs to 10.10.0 Shreyansh Jain
2018-09-26 18:04   ` [dpdk-dev] [PATCH v2 04/15] net/dpaa2: upgrade dpni to " Shreyansh Jain
2018-09-26 18:04   ` [dpdk-dev] [PATCH v2 05/15] crypto/dpaa2_sec: upgarde " Shreyansh Jain
2018-09-26 18:04   ` [dpdk-dev] [PATCH v2 06/15] bus/fslmc: support memory backed portals with QBMAN 5.0 Shreyansh Jain
2018-09-26 18:04   ` [dpdk-dev] [PATCH v2 07/15] bus/fslmc: support 32 enq and deq for LX2 platform Shreyansh Jain
2018-09-26 18:04   ` [dpdk-dev] [PATCH v2 08/15] bus/fslmc: disable annotation prefetch for LX2 Shreyansh Jain
2018-09-26 18:04   ` [dpdk-dev] [PATCH v2 09/15] net/dpaa2: read hardware provided MAC for DPNI devices Shreyansh Jain
2018-09-26 18:04   ` [dpdk-dev] [PATCH v2 10/15] net/dpaa2: add per queue stats get and reset support Shreyansh Jain
2018-09-26 18:04   ` [dpdk-dev] [PATCH v2 11/15] net/dpaa2: update RSS value in mbuf for lx2 platform Shreyansh Jain
2018-09-26 18:04   ` Shreyansh Jain [this message]
2018-09-26 18:04   ` [dpdk-dev] [PATCH v2 13/15] net/dpaa2: enhance the queue memory cleanup routines Shreyansh Jain
2018-09-26 18:04   ` [dpdk-dev] [PATCH v2 14/15] net/dpaa2: support MBUF VLAN tci population from HW parser Shreyansh Jain
2018-09-26 18:04   ` [dpdk-dev] [PATCH v2 15/15] net/dpaa2: support Rx checksum offload in slow parsing Shreyansh Jain
2018-10-12  9:32   ` [dpdk-dev] [PATCH v2 00/15] Upgrade DPAA2 FW and other feature/bug fixes Shreyansh Jain
2018-10-12  9:42     ` Shreyansh Jain
2018-10-12 10:16     ` Thomas Monjalon
2018-10-12 10:04   ` [dpdk-dev] [PATCH v3 " Shreyansh Jain
2018-10-12 10:04     ` [dpdk-dev] [PATCH v3 01/15] net/dpaa2: fix IOVA conversion for congestion memory Shreyansh Jain
2018-10-12 10:04     ` [dpdk-dev] [PATCH v3 02/15] net/dpaa2: fix VLAN filter enablement Shreyansh Jain
2018-10-12 10:04     ` [dpdk-dev] [PATCH v3 03/15] bus/fslmc: upgrade mc FW APIs to 10.10.0 Shreyansh Jain
2018-10-12 10:04     ` [dpdk-dev] [PATCH v3 04/15] net/dpaa2: upgrade dpni to " Shreyansh Jain
2018-10-12 10:04     ` [dpdk-dev] [PATCH v3 05/15] crypto/dpaa2_sec: upgarde " Shreyansh Jain
2018-10-12 10:04     ` [dpdk-dev] [PATCH v3 06/15] bus/fslmc: support memory backed portals with QBMAN 5.0 Shreyansh Jain
2018-10-12 10:04     ` [dpdk-dev] [PATCH v3 07/15] bus/fslmc: support 32 enq and deq for LX2 platform Shreyansh Jain
2018-10-12 10:04     ` [dpdk-dev] [PATCH v3 08/15] bus/fslmc: disable annotation prefetch for LX2 Shreyansh Jain
2018-10-12 10:04     ` [dpdk-dev] [PATCH v3 09/15] net/dpaa2: read hardware provided MAC for DPNI devices Shreyansh Jain
2018-10-12 10:04     ` [dpdk-dev] [PATCH v3 10/15] net/dpaa2: add per queue stats get and reset support Shreyansh Jain
2018-10-12 10:04     ` [dpdk-dev] [PATCH v3 11/15] net/dpaa2: update RSS value in mbuf for lx2 platform Shreyansh Jain
2018-10-12 10:04     ` [dpdk-dev] [PATCH v3 12/15] net/dpaa2: optimize the fd reset in Tx path Shreyansh Jain
2018-10-12 10:04     ` [dpdk-dev] [PATCH v3 13/15] net/dpaa2: enhance the queue memory cleanup routines Shreyansh Jain
2018-10-12 10:04     ` [dpdk-dev] [PATCH v3 14/15] net/dpaa2: support MBUF VLAN tci population from HW parser Shreyansh Jain
2018-10-12 10:04     ` [dpdk-dev] [PATCH v3 15/15] net/dpaa2: support Rx checksum offload in slow parsing Shreyansh Jain
2018-10-16 10:24     ` [dpdk-dev] [PATCH v3 00/15] Upgrade DPAA2 FW and other feature/bug fixes Thomas Monjalon

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=20180926180440.31726-13-shreyansh.jain@nxp.com \
    --to=shreyansh.jain@nxp.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=thomas@monjalon.net \
    /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).