From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0CDC0A00C2; Fri, 14 Oct 2022 11:58:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F40B642D22; Fri, 14 Oct 2022 11:58:47 +0200 (CEST) Received: from smtpbgsg1.qq.com (smtpbgsg1.qq.com [54.254.200.92]) by mails.dpdk.org (Postfix) with ESMTP id 0A70342CF8 for ; Fri, 14 Oct 2022 11:58:45 +0200 (CEST) X-QQ-mid: Yeas47t1665741518t899t25585 Received: from 7082A6556EBF4E69829842272A565F7C (jiawenwu@trustnetic.com [183.129.236.74]) X-QQ-SSF: 00400000000000F0FK8000000000000 From: =?utf-8?b?Smlhd2VuIFd1?= To: "'Radu Nicolau'" , "'Jian Wang'" Cc: , References: <20221013121913.3543260-1-radu.nicolau@intel.com> <20221013121913.3543260-3-radu.nicolau@intel.com> In-Reply-To: <20221013121913.3543260-3-radu.nicolau@intel.com> Subject: RE: [PATCH 3/3] net/txgbe: fix security session destroy Date: Fri, 14 Oct 2022 17:58:38 +0800 Message-ID: <002a01d8dfb3$880b6da0$982248e0$@trustnetic.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Content-Language: zh-cn Thread-Index: AQILqcgqEwPX5PftkS1odaeE8YLQ4gJFksswrZXmZJA= X-QQ-SENDSIZE: 520 Feedback-ID: Yeas:trustnetic.com:qybglogicsvr:qybglogicsvr5 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 On Thursday, October 13, 2022 8:19 PM, Radu Nicolau wrote: > 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 > --- > drivers/net/txgbe/txgbe_ipsec.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/net/txgbe/txgbe_ipsec.c b/drivers/net/txgbe/txgbe_ipsec.c index > b458b3a922..f9f8108fb8 100644 > --- a/drivers/net/txgbe/txgbe_ipsec.c > +++ b/drivers/net/txgbe/txgbe_ipsec.c > @@ -409,7 +409,6 @@ txgbe_crypto_remove_session(void *device, { > struct rte_eth_dev *eth_dev = device; > struct txgbe_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"); @@ -421,7 +420,7 @@ > txgbe_crypto_remove_session(void *device, > return -EFAULT; > } > > - rte_mempool_put(mempool, (void *)ic_session); > + memset(ic_session, 0, sizeof(struct txgbe_crypto_session)); > > return 0; > } > -- > 2.25.1 > > Reviewed-by: Jiawen Wu