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 076C2A04BC; Sat, 10 Oct 2020 06:13:09 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 938DD1D6ED; Sat, 10 Oct 2020 06:12:49 +0200 (CEST) Received: from mail-pl1-f226.google.com (mail-pl1-f226.google.com [209.85.214.226]) by dpdk.org (Postfix) with ESMTP id 34F531D6E4 for ; Sat, 10 Oct 2020 06:12:47 +0200 (CEST) Received: by mail-pl1-f226.google.com with SMTP id d6so5441649plo.13 for ; Fri, 09 Oct 2020 21:12:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fhyxQgccbhTxm4aqRro0eF3BNVW9QJEWMufpAKagYHE=; b=FkiTtklAWdzkmQCuoQHSaK75xxvfsmKUefBZbhQhVaKQh6ux4ltPWFqBt9tvylZ7vd d5OGtmLm3aNa3iXaBI+atebl1KJb/kwF5mh2lX28m9W+jDhmrJXjyepVSGwITLZXl23N xuyN23uGTqSKMMymnm0eG/YTd5F9jv9cWxgM4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fhyxQgccbhTxm4aqRro0eF3BNVW9QJEWMufpAKagYHE=; b=P1CUquKcXt0iUI4ck7CrnbYZQVt36B7FEVkAOslE16Nf/upwgphfWxpx2RhGc+oGIw HsO4zv100tnvJLQ9KzEFvjTiKKB++9N46v5xYL9axD614SNoWblaghfGfQbe6R3bvz4Z 7QH2dwNXTsyEMabBDiZckbT+GAcXh9XL9at3p1oeU7lJy+8Vd28ml1plQEa94WZUdleF Nxri0vBk27ML4YhroksJD4BXKoEXhUTBBfPuRa0MGE21mKPX5QEmv0ozo3ajkRQ0jnY8 K6QZyMxAUrlGOpwHO4KykhBuN4VvhypXN1kPJDurUyXWPz+inCe+aitCWHc+sb0t4AkO mxpA== X-Gm-Message-State: AOAM531pWR3YOSDqf1ggNYHgya65UGVc3Wtf2jipxzT/zufJZ/Hv5B1B tPlD/wdvYWqOwmew+t7VszTaUlhGcnNLpVcZ4KxeF0M5qWT6HdMjfqYpOa0SlhtdIFeSeC1CGma GiD9k1RH5kRgO2O4tuSU0jkd5DfoSlfkBwYHyk1ZgOYACiHMUnIaBG9bDueqBbMmcv1f+jb2UMp nHtw== X-Google-Smtp-Source: ABdhPJyX2adPUnzK6uK8V++K7CkcKNgfZlFDXaniHc7BGuhvAOxp8UbZvCZPkTIRCJLM8qJP9p79kHPYRrS4 X-Received: by 2002:a17:902:d904:b029:d3:d2dd:2b36 with SMTP id c4-20020a170902d904b02900d3d2dd2b36mr15176256plz.32.1602303165163; Fri, 09 Oct 2020 21:12:45 -0700 (PDT) Received: from localhost.localdomain ([192.19.223.252]) by smtp-relay.gmail.com with ESMTPS id b4sm1597022pjn.3.2020.10.09.21.12.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Oct 2020 21:12:45 -0700 (PDT) X-Relaying-Domain: broadcom.com From: Ajit Khaparde To: dev@dpdk.org Cc: Kishore Padmanabha , stable@dpdk.org, Mike Baucom Date: Fri, 9 Oct 2020 21:11:42 -0700 Message-Id: <20201010041153.63921-2-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.21.1 (Apple Git-122.3) In-Reply-To: <20201010041153.63921-1-ajit.khaparde@broadcom.com> References: <20201009111130.10422-1-somnath.kotur@broadcom.com> <20201010041153.63921-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 01/12] 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: Mike Baucom Reviewed-by: Ajit 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 289619411..a4d48c71a 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.21.1 (Apple Git-122.3)