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: gak...@marvell.com

Signed-off-by: Radu Nicolau <radu.nico...@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

Reply via email to