[PATCH v2 04/16] net/dpaa2: fix dpdmux configuration for error behaviour
Gagandeep Singh
g.singh at nxp.com
Fri Oct 7 05:27:31 CEST 2022
From: Vanshika Shukla <vanshika.shukla at nxp.com>
Driver is giving the wrong interface ID while setting the
error behaviour.
This patch fixes the issue by passing the correct MAC interface
index value to the API.
Fixes: 3d43972b1b42 ("net/dpaa2: do not drop parse error packets by dpdmux")
Cc: stable at dpdk.org
Signed-off-by: Vanshika Shukla <vanshika.shukla at nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal at nxp.com>
---
drivers/net/dpaa2/dpaa2_ethdev.h | 3 +++
drivers/net/dpaa2/dpaa2_mux.c | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.h b/drivers/net/dpaa2/dpaa2_ethdev.h
index f69df95253..32ae762e4a 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.h
+++ b/drivers/net/dpaa2/dpaa2_ethdev.h
@@ -66,6 +66,9 @@
/* Tx confirmation enabled */
#define DPAA2_TX_CONF_ENABLE 0x06
+/* DPDMUX index for DPMAC */
+#define DPAA2_DPDMUX_DPMAC_IDX 0
+
/* HW loopback the egress traffic to self ingress*/
#define DPAA2_TX_MAC_LOOPBACK_MODE 0x20
diff --git a/drivers/net/dpaa2/dpaa2_mux.c b/drivers/net/dpaa2/dpaa2_mux.c
index 3289f388e1..7456f43f42 100644
--- a/drivers/net/dpaa2/dpaa2_mux.c
+++ b/drivers/net/dpaa2/dpaa2_mux.c
@@ -336,7 +336,7 @@ dpaa2_create_dpdmux_device(int vdev_fd __rte_unused,
ret = dpdmux_if_set_errors_behavior(&dpdmux_dev->dpdmux,
CMD_PRI_LOW,
- dpdmux_dev->token, dpdmux_id,
+ dpdmux_dev->token, DPAA2_DPDMUX_DPMAC_IDX,
&mux_err_cfg);
if (ret) {
DPAA2_PMD_ERR("dpdmux_if_set_errors_behavior %s err %d",
--
2.25.1
More information about the stable
mailing list