* [PATCH] ipsec_mb: expect ENOTSUP in ipsec_mb_create()
@ 2023-02-20 17:13 Krzysztof Karas
2023-02-27 18:26 ` [EXT] " Akhil Goyal
2023-03-13 12:01 ` [PATCH v2] crypto/ipsec_mb: expect ENOTSUP Krzysztof Karas
0 siblings, 2 replies; 6+ messages in thread
From: Krzysztof Karas @ 2023-02-20 17:13 UTC (permalink / raw)
To: Thomas Monjalon, Kai Ji, Pablo de Lara; +Cc: dev, Krzysztof Karas
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.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
---
.mailmap | 1 +
drivers/crypto/ipsec_mb/ipsec_mb_private.c | 9 ++-------
2 files changed, 3 insertions(+), 7 deletions(-)
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..9eebf9bbc9 100644
--- a/drivers/crypto/ipsec_mb/ipsec_mb_private.c
+++ b/drivers/crypto/ipsec_mb/ipsec_mb_private.c
@@ -170,13 +170,8 @@ 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))
- /* Safe to proceed, return 0 */
- return 0;
-
- if (retval)
- IPSEC_MB_LOG(ERR,
- "IPSec Multi-buffer register MP request failed.\n");
+ if (retval != 0 && rte_errno == ENOTSUP)
+ retval = 0;
}
return retval;
}
--
2.34.1
---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.
Spolka oswiadcza, ze posiada status duzego przedsiebiorcy w rozumieniu ustawy z dnia 8 marca 2013 r. o przeciwdzialaniu nadmiernym opoznieniom w transakcjach handlowych.
Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [EXT] [PATCH] ipsec_mb: expect ENOTSUP in ipsec_mb_create()
2023-02-20 17:13 [PATCH] ipsec_mb: expect ENOTSUP in ipsec_mb_create() Krzysztof Karas
@ 2023-02-27 18:26 ` Akhil Goyal
2023-02-28 23:24 ` Ji, Kai
2023-03-13 12:01 ` [PATCH v2] crypto/ipsec_mb: expect ENOTSUP Krzysztof Karas
1 sibling, 1 reply; 6+ messages in thread
From: Akhil Goyal @ 2023-02-27 18:26 UTC (permalink / raw)
To: Krzysztof Karas, Thomas Monjalon, Kai Ji, Pablo de Lara; +Cc: dev
> Subject: [EXT] [PATCH] ipsec_mb: expect ENOTSUP in ipsec_mb_create()
Title should start with crypto/ipsec_mb:
Avoid using function names in patch titles.
>
> 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.
This seems to be a fix, kindly adhere to the guidelines for fixes patches.
>
> Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Kai/Pablo,
Acks please?
> ---
> .mailmap | 1 +
> drivers/crypto/ipsec_mb/ipsec_mb_private.c | 9 ++-------
> 2 files changed, 3 insertions(+), 7 deletions(-)
>
> 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..9eebf9bbc9 100644
> --- a/drivers/crypto/ipsec_mb/ipsec_mb_private.c
> +++ b/drivers/crypto/ipsec_mb/ipsec_mb_private.c
> @@ -170,13 +170,8 @@ 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))
> - /* Safe to proceed, return 0 */
> - return 0;
> -
> - if (retval)
> - IPSEC_MB_LOG(ERR,
> - "IPSec Multi-buffer register MP request
> failed.\n");
> + if (retval != 0 && rte_errno == ENOTSUP)
> + retval = 0;
> }
> return retval;
> }
> --
> 2.34.1
>
> ---------------------------------------------------------------------
> Intel Technology Poland sp. z o.o.
> ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII
> Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-
> 52-316 | Kapital zakladowy 200.000 PLN.
> Spolka oswiadcza, ze posiada status duzego przedsiebiorcy w rozumieniu ustawy
> z dnia 8 marca 2013 r. o przeciwdzialaniu nadmiernym opoznieniom w
> transakcjach handlowych.
>
> Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i
> moze zawierac informacje poufne. W razie przypadkowego otrzymania tej
> wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie;
> jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione.
> This e-mail and any attachments may contain confidential material for the sole
> use of the intended recipient(s). If you are not the intended recipient, please
> contact the sender and delete all copies; any review or distribution by others is
> strictly prohibited.
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [EXT] [PATCH] ipsec_mb: expect ENOTSUP in ipsec_mb_create()
2023-02-27 18:26 ` [EXT] " Akhil Goyal
@ 2023-02-28 23:24 ` Ji, Kai
0 siblings, 0 replies; 6+ messages in thread
From: Ji, Kai @ 2023-02-28 23:24 UTC (permalink / raw)
To: Akhil Goyal, Karas, Krzysztof, Thomas Monjalon, De Lara Guarch, Pablo; +Cc: dev
Is there any validation to this changes ? I Can't remember the exact reason why EEXIST
returned, somehow we need to handle that case.
Regards
Kai
> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Monday, February 27, 2023 6:27 PM
> To: Karas, Krzysztof <krzysztof.karas@intel.com>; Thomas Monjalon
> <thomas@monjalon.net>; Ji, Kai <kai.ji@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>
> Cc: dev@dpdk.org
> Subject: RE: [EXT] [PATCH] ipsec_mb: expect ENOTSUP in ipsec_mb_create()
>
> > Subject: [EXT] [PATCH] ipsec_mb: expect ENOTSUP in ipsec_mb_create()
>
> Title should start with crypto/ipsec_mb:
> Avoid using function names in patch titles.
>
> >
> > 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.
>
> This seems to be a fix, kindly adhere to the guidelines for fixes patches.
> >
> > Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
>
>
> Kai/Pablo,
> Acks please?
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] crypto/ipsec_mb: expect ENOTSUP
2023-02-20 17:13 [PATCH] ipsec_mb: expect ENOTSUP in ipsec_mb_create() Krzysztof Karas
2023-02-27 18:26 ` [EXT] " Akhil Goyal
@ 2023-03-13 12:01 ` Krzysztof Karas
2023-03-14 17:25 ` Ji, Kai
1 sibling, 1 reply; 6+ messages in thread
From: Krzysztof Karas @ 2023-03-13 12:01 UTC (permalink / raw)
To: Thomas Monjalon, Kai Ji, Pablo de Lara, Arkadiusz Kusztal
Cc: dev, Krzysztof Karas
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
---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.
Spolka oswiadcza, ze posiada status duzego przedsiebiorcy w rozumieniu ustawy z dnia 8 marca 2013 r. o przeciwdzialaniu nadmiernym opoznieniom w transakcjach handlowych.
Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH v2] crypto/ipsec_mb: expect ENOTSUP
2023-03-13 12:01 ` [PATCH v2] crypto/ipsec_mb: expect ENOTSUP Krzysztof Karas
@ 2023-03-14 17:25 ` Ji, Kai
2023-03-16 18:46 ` Akhil Goyal
0 siblings, 1 reply; 6+ messages in thread
From: Ji, Kai @ 2023-03-14 17:25 UTC (permalink / raw)
To: Karas, Krzysztof, Thomas Monjalon, De Lara Guarch, Pablo,
Kusztal, ArkadiuszX
Cc: dev
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH v2] crypto/ipsec_mb: expect ENOTSUP
2023-03-14 17:25 ` Ji, Kai
@ 2023-03-16 18:46 ` Akhil Goyal
0 siblings, 0 replies; 6+ messages in thread
From: Akhil Goyal @ 2023-03-16 18:46 UTC (permalink / raw)
To: Ji, Kai, Karas, Krzysztof, Thomas Monjalon, De Lara Guarch,
Pablo, Kusztal, ArkadiuszX
Cc: dev
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-03-16 18:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-20 17:13 [PATCH] ipsec_mb: expect ENOTSUP in ipsec_mb_create() Krzysztof Karas
2023-02-27 18:26 ` [EXT] " Akhil Goyal
2023-02-28 23:24 ` Ji, Kai
2023-03-13 12:01 ` [PATCH v2] crypto/ipsec_mb: expect ENOTSUP Krzysztof Karas
2023-03-14 17:25 ` Ji, Kai
2023-03-16 18:46 ` Akhil Goyal
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).