DPDK patches and discussions
 help / color / mirror / Atom feed
From: Hemant Agrawal <hemant.agrawal@nxp.com>
To: <dev@dpdk.org>
Cc: <ferruh.yigit@intel.com>
Subject: [dpdk-dev] [PATCH 4/5] net/dpaa2: use HASH FLCTYPE only for LX2
Date: Mon, 15 Jan 2018 17:08:05 +0530	[thread overview]
Message-ID: <1516016286-11942-4-git-send-email-hemant.agrawal@nxp.com> (raw)
In-Reply-To: <1516016286-11942-1-git-send-email-hemant.agrawal@nxp.com>

From: Nipun Gupta <nipun.gupta@nxp.com>

Enabling hash results in FD requires setting DPNI_FLCTYPE_HASH in
dpni_set_offload API. Setting this FLCTYPE for DPNI sets the FD[SC]
to 0 for LS2 in the hardware thus disabling data/annotation stashing.
For LX2 this is fixed in hardware and thus hash result and parse
results can be received in FD using this option.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa2/dpaa2_ethdev.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 0763033..8b1e4d2 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -380,6 +380,22 @@ dpaa2_eth_dev_configure(struct rte_eth_dev *dev)
 		return ret;
 	}
 
+	/* Enabling hash results in FD requires setting DPNI_FLCTYPE_HASH in
+	 * dpni_set_offload API. Setting this FLCTYPE for DPNI sets the FD[SC]
+	 * to 0 for LS2 in the hardware thus disabling data/annotation
+	 * stashing. For LX2 this is fixed in hardware and thus hash result and
+	 * parse results can be received in FD using this option.
+	 */
+	if (dpaa2_svr_family == SVR_LX2160A) {
+		ret = dpni_set_offload(dpni, CMD_PRI_LOW, priv->token,
+				       DPNI_FLCTYPE_HASH, true);
+		if (ret) {
+			PMD_INIT_LOG(ERR, "Error setting FLCTYPE: Err = %d\n",
+				     ret);
+			return ret;
+		}
+	}
+
 	if (eth_conf->rxmode.hw_vlan_filter)
 		dpaa2_vlan_offload_set(dev, ETH_VLAN_FILTER_MASK);
 
-- 
2.7.4

  parent reply	other threads:[~2018-01-15 11:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-15 11:38 [dpdk-dev] [PATCH 1/5] net/dpaa2: support more than 16 burst size in Rx func Hemant Agrawal
2018-01-15 11:38 ` [dpdk-dev] [PATCH 2/5] net/dpaa2: optimize Rx/Tx path Hemant Agrawal
2018-01-15 11:38 ` [dpdk-dev] [PATCH 3/5] net/dpaa2: change vlan filter rule to be called on config Hemant Agrawal
2018-01-15 11:38 ` Hemant Agrawal [this message]
2018-01-15 11:38 ` [dpdk-dev] [PATCH 5/5] bus/fslmc: disable eventdev config with no dpaa2 eventdev Hemant Agrawal
2018-01-17 19:11 ` [dpdk-dev] [PATCH 1/5] net/dpaa2: support more than 16 burst size in Rx func 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=1516016286-11942-4-git-send-email-hemant.agrawal@nxp.com \
    --to=hemant.agrawal@nxp.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    /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).