[v2] crypto/ipsec_mb: expect ENOTSUP

Message ID 20230313120106.3462855-1-krzysztof.karas@intel.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series [v2] crypto/ipsec_mb: expect ENOTSUP |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/github-robot: build success github build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-abi-testing success Testing PASS

Commit Message

Krzysztof Karas March 13, 2023, 12:01 p.m. UTC
  Commit b35848bc01f6 ("crypto/ipsec_mb: add multi-process
IPC request handler") is part of DPDK 22.11 release and
it enforces usage of shared config and multiprocess mode.

DPDK is not required to be run with more than one
process in general, so instead of erroring out,
catch the error and proceed with ipsec_mb device
creation normally.

Fixes: b35848bc01f6 ("crypto/ipsec_mb: add multi-process IPC request handler")
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
---
v2:
 * Modified patch title and added "Fixes:" note.
 * Restored original comparison "rte_errno == EEXIST".

 .mailmap                                   | 1 +
 drivers/crypto/ipsec_mb/ipsec_mb_private.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
  

Comments

Ji, Kai March 14, 2023, 5:25 p.m. UTC | #1
Acked-by: Kai Ji <kai.ji@intel.com>

> -----Original Message-----
> From: Karas, Krzysztof <krzysztof.karas@intel.com>
> Sent: Monday, March 13, 2023 12:01 PM
> To: Thomas Monjalon <thomas@monjalon.net>; Ji, Kai <kai.ji@intel.com>;
> De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Kusztal,
> ArkadiuszX <arkadiuszx.kusztal@intel.com>
> Cc: dev@dpdk.org; Karas, Krzysztof <krzysztof.karas@intel.com>
> Subject: [PATCH v2] crypto/ipsec_mb: expect ENOTSUP
> 
> Commit b35848bc01f6 ("crypto/ipsec_mb: add multi-process IPC request
> handler") is part of DPDK 22.11 release and it enforces usage of shared
> config and multiprocess mode.
> 
> DPDK is not required to be run with more than one process in general, so
> instead of erroring out, catch the error and proceed with ipsec_mb
> device creation normally.
> 
> Fixes: b35848bc01f6 ("crypto/ipsec_mb: add multi-process IPC request
> handler")
> Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
> ---
> v2:
>  * Modified patch title and added "Fixes:" note.
>  * Restored original comparison "rte_errno == EEXIST".
> 
>  .mailmap                                   | 1 +
>  drivers/crypto/ipsec_mb/ipsec_mb_private.c | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/.mailmap b/.mailmap
> index a9f4f28fba..dad475b9d0 100644
> --- a/.mailmap
> +++ b/.mailmap
> @@ -1583,3 +1583,4 @@ Ziye Yang <ziye.yang@intel.com>  Zoltan Kiss
> <zoltan.kiss@schaman.hu> <zoltan.kiss@linaro.org>  Zorik Machulsky
> <zorik@amazon.com>  Zyta Szpak <zyta@marvell.com> <zr@semihalf.com>
> <zyta.szpak@semihalf.com>
> +Krzysztof Karas <krzysztof.karas@intel.com>
> diff --git a/drivers/crypto/ipsec_mb/ipsec_mb_private.c
> b/drivers/crypto/ipsec_mb/ipsec_mb_private.c
> index 50b789a29b..64f2b4b604 100644
> --- a/drivers/crypto/ipsec_mb/ipsec_mb_private.c
> +++ b/drivers/crypto/ipsec_mb/ipsec_mb_private.c
> @@ -170,7 +170,7 @@ ipsec_mb_create(struct rte_vdev_device *vdev,
> 
>  	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
>  		retval = ipsec_mb_mp_request_register();
> -		if (retval && (rte_errno == EEXIST))
> +		if (retval && ((rte_errno == EEXIST) || (rte_errno ==
> ENOTSUP)))
>  			/* Safe to proceed, return 0 */
>  			return 0;
> 
> --
> 2.34.1
  
Akhil Goyal March 16, 2023, 6:46 p.m. UTC | #2
> Acked-by: Kai Ji <kai.ji@intel.com>
> 
> > Subject: [PATCH v2] crypto/ipsec_mb: expect ENOTSUP
> >
> > Commit b35848bc01f6 ("crypto/ipsec_mb: add multi-process IPC request
> > handler") is part of DPDK 22.11 release and it enforces usage of shared
> > config and multiprocess mode.
> >
> > DPDK is not required to be run with more than one process in general, so
> > instead of erroring out, catch the error and proceed with ipsec_mb
> > device creation normally.
> >
> > Fixes: b35848bc01f6 ("crypto/ipsec_mb: add multi-process IPC request
> > handler")
> > Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
> > ---
> > v2:
> >  * Modified patch title and added "Fixes:" note.
> >  * Restored original comparison "rte_errno == EEXIST".
> >
> >  .mailmap                                   | 1 +
> >  drivers/crypto/ipsec_mb/ipsec_mb_private.c | 2 +-
> >  2 files changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/.mailmap b/.mailmap
> > index a9f4f28fba..dad475b9d0 100644
> > --- a/.mailmap
> > +++ b/.mailmap
> > @@ -1583,3 +1583,4 @@ Ziye Yang <ziye.yang@intel.com>  Zoltan Kiss
> > <zoltan.kiss@schaman.hu> <zoltan.kiss@linaro.org>  Zorik Machulsky
> > <zorik@amazon.com>  Zyta Szpak <zyta@marvell.com> <zr@semihalf.com>
> > <zyta.szpak@semihalf.com>
> > +Krzysztof Karas <krzysztof.karas@intel.com>

Removed mailmap entry as it is already present + it should have been alphabetically sorted.

Applied to dpdk-next-crypto
  

Patch

diff --git a/.mailmap b/.mailmap
index a9f4f28fba..dad475b9d0 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1583,3 +1583,4 @@  Ziye Yang <ziye.yang@intel.com>
 Zoltan Kiss <zoltan.kiss@schaman.hu> <zoltan.kiss@linaro.org>
 Zorik Machulsky <zorik@amazon.com>
 Zyta Szpak <zyta@marvell.com> <zr@semihalf.com> <zyta.szpak@semihalf.com>
+Krzysztof Karas <krzysztof.karas@intel.com>
diff --git a/drivers/crypto/ipsec_mb/ipsec_mb_private.c b/drivers/crypto/ipsec_mb/ipsec_mb_private.c
index 50b789a29b..64f2b4b604 100644
--- a/drivers/crypto/ipsec_mb/ipsec_mb_private.c
+++ b/drivers/crypto/ipsec_mb/ipsec_mb_private.c
@@ -170,7 +170,7 @@  ipsec_mb_create(struct rte_vdev_device *vdev,
 
 	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
 		retval = ipsec_mb_mp_request_register();
-		if (retval && (rte_errno == EEXIST))
+		if (retval && ((rte_errno == EEXIST) || (rte_errno == ENOTSUP)))
 			/* Safe to proceed, return 0 */
 			return 0;