From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 223E4A04BC; Fri, 9 Oct 2020 13:19:09 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 494321D425; Fri, 9 Oct 2020 13:18:50 +0200 (CEST) Received: from relay.smtp-ext.broadcom.com (saphodev.broadcom.com [192.19.232.172]) by dpdk.org (Postfix) with ESMTP id 712EE1BFFC; Fri, 9 Oct 2020 13:18:47 +0200 (CEST) Received: from dhcp-10-123-153-55.dhcp.broadcom.net (bgccx-dev-host-lnx35.bec.broadcom.net [10.123.153.55]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by relay.smtp-ext.broadcom.com (Postfix) with ESMTPS id 5BC24829A; Fri, 9 Oct 2020 04:18:44 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 5BC24829A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1602242326; bh=xKQqJyiGGJtLDEDFnVgFWMSO+CRBVD9qtz66w0GVQLk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tdNtv9S8oVdboK+HubNXR9nCOljagn/2tYuDPurCygZJT1RVLJqcqnrL+gHUFSySp pKD/mYeRU3wmFxqVIngef60Sn4L2z4WjP5msGWsEPqZ6jRSdWJWIY+ECAW8CGM+uJO 4GKLtDE/tjNrymPrNuxU9OPgVH0LTgTKISgu1330= From: Somnath Kotur To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Kishore Padmanabha , stable@dpdk.org, Michael Baucom , Ajit Kumar Khaparde Date: Fri, 9 Oct 2020 16:41:18 +0530 Message-Id: <20201009111130.10422-2-somnath.kotur@broadcom.com> X-Mailer: git-send-email 2.28.0.450.g3a238e5 In-Reply-To: <20201009111130.10422-1-somnath.kotur@broadcom.com> References: <20201009111130.10422-1-somnath.kotur@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 01/13] net/bnxt: fix the corruption of the session details X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Kishore Padmanabha 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 Reviewed-by: Michael Baucom Reviewed-by: Ajit Kumar Khaparde --- drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c index 2896194..a4d48c7 100644 --- a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c +++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c @@ -159,7 +159,9 @@ ulp_ctx_session_open(struct bnxt *bp, } 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; } @@ -176,6 +178,7 @@ ulp_ctx_session_close(struct bnxt *bp, if (session->session_opened) tf_close_session(&bp->tfp); session->session_opened = 0; + rte_free(session->g_tfp); session->g_tfp = NULL; } -- 2.7.4