The session details that is shared among multiple ports
need to be outside the bnxt structure.
Fixes:
70e64b27af5b ("net/bnxt: support ULP session manager cleanup")
Cc: stable@dpdk.org
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
}
if (!session->session_opened) {
session->session_opened = 1;
- session->g_tfp = &bp->tfp;
+ session->g_tfp = rte_zmalloc("bnxt_ulp_session_tfp",
+ sizeof(struct tf), 0);
+ session->g_tfp->session = bp->tfp.session;
}
return rc;
}
if (session->session_opened)
tf_close_session(&bp->tfp);
session->session_opened = 0;
+ rte_free(session->g_tfp);
session->g_tfp = NULL;
}