From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hemant Agrawal Subject: [PATCH 4/5] net/dpaa2: use HASH FLCTYPE only for LX2 Date: Mon, 15 Jan 2018 17:08:05 +0530 Message-ID: <1516016286-11942-4-git-send-email-hemant.agrawal@nxp.com> References: <1516016286-11942-1-git-send-email-hemant.agrawal@nxp.com> Mime-Version: 1.0 Content-Type: text/plain Cc: To: Return-path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0041.outbound.protection.outlook.com [104.47.33.41]) by dpdk.org (Postfix) with ESMTP id E9244A84E for ; Mon, 15 Jan 2018 12:39:22 +0100 (CET) In-Reply-To: <1516016286-11942-1-git-send-email-hemant.agrawal@nxp.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" From: Nipun Gupta 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 Acked-by: Hemant Agrawal --- 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