crypto/ipsec_mb: handle mp request register error
PATCH 1/1 crypto/ipsec_mb: handle mp request register error
This patch fix the EXIST error handling when calling rte_mp_action_register().
Signed-off-by Kai Ji <[email protected]>
--- drivers/crypto/ipsec_mb/ipsec_mb_private.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
drivers/crypto/ipsec_mb/ipsec_mb_private.c +9 -2
@@ -5,6 +5,7 @@#include <bus_vdev_driver.h> #include <rte_common.h> #include <rte_cryptodev.h> +#include <rte_errno.h> #include "ipsec_mb_private.h"
@@ -46,7 +47,6 @@ static intipsec_mb_mp_request_register (void) {RTE_ASSERT (rte_eal_process_type () ==RTE_PROC_PRIMARY ); -IPSEC_MB_LOG (INFO ,"Starting register MP IPC request\n" );return rte_mp_action_register (IPSEC_MB_MP_MSG , ipsec_mb_ipc_request); }
@@ -168,9 +168,16 @@ ipsec_mb_create(struct rte_vdev_device *vdev,IPSEC_MB_LOG (INFO ,"IPSec Multi-buffer library version used: %s\n" ,imb_get_version_str ()); -if (rte_eal_process_type () ==RTE_PROC_PRIMARY ) +if (rte_eal_process_type () ==RTE_PROC_PRIMARY ) { retval =ipsec_mb_mp_request_register (); +if (retval && (rte_errno ==EEXIST )) +/* Safe to proceed, return 0 */ +return 0 ; +if (retval) +IPSEC_MB_LOG (ERR , +"IPSec Multi-buffer register MP request failed.\n" ); + }return retval; }
Signature · 1 line
2.17.1
Hi Kai,
Quoted 16 lines
-----Original Message-----
From: Kai Ji <[email protected]>
Sent: Wednesday, November 2, 2022 11:25 PM
To: [email protected]
Cc: [email protected]; Ji, Kai <[email protected]>; De Lara Guarch, Pablo <[email protected]>; Burakov, Anatoly <[email protected]>
Subject: [dpdk-dev v1]crypto/ipsec_mb: handle mp request register errorThis patch fix the EXIST error handling when calling
rte_mp_action_register().Signed-off-by Kai Ji <[email protected]>--- drivers/crypto/ipsec_mb/ipsec_mb_private.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
<snip>
Tested-by Brian Dooley <[email protected]>
Akhil Goyal
AppliedQuoted 11 lines
Hi Kai,
Quoted 8 lines
Subject: [dpdk-dev v1]
crypto/ipsec_mb: handle mp request register errorThis patch fix the EXIST error handling when calling
rte_mp_action_register().Signed-off-by Kai Ji <[email protected]>--- drivers/crypto/ipsec_mb/ipsec_mb_private.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)Tested-by Brian Dooley <[email protected]>
Applied to dpdk-next-crypto
Thanks.