[v5,37/42] net/dpaa2: improve DPDMUX error behavior settings

Message ID 20241023115955.1207617-38-vanshika.shukla@nxp.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series DPAA2 specific patches |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Vanshika Shukla Oct. 23, 2024, 11:59 a.m. UTC
From: Sachin Saxena <sachin.saxena@nxp.com>

compatible with MC v10.36 or later

Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
---
 drivers/net/dpaa2/dpaa2_mux.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
  

Patch

diff --git a/drivers/net/dpaa2/dpaa2_mux.c b/drivers/net/dpaa2/dpaa2_mux.c
index f4b8d481af..13de7d5783 100644
--- a/drivers/net/dpaa2/dpaa2_mux.c
+++ b/drivers/net/dpaa2/dpaa2_mux.c
@@ -1,5 +1,5 @@ 
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright 2018-2021 NXP
+ * Copyright 2018-2021,2023 NXP
  */
 
 #include <sys/queue.h>
@@ -448,13 +448,12 @@  dpaa2_create_dpdmux_device(int vdev_fd __rte_unused,
 		struct dpdmux_error_cfg mux_err_cfg;
 
 		memset(&mux_err_cfg, 0, sizeof(mux_err_cfg));
+		/* Note: Discarded flag(DPDMUX_ERROR_DISC) has effect only when
+		 * ERROR_ACTION is set to DPNI_ERROR_ACTION_SEND_TO_ERROR_QUEUE.
+		 */
+		mux_err_cfg.errors = DPDMUX_ALL_ERRORS;
 		mux_err_cfg.error_action = DPDMUX_ERROR_ACTION_CONTINUE;
 
-		if (attr.method != DPDMUX_METHOD_C_VLAN_MAC)
-			mux_err_cfg.errors = DPDMUX_ERROR_DISC;
-		else
-			mux_err_cfg.errors = DPDMUX_ALL_ERRORS;
-
 		ret = dpdmux_if_set_errors_behavior(&dpdmux_dev->dpdmux,
 				CMD_PRI_LOW,
 				dpdmux_dev->token, DPAA2_DPDMUX_DPMAC_IDX,