[v2,01/20] bus/fslmc: fix to reset portal memory before use

Message ID 20190111115712.6482-2-shreyansh.jain@nxp.com
State Superseded, archived
Delegated to: Ferruh Yigit
Headers show
Series
  • NXP DPAA2 fixes and enhancements
Related show

Checks

Context Check Description
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/intel-Performance-Testing success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Shreyansh Jain Jan. 11, 2019, 11:57 a.m.
From: Sachin Saxena <sachin.saxena@nxp.com>

Uninitialized portal memory is causing unwanted issues.

Fixes: 293c0ca94c36 ("bus/fslmc: support memory backed portals with QBMAN 5.0")
Cc: stable@dpdk.org

Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
---
 drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 2 ++
 1 file changed, 2 insertions(+)

Patch

diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
index ce0699842..4fc6efec5 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
@@ -369,6 +369,8 @@  dpaa2_create_dpio_device(int vdev_fd,
 	dpio_dev->mc_portal = rte_mcp_ptr_list[MC_PORTAL_INDEX];
 
 	dpio_dev->dpio = malloc(sizeof(struct fsl_mc_io));
+	memset(dpio_dev->dpio, 0, sizeof(struct fsl_mc_io));
+
 	if (!dpio_dev->dpio) {
 		DPAA2_BUS_ERR("Memory allocation failure");
 		goto err;