From patchwork Thu Oct 13 12:19:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Radu Nicolau X-Patchwork-Id: 118154 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E8F02A00C2; Thu, 13 Oct 2022 14:19:47 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6140A42F50; Thu, 13 Oct 2022 14:19:45 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 31AB542DC7 for ; Thu, 13 Oct 2022 14:19:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665663581; x=1697199581; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=J1FNXubOYT5FFkbhkA1hdA4T8Nk/FzuGl2EzlRtylAA=; b=Or1LfVPxkpSwq3tGOW767rXVgVwJ4+7S0Uw12EDa2Z4R/H3eSwp3lhIy 41A1jmnUC4PZT7kzCTB5pdIij69OiLK1KptOrLr+zJoHvL/H5VaGzF/po NOcep5tq6kL/IuS4swA4I6nYlYdTJeHuRVzxmeA11VFS8MXuawo2BlxzY uB0vjWfxjKoqAqpOAGUk+CLp2DIJ97VBxRoj5xJRxyQD8ii8gHfFYQmF9 8+9FQDe0wk5w3jz5zKXZcvS2t0iK71NwHbF5TiVtXHkSPJWMT6z25tkXr jYtkAy1hoBVHEwk/8iEZVm0i0qRKcPjapnU8oqxwyHxXLeAJocqveGXRf g==; X-IronPort-AV: E=McAfee;i="6500,9779,10498"; a="306124638" X-IronPort-AV: E=Sophos;i="5.95,180,1661842800"; d="scan'208";a="306124638" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Oct 2022 05:19:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10498"; a="956141388" X-IronPort-AV: E=Sophos;i="5.95,180,1661842800"; d="scan'208";a="956141388" Received: from silpixa00400884.ir.intel.com ([10.243.22.82]) by fmsmga005.fm.intel.com with ESMTP; 13 Oct 2022 05:19:18 -0700 From: Radu Nicolau To: Qiming Yang , Wenjun Wu Cc: dev@dpdk.org, Radu Nicolau , gakhil@marvell.com Subject: [PATCH 2/3] net/ixgbe: fix security session destroy Date: Thu, 13 Oct 2022 13:19:12 +0100 Message-Id: <20221013121913.3543260-2-radu.nicolau@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221013121913.3543260-1-radu.nicolau@intel.com> References: <20221013121913.3543260-1-radu.nicolau@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Replace mempool_put with memset 0, the internal session memory block is no longer allocated from a mempool Fixes: 3f3fc3308bd0 ("security: remove private mempool usage") Cc: gakhil@marvell.com Signed-off-by: Radu Nicolau Acked-by: Akhil Goyal --- drivers/net/ixgbe/ixgbe_ipsec.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_ipsec.c b/drivers/net/ixgbe/ixgbe_ipsec.c index 8a96a9f11a..0c75fd36da 100644 --- a/drivers/net/ixgbe/ixgbe_ipsec.c +++ b/drivers/net/ixgbe/ixgbe_ipsec.c @@ -429,7 +429,6 @@ ixgbe_crypto_remove_session(void *device, { struct rte_eth_dev *eth_dev = device; struct ixgbe_crypto_session *ic_session = SECURITY_GET_SESS_PRIV(session); - struct rte_mempool *mempool = rte_mempool_from_obj(ic_session); if (eth_dev != ic_session->dev) { PMD_DRV_LOG(ERR, "Session not bound to this device\n"); @@ -441,8 +440,7 @@ ixgbe_crypto_remove_session(void *device, return -EFAULT; } - rte_mempool_put(mempool, (void *)ic_session); - + memset(ic_session, 0, sizeof(struct ixgbe_crypto_session)); return 0; }