[dpdk-dev] [PATCH 04/10] net/dpaa2: check soc version for stashing enable
Hemant Agrawal
hemant.agrawal at nxp.com
Thu Jun 22 15:57:11 CEST 2017
Instead of qbman version, check the soc version for stashing
enablement decision
Signed-off-by: Hemant Agrawal <hemant.agrawal at nxp.com>
---
drivers/net/dpaa2/dpaa2_ethdev.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 48e0997..767eb9b 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -361,6 +361,7 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev,
{
struct dpaa2_dev_priv *priv = dev->data->dev_private;
struct fsl_mc_io *dpni = (struct fsl_mc_io *)priv->hw;
+ struct mc_soc_version mc_plat_info = {0};
struct dpaa2_queue *dpaa2_q;
struct dpni_queue cfg;
uint8_t options = 0;
@@ -391,7 +392,11 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev,
cfg.user_context = (uint64_t)(dpaa2_q);
/*if ls2088 or rev2 device, enable the stashing */
- if ((qbman_get_version() & 0xFFFF0000) > QMAN_REV_4000) {
+
+ if (mc_get_soc_version(dpni, CMD_PRI_LOW, &mc_plat_info))
+ PMD_INIT_LOG(ERR, "\tmc_get_soc_version failed\n");
+
+ if ((mc_plat_info.svr & 0xffff0000) != SVR_LS2080A) {
options |= DPNI_QUEUE_OPT_FLC;
cfg.flc.stash_control = true;
cfg.flc.value &= 0xFFFFFFFFFFFFFFC0;
--
2.7.4
More information about the dev
mailing list