DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 1/3] net/iavf: fix security session destroy
@ 2022-10-13 12:19 Radu Nicolau
  2022-10-13 12:19 ` [PATCH 2/3] net/ixgbe: " Radu Nicolau
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Radu Nicolau @ 2022-10-13 12:19 UTC (permalink / raw)
  To: Jingjing Wu, Beilei Xing; +Cc: dev, Radu Nicolau, gakhil

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 <radu.nicolau@intel.com>
---
 drivers/net/iavf/iavf_ipsec_crypto.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_ipsec_crypto.c b/drivers/net/iavf/iavf_ipsec_crypto.c
index afd7f8f467..46a77afa27 100644
--- a/drivers/net/iavf/iavf_ipsec_crypto.c
+++ b/drivers/net/iavf/iavf_ipsec_crypto.c
@@ -1042,7 +1042,7 @@ iavf_ipsec_crypto_session_destroy(void *device,
 		return -EINVAL;
 
 	ret = iavf_ipsec_crypto_sa_del(adapter, iavf_sess);
-	rte_mempool_put(rte_mempool_from_obj(iavf_sess), (void *)iavf_sess);
+	memset(iavf_sess, 0, sizeof(struct iavf_security_session));
 	return ret;
 }
 
-- 
2.25.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 2/3] net/ixgbe: fix security session destroy
  2022-10-13 12:19 [PATCH 1/3] net/iavf: fix security session destroy Radu Nicolau
@ 2022-10-13 12:19 ` Radu Nicolau
  2022-10-13 12:24   ` [EXT] " Akhil Goyal
  2022-10-13 12:19 ` [PATCH 3/3] net/txgbe: " Radu Nicolau
  2022-10-13 12:23 ` [EXT] [PATCH 1/3] net/iavf: " Akhil Goyal
  2 siblings, 1 reply; 10+ messages in thread
From: Radu Nicolau @ 2022-10-13 12:19 UTC (permalink / raw)
  To: Qiming Yang, Wenjun Wu; +Cc: dev, Radu Nicolau, gakhil

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 <radu.nicolau@intel.com>
---
 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;
 }
 
-- 
2.25.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 3/3] net/txgbe: fix security session destroy
  2022-10-13 12:19 [PATCH 1/3] net/iavf: fix security session destroy Radu Nicolau
  2022-10-13 12:19 ` [PATCH 2/3] net/ixgbe: " Radu Nicolau
@ 2022-10-13 12:19 ` Radu Nicolau
  2022-10-13 12:23   ` [EXT] " Akhil Goyal
  2022-10-14  9:58   ` Jiawen Wu
  2022-10-13 12:23 ` [EXT] [PATCH 1/3] net/iavf: " Akhil Goyal
  2 siblings, 2 replies; 10+ messages in thread
From: Radu Nicolau @ 2022-10-13 12:19 UTC (permalink / raw)
  To: Jiawen Wu, Jian Wang; +Cc: dev, Radu Nicolau, gakhil

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 <radu.nicolau@intel.com>
---
 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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [EXT] [PATCH 1/3] net/iavf: fix security session destroy
  2022-10-13 12:19 [PATCH 1/3] net/iavf: fix security session destroy Radu Nicolau
  2022-10-13 12:19 ` [PATCH 2/3] net/ixgbe: " Radu Nicolau
  2022-10-13 12:19 ` [PATCH 3/3] net/txgbe: " Radu Nicolau
@ 2022-10-13 12:23 ` Akhil Goyal
  2022-10-18  4:13   ` Zhang, Qi Z
  2 siblings, 1 reply; 10+ messages in thread
From: Akhil Goyal @ 2022-10-13 12:23 UTC (permalink / raw)
  To: Radu Nicolau, Jingjing Wu, Beilei Xing; +Cc: dev

> 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 <radu.nicolau@intel.com>
> ---
Acked-by: Akhil Goyal <gakhil@marvell.com>



^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [EXT] [PATCH 3/3] net/txgbe: fix security session destroy
  2022-10-13 12:19 ` [PATCH 3/3] net/txgbe: " Radu Nicolau
@ 2022-10-13 12:23   ` Akhil Goyal
  2022-10-14  9:58   ` Jiawen Wu
  1 sibling, 0 replies; 10+ messages in thread
From: Akhil Goyal @ 2022-10-13 12:23 UTC (permalink / raw)
  To: Radu Nicolau, Jiawen Wu, Jian Wang; +Cc: dev

> 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 <radu.nicolau@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [EXT] [PATCH 2/3] net/ixgbe: fix security session destroy
  2022-10-13 12:19 ` [PATCH 2/3] net/ixgbe: " Radu Nicolau
@ 2022-10-13 12:24   ` Akhil Goyal
  2022-10-18  4:18     ` Zhang, Qi Z
  0 siblings, 1 reply; 10+ messages in thread
From: Akhil Goyal @ 2022-10-13 12:24 UTC (permalink / raw)
  To: Radu Nicolau, Qiming Yang, Wenjun Wu; +Cc: dev

> 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 <radu.nicolau@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [PATCH 3/3] net/txgbe: fix security session destroy
  2022-10-13 12:19 ` [PATCH 3/3] net/txgbe: " Radu Nicolau
  2022-10-13 12:23   ` [EXT] " Akhil Goyal
@ 2022-10-14  9:58   ` Jiawen Wu
  2022-10-18  4:19     ` Zhang, Qi Z
  1 sibling, 1 reply; 10+ messages in thread
From: Jiawen Wu @ 2022-10-14  9:58 UTC (permalink / raw)
  To: 'Radu Nicolau', 'Jian Wang'; +Cc: dev, gakhil

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 <radu.nicolau@intel.com>
> ---
>  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 <jiawenwu@trustnetic.com>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [EXT] [PATCH 1/3] net/iavf: fix security session destroy
  2022-10-13 12:23 ` [EXT] [PATCH 1/3] net/iavf: " Akhil Goyal
@ 2022-10-18  4:13   ` Zhang, Qi Z
  0 siblings, 0 replies; 10+ messages in thread
From: Zhang, Qi Z @ 2022-10-18  4:13 UTC (permalink / raw)
  To: Akhil Goyal, Nicolau, Radu, Wu, Jingjing, Xing, Beilei; +Cc: dev



> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Thursday, October 13, 2022 8:24 PM
> To: Nicolau, Radu <radu.nicolau@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>
> Cc: dev@dpdk.org
> Subject: RE: [EXT] [PATCH 1/3] net/iavf: fix security session destroy
> 
> > 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 <radu.nicolau@intel.com>
> > ---
> Acked-by: Akhil Goyal <gakhil@marvell.com>
> 

Applied to dpdk-next-net-intel.

Thanks
Qi


^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [EXT] [PATCH 2/3] net/ixgbe: fix security session destroy
  2022-10-13 12:24   ` [EXT] " Akhil Goyal
@ 2022-10-18  4:18     ` Zhang, Qi Z
  0 siblings, 0 replies; 10+ messages in thread
From: Zhang, Qi Z @ 2022-10-18  4:18 UTC (permalink / raw)
  To: Akhil Goyal, Nicolau, Radu, Yang, Qiming, Wu, Wenjun1; +Cc: dev



> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Thursday, October 13, 2022 8:24 PM
> To: Nicolau, Radu <radu.nicolau@intel.com>; Yang, Qiming
> <qiming.yang@intel.com>; Wu, Wenjun1 <wenjun1.wu@intel.com>
> Cc: dev@dpdk.org
> Subject: RE: [EXT] [PATCH 2/3] net/ixgbe: fix security session destroy
> 
> > 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 <radu.nicolau@intel.com>
> Acked-by: Akhil Goyal <gakhil@marvell.com>

Applied to dpdk-next-net-intel.

Thanks
Qi

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [PATCH 3/3] net/txgbe: fix security session destroy
  2022-10-14  9:58   ` Jiawen Wu
@ 2022-10-18  4:19     ` Zhang, Qi Z
  0 siblings, 0 replies; 10+ messages in thread
From: Zhang, Qi Z @ 2022-10-18  4:19 UTC (permalink / raw)
  To: Jiawen Wu, Nicolau, Radu, 'Jian Wang'; +Cc: dev, gakhil



> -----Original Message-----
> From: Jiawen Wu <jiawenwu@trustnetic.com>
> Sent: Friday, October 14, 2022 5:59 PM
> To: Nicolau, Radu <radu.nicolau@intel.com>; 'Jian Wang'
> <jianwang@trustnetic.com>
> Cc: dev@dpdk.org; gakhil@marvell.com
> Subject: RE: [PATCH 3/3] net/txgbe: fix security session destroy
> 
> 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 <radu.nicolau@intel.com>
> > ---
> >  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 <jiawenwu@trustnetic.com>

Applied to dpdk-next-net-intel.

Thanks
Qi

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-10-18  4:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-13 12:19 [PATCH 1/3] net/iavf: fix security session destroy Radu Nicolau
2022-10-13 12:19 ` [PATCH 2/3] net/ixgbe: " Radu Nicolau
2022-10-13 12:24   ` [EXT] " Akhil Goyal
2022-10-18  4:18     ` Zhang, Qi Z
2022-10-13 12:19 ` [PATCH 3/3] net/txgbe: " Radu Nicolau
2022-10-13 12:23   ` [EXT] " Akhil Goyal
2022-10-14  9:58   ` Jiawen Wu
2022-10-18  4:19     ` Zhang, Qi Z
2022-10-13 12:23 ` [EXT] [PATCH 1/3] net/iavf: " Akhil Goyal
2022-10-18  4:13   ` Zhang, Qi Z

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).