* Re: [dpdk-dev] [PATCH] doc: add deprecation notice on external memory support
2018-08-01 12:07 13% [dpdk-dev] [PATCH] doc: add deprecation notice on external memory support Anatoly Burakov
2018-08-01 12:20 0% ` Wiles, Keith
2018-08-02 2:37 0% ` Wang, Zhihong
@ 2018-08-02 3:38 0% ` Jerin Jacob
2 siblings, 0 replies; 200+ results
From: Jerin Jacob @ 2018-08-02 3:38 UTC (permalink / raw)
To: Anatoly Burakov
Cc: dev, Neil Horman, John McNamara, Marko Kovacevic, thomas, keith.wiles
-----Original Message-----
> Date: Wed, 1 Aug 2018 13:07:16 +0100
> From: Anatoly Burakov <anatoly.burakov@intel.com>
> To: dev@dpdk.org
> CC: Neil Horman <nhorman@tuxdriver.com>, John McNamara
> <john.mcnamara@intel.com>, Marko Kovacevic <marko.kovacevic@intel.com>,
> thomas@monjalon.net, keith.wiles@intel.com
> Subject: [dpdk-dev] [PATCH] doc: add deprecation notice on external memory
> support
> X-Mailer: git-send-email 1.7.0.7
>
> External Email
>
> Due to the upcoming external memory support [1], some API and ABI
> changes will be required. In addition, although the changes called
> out in the deprecation notice are not yet present in form of code
> in the published RFC itself, they are based on consensus on the
> mailing list [2] on how to best implement this feature.
>
> [1] http://patches.dpdk.org/project/dpdk/list/?series=453&state=*
> [2] https://mails.dpdk.org/archives/dev/2018-July/108002.html
>
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> ---
> doc/guides/rel_notes/deprecation.rst | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> index 14714fe94..629154711 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -8,6 +8,21 @@ API and ABI deprecation notices are to be posted here.
> Deprecation Notices
> -------------------
>
> +* eal: certain structures will change in EAL on account of upcoming external
> + memory support. Aside from internal changes leading to an ABI break, the
> + following externally visible changes will also be implemented:
> +
> + - ``rte_memseg_list`` will change to include a boolean flag indicating
> + whether a particular memseg list is externally allocated. This will have
> + implications for any users of memseg-walk-related functions, as they will
> + now have to skip externally allocated segments in most cases if the intent
> + is to only iterate over internal DPDK memory.
> + - ``socket_id`` parameter across the entire DPDK will gain additional meaning,
> + as some socket ID's will now be representing externally allocated memory. No
> + changes will be required for existing code as backwards compatibility will
> + be kept, and those who do not use this feature will not see these extra
> + socket ID's.
> +
> * eal: both declaring and identifying devices will be streamlined in v18.08.
> New functions will appear to query a specific port from buses, classes of
> device and device drivers. Device declaration will be made coherent with the
> --
> 2.17.1
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [PATCH] doc: add deprecation notice on external memory support
2018-08-01 12:07 13% [dpdk-dev] [PATCH] doc: add deprecation notice on external memory support Anatoly Burakov
2018-08-01 12:20 0% ` Wiles, Keith
@ 2018-08-02 2:37 0% ` Wang, Zhihong
2018-08-02 3:38 0% ` Jerin Jacob
2 siblings, 0 replies; 200+ results
From: Wang, Zhihong @ 2018-08-02 2:37 UTC (permalink / raw)
To: Burakov, Anatoly, dev
Cc: Neil Horman, Mcnamara, John, Kovacevic, Marko, thomas, Wiles, Keith
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Anatoly Burakov
> Sent: Wednesday, August 1, 2018 8:07 PM
> To: dev@dpdk.org
> Cc: Neil Horman <nhorman@tuxdriver.com>; Mcnamara, John
> <john.mcnamara@intel.com>; Kovacevic, Marko
> <marko.kovacevic@intel.com>; thomas@monjalon.net; Wiles, Keith
> <keith.wiles@intel.com>
> Subject: [dpdk-dev] [PATCH] doc: add deprecation notice on external
> memory support
>
> Due to the upcoming external memory support [1], some API and ABI
> changes will be required. In addition, although the changes called
> out in the deprecation notice are not yet present in form of code
> in the published RFC itself, they are based on consensus on the
> mailing list [2] on how to best implement this feature.
>
> [1] http://patches.dpdk.org/project/dpdk/list/?series=453&state=*
> [2] https://mails.dpdk.org/archives/dev/2018-July/108002.html
>
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> ---
> doc/guides/rel_notes/deprecation.rst | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/doc/guides/rel_notes/deprecation.rst
> b/doc/guides/rel_notes/deprecation.rst
> index 14714fe94..629154711 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -8,6 +8,21 @@ API and ABI deprecation notices are to be posted here.
> Deprecation Notices
> -------------------
>
> +* eal: certain structures will change in EAL on account of upcoming external
> + memory support. Aside from internal changes leading to an ABI break, the
> + following externally visible changes will also be implemented:
> +
> + - ``rte_memseg_list`` will change to include a boolean flag indicating
> + whether a particular memseg list is externally allocated. This will have
> + implications for any users of memseg-walk-related functions, as they will
> + now have to skip externally allocated segments in most cases if the intent
> + is to only iterate over internal DPDK memory.
> + - ``socket_id`` parameter across the entire DPDK will gain additional
> meaning,
> + as some socket ID's will now be representing externally allocated memory.
> No
> + changes will be required for existing code as backwards compatibility will
> + be kept, and those who do not use this feature will not see these extra
> + socket ID's.
> +
> * eal: both declaring and identifying devices will be streamlined in v18.08.
> New functions will appear to query a specific port from buses, classes of
> device and device drivers. Device declaration will be made coherent with
> the
> --
> 2.17.1
Acked-by: Wang, Zhihong <zhihong.wang@intel.com>
Thanks
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [dpdk-stable] [PATCH] devtools: trap SIGINT is not recognizable to dash
2018-08-01 10:40 0% ` [dpdk-dev] [dpdk-stable] " Mcnamara, John
2018-08-01 13:09 0% ` Varghese, Vipin
@ 2018-08-01 14:37 0% ` Thomas Monjalon
1 sibling, 0 replies; 200+ results
From: Thomas Monjalon @ 2018-08-01 14:37 UTC (permalink / raw)
To: Gavin Hu; +Cc: dev, Mcnamara, John, honnappa.nagarahalli, stable
> > When running checkpatch.sh, it generates the following error on some linux
> > distributions(like Debian) with Dash as the default shell interpreter.
> > trap: SIGINT: bad trap
> >
> > The fix is to replace SIGINT with INT signal, it works for both bash and
> > dash.
> >
> > Fixes: 4bec48184e ("devtools: add checks for ABI symbol addition")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Gavin Hu <gavin.hu@arm.com>
> > Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@amr.com>
>
> Acked-by: John McNamara <john.mcnamara@intel.com>
Applied, thanks
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] Stable ABI status of rte_meter_[t|s]rtcm_profile_config
2018-08-01 14:30 4% ` Dumitrescu, Cristian
@ 2018-08-01 14:36 4% ` Kevin Traynor
0 siblings, 0 replies; 200+ results
From: Kevin Traynor @ 2018-08-01 14:36 UTC (permalink / raw)
To: Dumitrescu, Cristian, dev; +Cc: Andy Green, Singh, Jasvinder
On 08/01/2018 03:30 PM, Dumitrescu, Cristian wrote:
>
>
>> -----Original Message-----
>> From: Kevin Traynor [mailto:ktraynor@redhat.com]
>> Sent: Wednesday, August 1, 2018 11:48 AM
>> To: dev@dpdk.org; Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
>> Cc: Andy Green <andy@warmcat.com>; Singh, Jasvinder
>> <jasvinder.singh@intel.com>
>> Subject: Re: [dpdk-dev] Stable ABI status of
>> rte_meter_[t|s]rtcm_profile_config
>>
>> On 05/28/2018 04:31 AM, Andy Green wrote:
>>> Hi -
>>>
>>> Between 18.02 and the putative 18.05 there were changes in the way the
>>> meter stuff deals with its config.
>>>
>>> I updated the related code in lagopus, but I get warnings about using
>>> the new APIs (it's the same for rte_meter_trtcm_profile_config())
>>>
>>> ./dpdk/meter.c: In function 'dpdk_register_meter':
>>> ./dpdk/meter.c:119:7: warning: 'rte_meter_srtcm_profile_config' is
>>> deprecated: Symbol is not yet part of stable ABI
>>> [-Wdeprecated-declarations]
>>> rte_meter_srtcm_profile_config(&lband->sp, ¶m);
>>> ^
>>> In file included from ./dpdk/meter.c:27:0:
>>> /home/agreen/lagopus/src/dpdk/build/include/rte_meter.h:86:1: note:
>>> declared here
>>> rte_meter_srtcm_profile_config(struct rte_meter_srtcm_profile *p,
>>> ^
>>> ./dpdk/meter.c:132:7: warning: 'rte_meter_srtcm_profile_config' is
>>> deprecated: Symbol is not yet part of stable ABI
>>> [-Wdeprecated-declarations]
>>> rte_meter_srtcm_profile_config(&lband->sp, ¶m);
>>> ^
>>> In file included from ./dpdk/meter.c:27:0:
>>> /home/agreen/lagopus/src/dpdk/build/include/rte_meter.h:86:1: note:
>>> declared here
>>> rte_meter_srtcm_profile_config(struct rte_meter_srtcm_profile *p,
>>>
>>
>> Hi Cristian,
>>
>> Are these API still to be considered experimental in 18.08, or the tags
>> can be removed?
>>
>> Kevin.
>
> No, we should remove the experimental tag on these functions.
>
ok, I just did a quick compile tested patch. Will send.
>>
>>>
>>> As far as I can see this api change is not optional, it changes the
>>> parameters for related apis to require a struct prepared with these new
>>> apis.
>>>
>>> -Andy
>
^ permalink raw reply [relevance 4%]
* Re: [dpdk-dev] Stable ABI status of rte_meter_[t|s]rtcm_profile_config
2018-08-01 10:47 4% ` Kevin Traynor
2018-08-01 11:32 4% ` Andy Green
@ 2018-08-01 14:30 4% ` Dumitrescu, Cristian
2018-08-01 14:36 4% ` Kevin Traynor
1 sibling, 1 reply; 200+ results
From: Dumitrescu, Cristian @ 2018-08-01 14:30 UTC (permalink / raw)
To: Kevin Traynor, dev; +Cc: Andy Green, Singh, Jasvinder
> -----Original Message-----
> From: Kevin Traynor [mailto:ktraynor@redhat.com]
> Sent: Wednesday, August 1, 2018 11:48 AM
> To: dev@dpdk.org; Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
> Cc: Andy Green <andy@warmcat.com>; Singh, Jasvinder
> <jasvinder.singh@intel.com>
> Subject: Re: [dpdk-dev] Stable ABI status of
> rte_meter_[t|s]rtcm_profile_config
>
> On 05/28/2018 04:31 AM, Andy Green wrote:
> > Hi -
> >
> > Between 18.02 and the putative 18.05 there were changes in the way the
> > meter stuff deals with its config.
> >
> > I updated the related code in lagopus, but I get warnings about using
> > the new APIs (it's the same for rte_meter_trtcm_profile_config())
> >
> > ./dpdk/meter.c: In function 'dpdk_register_meter':
> > ./dpdk/meter.c:119:7: warning: 'rte_meter_srtcm_profile_config' is
> > deprecated: Symbol is not yet part of stable ABI
> > [-Wdeprecated-declarations]
> > rte_meter_srtcm_profile_config(&lband->sp, ¶m);
> > ^
> > In file included from ./dpdk/meter.c:27:0:
> > /home/agreen/lagopus/src/dpdk/build/include/rte_meter.h:86:1: note:
> > declared here
> > rte_meter_srtcm_profile_config(struct rte_meter_srtcm_profile *p,
> > ^
> > ./dpdk/meter.c:132:7: warning: 'rte_meter_srtcm_profile_config' is
> > deprecated: Symbol is not yet part of stable ABI
> > [-Wdeprecated-declarations]
> > rte_meter_srtcm_profile_config(&lband->sp, ¶m);
> > ^
> > In file included from ./dpdk/meter.c:27:0:
> > /home/agreen/lagopus/src/dpdk/build/include/rte_meter.h:86:1: note:
> > declared here
> > rte_meter_srtcm_profile_config(struct rte_meter_srtcm_profile *p,
> >
>
> Hi Cristian,
>
> Are these API still to be considered experimental in 18.08, or the tags
> can be removed?
>
> Kevin.
No, we should remove the experimental tag on these functions.
>
> >
> > As far as I can see this api change is not optional, it changes the
> > parameters for related apis to require a struct prepared with these new
> > apis.
> >
> > -Andy
^ permalink raw reply [relevance 4%]
* Re: [dpdk-dev] [dpdk-stable] [PATCH] devtools: trap SIGINT is not recognizable to dash
2018-08-01 10:40 0% ` [dpdk-dev] [dpdk-stable] " Mcnamara, John
@ 2018-08-01 13:09 0% ` Varghese, Vipin
2018-08-01 14:37 0% ` Thomas Monjalon
1 sibling, 0 replies; 200+ results
From: Varghese, Vipin @ 2018-08-01 13:09 UTC (permalink / raw)
To: dev, Gavin Hu, dev; +Cc: honnappa.nagarahalli, stable
Checked with Ubuntu 16.04.4 LTS, it works.
Acked-by: Vipin Varghese <vipin.varghese@intel.com>
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org>
> Sent: Wednesday, August 1, 2018 4:10 PM
> To: Gavin Hu <gavin.hu@arm.com>; dev@dpdk.org
> Cc: honnappa.nagarahalli@arm.com; stable@dpdk.org
> Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] devtools: trap SIGINT is not
> recognizable to dash
>
>
>
> > -----Original Message-----
> > From: stable [mailto:stable-bounces@dpdk.org] On Behalf Of Gavin Hu
> > Sent: Wednesday, August 1, 2018 6:23 AM
> > To: dev@dpdk.org
> > Cc: honnappa.nagarahalli@arm.com; gavin.hu@arm.com; stable@dpdk.org
> > Subject: [dpdk-stable] [PATCH] devtools: trap SIGINT is not
> > recognizable to dash
> >
> > When running checkpatch.sh, it generates the following error on some
> > linux distributions(like Debian) with Dash as the default shell interpreter.
> > trap: SIGINT: bad trap
> >
> > The fix is to replace SIGINT with INT signal, it works for both bash
> > and dash.
> >
> > Fixes: 4bec48184e ("devtools: add checks for ABI symbol addition")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Gavin Hu <gavin.hu@arm.com>
> > Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@amr.com>
>
> Acked-by: John McNamara <john.mcnamara@intel.com>
>
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [PATCH] doc: add deprecation notice on external memory support
2018-08-01 12:07 13% [dpdk-dev] [PATCH] doc: add deprecation notice on external memory support Anatoly Burakov
@ 2018-08-01 12:20 0% ` Wiles, Keith
2018-08-02 2:37 0% ` Wang, Zhihong
2018-08-02 3:38 0% ` Jerin Jacob
2 siblings, 0 replies; 200+ results
From: Wiles, Keith @ 2018-08-01 12:20 UTC (permalink / raw)
To: Burakov, Anatoly
Cc: dev, Neil Horman, Mcnamara, John, Kovacevic, Marko, thomas
> On Aug 1, 2018, at 7:07 AM, Burakov, Anatoly <anatoly.burakov@intel.com> wrote:
>
> Due to the upcoming external memory support [1], some API and ABI
> changes will be required. In addition, although the changes called
> out in the deprecation notice are not yet present in form of code
> in the published RFC itself, they are based on consensus on the
> mailing list [2] on how to best implement this feature.
>
> [1] http://patches.dpdk.org/project/dpdk/list/?series=453&state=*
> [2] https://mails.dpdk.org/archives/dev/2018-July/108002.html
>
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> ---
> doc/guides/rel_notes/deprecation.rst | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> index 14714fe94..629154711 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -8,6 +8,21 @@ API and ABI deprecation notices are to be posted here.
> Deprecation Notices
> -------------------
>
> +* eal: certain structures will change in EAL on account of upcoming external
> + memory support. Aside from internal changes leading to an ABI break, the
> + following externally visible changes will also be implemented:
> +
> + - ``rte_memseg_list`` will change to include a boolean flag indicating
> + whether a particular memseg list is externally allocated. This will have
> + implications for any users of memseg-walk-related functions, as they will
> + now have to skip externally allocated segments in most cases if the intent
> + is to only iterate over internal DPDK memory.
> + - ``socket_id`` parameter across the entire DPDK will gain additional meaning,
> + as some socket ID's will now be representing externally allocated memory. No
> + changes will be required for existing code as backwards compatibility will
> + be kept, and those who do not use this feature will not see these extra
> + socket ID's.
> +
> * eal: both declaring and identifying devices will be streamlined in v18.08.
> New functions will appear to query a specific port from buses, classes of
> device and device drivers. Device declaration will be made coherent with the
Acked-by: Keith Wiles <keith.wiles@intel.com>
> --
> 2.17.1
Regards,
Keith
^ permalink raw reply [relevance 0%]
* [dpdk-dev] [PATCH] doc: add deprecation notice on external memory support
@ 2018-08-01 12:07 13% Anatoly Burakov
2018-08-01 12:20 0% ` Wiles, Keith
` (2 more replies)
0 siblings, 3 replies; 200+ results
From: Anatoly Burakov @ 2018-08-01 12:07 UTC (permalink / raw)
To: dev; +Cc: Neil Horman, John McNamara, Marko Kovacevic, thomas, keith.wiles
Due to the upcoming external memory support [1], some API and ABI
changes will be required. In addition, although the changes called
out in the deprecation notice are not yet present in form of code
in the published RFC itself, they are based on consensus on the
mailing list [2] on how to best implement this feature.
[1] http://patches.dpdk.org/project/dpdk/list/?series=453&state=*
[2] https://mails.dpdk.org/archives/dev/2018-July/108002.html
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
doc/guides/rel_notes/deprecation.rst | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 14714fe94..629154711 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -8,6 +8,21 @@ API and ABI deprecation notices are to be posted here.
Deprecation Notices
-------------------
+* eal: certain structures will change in EAL on account of upcoming external
+ memory support. Aside from internal changes leading to an ABI break, the
+ following externally visible changes will also be implemented:
+
+ - ``rte_memseg_list`` will change to include a boolean flag indicating
+ whether a particular memseg list is externally allocated. This will have
+ implications for any users of memseg-walk-related functions, as they will
+ now have to skip externally allocated segments in most cases if the intent
+ is to only iterate over internal DPDK memory.
+ - ``socket_id`` parameter across the entire DPDK will gain additional meaning,
+ as some socket ID's will now be representing externally allocated memory. No
+ changes will be required for existing code as backwards compatibility will
+ be kept, and those who do not use this feature will not see these extra
+ socket ID's.
+
* eal: both declaring and identifying devices will be streamlined in v18.08.
New functions will appear to query a specific port from buses, classes of
device and device drivers. Device declaration will be made coherent with the
--
2.17.1
^ permalink raw reply [relevance 13%]
* Re: [dpdk-dev] Stable ABI status of rte_meter_[t|s]rtcm_profile_config
2018-08-01 10:47 4% ` Kevin Traynor
@ 2018-08-01 11:32 4% ` Andy Green
2018-08-01 14:30 4% ` Dumitrescu, Cristian
1 sibling, 0 replies; 200+ results
From: Andy Green @ 2018-08-01 11:32 UTC (permalink / raw)
To: Kevin Traynor, dev, Dumitrescu, Cristian; +Cc: Singh, Jasvinder
On 08/01/2018 06:47 PM, Kevin Traynor wrote:
> On 05/28/2018 04:31 AM, Andy Green wrote:
>> Hi -
>>
>> Between 18.02 and the putative 18.05 there were changes in the way the
>> meter stuff deals with its config.
>>
>> I updated the related code in lagopus, but I get warnings about using
>> the new APIs (it's the same for rte_meter_trtcm_profile_config())
>>
>> ./dpdk/meter.c: In function 'dpdk_register_meter':
>> ./dpdk/meter.c:119:7: warning: 'rte_meter_srtcm_profile_config' is
>> deprecated: Symbol is not yet part of stable ABI
>> [-Wdeprecated-declarations]
>> rte_meter_srtcm_profile_config(&lband->sp, ¶m);
>> ^
>> In file included from ./dpdk/meter.c:27:0:
>> /home/agreen/lagopus/src/dpdk/build/include/rte_meter.h:86:1: note:
>> declared here
>> rte_meter_srtcm_profile_config(struct rte_meter_srtcm_profile *p,
>> ^
>> ./dpdk/meter.c:132:7: warning: 'rte_meter_srtcm_profile_config' is
>> deprecated: Symbol is not yet part of stable ABI
>> [-Wdeprecated-declarations]
>> rte_meter_srtcm_profile_config(&lband->sp, ¶m);
>> ^
>> In file included from ./dpdk/meter.c:27:0:
>> /home/agreen/lagopus/src/dpdk/build/include/rte_meter.h:86:1: note:
>> declared here
>> rte_meter_srtcm_profile_config(struct rte_meter_srtcm_profile *p,
>>
>
> Hi Cristian,
>
> Are these API still to be considered experimental in 18.08, or the tags
> can be removed?
... to be clear that these apis claimed to be 'experimental' in 18.05 at
all, when they aren't, is already broken in 18.05.
The only question is whether they want to continue ignoring the breakage
into 18.08+ so future generations can enjoy it.
-Andy
> Kevin.
>
>>
>> As far as I can see this api change is not optional, it changes the
>> parameters for related apis to require a struct prepared with these new
>> apis.
>>
>> -Andy
>
^ permalink raw reply [relevance 4%]
* Re: [dpdk-dev] Stable ABI status of rte_meter_[t|s]rtcm_profile_config
2018-05-28 3:31 8% [dpdk-dev] Stable ABI status of rte_meter_[t|s]rtcm_profile_config Andy Green
2018-05-30 0:32 4% ` Andy Green
@ 2018-08-01 10:47 4% ` Kevin Traynor
2018-08-01 11:32 4% ` Andy Green
2018-08-01 14:30 4% ` Dumitrescu, Cristian
1 sibling, 2 replies; 200+ results
From: Kevin Traynor @ 2018-08-01 10:47 UTC (permalink / raw)
To: dev, Dumitrescu, Cristian; +Cc: Andy Green, Singh, Jasvinder
On 05/28/2018 04:31 AM, Andy Green wrote:
> Hi -
>
> Between 18.02 and the putative 18.05 there were changes in the way the
> meter stuff deals with its config.
>
> I updated the related code in lagopus, but I get warnings about using
> the new APIs (it's the same for rte_meter_trtcm_profile_config())
>
> ./dpdk/meter.c: In function 'dpdk_register_meter':
> ./dpdk/meter.c:119:7: warning: 'rte_meter_srtcm_profile_config' is
> deprecated: Symbol is not yet part of stable ABI
> [-Wdeprecated-declarations]
> rte_meter_srtcm_profile_config(&lband->sp, ¶m);
> ^
> In file included from ./dpdk/meter.c:27:0:
> /home/agreen/lagopus/src/dpdk/build/include/rte_meter.h:86:1: note:
> declared here
> rte_meter_srtcm_profile_config(struct rte_meter_srtcm_profile *p,
> ^
> ./dpdk/meter.c:132:7: warning: 'rte_meter_srtcm_profile_config' is
> deprecated: Symbol is not yet part of stable ABI
> [-Wdeprecated-declarations]
> rte_meter_srtcm_profile_config(&lband->sp, ¶m);
> ^
> In file included from ./dpdk/meter.c:27:0:
> /home/agreen/lagopus/src/dpdk/build/include/rte_meter.h:86:1: note:
> declared here
> rte_meter_srtcm_profile_config(struct rte_meter_srtcm_profile *p,
>
Hi Cristian,
Are these API still to be considered experimental in 18.08, or the tags
can be removed?
Kevin.
>
> As far as I can see this api change is not optional, it changes the
> parameters for related apis to require a struct prepared with these new
> apis.
>
> -Andy
^ permalink raw reply [relevance 4%]
* Re: [dpdk-dev] [dpdk-stable] [PATCH] devtools: trap SIGINT is not recognizable to dash
2018-08-01 5:22 3% [dpdk-dev] [PATCH] devtools: trap SIGINT is not recognizable to dash Gavin Hu
@ 2018-08-01 10:40 0% ` Mcnamara, John
2018-08-01 13:09 0% ` Varghese, Vipin
2018-08-01 14:37 0% ` Thomas Monjalon
0 siblings, 2 replies; 200+ results
From: Mcnamara, John @ 2018-08-01 10:40 UTC (permalink / raw)
To: Gavin Hu, dev; +Cc: honnappa.nagarahalli, stable
> -----Original Message-----
> From: stable [mailto:stable-bounces@dpdk.org] On Behalf Of Gavin Hu
> Sent: Wednesday, August 1, 2018 6:23 AM
> To: dev@dpdk.org
> Cc: honnappa.nagarahalli@arm.com; gavin.hu@arm.com; stable@dpdk.org
> Subject: [dpdk-stable] [PATCH] devtools: trap SIGINT is not recognizable to
> dash
>
> When running checkpatch.sh, it generates the following error on some linux
> distributions(like Debian) with Dash as the default shell interpreter.
> trap: SIGINT: bad trap
>
> The fix is to replace SIGINT with INT signal, it works for both bash and
> dash.
>
> Fixes: 4bec48184e ("devtools: add checks for ABI symbol addition")
> Cc: stable@dpdk.org
>
> Signed-off-by: Gavin Hu <gavin.hu@arm.com>
> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@amr.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
^ permalink raw reply [relevance 0%]
* [dpdk-dev] [PATCH] devtools: trap SIGINT is not recognizable to dash
@ 2018-08-01 5:22 3% Gavin Hu
2018-08-01 10:40 0% ` [dpdk-dev] [dpdk-stable] " Mcnamara, John
0 siblings, 1 reply; 200+ results
From: Gavin Hu @ 2018-08-01 5:22 UTC (permalink / raw)
To: dev; +Cc: honnappa.nagarahalli, gavin.hu, stable
When running checkpatch.sh, it generates the following error
on some linux distributions(like Debian) with Dash as the
default shell interpreter.
trap: SIGINT: bad trap
The fix is to replace SIGINT with INT signal, it works for
both bash and dash.
Fixes: 4bec48184e ("devtools: add checks for ABI symbol addition")
Cc: stable@dpdk.org
Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@amr.com>
---
devtools/checkpatches.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index 2509269df..ba795ad1d 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -29,7 +29,7 @@ clean_tmp_files() {
fi
}
-trap "clean_tmp_files" SIGINT
+trap "clean_tmp_files" INT
print_usage () {
cat <<- END_OF_HELP
--
2.11.0
^ permalink raw reply [relevance 3%]
* [dpdk-dev] [PATCH] devtools: check_symbol_change requires bash
@ 2018-07-31 15:14 3% Stephen Hemminger
0 siblings, 0 replies; 200+ results
From: Stephen Hemminger @ 2018-07-31 15:14 UTC (permalink / raw)
To: nhorman; +Cc: dev, Stephen Hemminger
The syntax of check_symbol_change uses some bash syntax.
It does not run correctly on Debian where /bin/sh is not the
same as /bin/bash.
Fixes: 4bec48184e33 ("devtools: add checks for ABI symbol addition")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
devtools/check-symbol-change.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/devtools/check-symbol-change.sh b/devtools/check-symbol-change.sh
index 40b72073a975..19035a8d40e4 100755
--- a/devtools/check-symbol-change.sh
+++ b/devtools/check-symbol-change.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Neil Horman <nhorman@tuxdriver.com>
--
2.18.0
^ permalink raw reply [relevance 3%]
* Re: [dpdk-dev] [PATCH 1/2] mempool: remove deprecated functions
2018-07-27 13:45 0% ` Andrew Rybchenko
@ 2018-07-27 14:38 0% ` Thomas Monjalon
0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2018-07-27 14:38 UTC (permalink / raw)
To: Andrew Rybchenko; +Cc: dev, Olivier Matz
27/07/2018 15:45, Andrew Rybchenko:
> On 27.07.2018 00:34, Thomas Monjalon wrote:
> > 11/07/2018 12:59, Andrew Rybchenko:
> >> Functions rte_mempool_populate_phys(), rte_mempool_virt2phy() and
> >> rte_mempool_populate_phys_tab() are just wrappers for corresponding
> >> IOVA functions and were deprecated in v17.11.
> >>
> >> Functions rte_mempool_xmem_create(), rte_mempool_xmem_size(),
> >> rte_mempool_xmem_usage() and rte_mempool_populate_iova_tab() were
> >> deprecated in v18.05 and removal was announced earlier in v18.02.
> >>
> >> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
> >> ---
> >> lib/librte_mempool/Makefile | 3 -
> >> lib/librte_mempool/meson.build | 4 -
> >> lib/librte_mempool/rte_mempool.c | 181 +--------------------
> >> lib/librte_mempool/rte_mempool.h | 179 --------------------
> >> lib/librte_mempool/rte_mempool_version.map | 6 -
> >> 5 files changed, 1 insertion(+), 372 deletions(-)
> > Please update the release notes, deprecation notice, and bump ABI version.
>
> Will do. Deprecation notice which schedules removal of xmem functions
> was removed on previous release when these function are deprecated.
> Is it a problem? Should removal of already deprecated function pass
> deprecation (removal) announcement procedure once again?
No, it's OK.
We should have left the notice about removal but it's too late :)
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [PATCH 1/2] mempool: remove deprecated functions
2018-07-26 21:34 3% ` Thomas Monjalon
@ 2018-07-27 13:45 0% ` Andrew Rybchenko
2018-07-27 14:38 0% ` Thomas Monjalon
0 siblings, 1 reply; 200+ results
From: Andrew Rybchenko @ 2018-07-27 13:45 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev, Olivier Matz
On 27.07.2018 00:34, Thomas Monjalon wrote:
> 11/07/2018 12:59, Andrew Rybchenko:
>> Functions rte_mempool_populate_phys(), rte_mempool_virt2phy() and
>> rte_mempool_populate_phys_tab() are just wrappers for corresponding
>> IOVA functions and were deprecated in v17.11.
>>
>> Functions rte_mempool_xmem_create(), rte_mempool_xmem_size(),
>> rte_mempool_xmem_usage() and rte_mempool_populate_iova_tab() were
>> deprecated in v18.05 and removal was announced earlier in v18.02.
>>
>> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
>> ---
>> lib/librte_mempool/Makefile | 3 -
>> lib/librte_mempool/meson.build | 4 -
>> lib/librte_mempool/rte_mempool.c | 181 +--------------------
>> lib/librte_mempool/rte_mempool.h | 179 --------------------
>> lib/librte_mempool/rte_mempool_version.map | 6 -
>> 5 files changed, 1 insertion(+), 372 deletions(-)
> Please update the release notes, deprecation notice, and bump ABI version.
Will do. Deprecation notice which schedules removal of xmem functions
was removed on previous release when these function are deprecated.
Is it a problem? Should removal of already deprecated function pass
deprecation (removal) announcement procedure once again?
Andrew.
^ permalink raw reply [relevance 0%]
* [dpdk-dev] [PATCH v2 1/2] mempool: remove deprecated functions
@ 2018-07-27 13:46 2% Andrew Rybchenko
0 siblings, 0 replies; 200+ results
From: Andrew Rybchenko @ 2018-07-27 13:46 UTC (permalink / raw)
To: dev; +Cc: Olivier Matz, Thomas Monjalon
Functions rte_mempool_populate_phys(), rte_mempool_virt2phy() and
rte_mempool_populate_phys_tab() are just wrappers for corresponding
IOVA functions and were deprecated in v17.11.
Functions rte_mempool_xmem_create(), rte_mempool_xmem_size(),
rte_mempool_xmem_usage() and rte_mempool_populate_iova_tab() were
deprecated in v18.05 and removal was announced earlier in v18.02.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
doc/guides/rel_notes/release_18_08.rst | 12 +-
lib/librte_mempool/Makefile | 5 +-
lib/librte_mempool/meson.build | 6 +-
lib/librte_mempool/rte_mempool.c | 181 +--------------------
lib/librte_mempool/rte_mempool.h | 179 --------------------
lib/librte_mempool/rte_mempool_version.map | 6 -
6 files changed, 14 insertions(+), 375 deletions(-)
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 5f2401401..165e413f0 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -166,6 +166,16 @@ API Changes
- ``RTE_COMP_FF_OOP_SGL_IN_LB_OUT``
- ``RTE_COMP_FF_OOP_LB_IN_SGL_OUT``
+* mempool: Following functions were deprecated and are removed in 18.08:
+
+ - ``rte_mempool_populate_iova_tab``
+ - ``rte_mempool_populate_phys_tab``
+ - ``rte_mempool_populate_phys`` (``rte_mempool_populate_iova`` should be used)
+ - ``rte_mempool_virt2phy`` (``rte_mempool_virt2iova`` should be used)
+ - ``rte_mempool_xmem_create``
+ - ``rte_mempool_xmem_size``
+ - ``rte_mempool_xmem_usage``
+
ABI Changes
-----------
@@ -241,7 +251,7 @@ The libraries prepended with a plus sign were incremented in this version.
librte_latencystats.so.1
librte_lpm.so.2
librte_mbuf.so.4
- librte_mempool.so.4
+ + librte_mempool.so.5
librte_meter.so.2
librte_metrics.so.1
librte_net.so.1
diff --git a/lib/librte_mempool/Makefile b/lib/librte_mempool/Makefile
index e3c32b14f..20bf63fbc 100644
--- a/lib/librte_mempool/Makefile
+++ b/lib/librte_mempool/Makefile
@@ -7,15 +7,12 @@ include $(RTE_SDK)/mk/rte.vars.mk
LIB = librte_mempool.a
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
-# Allow deprecated symbol to use deprecated rte_mempool_populate_iova_tab()
-# from earlier deprecated rte_mempool_populate_phys_tab()
-CFLAGS += -Wno-deprecated-declarations
CFLAGS += -DALLOW_EXPERIMENTAL_API
LDLIBS += -lrte_eal -lrte_ring
EXPORT_MAP := rte_mempool_version.map
-LIBABIVER := 4
+LIBABIVER := 5
# memseg walk is not yet part of stable API
CFLAGS += -DALLOW_EXPERIMENTAL_API
diff --git a/lib/librte_mempool/meson.build b/lib/librte_mempool/meson.build
index d507e5511..38d7ae890 100644
--- a/lib/librte_mempool/meson.build
+++ b/lib/librte_mempool/meson.build
@@ -5,17 +5,13 @@ allow_experimental_apis = true
extra_flags = []
-# Allow deprecated symbol to use deprecated rte_mempool_populate_iova_tab()
-# from earlier deprecated rte_mempool_populate_phys_tab()
-extra_flags += '-Wno-deprecated-declarations'
-
foreach flag: extra_flags
if cc.has_argument(flag)
cflags += flag
endif
endforeach
-version = 4
+version = 5
sources = files('rte_mempool.c', 'rte_mempool_ops.c',
'rte_mempool_ops_default.c')
headers = files('rte_mempool.h')
diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
index 8c8b9f809..d48e53c7e 100644
--- a/lib/librte_mempool/rte_mempool.c
+++ b/lib/librte_mempool/rte_mempool.c
@@ -227,9 +227,7 @@ rte_mempool_calc_obj_size(uint32_t elt_size, uint32_t flags,
/*
- * Internal function to calculate required memory chunk size shared
- * by default implementation of the corresponding callback and
- * deprecated external function.
+ * Internal function to calculate required memory chunk size.
*/
size_t
rte_mempool_calc_mem_size_helper(uint32_t elt_num, size_t total_elt_sz,
@@ -252,66 +250,6 @@ rte_mempool_calc_mem_size_helper(uint32_t elt_num, size_t total_elt_sz,
return pg_num << pg_shift;
}
-/*
- * Calculate maximum amount of memory required to store given number of objects.
- */
-size_t
-rte_mempool_xmem_size(uint32_t elt_num, size_t total_elt_sz, uint32_t pg_shift,
- __rte_unused unsigned int flags)
-{
- return rte_mempool_calc_mem_size_helper(elt_num, total_elt_sz,
- pg_shift);
-}
-
-/*
- * Calculate how much memory would be actually required with the
- * given memory footprint to store required number of elements.
- */
-ssize_t
-rte_mempool_xmem_usage(__rte_unused void *vaddr, uint32_t elt_num,
- size_t total_elt_sz, const rte_iova_t iova[], uint32_t pg_num,
- uint32_t pg_shift, __rte_unused unsigned int flags)
-{
- uint32_t elt_cnt = 0;
- rte_iova_t start, end;
- uint32_t iova_idx;
- size_t pg_sz = (size_t)1 << pg_shift;
-
- /* if iova is NULL, assume contiguous memory */
- if (iova == NULL) {
- start = 0;
- end = pg_sz * pg_num;
- iova_idx = pg_num;
- } else {
- start = iova[0];
- end = iova[0] + pg_sz;
- iova_idx = 1;
- }
- while (elt_cnt < elt_num) {
-
- if (end - start >= total_elt_sz) {
- /* enough contiguous memory, add an object */
- start += total_elt_sz;
- elt_cnt++;
- } else if (iova_idx < pg_num) {
- /* no room to store one obj, add a page */
- if (end == iova[iova_idx]) {
- end += pg_sz;
- } else {
- start = iova[iova_idx];
- end = iova[iova_idx] + pg_sz;
- }
- iova_idx++;
-
- } else {
- /* no more page, return how many elements fit */
- return -(size_t)elt_cnt;
- }
- }
-
- return (size_t)iova_idx << pg_shift;
-}
-
/* free a memchunk allocated with rte_memzone_reserve() */
static void
rte_mempool_memchunk_mz_free(__rte_unused struct rte_mempool_memhdr *memhdr,
@@ -423,63 +361,6 @@ rte_mempool_populate_iova(struct rte_mempool *mp, char *vaddr,
return ret;
}
-int
-rte_mempool_populate_phys(struct rte_mempool *mp, char *vaddr,
- phys_addr_t paddr, size_t len, rte_mempool_memchunk_free_cb_t *free_cb,
- void *opaque)
-{
- return rte_mempool_populate_iova(mp, vaddr, paddr, len, free_cb, opaque);
-}
-
-/* Add objects in the pool, using a table of physical pages. Return the
- * number of objects added, or a negative value on error.
- */
-int
-rte_mempool_populate_iova_tab(struct rte_mempool *mp, char *vaddr,
- const rte_iova_t iova[], uint32_t pg_num, uint32_t pg_shift,
- rte_mempool_memchunk_free_cb_t *free_cb, void *opaque)
-{
- uint32_t i, n;
- int ret, cnt = 0;
- size_t pg_sz = (size_t)1 << pg_shift;
-
- /* mempool must not be populated */
- if (mp->nb_mem_chunks != 0)
- return -EEXIST;
-
- if (mp->flags & MEMPOOL_F_NO_IOVA_CONTIG)
- return rte_mempool_populate_iova(mp, vaddr, RTE_BAD_IOVA,
- pg_num * pg_sz, free_cb, opaque);
-
- for (i = 0; i < pg_num && mp->populated_size < mp->size; i += n) {
-
- /* populate with the largest group of contiguous pages */
- for (n = 1; (i + n) < pg_num &&
- iova[i + n - 1] + pg_sz == iova[i + n]; n++)
- ;
-
- ret = rte_mempool_populate_iova(mp, vaddr + i * pg_sz,
- iova[i], n * pg_sz, free_cb, opaque);
- if (ret < 0) {
- rte_mempool_free_memchunks(mp);
- return ret;
- }
- /* no need to call the free callback for next chunks */
- free_cb = NULL;
- cnt += ret;
- }
- return cnt;
-}
-
-int
-rte_mempool_populate_phys_tab(struct rte_mempool *mp, char *vaddr,
- const phys_addr_t paddr[], uint32_t pg_num, uint32_t pg_shift,
- rte_mempool_memchunk_free_cb_t *free_cb, void *opaque)
-{
- return rte_mempool_populate_iova_tab(mp, vaddr, paddr, pg_num, pg_shift,
- free_cb, opaque);
-}
-
/* Populate the mempool with a virtual area. Return the number of
* objects added, or a negative value on error.
*/
@@ -1065,66 +946,6 @@ rte_mempool_create(const char *name, unsigned n, unsigned elt_size,
return NULL;
}
-/*
- * Create the mempool over already allocated chunk of memory.
- * That external memory buffer can consists of physically disjoint pages.
- * Setting vaddr to NULL, makes mempool to fallback to rte_mempool_create()
- * behavior.
- */
-struct rte_mempool *
-rte_mempool_xmem_create(const char *name, unsigned n, unsigned elt_size,
- unsigned cache_size, unsigned private_data_size,
- rte_mempool_ctor_t *mp_init, void *mp_init_arg,
- rte_mempool_obj_cb_t *obj_init, void *obj_init_arg,
- int socket_id, unsigned flags, void *vaddr,
- const rte_iova_t iova[], uint32_t pg_num, uint32_t pg_shift)
-{
- struct rte_mempool *mp = NULL;
- int ret;
-
- /* no virtual address supplied, use rte_mempool_create() */
- if (vaddr == NULL)
- return rte_mempool_create(name, n, elt_size, cache_size,
- private_data_size, mp_init, mp_init_arg,
- obj_init, obj_init_arg, socket_id, flags);
-
- /* check that we have both VA and PA */
- if (iova == NULL) {
- rte_errno = EINVAL;
- return NULL;
- }
-
- /* Check that pg_shift parameter is valid. */
- if (pg_shift > MEMPOOL_PG_SHIFT_MAX) {
- rte_errno = EINVAL;
- return NULL;
- }
-
- mp = rte_mempool_create_empty(name, n, elt_size, cache_size,
- private_data_size, socket_id, flags);
- if (mp == NULL)
- return NULL;
-
- /* call the mempool priv initializer */
- if (mp_init)
- mp_init(mp, mp_init_arg);
-
- ret = rte_mempool_populate_iova_tab(mp, vaddr, iova, pg_num, pg_shift,
- NULL, NULL);
- if (ret < 0 || ret != (int)mp->size)
- goto fail;
-
- /* call the object initializers */
- if (obj_init)
- rte_mempool_obj_iter(mp, obj_init, obj_init_arg);
-
- return mp;
-
- fail:
- rte_mempool_free(mp);
- return NULL;
-}
-
/* Return the number of entries in the mempool */
unsigned int
rte_mempool_avail_count(const struct rte_mempool *mp)
diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
index 1f59553b3..5d1602555 100644
--- a/lib/librte_mempool/rte_mempool.h
+++ b/lib/librte_mempool/rte_mempool.h
@@ -973,74 +973,6 @@ rte_mempool_create(const char *name, unsigned n, unsigned elt_size,
rte_mempool_obj_cb_t *obj_init, void *obj_init_arg,
int socket_id, unsigned flags);
-/**
- * @deprecated
- * Create a new mempool named *name* in memory.
- *
- * The pool contains n elements of elt_size. Its size is set to n.
- * This function uses ``memzone_reserve()`` to allocate the mempool header
- * (and the objects if vaddr is NULL).
- * Depending on the input parameters, mempool elements can be either allocated
- * together with the mempool header, or an externally provided memory buffer
- * could be used to store mempool objects. In later case, that external
- * memory buffer can consist of set of disjoint physical pages.
- *
- * @param name
- * The name of the mempool.
- * @param n
- * The number of elements in the mempool. The optimum size (in terms of
- * memory usage) for a mempool is when n is a power of two minus one:
- * n = (2^q - 1).
- * @param elt_size
- * The size of each element.
- * @param cache_size
- * Size of the cache. See rte_mempool_create() for details.
- * @param private_data_size
- * The size of the private data appended after the mempool
- * structure. This is useful for storing some private data after the
- * mempool structure, as is done for rte_mbuf_pool for example.
- * @param mp_init
- * A function pointer that is called for initialization of the pool,
- * before object initialization. The user can initialize the private
- * data in this function if needed. This parameter can be NULL if
- * not needed.
- * @param mp_init_arg
- * An opaque pointer to data that can be used in the mempool
- * constructor function.
- * @param obj_init
- * A function called for each object at initialization of the pool.
- * See rte_mempool_create() for details.
- * @param obj_init_arg
- * An opaque pointer passed to the object constructor function.
- * @param socket_id
- * The *socket_id* argument is the socket identifier in the case of
- * NUMA. The value can be *SOCKET_ID_ANY* if there is no NUMA
- * constraint for the reserved zone.
- * @param flags
- * Flags controlling the behavior of the mempool. See
- * rte_mempool_create() for details.
- * @param vaddr
- * Virtual address of the externally allocated memory buffer.
- * Will be used to store mempool objects.
- * @param iova
- * Array of IO addresses of the pages that comprises given memory buffer.
- * @param pg_num
- * Number of elements in the iova array.
- * @param pg_shift
- * LOG2 of the physical pages size.
- * @return
- * The pointer to the new allocated mempool, on success. NULL on error
- * with rte_errno set appropriately. See rte_mempool_create() for details.
- */
-__rte_deprecated
-struct rte_mempool *
-rte_mempool_xmem_create(const char *name, unsigned n, unsigned elt_size,
- unsigned cache_size, unsigned private_data_size,
- rte_mempool_ctor_t *mp_init, void *mp_init_arg,
- rte_mempool_obj_cb_t *obj_init, void *obj_init_arg,
- int socket_id, unsigned flags, void *vaddr,
- const rte_iova_t iova[], uint32_t pg_num, uint32_t pg_shift);
-
/**
* Create an empty mempool
*
@@ -1123,48 +1055,6 @@ int rte_mempool_populate_iova(struct rte_mempool *mp, char *vaddr,
rte_iova_t iova, size_t len, rte_mempool_memchunk_free_cb_t *free_cb,
void *opaque);
-__rte_deprecated
-int rte_mempool_populate_phys(struct rte_mempool *mp, char *vaddr,
- phys_addr_t paddr, size_t len, rte_mempool_memchunk_free_cb_t *free_cb,
- void *opaque);
-
-/**
- * @deprecated
- * Add physical memory for objects in the pool at init
- *
- * Add a virtually contiguous memory chunk in the pool where objects can
- * be instantiated. The IO addresses corresponding to the virtual
- * area are described in iova[], pg_num, pg_shift.
- *
- * @param mp
- * A pointer to the mempool structure.
- * @param vaddr
- * The virtual address of memory that should be used to store objects.
- * @param iova
- * An array of IO addresses of each page composing the virtual area.
- * @param pg_num
- * Number of elements in the iova array.
- * @param pg_shift
- * LOG2 of the physical pages size.
- * @param free_cb
- * The callback used to free this chunk when destroying the mempool.
- * @param opaque
- * An opaque argument passed to free_cb.
- * @return
- * The number of objects added on success.
- * On error, the chunks are not added in the memory list of the
- * mempool and a negative errno is returned.
- */
-__rte_deprecated
-int rte_mempool_populate_iova_tab(struct rte_mempool *mp, char *vaddr,
- const rte_iova_t iova[], uint32_t pg_num, uint32_t pg_shift,
- rte_mempool_memchunk_free_cb_t *free_cb, void *opaque);
-
-__rte_deprecated
-int rte_mempool_populate_phys_tab(struct rte_mempool *mp, char *vaddr,
- const phys_addr_t paddr[], uint32_t pg_num, uint32_t pg_shift,
- rte_mempool_memchunk_free_cb_t *free_cb, void *opaque);
-
/**
* Add virtually contiguous memory for objects in the pool at init
*
@@ -1746,13 +1636,6 @@ rte_mempool_virt2iova(const void *elt)
return hdr->iova;
}
-__rte_deprecated
-static inline phys_addr_t
-rte_mempool_virt2phy(__rte_unused const struct rte_mempool *mp, const void *elt)
-{
- return rte_mempool_virt2iova(elt);
-}
-
/**
* Check the consistency of mempool objects.
*
@@ -1821,68 +1704,6 @@ struct rte_mempool *rte_mempool_lookup(const char *name);
uint32_t rte_mempool_calc_obj_size(uint32_t elt_size, uint32_t flags,
struct rte_mempool_objsz *sz);
-/**
- * @deprecated
- * Get the size of memory required to store mempool elements.
- *
- * Calculate the maximum amount of memory required to store given number
- * of objects. Assume that the memory buffer will be aligned at page
- * boundary.
- *
- * Note that if object size is bigger than page size, then it assumes
- * that pages are grouped in subsets of physically continuous pages big
- * enough to store at least one object.
- *
- * @param elt_num
- * Number of elements.
- * @param total_elt_sz
- * The size of each element, including header and trailer, as returned
- * by rte_mempool_calc_obj_size().
- * @param pg_shift
- * LOG2 of the physical pages size. If set to 0, ignore page boundaries.
- * @param flags
- * The mempool flags.
- * @return
- * Required memory size aligned at page boundary.
- */
-__rte_deprecated
-size_t rte_mempool_xmem_size(uint32_t elt_num, size_t total_elt_sz,
- uint32_t pg_shift, unsigned int flags);
-
-/**
- * @deprecated
- * Get the size of memory required to store mempool elements.
- *
- * Calculate how much memory would be actually required with the given
- * memory footprint to store required number of objects.
- *
- * @param vaddr
- * Virtual address of the externally allocated memory buffer.
- * Will be used to store mempool objects.
- * @param elt_num
- * Number of elements.
- * @param total_elt_sz
- * The size of each element, including header and trailer, as returned
- * by rte_mempool_calc_obj_size().
- * @param iova
- * Array of IO addresses of the pages that comprises given memory buffer.
- * @param pg_num
- * Number of elements in the iova array.
- * @param pg_shift
- * LOG2 of the physical pages size.
- * @param flags
- * The mempool flags.
- * @return
- * On success, the number of bytes needed to store given number of
- * objects, aligned to the given page size. If the provided memory
- * buffer is too small, return a negative value whose absolute value
- * is the actual number of elements that can be stored in that buffer.
- */
-__rte_deprecated
-ssize_t rte_mempool_xmem_usage(void *vaddr, uint32_t elt_num,
- size_t total_elt_sz, const rte_iova_t iova[], uint32_t pg_num,
- uint32_t pg_shift, unsigned int flags);
-
/**
* Walk list of all memory pools
*
diff --git a/lib/librte_mempool/rte_mempool_version.map b/lib/librte_mempool/rte_mempool_version.map
index 7091b954b..17cbca460 100644
--- a/lib/librte_mempool/rte_mempool_version.map
+++ b/lib/librte_mempool/rte_mempool_version.map
@@ -8,9 +8,6 @@ DPDK_2.0 {
rte_mempool_list_dump;
rte_mempool_lookup;
rte_mempool_walk;
- rte_mempool_xmem_create;
- rte_mempool_xmem_size;
- rte_mempool_xmem_usage;
local: *;
};
@@ -34,8 +31,6 @@ DPDK_16.07 {
rte_mempool_ops_table;
rte_mempool_populate_anon;
rte_mempool_populate_default;
- rte_mempool_populate_phys;
- rte_mempool_populate_phys_tab;
rte_mempool_populate_virt;
rte_mempool_register_ops;
rte_mempool_set_ops_byname;
@@ -46,7 +41,6 @@ DPDK_17.11 {
global:
rte_mempool_populate_iova;
- rte_mempool_populate_iova_tab;
} DPDK_16.07;
--
2.17.1
^ permalink raw reply [relevance 2%]
* [dpdk-dev] [PATCH v2] doc: add SPDX and copyright to rel notes
2018-06-05 7:50 4% ` [dpdk-dev] [PATCH] doc: add SPDX and copyright to rel notes Hemant Agrawal
@ 2018-07-27 4:54 4% ` Hemant Agrawal
0 siblings, 0 replies; 200+ results
From: Hemant Agrawal @ 2018-07-27 4:54 UTC (permalink / raw)
To: dev; +Cc: thomas, Hemant Agrawal
using "The DPDK Contributors" as decided by techboard.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
doc/guides/rel_notes/deprecation.rst | 3 +++
doc/guides/rel_notes/release_16_04.rst | 3 +++
doc/guides/rel_notes/release_16_07.rst | 3 +++
doc/guides/rel_notes/release_16_11.rst | 3 +++
doc/guides/rel_notes/release_17_02.rst | 3 +++
doc/guides/rel_notes/release_17_05.rst | 3 +++
doc/guides/rel_notes/release_17_08.rst | 3 +++
doc/guides/rel_notes/release_17_11.rst | 3 +++
doc/guides/rel_notes/release_18_02.rst | 3 +++
doc/guides/rel_notes/release_18_05.rst | 3 +++
doc/guides/rel_notes/release_18_08.rst | 3 +++
doc/guides/rel_notes/release_2_2.rst | 3 +++
12 files changed, 36 insertions(+)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 14714fe..1ca93f3 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -1,3 +1,6 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2018 The DPDK contributors
+
ABI and API Deprecation
=======================
diff --git a/doc/guides/rel_notes/release_16_04.rst b/doc/guides/rel_notes/release_16_04.rst
index d0a09ef..e9f1e6f 100644
--- a/doc/guides/rel_notes/release_16_04.rst
+++ b/doc/guides/rel_notes/release_16_04.rst
@@ -1,3 +1,6 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2016 The DPDK contributors
+
DPDK Release 16.04
==================
diff --git a/doc/guides/rel_notes/release_16_07.rst b/doc/guides/rel_notes/release_16_07.rst
index a8a3fc1..2904aac 100644
--- a/doc/guides/rel_notes/release_16_07.rst
+++ b/doc/guides/rel_notes/release_16_07.rst
@@ -1,3 +1,6 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2016 The DPDK contributors
+
DPDK Release 16.07
==================
diff --git a/doc/guides/rel_notes/release_16_11.rst b/doc/guides/rel_notes/release_16_11.rst
index 8c9ec65..92e0ec6 100644
--- a/doc/guides/rel_notes/release_16_11.rst
+++ b/doc/guides/rel_notes/release_16_11.rst
@@ -1,3 +1,6 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2016 The DPDK contributors
+
DPDK Release 16.11
==================
diff --git a/doc/guides/rel_notes/release_17_02.rst b/doc/guides/rel_notes/release_17_02.rst
index 357965a..d6c1c56 100644
--- a/doc/guides/rel_notes/release_17_02.rst
+++ b/doc/guides/rel_notes/release_17_02.rst
@@ -1,3 +1,6 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2017 The DPDK contributors
+
DPDK Release 17.02
==================
diff --git a/doc/guides/rel_notes/release_17_05.rst b/doc/guides/rel_notes/release_17_05.rst
index 6892284..6418240 100644
--- a/doc/guides/rel_notes/release_17_05.rst
+++ b/doc/guides/rel_notes/release_17_05.rst
@@ -1,3 +1,6 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2017 The DPDK contributors
+
DPDK Release 17.05
==================
diff --git a/doc/guides/rel_notes/release_17_08.rst b/doc/guides/rel_notes/release_17_08.rst
index 0bcdfb7..dc62240 100644
--- a/doc/guides/rel_notes/release_17_08.rst
+++ b/doc/guides/rel_notes/release_17_08.rst
@@ -1,3 +1,6 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2017 The DPDK contributors
+
DPDK Release 17.08
==================
diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index 5176d69..2a93af3 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -1,3 +1,6 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2017 The DPDK contributors
+
DPDK Release 17.11
==================
diff --git a/doc/guides/rel_notes/release_18_02.rst b/doc/guides/rel_notes/release_18_02.rst
index 44b7de5..8e40311 100644
--- a/doc/guides/rel_notes/release_18_02.rst
+++ b/doc/guides/rel_notes/release_18_02.rst
@@ -1,3 +1,6 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2018 The DPDK contributors
+
DPDK Release 18.02
==================
diff --git a/doc/guides/rel_notes/release_18_05.rst b/doc/guides/rel_notes/release_18_05.rst
index 6b36493..8dc22b0 100644
--- a/doc/guides/rel_notes/release_18_05.rst
+++ b/doc/guides/rel_notes/release_18_05.rst
@@ -1,3 +1,6 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2018 The DPDK contributors
+
DPDK Release 18.05
==================
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 5f24014..cf80448 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -1,3 +1,6 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2018 The DPDK contributors
+
DPDK Release 18.08
==================
diff --git a/doc/guides/rel_notes/release_2_2.rst b/doc/guides/rel_notes/release_2_2.rst
index bb7d15a..cea5c87 100644
--- a/doc/guides/rel_notes/release_2_2.rst
+++ b/doc/guides/rel_notes/release_2_2.rst
@@ -1,3 +1,6 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2016 The DPDK contributors
+
DPDK Release 2.2
================
--
2.7.4
^ permalink raw reply [relevance 4%]
* Re: [dpdk-dev] [PATCH v2 1/2] eal: remove deprecated function returning mbuf pool ops name
@ 2018-07-26 21:42 3% ` Thomas Monjalon
0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2018-07-26 21:42 UTC (permalink / raw)
To: Olivier Matz; +Cc: dev, Hemant Agrawal, santosh.shukla, John McNamara
26/06/2018 11:56, Olivier Matz:
> rte_eal_mbuf_default_mempool_ops() is replaced by
> rte_mbuf_best_mempool_ops().
>
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> ---
>
> v2:
> * remove rte_eal_mbuf_user_pool_ops from .map in next patch instead of this
>
> doc/guides/rel_notes/deprecation.rst | 9 ---------
> lib/librte_eal/bsdapp/eal/eal.c | 10 ----------
> lib/librte_eal/common/include/rte_eal.h | 11 -----------
> lib/librte_eal/linuxapp/eal/eal.c | 10 ----------
> lib/librte_eal/rte_eal_version.map | 1 -
> 5 files changed, 41 deletions(-)
Please bump ABI version and update the release notes.
Thanks
^ permalink raw reply [relevance 3%]
* Re: [dpdk-dev] [PATCH 1/2] mempool: remove deprecated functions
@ 2018-07-26 21:34 3% ` Thomas Monjalon
2018-07-27 13:45 0% ` Andrew Rybchenko
0 siblings, 1 reply; 200+ results
From: Thomas Monjalon @ 2018-07-26 21:34 UTC (permalink / raw)
To: Andrew Rybchenko; +Cc: dev, Olivier Matz
11/07/2018 12:59, Andrew Rybchenko:
> Functions rte_mempool_populate_phys(), rte_mempool_virt2phy() and
> rte_mempool_populate_phys_tab() are just wrappers for corresponding
> IOVA functions and were deprecated in v17.11.
>
> Functions rte_mempool_xmem_create(), rte_mempool_xmem_size(),
> rte_mempool_xmem_usage() and rte_mempool_populate_iova_tab() were
> deprecated in v18.05 and removal was announced earlier in v18.02.
>
> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
> ---
> lib/librte_mempool/Makefile | 3 -
> lib/librte_mempool/meson.build | 4 -
> lib/librte_mempool/rte_mempool.c | 181 +--------------------
> lib/librte_mempool/rte_mempool.h | 179 --------------------
> lib/librte_mempool/rte_mempool_version.map | 6 -
> 5 files changed, 1 insertion(+), 372 deletions(-)
Please update the release notes, deprecation notice, and bump ABI version.
Thanks
^ permalink raw reply [relevance 3%]
* Re: [dpdk-dev] [RFC 00/11] Support externally allocated memory in DPDK
2018-07-19 10:58 0% ` László Vadkerti
@ 2018-07-26 13:48 0% ` Burakov, Anatoly
0 siblings, 0 replies; 200+ results
From: Burakov, Anatoly @ 2018-07-26 13:48 UTC (permalink / raw)
To: László Vadkerti, Wiles, Keith
Cc: dev, srinath.mannam, scott.branden, ajit.khaparde,
Thomas Monjalon, Shreyansh Jain, jerin.jacob
On 19-Jul-18 11:58 AM, László Vadkerti wrote:
>> On Jul 13, 2018, at 7:57 PM, Wiles, Keith <keith.wiles@intel.com> wrote:
>>
>>> On Jul 13, 2018, at 12:10 PM, Burakov, Anatoly <anatoly.burakov@intel.com> wrote:
>>>
>>> On 06-Jul-18 2:17 PM, Anatoly Burakov wrote:
>>>> This is a proposal to enable using externally allocated memory in
>>>> DPDK.
>>>> In a nutshell, here is what is being done here:
>>>> - Index malloc heaps by NUMA node index, rather than NUMA node itself
>>>> - Add identifier string to malloc heap, to uniquely identify it
>>>> - Allow creating named heaps and add/remove memory to/from those
>>>> heaps
>>>> - Allocate memseg lists at runtime, to keep track of IOVA addresses
>>>> of externally allocated memory
>>>> - If IOVA addresses aren't provided, use RTE_BAD_IOVA
>>>> - Allow malloc and memzones to allocate from named heaps The
>>>> responsibility to ensure memory is accessible before using it is on
>>>> the shoulders of the user - there is no checking done with regards to
>>>> validity of the memory (nor could there be...).
>>>> The following limitations are present:
>>>> - No multiprocess support
>>>> - No thread safety
>>>> There is currently no way to allocate memory during initialization
>>>> stage, so even if multiprocess support is added, it is not guaranteed
>>>> to work because of underlying issues with mapping fbarrays in
>>>> secondary processes. This is not an issue in single process scenario,
>>>> but it may be an issue in a multiprocess scenario in case where
>>>> primary doesn't intend to share the externally allocated memory, yet
>>>> adding such memory could fail because some other process failed to
>>>> attach to this shared memory when it wasn't needed.
>>>> Anatoly Burakov (11):
>>>> mem: allow memseg lists to be marked as external
>>>> eal: add function to rerieve socket index by socket ID
>>>> malloc: index heaps using heap ID rather than NUMA node
>>>> malloc: add name to malloc heaps
>>>> malloc: enable retrieving statistics from named heaps
>>>> malloc: enable allocating from named heaps
>>>> malloc: enable creating new malloc heaps
>>>> malloc: allow adding memory to named heaps
>>>> malloc: allow removing memory from named heaps
>>>> malloc: allow destroying heaps
>>>> memzone: enable reserving memory from named heaps
>>>> config/common_base | 1 +
>>>> lib/librte_eal/common/eal_common_lcore.c | 15 +
>>>> lib/librte_eal/common/eal_common_memory.c | 51 +++-
>>>> lib/librte_eal/common/eal_common_memzone.c | 283
>> ++++++++++++++----
>>>> .../common/include/rte_eal_memconfig.h | 5 +-
>>>> lib/librte_eal/common/include/rte_lcore.h | 19 +-
>>>> lib/librte_eal/common/include/rte_malloc.h | 158 +++++++++-
>>>> .../common/include/rte_malloc_heap.h | 2 +
>>>> lib/librte_eal/common/include/rte_memzone.h | 183 +++++++++++
>>>> lib/librte_eal/common/malloc_heap.c | 277 +++++++++++++++--
>>>> lib/librte_eal/common/malloc_heap.h | 26 ++
>>>> lib/librte_eal/common/rte_malloc.c | 197 +++++++++++-
>>>> lib/librte_eal/rte_eal_version.map | 10 +
>>>> 13 files changed, 1118 insertions(+), 109 deletions(-)
>>>
>>> So, now that the RFC is out, i would like to ask a general question.
>>>
>>> One other thing that this patchset is missing, is the ability for data
>> structures (e.g. hash, mempool, etc.) to be allocated from external heaps.
>> Currently, we can kinda sorta do that with various _init() API's (initializing a
>> data structure over already allocated memzone), but this is not ideal and is a
>> hassle for anyone using external memory in DPDK.
>>>
>>> There are basically four ways to approach this problem (that i can see).
>>>
>>> First way is to change "socket ID" to mean "heap ID" everywhere. This has
>> an upside of having a consistent API to allocate from internal and external
>> heaps, with little to no API additions, only internal changes to account for the
>> fact that "socket ID" is now "heap ID".
>>>
>>> However, there is a massive downside to this approach: it is a *giant* API
>> change, and it's also a giant *ABI-compatible* API change. Meaning,
>> replacing socket ID with heap ID will not cause compile failures for old code,
>> which would result in many subtle bugs in already existing codebases. So,
>> while in the perfect world this would've been my preferred approach,
>> realistically i think this is a very, very bad idea.
>>>
>>> Second one is to add a separate "heap name" API's to everything. This has
>> an upside of clean separation between allocation from internal and external
>> heaps. (well, whether it's an upside is debatable...) This is the approach i
>> expected to take when i was creating this patchset.
>>>
>>> The downside is that we have to add new API's to every library and every
>> DPDK data structure, to allow explicit allocation from external heaps. We will
>> have to maintain both, and things like hardware drivers will need to have a
>> way to indicate the need to allocate things from a particular external heap.
>>>
>>> The third way is to expose the "heap ID" externally, and allow a single,
>> unified API to reserve memory. That is, create an API that would map either
>> a NUMA node ID or a heap name to an ID, and allow reserving memory
>> through that ID regardless of whether it's internal or external memory. This
>> would also allow to gradually phase out socket-based ID's in favor of heap ID
>> API, should we choose to do so.
>>>
>>> The downside for this is, it adds a layer of indirection between socket ID
>> and reserving memory on a particular NUMA node, and it makes it hard to
>> produce a single value of "heap ID" in such a way as to replicate current
>> functionality of allocating with SOCKET_ID_ANY. Most likely user will have to
>> explicitly try to allocate on all sockets, unless we keep old API's around in
>> parallel.
>>>
>>> Finally, a fourth way would be to abuse the socket ID to also mean
>> something else, which is an approach i've seen numerous times already, and
>> one that i don't like. We could register new heaps as a new, fake socket ID,
>> and use that to address external heaps (each heap would get its own
>> socket). So, keep current socket ID behavior, but for non-existent sockets it
>> would be possible to be registered as a fake socket pointing to an external
>> heap.
>>>
>>> The upside for this approach would be that no API changes are required
>> whatsoever to existing libraries - this scheme is compatible with both internal
>> and external heaps without adding a separate API.
>>>
>>> The downside is bad semantics - "special" sockets, handling of
>>> SOCKET_ID_ANY, handling of "invalid socket" vs. "invalid socket that
>>> happens to correspond to an existing external heap", and many other
>>> things that can be confusing. I don't like this option, but it's an
>>> option :)
>>>
>>> Thoughts? Comments?
>>
>> #1 is super clean, but very disruptive to everyone. Very Bad IMO
>> #2 is also clean, but adds a lot of new APIs that everyone needs to use or at
>> least in the external heap cases.
>> #3 not sure I fully understand it, but reproducing heap IDs for testing is a
>> problem and requires new/old APIs
>>
>> #4 Very easy to add, IMO it is clean and very small disruption to developers.
>> It does require the special handling, but I feel it is OK and can be explained in
>> the docs. Having a socket id as an ‘int’ gives us a lot room e.g. id < 64K is
>> normal socket and > 64K is external id.
>>
>> My vote would be #4, as it seems the least risk and work. :-)
>>
> We are living with #4 (overloaded socket_ids) since ~5 years now but it indeed generates some confusion and it is a kind of hack so it may not be the best choice going forward in official releases but for sure is the easiest/simplest solution requiring the least modifications.
> Using an overloaded socket_id is especially disturbing in the dump memory config printout where the user will see multiple socket ids on a single socket system or more than the available real number of sockets, however it could still be explained in the notes and the documentation.
> The allocation behavior with SOCKET_ID_ANY is also a question as I think it shouldn’t roll over to allocate memory in the external heap, we especially disabled this feature in our implementation. The reason behind is that the external memory may be a limited resource where only explicit allocation requests would be allowed and also in a multi-process environment we may not want all external heaps to be mapped into all other processes address space meaning that not all heaps are accessible from every process (I’m not sure if it is planned to be supported though but it would be an important and useful feature based on our experiences).
Hi Laszlo,
That depends on what you mean by "all other processes". If they are all
part of the primary-secondary process prefix, then my plan is to enable
private and shared heaps - i.e. a heap is either available to a single
process, or it is available to some or all processes within a prefix.
It is also not possible to share the same area with different process
prefixes (i.e. between two different primaries) because each of the
processes will think it owns the entire memory and will do with it as it
pleases. Using the same memory region with two different process
prefixes will break many assumptions heap has - for example, it relies
on a per-heap lock to control access to the heap, and that will not work
if you map the same memory area into multiple primary processes. I do
not foresee a mechanism to fix this problem within DPDK, but obviously
if you have any suggestions, they will be considered :)
The reason we have to care about private vs. shared heaps is because of
how DPDK handles memory management. In order for DPDK facilities such as
rte_mem_virt2iova() or rte_memseg_walk() to work, we need to keep track
of the pages we use for the heap - i.e. from DPDK's point of view,
external memory behaves just like regular memory and is tracked using
the same method of keeping page tables around (see rte_memseg_list).
These page tables need to be shared between all processes that use a
specific heap. This introduces an inherent point of failure - you may
mmap() the *area itself* successfully at the same address, but you may
still fail to *attach to the page tables*, which will cause a particular
heap to not be available in a process. This is a problem that i do not
see a solution for at the moment, and it is something that users
attempting to use external memory in secondary processes will have to
deal with.
I haven't yet decided whether this should be automatic (i.e. shared
heaps "automagically" appearing in all processes) or manual (make the
user explicitly attach to an externally allocated heap in each process
within the prefix). I would tend to go for the latter as it gives the
user more control, and it is easier to implement because there's no need
to engage IPC to make this work.
> Anyway I think the confusion with this option comes due to the misleading “socket_id” name which would not really mean socket id anymore. So we should probably just document it as pseudo socket_id and problem solved with #4 :)
>
> The cleanest solution in my opinion would be #1 which could be combined with #4 so that the physical socket_id could be directly passed as the heap_id (or rather call it allocation id or just location?) so that backward compatibility could also be kept.
> Meaning to apply #1, change “socket_id” to “heap_id” (or “alloc_id”?) in all functions which are today expecting the socket_id to indicate the location of the allocations but keep a direct mapping from socket_id to heap_id, e.g. as Keith suggested lower range of heap_id would be equivalent to the socket_id and upper range would be the external id, this way even existing applications would still work without changing the code just by passing the socket_id in the heap_id parameter. However it is a question what would happen with the socket_id stored in data structures such as struct rte_mempool where socket_id is stored with a meaning “Socket id passed at create.”
> SOCKET_ID_ANY would only mean lower range of heap_ids (physical socket ids) but not the external heap and if needed a new HEAP_ID_ANY could be introduced.
>
> If changing heap_id to socket_id in existing functions is a big issue then one option would be to keep the original API and introduce new equivalent functions allowing to use the heap_id instead of the socket_id, e.g. rte_mempool_create would have an equivalent function to use with the heap_id instead of the socket_id.
> Socket_id could then be converted to heap_id with a new function which should always be possible and can still use to direct mapping approach with lower/upper range convention.
> The socket_id based functions would then just be wrappers calling the heap_id equivalent function after converting the socket_id to heap_id.
> Using socket_id to indicate the location could still be relevant so the old socket_id based functions may not even need to be deprecated unless it would become hard to maintain.
>
> Irrespective of the chosen option, external heaps should be registered/identified by name and there could be a function to fetch/lookup the id (heap_id or pseudo socket_id) by registered heap name which then could be used in the related API calls.
So, in other words, the consesus seems to be that we need to stay with
the old socket_id and just use weird socket ID's for external heaps.
Okay, so be it. Less work for me implementing it :)
>
> It would also be another work item to update all the data structures which are storing the socket_id to use it as the location identifier and I think few of them may need to store both the real physical socket_id and the heap_id, e.g. in struct lcore_config where the user may want to know the real physical socket id but want to set specific heap_id as the default allocation location for the given lcore.
I do not see physical socket ID of externally allocated memory as a
matter of concern for DPDK. I think this information should be up to the
user application to handle, not DPDK. From my point of view, we
shouldn't care where the memory came from, we just facilitate using it.
If the user chooses to store additional metadata about the memory
somewhere else - that is his prerogative, but i don't think having a
provision for "physical socket ID" etc for external heaps should be in DPDK.
>
>>>
>>> I myself still favor the second way, however there are good arguments to
>> be made for each of these options.
>>>
>>> --
>>> Thanks,
>>> Anatoly
>>
>> Regards,
>> Keith
>
> Thanks,
> Laszlo
>
--
Thanks,
Anatoly
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [PATCH] devtools: fix checkpatch for filename with space
2018-07-20 18:25 0% ` Neil Horman
@ 2018-07-20 20:56 0% ` Thomas Monjalon
0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2018-07-20 20:56 UTC (permalink / raw)
To: dev; +Cc: Neil Horman
20/07/2018 20:25, Neil Horman:
> On Fri, Jul 20, 2018 at 01:41:03PM +0200, Thomas Monjalon wrote:
> > If the patch filename or the temporary file path have a space
> > in their name, the script checkpatches.sh does not work.
> > The variables for the filenames must be enclosed in quotes
> > in order to preserve spaces.
> >
> > Fixes: 4bec48184e33 ("devtools: add checks for ABI symbol addition")
> >
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> Acked-by: Neil Horman <nhorman@tuxdriver.com>
>
> > ---
> >
> > Strangely, I did a fix for check-symbol-change.sh and I forgot
> > to fix checkpatches.sh.
> >
> > ---
Applied
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [PATCH] devtools: fix checkpatch for filename with space
2018-07-20 11:41 3% [dpdk-dev] [PATCH] devtools: fix checkpatch " Thomas Monjalon
@ 2018-07-20 18:25 0% ` Neil Horman
2018-07-20 20:56 0% ` Thomas Monjalon
0 siblings, 1 reply; 200+ results
From: Neil Horman @ 2018-07-20 18:25 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev
On Fri, Jul 20, 2018 at 01:41:03PM +0200, Thomas Monjalon wrote:
> If the patch filename or the temporary file path have a space
> in their name, the script checkpatches.sh does not work.
> The variables for the filenames must be enclosed in quotes
> in order to preserve spaces.
>
> Fixes: 4bec48184e33 ("devtools: add checks for ABI symbol addition")
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
> ---
>
> Strangely, I did a fix for check-symbol-change.sh and I forgot
> to fix checkpatches.sh.
>
> ---
> devtools/checkpatches.sh | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
> index 1439bce94..e97a4f2c9 100755
> --- a/devtools/checkpatches.sh
> +++ b/devtools/checkpatches.sh
> @@ -25,7 +25,7 @@ NEW_TYPEDEFS,COMPARISON_TO_NULL"
>
> clean_tmp_files() {
> if echo $tmpinput | grep -q '^checkpatches\.' ; then
> - rm -f $tmpinput
> + rm -f "$tmpinput"
> fi
> }
>
> @@ -77,13 +77,13 @@ check () { # <patch> <commit> <title>
> elif [ -n "$2" ] ; then
> tmpinput=$(mktemp checkpatches.XXXXXX)
> git format-patch --find-renames \
> - --no-stat --stdout -1 $commit > $tmpinput
> + --no-stat --stdout -1 $commit > "$tmpinput"
> else
> tmpinput=$(mktemp checkpatches.XXXXXX)
> - cat > $tmpinput
> + cat > "$tmpinput"
> fi
>
> - report=$($DPDK_CHECKPATCH_PATH $options $tmpinput 2>/dev/null)
> + report=$($DPDK_CHECKPATCH_PATH $options "$tmpinput" 2>/dev/null)
> if [ $? -ne 0 ] ; then
> $verbose || printf '\n### %s\n\n' "$3"
> printf '%s\n' "$report" | sed -n '1,/^total:.*lines checked$/p'
> --
> 2.17.1
>
>
^ permalink raw reply [relevance 0%]
* [dpdk-dev] [PATCH] devtools: fix checkpatch for filename with space
@ 2018-07-20 11:41 3% Thomas Monjalon
2018-07-20 18:25 0% ` Neil Horman
0 siblings, 1 reply; 200+ results
From: Thomas Monjalon @ 2018-07-20 11:41 UTC (permalink / raw)
To: nhorman; +Cc: dev
If the patch filename or the temporary file path have a space
in their name, the script checkpatches.sh does not work.
The variables for the filenames must be enclosed in quotes
in order to preserve spaces.
Fixes: 4bec48184e33 ("devtools: add checks for ABI symbol addition")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
Strangely, I did a fix for check-symbol-change.sh and I forgot
to fix checkpatches.sh.
---
devtools/checkpatches.sh | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index 1439bce94..e97a4f2c9 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -25,7 +25,7 @@ NEW_TYPEDEFS,COMPARISON_TO_NULL"
clean_tmp_files() {
if echo $tmpinput | grep -q '^checkpatches\.' ; then
- rm -f $tmpinput
+ rm -f "$tmpinput"
fi
}
@@ -77,13 +77,13 @@ check () { # <patch> <commit> <title>
elif [ -n "$2" ] ; then
tmpinput=$(mktemp checkpatches.XXXXXX)
git format-patch --find-renames \
- --no-stat --stdout -1 $commit > $tmpinput
+ --no-stat --stdout -1 $commit > "$tmpinput"
else
tmpinput=$(mktemp checkpatches.XXXXXX)
- cat > $tmpinput
+ cat > "$tmpinput"
fi
- report=$($DPDK_CHECKPATCH_PATH $options $tmpinput 2>/dev/null)
+ report=$($DPDK_CHECKPATCH_PATH $options "$tmpinput" 2>/dev/null)
if [ $? -ne 0 ] ; then
$verbose || printf '\n### %s\n\n' "$3"
printf '%s\n' "$report" | sed -n '1,/^total:.*lines checked$/p'
--
2.17.1
^ permalink raw reply [relevance 3%]
* Re: [dpdk-dev] [PATCH v2] devtools: fix symbol check for filename with space
2018-07-19 15:37 0% ` Neil Horman
@ 2018-07-20 9:37 0% ` Thomas Monjalon
0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2018-07-20 9:37 UTC (permalink / raw)
To: Neil Horman; +Cc: dev
19/07/2018 17:37, Neil Horman:
> On Thu, Jul 19, 2018 at 02:09:47PM +0200, Thomas Monjalon wrote:
> > 19/07/2018 13:14, Neil Horman:
> > > On Wed, Jul 18, 2018 at 11:26:58PM +0200, Thomas Monjalon wrote:
> > > > If the patch filename or the temporary file path have a space
> > > > in their name, the script check-symbol-change.sh does not work.
> > > > The variables for the filenames must be enclosed in quotes
> > > > in order to preserve spaces.
> > > >
> > > > Fixes: 4bec48184e33 ("devtools: add checks for ABI symbol addition")
> > > > Cc: nhorman@tuxdriver.com
> > > >
> > > > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > > > ---
> > > > v2: one occurence of "$mapfile" was missed in v1
> > > I don't have any issue with this change, but the only way I see to introduce a
> > > space into the tempfile name is to set $TMPDIR to '/path/with silly spaces' or
> > > something simmilar. I think we discussed this before, but it would alsmot make
> > > sense to, instead of quoting everything, instead specify -p ./ to ensure the
> > > tempfile has no spaces.
> >
> > When I save patches from my inbox, the filename has some spaces.
> >
> > I think quoting variables is mandatory.
> >
> >
> Sure, it doesn't hurt anything really
>
> Acked-by: Neil Horman <nhorman@tuxdriver.com>
Applied
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [PATCH v2] devtools: fix symbol check for filename with space
2018-07-19 12:09 0% ` Thomas Monjalon
@ 2018-07-19 15:37 0% ` Neil Horman
2018-07-20 9:37 0% ` Thomas Monjalon
0 siblings, 1 reply; 200+ results
From: Neil Horman @ 2018-07-19 15:37 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev
On Thu, Jul 19, 2018 at 02:09:47PM +0200, Thomas Monjalon wrote:
> 19/07/2018 13:14, Neil Horman:
> > On Wed, Jul 18, 2018 at 11:26:58PM +0200, Thomas Monjalon wrote:
> > > If the patch filename or the temporary file path have a space
> > > in their name, the script check-symbol-change.sh does not work.
> > > The variables for the filenames must be enclosed in quotes
> > > in order to preserve spaces.
> > >
> > > Fixes: 4bec48184e33 ("devtools: add checks for ABI symbol addition")
> > > Cc: nhorman@tuxdriver.com
> > >
> > > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > > ---
> > > v2: one occurence of "$mapfile" was missed in v1
> > I don't have any issue with this change, but the only way I see to introduce a
> > space into the tempfile name is to set $TMPDIR to '/path/with silly spaces' or
> > something simmilar. I think we discussed this before, but it would alsmot make
> > sense to, instead of quoting everything, instead specify -p ./ to ensure the
> > tempfile has no spaces.
>
> When I save patches from my inbox, the filename has some spaces.
>
> I think quoting variables is mandatory.
>
>
>
>
Sure, it doesn't hurt anything really
Acked-by: Neil Horman <nhorman@tuxdriver.com>
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [PATCH v2] devtools: fix symbol check for filename with space
2018-07-19 11:14 0% ` Neil Horman
@ 2018-07-19 12:09 0% ` Thomas Monjalon
2018-07-19 15:37 0% ` Neil Horman
0 siblings, 1 reply; 200+ results
From: Thomas Monjalon @ 2018-07-19 12:09 UTC (permalink / raw)
To: Neil Horman; +Cc: dev
19/07/2018 13:14, Neil Horman:
> On Wed, Jul 18, 2018 at 11:26:58PM +0200, Thomas Monjalon wrote:
> > If the patch filename or the temporary file path have a space
> > in their name, the script check-symbol-change.sh does not work.
> > The variables for the filenames must be enclosed in quotes
> > in order to preserve spaces.
> >
> > Fixes: 4bec48184e33 ("devtools: add checks for ABI symbol addition")
> > Cc: nhorman@tuxdriver.com
> >
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > ---
> > v2: one occurence of "$mapfile" was missed in v1
> I don't have any issue with this change, but the only way I see to introduce a
> space into the tempfile name is to set $TMPDIR to '/path/with silly spaces' or
> something simmilar. I think we discussed this before, but it would alsmot make
> sense to, instead of quoting everything, instead specify -p ./ to ensure the
> tempfile has no spaces.
When I save patches from my inbox, the filename has some spaces.
I think quoting variables is mandatory.
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [PATCH v2] devtools: fix symbol check for filename with space
2018-07-18 21:26 3% ` [dpdk-dev] [PATCH v2] " Thomas Monjalon
@ 2018-07-19 11:14 0% ` Neil Horman
2018-07-19 12:09 0% ` Thomas Monjalon
0 siblings, 1 reply; 200+ results
From: Neil Horman @ 2018-07-19 11:14 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev
On Wed, Jul 18, 2018 at 11:26:58PM +0200, Thomas Monjalon wrote:
> If the patch filename or the temporary file path have a space
> in their name, the script check-symbol-change.sh does not work.
> The variables for the filenames must be enclosed in quotes
> in order to preserve spaces.
>
> Fixes: 4bec48184e33 ("devtools: add checks for ABI symbol addition")
> Cc: nhorman@tuxdriver.com
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
> v2: one occurence of "$mapfile" was missed in v1
I don't have any issue with this change, but the only way I see to introduce a
space into the tempfile name is to set $TMPDIR to '/path/with silly spaces' or
something simmilar. I think we discussed this before, but it would alsmot make
sense to, instead of quoting everything, instead specify -p ./ to ensure the
tempfile has no spaces.
Neil
> ---
> devtools/check-symbol-change.sh | 20 ++++++++++----------
> 1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/devtools/check-symbol-change.sh b/devtools/check-symbol-change.sh
> index 9952a8d66..40b72073a 100755
> --- a/devtools/check-symbol-change.sh
> +++ b/devtools/check-symbol-change.sh
> @@ -7,7 +7,7 @@ build_map_changes()
> local fname=$1
> local mapdb=$2
>
> - cat $fname | awk '
> + cat "$fname" | awk '
> # Initialize our variables
> BEGIN {map="";sym="";ar="";sec=""; in_sec=0; in_map=0}
>
> @@ -71,10 +71,10 @@ build_map_changes()
> print map " " sym " unknown del"
> }
> }
> - }' > ./$mapdb
> + }' > "$mapdb"
>
> - sort -u $mapdb > ./$mapdb.2
> - mv -f $mapdb.2 $mapdb
> + sort -u "$mapdb" > "$mapdb.2"
> + mv -f "$mapdb.2" "$mapdb"
>
> }
>
> @@ -111,7 +111,7 @@ check_for_rule_violations()
> # to be moving from an already supported
> # section or its a violation
> grep -q \
> - "$mname $symname [^EXPERIMENTAL] del" $mapdb
> + "$mname $symname [^EXPERIMENTAL] del" "$mapdb"
> if [ $? -ne 0 ]
> then
> echo -n "ERROR: symbol $symname "
> @@ -133,7 +133,7 @@ check_for_rule_violations()
> echo "gone through the deprecation process"
> fi
> fi
> - done < $mapdb
> + done < "$mapdb"
>
> return $ret
> }
> @@ -146,14 +146,14 @@ exit_code=1
>
> clean_and_exit_on_sig()
> {
> - rm -f $mapfile
> + rm -f "$mapfile"
> exit $exit_code
> }
>
> -build_map_changes $patch $mapfile
> -check_for_rule_violations $mapfile
> +build_map_changes "$patch" "$mapfile"
> +check_for_rule_violations "$mapfile"
> exit_code=$?
>
> -rm -f $mapfile
> +rm -f "$mapfile"
>
> exit $exit_code
> --
> 2.17.1
>
>
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [RFC 00/11] Support externally allocated memory in DPDK
2018-07-13 17:56 0% ` Wiles, Keith
@ 2018-07-19 10:58 0% ` László Vadkerti
2018-07-26 13:48 0% ` Burakov, Anatoly
0 siblings, 1 reply; 200+ results
From: László Vadkerti @ 2018-07-19 10:58 UTC (permalink / raw)
To: Wiles, Keith, Burakov, Anatoly
Cc: dev, srinath.mannam, scott.branden, ajit.khaparde,
Thomas Monjalon, Shreyansh Jain, jerin.jacob
> On Jul 13, 2018, at 7:57 PM, Wiles, Keith <keith.wiles@intel.com> wrote:
>
> > On Jul 13, 2018, at 12:10 PM, Burakov, Anatoly <anatoly.burakov@intel.com> wrote:
> >
> > On 06-Jul-18 2:17 PM, Anatoly Burakov wrote:
> >> This is a proposal to enable using externally allocated memory in
> >> DPDK.
> >> In a nutshell, here is what is being done here:
> >> - Index malloc heaps by NUMA node index, rather than NUMA node itself
> >> - Add identifier string to malloc heap, to uniquely identify it
> >> - Allow creating named heaps and add/remove memory to/from those
> >> heaps
> >> - Allocate memseg lists at runtime, to keep track of IOVA addresses
> >> of externally allocated memory
> >> - If IOVA addresses aren't provided, use RTE_BAD_IOVA
> >> - Allow malloc and memzones to allocate from named heaps The
> >> responsibility to ensure memory is accessible before using it is on
> >> the shoulders of the user - there is no checking done with regards to
> >> validity of the memory (nor could there be...).
> >> The following limitations are present:
> >> - No multiprocess support
> >> - No thread safety
> >> There is currently no way to allocate memory during initialization
> >> stage, so even if multiprocess support is added, it is not guaranteed
> >> to work because of underlying issues with mapping fbarrays in
> >> secondary processes. This is not an issue in single process scenario,
> >> but it may be an issue in a multiprocess scenario in case where
> >> primary doesn't intend to share the externally allocated memory, yet
> >> adding such memory could fail because some other process failed to
> >> attach to this shared memory when it wasn't needed.
> >> Anatoly Burakov (11):
> >> mem: allow memseg lists to be marked as external
> >> eal: add function to rerieve socket index by socket ID
> >> malloc: index heaps using heap ID rather than NUMA node
> >> malloc: add name to malloc heaps
> >> malloc: enable retrieving statistics from named heaps
> >> malloc: enable allocating from named heaps
> >> malloc: enable creating new malloc heaps
> >> malloc: allow adding memory to named heaps
> >> malloc: allow removing memory from named heaps
> >> malloc: allow destroying heaps
> >> memzone: enable reserving memory from named heaps
> >> config/common_base | 1 +
> >> lib/librte_eal/common/eal_common_lcore.c | 15 +
> >> lib/librte_eal/common/eal_common_memory.c | 51 +++-
> >> lib/librte_eal/common/eal_common_memzone.c | 283
> ++++++++++++++----
> >> .../common/include/rte_eal_memconfig.h | 5 +-
> >> lib/librte_eal/common/include/rte_lcore.h | 19 +-
> >> lib/librte_eal/common/include/rte_malloc.h | 158 +++++++++-
> >> .../common/include/rte_malloc_heap.h | 2 +
> >> lib/librte_eal/common/include/rte_memzone.h | 183 +++++++++++
> >> lib/librte_eal/common/malloc_heap.c | 277 +++++++++++++++--
> >> lib/librte_eal/common/malloc_heap.h | 26 ++
> >> lib/librte_eal/common/rte_malloc.c | 197 +++++++++++-
> >> lib/librte_eal/rte_eal_version.map | 10 +
> >> 13 files changed, 1118 insertions(+), 109 deletions(-)
> >
> > So, now that the RFC is out, i would like to ask a general question.
> >
> > One other thing that this patchset is missing, is the ability for data
> structures (e.g. hash, mempool, etc.) to be allocated from external heaps.
> Currently, we can kinda sorta do that with various _init() API's (initializing a
> data structure over already allocated memzone), but this is not ideal and is a
> hassle for anyone using external memory in DPDK.
> >
> > There are basically four ways to approach this problem (that i can see).
> >
> > First way is to change "socket ID" to mean "heap ID" everywhere. This has
> an upside of having a consistent API to allocate from internal and external
> heaps, with little to no API additions, only internal changes to account for the
> fact that "socket ID" is now "heap ID".
> >
> > However, there is a massive downside to this approach: it is a *giant* API
> change, and it's also a giant *ABI-compatible* API change. Meaning,
> replacing socket ID with heap ID will not cause compile failures for old code,
> which would result in many subtle bugs in already existing codebases. So,
> while in the perfect world this would've been my preferred approach,
> realistically i think this is a very, very bad idea.
> >
> > Second one is to add a separate "heap name" API's to everything. This has
> an upside of clean separation between allocation from internal and external
> heaps. (well, whether it's an upside is debatable...) This is the approach i
> expected to take when i was creating this patchset.
> >
> > The downside is that we have to add new API's to every library and every
> DPDK data structure, to allow explicit allocation from external heaps. We will
> have to maintain both, and things like hardware drivers will need to have a
> way to indicate the need to allocate things from a particular external heap.
> >
> > The third way is to expose the "heap ID" externally, and allow a single,
> unified API to reserve memory. That is, create an API that would map either
> a NUMA node ID or a heap name to an ID, and allow reserving memory
> through that ID regardless of whether it's internal or external memory. This
> would also allow to gradually phase out socket-based ID's in favor of heap ID
> API, should we choose to do so.
> >
> > The downside for this is, it adds a layer of indirection between socket ID
> and reserving memory on a particular NUMA node, and it makes it hard to
> produce a single value of "heap ID" in such a way as to replicate current
> functionality of allocating with SOCKET_ID_ANY. Most likely user will have to
> explicitly try to allocate on all sockets, unless we keep old API's around in
> parallel.
> >
> > Finally, a fourth way would be to abuse the socket ID to also mean
> something else, which is an approach i've seen numerous times already, and
> one that i don't like. We could register new heaps as a new, fake socket ID,
> and use that to address external heaps (each heap would get its own
> socket). So, keep current socket ID behavior, but for non-existent sockets it
> would be possible to be registered as a fake socket pointing to an external
> heap.
> >
> > The upside for this approach would be that no API changes are required
> whatsoever to existing libraries - this scheme is compatible with both internal
> and external heaps without adding a separate API.
> >
> > The downside is bad semantics - "special" sockets, handling of
> > SOCKET_ID_ANY, handling of "invalid socket" vs. "invalid socket that
> > happens to correspond to an existing external heap", and many other
> > things that can be confusing. I don't like this option, but it's an
> > option :)
> >
> > Thoughts? Comments?
>
> #1 is super clean, but very disruptive to everyone. Very Bad IMO
> #2 is also clean, but adds a lot of new APIs that everyone needs to use or at
> least in the external heap cases.
> #3 not sure I fully understand it, but reproducing heap IDs for testing is a
> problem and requires new/old APIs
>
> #4 Very easy to add, IMO it is clean and very small disruption to developers.
> It does require the special handling, but I feel it is OK and can be explained in
> the docs. Having a socket id as an ‘int’ gives us a lot room e.g. id < 64K is
> normal socket and > 64K is external id.
>
> My vote would be #4, as it seems the least risk and work. :-)
>
We are living with #4 (overloaded socket_ids) since ~5 years now but it indeed generates some confusion and it is a kind of hack so it may not be the best choice going forward in official releases but for sure is the easiest/simplest solution requiring the least modifications.
Using an overloaded socket_id is especially disturbing in the dump memory config printout where the user will see multiple socket ids on a single socket system or more than the available real number of sockets, however it could still be explained in the notes and the documentation.
The allocation behavior with SOCKET_ID_ANY is also a question as I think it shouldn’t roll over to allocate memory in the external heap, we especially disabled this feature in our implementation. The reason behind is that the external memory may be a limited resource where only explicit allocation requests would be allowed and also in a multi-process environment we may not want all external heaps to be mapped into all other processes address space meaning that not all heaps are accessible from every process (I’m not sure if it is planned to be supported though but it would be an important and useful feature based on our experiences).
Anyway I think the confusion with this option comes due to the misleading “socket_id” name which would not really mean socket id anymore. So we should probably just document it as pseudo socket_id and problem solved with #4 :)
The cleanest solution in my opinion would be #1 which could be combined with #4 so that the physical socket_id could be directly passed as the heap_id (or rather call it allocation id or just location?) so that backward compatibility could also be kept.
Meaning to apply #1, change “socket_id” to “heap_id” (or “alloc_id”?) in all functions which are today expecting the socket_id to indicate the location of the allocations but keep a direct mapping from socket_id to heap_id, e.g. as Keith suggested lower range of heap_id would be equivalent to the socket_id and upper range would be the external id, this way even existing applications would still work without changing the code just by passing the socket_id in the heap_id parameter. However it is a question what would happen with the socket_id stored in data structures such as struct rte_mempool where socket_id is stored with a meaning “Socket id passed at create.”
SOCKET_ID_ANY would only mean lower range of heap_ids (physical socket ids) but not the external heap and if needed a new HEAP_ID_ANY could be introduced.
If changing heap_id to socket_id in existing functions is a big issue then one option would be to keep the original API and introduce new equivalent functions allowing to use the heap_id instead of the socket_id, e.g. rte_mempool_create would have an equivalent function to use with the heap_id instead of the socket_id.
Socket_id could then be converted to heap_id with a new function which should always be possible and can still use to direct mapping approach with lower/upper range convention.
The socket_id based functions would then just be wrappers calling the heap_id equivalent function after converting the socket_id to heap_id.
Using socket_id to indicate the location could still be relevant so the old socket_id based functions may not even need to be deprecated unless it would become hard to maintain.
Irrespective of the chosen option, external heaps should be registered/identified by name and there could be a function to fetch/lookup the id (heap_id or pseudo socket_id) by registered heap name which then could be used in the related API calls.
It would also be another work item to update all the data structures which are storing the socket_id to use it as the location identifier and I think few of them may need to store both the real physical socket_id and the heap_id, e.g. in struct lcore_config where the user may want to know the real physical socket id but want to set specific heap_id as the default allocation location for the given lcore.
> >
> > I myself still favor the second way, however there are good arguments to
> be made for each of these options.
> >
> > --
> > Thanks,
> > Anatoly
>
> Regards,
> Keith
Thanks,
Laszlo
^ permalink raw reply [relevance 0%]
* [dpdk-dev] [PATCH v2] devtools: fix symbol check for filename with space
2018-07-18 21:06 3% [dpdk-dev] [PATCH] devtools: fix symbol check for filename with space Thomas Monjalon
@ 2018-07-18 21:26 3% ` Thomas Monjalon
2018-07-19 11:14 0% ` Neil Horman
0 siblings, 1 reply; 200+ results
From: Thomas Monjalon @ 2018-07-18 21:26 UTC (permalink / raw)
To: dev; +Cc: nhorman
If the patch filename or the temporary file path have a space
in their name, the script check-symbol-change.sh does not work.
The variables for the filenames must be enclosed in quotes
in order to preserve spaces.
Fixes: 4bec48184e33 ("devtools: add checks for ABI symbol addition")
Cc: nhorman@tuxdriver.com
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
v2: one occurence of "$mapfile" was missed in v1
---
devtools/check-symbol-change.sh | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/devtools/check-symbol-change.sh b/devtools/check-symbol-change.sh
index 9952a8d66..40b72073a 100755
--- a/devtools/check-symbol-change.sh
+++ b/devtools/check-symbol-change.sh
@@ -7,7 +7,7 @@ build_map_changes()
local fname=$1
local mapdb=$2
- cat $fname | awk '
+ cat "$fname" | awk '
# Initialize our variables
BEGIN {map="";sym="";ar="";sec=""; in_sec=0; in_map=0}
@@ -71,10 +71,10 @@ build_map_changes()
print map " " sym " unknown del"
}
}
- }' > ./$mapdb
+ }' > "$mapdb"
- sort -u $mapdb > ./$mapdb.2
- mv -f $mapdb.2 $mapdb
+ sort -u "$mapdb" > "$mapdb.2"
+ mv -f "$mapdb.2" "$mapdb"
}
@@ -111,7 +111,7 @@ check_for_rule_violations()
# to be moving from an already supported
# section or its a violation
grep -q \
- "$mname $symname [^EXPERIMENTAL] del" $mapdb
+ "$mname $symname [^EXPERIMENTAL] del" "$mapdb"
if [ $? -ne 0 ]
then
echo -n "ERROR: symbol $symname "
@@ -133,7 +133,7 @@ check_for_rule_violations()
echo "gone through the deprecation process"
fi
fi
- done < $mapdb
+ done < "$mapdb"
return $ret
}
@@ -146,14 +146,14 @@ exit_code=1
clean_and_exit_on_sig()
{
- rm -f $mapfile
+ rm -f "$mapfile"
exit $exit_code
}
-build_map_changes $patch $mapfile
-check_for_rule_violations $mapfile
+build_map_changes "$patch" "$mapfile"
+check_for_rule_violations "$mapfile"
exit_code=$?
-rm -f $mapfile
+rm -f "$mapfile"
exit $exit_code
--
2.17.1
^ permalink raw reply [relevance 3%]
* [dpdk-dev] [PATCH] devtools: fix symbol check for filename with space
@ 2018-07-18 21:06 3% Thomas Monjalon
2018-07-18 21:26 3% ` [dpdk-dev] [PATCH v2] " Thomas Monjalon
0 siblings, 1 reply; 200+ results
From: Thomas Monjalon @ 2018-07-18 21:06 UTC (permalink / raw)
To: dev; +Cc: nhorman
If the patch filename or the temporary file path have a space
in their name, the script check-symbol-change.sh does not work.
The variables for the filenames must be enclosed in quotes
in order to preserve spaces.
Fixes: 4bec48184e33 ("devtools: add checks for ABI symbol addition")
Cc: nhorman@tuxdriver.com
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
devtools/check-symbol-change.sh | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/devtools/check-symbol-change.sh b/devtools/check-symbol-change.sh
index 9952a8d66..69b874ace 100755
--- a/devtools/check-symbol-change.sh
+++ b/devtools/check-symbol-change.sh
@@ -7,7 +7,7 @@ build_map_changes()
local fname=$1
local mapdb=$2
- cat $fname | awk '
+ cat "$fname" | awk '
# Initialize our variables
BEGIN {map="";sym="";ar="";sec=""; in_sec=0; in_map=0}
@@ -71,10 +71,10 @@ build_map_changes()
print map " " sym " unknown del"
}
}
- }' > ./$mapdb
+ }' > "$mapdb"
- sort -u $mapdb > ./$mapdb.2
- mv -f $mapdb.2 $mapdb
+ sort -u "$mapdb" > "$mapdb.2"
+ mv -f "$mapdb.2" "$mapdb"
}
@@ -111,7 +111,7 @@ check_for_rule_violations()
# to be moving from an already supported
# section or its a violation
grep -q \
- "$mname $symname [^EXPERIMENTAL] del" $mapdb
+ "$mname $symname [^EXPERIMENTAL] del" "$mapdb"
if [ $? -ne 0 ]
then
echo -n "ERROR: symbol $symname "
@@ -133,7 +133,7 @@ check_for_rule_violations()
echo "gone through the deprecation process"
fi
fi
- done < $mapdb
+ done < "$mapdb"
return $ret
}
@@ -150,10 +150,10 @@ clean_and_exit_on_sig()
exit $exit_code
}
-build_map_changes $patch $mapfile
-check_for_rule_violations $mapfile
+build_map_changes "$patch" "$mapfile"
+check_for_rule_violations "$mapfile"
exit_code=$?
-rm -f $mapfile
+rm -f "$mapfile"
exit $exit_code
--
2.17.1
^ permalink raw reply [relevance 3%]
* Re: [dpdk-dev] [PATCH 1/4] eventdev: add eth Tx adapter APIs
2018-07-10 12:17 3% ` Jerin Jacob
@ 2018-07-16 8:34 0% ` Rao, Nikhil
0 siblings, 0 replies; 200+ results
From: Rao, Nikhil @ 2018-07-16 8:34 UTC (permalink / raw)
To: Jerin Jacob; +Cc: olivier.matz, dev, anoob.joseph
> -----Original Message-----
> From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com]
> Sent: Tuesday, July 10, 2018 5:48 PM
> To: Rao, Nikhil <nikhil.rao@intel.com>
> Cc: olivier.matz@6wind.com; dev@dpdk.org; anoob.joseph@cavium.com
> Subject: Re: [PATCH 1/4] eventdev: add eth Tx adapter APIs
>
> ---
>
> 1) Update doc/api/doxy-api-index.md
OK.
> 2) Update lib/librte_eventdev/Makefile
> +SYMLINK-y-include += rte_event_eth_tx_adapter.h
>
This is done in patch 3 of this series.
>
> I think, the following working is _pending_
>
> 1) Update app/test-eventdev/ for Tx adapter
> 2) Update examples/eventdev_pipeline/ for Tx adapter
> 3) Add Tx adapter documentation
> 4) Add Tx adapter ops for octeontx driver
> 5) Add Tx adapter ops for dpaa driver(if need)
>
> Nikhil,
> If you are OK then Cavium would like to take up (1), (2) and (4) activities.
>
> Let me know your thoughts.
>
Fine with me.
> Since this patch set already crossed the RC1 deadline. We will complete all
> the _pending_ work and push to next-eventdev tree in the very beginning
> of
> v18.11 so that Anoob's adapter helper function work can be added v18.11.
>
>
> >
> > This patch series adds the event ethernet Tx adapter which is based on
> > a previous RFC
> > * RFCv1 - http://mails.dpdk.org/archives/dev/2018-May/102936.html
> > * RFCv2 - http://mails.dpdk.org/archives/dev/2018-June/104075.html
> >
> > RFC -> V1:
> > =========
> >
> > * Move port and tx queue id to mbuf from mbuf private area. (Jerin
> > Jacob)
> >
> > * Support for PMD transmit function. (Jerin Jacob)
> >
> > * mbuf change has been replaced with
> rte_event_eth_tx_adapter_txq_set().
> > The goal is to align with the mbuf change for a qid field.
> > (http://mails.dpdk.org/archives/dev/2018-February/090651.html). Once
> > the mbuf change is available, the function can be replaced with a
> > macro with no impact to applications.
> >
> > * Various cleanups (Jerin Jacob)
> >
> > lib/librte_eventdev/rte_event_eth_tx_adapter.h | 497
> +++++++++++++++++++++++++
> > lib/librte_mbuf/rte_mbuf.h | 4 +-
> > MAINTAINERS | 5 +
> > 3 files changed, 505 insertions(+), 1 deletion(-) create mode 100644
> > lib/librte_eventdev/rte_event_eth_tx_adapter.h
> >
> > +/**
> > + * @warning
> > + * @b EXPERIMENTAL: this API may change without prior notice
> > + *
> > + * A structure used to retrieve statistics for an eth tx adapter instance.
> > + */
> > +struct rte_event_eth_tx_adapter_stats {
> > + uint64_t tx_retry;
> > + /**< Number of transmit retries */
> > + uint64_t tx_packets;
> > + /**< Number of packets transmitted */
> > + uint64_t tx_dropped;
> > + /**< Number of packets dropped */ };
> > +
> > +/** Event Eth Tx Adapter Structure */ struct rte_event_eth_tx_adapter
> > +{
> > + uint8_t id;
> > + /**< Adapter Identifier */
> > + uint8_t eventdev_id;
> > + /**< Max mbufs processed in any service function invocation */
> > + uint32_t max_nb_tx;
> > + /**< The adapter can return early if it has processed at least
> > + * max_nb_tx mbufs. This isn't treated as a requirement; batching
> may
> > + * cause the adapter to process more than max_nb_tx mbufs.
> > + */
> > + uint32_t nb_queues;
> > + /**< Number of Tx queues in adapter */
> > + int socket_id;
> > + /**< socket id */
> > + rte_spinlock_t tx_lock;
> > + /**< Synchronization with data path */
> > + void *dev_private;
> > + /**< PMD private data */
> > + char
> mem_name[RTE_EVENT_ETH_TX_ADAPTER_SERVICE_NAME_LEN];
> > + /**< Memory allocation name */
> > + rte_event_eth_tx_adapter_conf_cb conf_cb;
> > + /** Configuration callback */
> > + void *conf_arg;
> > + /**< Configuration callback argument */
> > + uint16_t dev_count;
> > + /**< Highest port id supported + 1 */
> > + struct rte_event_eth_tx_adapter_ethdev *txa_ethdev;
> > + /**< Per ethernet device structure */
> > + struct rte_event_eth_tx_adapter_stats stats; }
> > +__rte_cache_aligned;
>
> Can you move this structure to .c file as implementation, Reasons are -
> a) It should not be under ABI deprecation
> b) INTERNAL_PORT based adapter may have different values.i.e the above
> structure is implementation defined.
>
> > +
> > +struct rte_event_eth_tx_adapters {
> > + struct rte_event_eth_tx_adapter **data; };
> > +
>
> same as above
>
> > +/* Per eth device structure */
> > +struct rte_event_eth_tx_adapter_ethdev {
> > + /* Pointer to ethernet device */
> > + struct rte_eth_dev *dev;
> > + /* Number of queues added */
> > + uint16_t nb_queues;
> > + /* PMD specific queue data */
> > + void *queues;
> > +};
>
> same as above
>
> > +
> > +extern struct rte_event_eth_tx_adapters rte_event_eth_tx_adapters;
> > +
>
> same as above
>
OK, if these fields are not going to be used within the other adapter, I will move these to the .c file.
> > +/**
> > + * @warning
> > + * @b EXPERIMENTAL: this API may change without prior notice
> > + *
> > + * Create a new event ethernet Tx adapter with the specified identifier.
> > + *
> > + * @param id
> > + * The identifier of the event ethernet Tx adapter.
> > + * @param dev_id
> > + * The event device identifier.
> > + * @param port_config
> > + * Event port configuration, the adapter uses this configuration to
> > + * create an event port if needed.
> > + * @return
> > + * - 0: Success
> > + * - <0: Error code on failure
> > + */
> > +int __rte_experimental
> > +rte_event_eth_tx_adapter_create(uint8_t id, uint8_t dev_id,
> > + struct rte_event_port_conf
> > +*port_config);
> > +
> > +/**
> > + * @warning
> > + * @b EXPERIMENTAL: this API may change without prior notice
> > + *
> > + * Create a new event ethernet Tx adapter with the specified identifier.
> > + *
> > + * @param id
> > + * The identifier of the event ethernet Tx adapter.
> > + * @param dev_id
> > + * The event device identifier.
> > + * @param conf_cb
> > + * Callback function that initalizes members of the
>
> s/initalizes/initializes
>
> > + * struct rte_event_eth_tx_adapter_conf struct passed into
> > + * it.
> > + * @param conf_arg
> > + * Argument that is passed to the conf_cb function.
> > + * @return
> > + * - 0: Success
> > + * - <0: Error code on failure
> > + */
> > +int __rte_experimental
> > +rte_event_eth_tx_adapter_create_ext(uint8_t id, uint8_t dev_id,
> > + rte_event_eth_tx_adapter_conf_cb conf_cb,
> > + void *conf_arg);
> > +
> > +/**
> > +/**
> > + * @warning
> > + * @b EXPERIMENTAL: this API may change without prior notice
> > + *
> > + * Add a Tx queue to the adapter.
> > + * A queue value of -1 is used to indicate all
> > + * queues within the device.
> > + *
> > + * @param id
> > + * Adapter identifier.
> > + * @param eth_dev_id
> > + * Ethernet Port Identifier.
> > + * @param queue
> > + * Tx queue index.
> > + * @return
> > + * - 0: Success, Queues added succcessfully.
>
> s/succcessfully/successfully
>
>
> > + * - <0: Error code on failure.
> > + */
> > +int __rte_experimental
> > +rte_event_eth_tx_adapter_queue_add(uint8_t id,
> > + uint16_t eth_dev_id,
> > + int32_t queue);
> > +
> > +/**
> > + * @warning
> > + * @b EXPERIMENTAL: this API may change without prior notice
> > + *
> > + *
> > + * Set Tx queue in the mbuf.
> > + *
> > + * @param pkt
> > + * Pointer to the mbuf.
> > + * @param queue
> > + * Tx queue index.
> > + */
> > +void __rte_experimental
> > +rte_event_eth_tx_adapter_txq_set(struct rte_mbuf *pkt, uint16_t
> > +queue);
>
> 1) Can you make this as static inline for better performance(as it is just a
> mbuf field access)?
OK.
This would also move the private definition of struct txa_mbuf_txq_id to the adapter header file, which would be needed to deprecated once the field is
available in rte_mbuf.h.
>
> 2) Please add _get function, It will be useful for application and Tx adapter
> op implementation.
>
>
OK.
> > +
> > +/**
> > + * @warning
> > + * @b EXPERIMENTAL: this API may change without prior notice
> > + *
> > + * Retrieve the adapter event port. The adapter creates an event port
> > +if
> > + * the RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT is not set in
> the
> > + * eth Tx capabilities of the event device.
> > + *
> > + * @param id
> > + * Adapter Identifier.
> > + * @param[out] event_port_id
> > + * Event port pointer.
> > + * @return
> > + * - 0: Success.
> > + * - <0: Error code on failure.
> > + */
> > +int __rte_experimental
> > +rte_event_eth_tx_adapter_event_port_get(uint8_t id, uint8_t
> > +*event_port_id);
> > +
> > +static __rte_always_inline uint16_t __rte_experimental
> > +__rte_event_eth_tx_adapter_enqueue(uint8_t id, uint8_t dev_id,
> uint8_t port_id,
> > + struct rte_event ev[],
> > + uint16_t nb_events,
> > + const event_tx_adapter_enqueue fn) {
> > + const struct rte_eventdev *dev = &rte_eventdevs[dev_id];
>
> Access to *dev twice(see below rte_event_eth_tx_adapter_enqueue())
>
> > + struct rte_event_eth_tx_adapter *txa =
> > +
> > + rte_event_eth_tx_adapters.data[id];
>
> Just like common Tx adapter implementation, We can manage ethdev
> queue to adapter mapping internally. So this deference is not required in
> fastpath.
>
> Please simply call the following, just like other eventdev ops.
> fn(dev->data->ports[port_id], ev, nb_events)
>
>
OK.
> > +
> > +#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
> > + if (id >= RTE_EVENT_ETH_TX_ADAPTER_MAX_INSTANCE ||
> > + dev_id >= RTE_EVENT_MAX_DEVS ||
> > + !rte_eventdevs[dev_id].attached) {
> > + rte_errno = -EINVAL;
> > + return 0;
> > + }
> > +
> > + if (port_id >= dev->data->nb_ports) {
> > + rte_errno = -EINVAL;
> > + return 0;
> > + }
> > +#endif
> > + return fn((void *)txa, dev, dev->data->ports[port_id], ev,
> > +nb_events); }
> > +
> > +/**
> > + * Enqueue a burst of events objects or an event object supplied in
> > +*rte_event*
> > + * structure on an event device designated by its *dev_id* through
> > +the event
> > + * port specified by *port_id*. This function is supported if the
> > +eventdev PMD
> > + * has the RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT
> capability flag set.
> > + *
> > + * The *nb_events* parameter is the number of event objects to
> > +enqueue which are
> > + * supplied in the *ev* array of *rte_event* structure.
> > + *
> > + * The rte_event_eth_tx_adapter_enqueue() function returns the
> number
> > +of
> > + * events objects it actually enqueued. A return value equal to
> > +*nb_events*
> > + * means that all event objects have been enqueued.
> > + *
> > + * @param id
> > + * The identifier of the tx adapter.
> > + * @param dev_id
> > + * The identifier of the device.
> > + * @param port_id
> > + * The identifier of the event port.
> > + * @param ev
> > + * Points to an array of *nb_events* objects of type *rte_event*
> > +structure
> > + * which contain the event object enqueue operations to be processed.
> > + * @param nb_events
> > + * The number of event objects to enqueue, typically number of
> > + * rte_event_port_enqueue_depth() available for this port.
> > + *
> > + * @return
> > + * The number of event objects actually enqueued on the event device.
> The
> > + * return value can be less than the value of the *nb_events*
> parameter when
> > + * the event devices queue is full or if invalid parameters are specified
> in a
> > + * *rte_event*. If the return value is less than *nb_events*, the
> remaining
> > + * events at the end of ev[] are not consumed and the caller has to take
> care
> > + * of them, and rte_errno is set accordingly. Possible errno values
> include:
> > + * - -EINVAL The port ID is invalid, device ID is invalid, an event's queue
> > + * ID is invalid, or an event's sched type doesn't match the
> > + * capabilities of the destination queue.
> > + * - -ENOSPC The event port was backpressured and unable to enqueue
> > + * one or more events. This error code is only applicable to
> > + * closed systems.
> > + */
> > +static inline uint16_t __rte_experimental
> > +rte_event_eth_tx_adapter_enqueue(uint8_t id, uint8_t dev_id,
> > + uint8_t port_id,
> > + struct rte_event ev[],
> > + uint16_t nb_events) {
> > + const struct rte_eventdev *dev = &rte_eventdevs[dev_id];
> > +
> > + return __rte_event_eth_tx_adapter_enqueue(id, dev_id, port_id,
> ev,
> > + nb_events,
> > + dev->txa_enqueue);
>
> As per above, Since the function call logic is simplified you can add the
> above function logic here.
>
OK, I will also delete the id parameter.
> > +}
> > +
> > index dabb12d..ab23503 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -388,6 +388,11 @@ F: lib/librte_eventdev/*crypto_adapter*
> > F: test/test/test_event_crypto_adapter.c
> > F: doc/guides/prog_guide/event_crypto_adapter.rst
> >
> > +Eventdev Ethdev Tx Adapter API - EXPERIMENTAL
> > +M: Nikhil Rao <nikhil.rao@intel.com>
> > +T: git://dpdk.org/next/dpdk-next-eventdev
> > +F: lib/librte_eventdev/*eth_tx_adapter*
>
> Add the testcase also.
>
I have made that update in patch 4 of this series.
> Overall it looks good. No more comments on specification.
>
Thanks for the review,
Nikhil
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [PATCH v9] checkpatches.sh: Add checks for ABI symbol addition
2018-06-27 18:01 6% ` [dpdk-dev] [PATCH v9] " Neil Horman
@ 2018-07-15 23:12 4% ` Thomas Monjalon
0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2018-07-15 23:12 UTC (permalink / raw)
To: Neil Horman
Cc: dev, john.mcnamara, bruce.richardson, Ferruh Yigit, Stephen Hemminger
27/06/2018 20:01, Neil Horman:
> Recently, some additional patches were added to allow for programmatic
> marking of C symbols as experimental. The addition of these markers is
> dependent on the manual addition of exported symbols to the EXPERIMENTAL
> section of the corresponding libraries version map file. The consensus
> on review is that, in addition to mandating the addition of symbols to
> the EXPERIMENTAL version in the map, we need a mechanism to enforce our
> documented process of mandating that addition when they are introduced.
> To that end, I am proposing this change. It is an addition to the
> checkpatches script, which scan incoming patches for additions and
> removals of symbols to the map file, and warns the user appropriately
>
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> CC: thomas@monjalon.net
> CC: john.mcnamara@intel.com
> CC: bruce.richardson@intel.com
> CC: Ferruh Yigit <ferruh.yigit@intel.com>
> CC: Stephen Hemminger <stephen@networkplumber.org>
>
> ---
> + tmpinput=$(mktemp checkpatches.XXXXXX)
> + git format-patch --find-renames \
> + --no-stat --stdout -1 $commit > ./$tmpinput
In case $tmpinput is an absolute path (like in /tmp),
we must not prepend it with ./
I fix it when applying.
Applied, thanks
^ permalink raw reply [relevance 4%]
* Re: [dpdk-dev] DPDK 18.05 only works with up to 4 NUMAs systems
2018-06-28 8:42 3% ` Burakov, Anatoly
@ 2018-07-14 9:44 0% ` Kumar, Ravi1
0 siblings, 0 replies; 200+ results
From: Kumar, Ravi1 @ 2018-07-14 9:44 UTC (permalink / raw)
To: Burakov, Anatoly, dev
>On 28-Jun-18 8:03 AM, Kumar, Ravi1 wrote:
>>> On 22-Jun-18 5:37 PM, Kumar, Ravi1 wrote:
>>>> Hi,
>>>>
>>>> As the memory subsystem in DPDK 18.05 is reworked, it has introduced a problem for AMD EPYC 2P platforms.
>>>> The issue is that DPDK 18.05 only works with up to 4 NUMAs. For AMD EPYC 2P platforms, DPDK now only works with P0 (NUMA 0-3) and does not work with P1 (NUMA 4-7).
>>>>
>>>> The problem can be fixed by reducing some of the default settings of the memory subsystem.
>>>>
>>>> To solve this issue:
>>>> - We can create our own config file for our integrated 10G NIC, that is for amd_xgbe PMD. This will make amd_xgbe immune to this problem.
>>>> - However, when any other NIC (Intel, Mellanox, Cavium or Broadcom etc.) is plugged into NUMA 4-7, the problem will still be exposed.
>>>> - If we only fix it in "config/common_base", it will cover all cases.
>>>>
>>>> Our current workaround is:
>>>> Edit config file "./config/common_base" and change the following line
>>>> CONFIG_RTE_MAX_MEM_MB_PER_TYPE=131072
>>>> TO
>>>> CONFIG_RTE_MAX_MEM_MB_PER_TYPE=65536
>>>>
>>>> Any better solution for this issue is welcome.
>>>>
>>>> We would appreciate if this issue can be fixed in the next release (18.08) so the STOCK version of DPDK works on AMD EPYC 2P platforms.
>>>>
>>>> Regards,
>>>> Ravi
>>>>
>>>
>>> Hi Ravi,
>>>
>>> What is the reason behind this limitation? Is it too much virtual memory being preallocated?
>>>
>>> --
>>> Thanks,
>>> Anatoly
>>>
>> Hi Anatoly,
>>
>> We believe this is true. By default, too much virtual memory is being preallocated. The result is it can only support up to 4 NUMAs.
>>
>> Our workaround is to reduce the amount of preallocated virtual memory by half, so to support up to 8 NUMAs.
>>
>> Regards,
>> Ravi
>>
>
>I assume you see a bunch of failed mmap() calls with ENOMEM?
>
>In general, changing base config that way is an OK change, and it won't even be an ABI break since this memory is allocated at runtime. I just want to make sure that we fix the underlying problem, rather than the symptom.
>
>--
>Thanks,
>Anatoly
Hi Anatoly,
Sorry for the late reply. I have been away and took me some time to get the logs.
Here are some more details.
Dpdk-18.05/config/common_base contains the constants used to configure the memory subsystem.
CONFIG_RTE_MAX_NUMA_NODES=8
CONFIG_RTE_MAX_MEMSEG_LISTS=64
# each memseg list will be limited to either RTE_MAX_MEMSEG_PER_LIST pages
# or RTE_MAX_MEM_MB_PER_LIST megabytes worth of memory, whichever is smaller
CONFIG_RTE_MAX_MEMSEG_PER_LIST=8192
CONFIG_RTE_MAX_MEM_MB_PER_LIST=32768
# a "type" is a combination of page size and NUMA node. total number of memseg
# lists per type will be limited to either RTE_MAX_MEMSEG_PER_TYPE pages (split
# over multiple lists of RTE_MAX_MEMSEG_PER_LIST pages), or
# RTE_MAX_MEM_MB_PER_TYPE megabytes of memory (split over multiple lists of
# RTE_MAX_MEM_MB_PER_LIST), whichever is smaller
CONFIG_RTE_MAX_MEMSEG_PER_TYPE=32768
CONFIG_RTE_MAX_MEM_MB_PER_TYPE=131072
# global maximum usable amount of VA, in megabytes
CONFIG_RTE_MAX_MEM_MB=524288
From the documentation.
Dpdk-18.05/doc/guides/prog_guide/env_abstraction_layer.rst
All possible virtual memory space that can ever be used for hugepage mapping in a DPDK process is preallocated at startup, thereby placing an upper limit on how much memory a DPDK application can have. DPDK memory is stored in segment lists, each segment is strictly one physical page. It is possible to change the amount of virtual memory being preallocated at startup by editing the following config variables:
* ``CONFIG_RTE_MAX_MEMSEG_LISTS`` controls how many segment lists can DPDK have
* ``CONFIG_RTE_MAX_MEM_MB_PER_LIST`` controls how much megabytes of memory each segment list can address
* ``CONFIG_RTE_MAX_MEMSEG_PER_LIST`` controls how many segments each segment can have
* ``CONFIG_RTE_MAX_MEMSEG_PER_TYPE`` controls how many segments each memory typ can have (where "type" is defined as "page size + NUMA node" combination)
* ``CONFIG_RTE_MAX_MEM_MB_PER_TYPE`` controls how much megabytes of memory each memory type can address
* ``CONFIG_RTE_MAX_MEM_MB`` places a global maximum on the amount of memory DPDK can reserve
Normally, these options do not need to be changed.
.. note::
Preallocated virtual memory is not to be confused with preallocated hugepage memory! All DPDK processes preallocate virtual memory at startup. Hugepages can later be mapped into that preallocated VA space (if dynamic memory mode is enabled), and can optionally be mapped into it at startup.
Memory setup with 2M pages works with the default configuration. With the default configuration and 2M hugepages
1. Total amount of memory for each NUMA zone does not exceed 128G (CONFIG_RTE_MAX_MEM_MB_PER_TYPE).
2. Total number of segment lists per NUMA is limited to 32768 (CONFIG_RTE_MAX_MEMSEG_PER_TYPE). This constraint is met for each numa zone. This is the limiting factor for memory per numa with 2M hugepages and the default configuration.
3. The data structures are capable of supporting 64G of memory for each numa zone (32768 segments * 2M hugepagesize).
4. 8 NUMA zones * 64G = 512G. Therefore the total for all numa zones does not exceed 512G (CONFIG_RTE_MAX_MEM_MB).
5. Resources are capable of allocating up to 64G per NUMA zone. Things will work as long as there are enough 2M hugepages to cover the memory needs of the DPDK applications AND no memory zone needs more than 64G.
With the default configuration and 1G hugepages
1. Total amount of memory for each NUMA zone is limited to 128G (CONFIG_RTE_MAX_MEM_MB_PER_TYPE). This constraint is hit for each numa zone. This is the limiting factor for memory per numa.
2. Total number of segment lists (128) does not exceed 32768 (CONFIG_RTE_MAX_MEMSEG_PER_TYPE). There are 128 segments per NUMA.
3. The data structures are capable of supporting 128G of memory for each numa zone (128 segments * 1G hugepagesize). However, only the first four NUMA zones get initialized before we hit CONFIG_RTE_MAX_MEM_MB (512G).
4. The total for all numa zones is limited to 512G (CONFIG_RTE_MAX_MEM_MB). This limit is hit after configuring the first four NUMA zones (4 x 128G = 512G). The rest of the NUMA zones cannot allocate memory.
Apparently, it is intended to support max 8 NUMAs by default (CONFIG_RTE_MAX_NUMA_NODES=8), but when 1G hugepages are use, it can only support up to 4 NUMAs.
Possible workarounds when using 1G hugepages:
1. Decrease CONFIG_RTE_MAX_MEM_MB_PER_TYPE to 65536 (limit of 64G per NUMA zone). This is probably the best option unless you need a lot of memory in any given NUMA.
2. Or, increase CONFIG_RTE_MAX_MEM_MB to 1048576.
With default settings, I got the following errors.
amd@amd:~/dpdk/app/test-pmd$ sudo -E ./testpmd -c 0x7 -n 4 -- -i --portmask=0x3 --nb-cores=2
EAL: Detected 64 lcore(s)
EAL: Detected 8 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Probing VFIO support...
EAL: PCI device 0000:01:00.0 on NUMA socket 0
EAL: probe driver: 8086:1563 net_ixgbe
EAL: PCI device 0000:01:00.1 on NUMA socket 0
EAL: probe driver: 8086:1563 net_ixgbe
EAL: PCI device 0000:13:00.0 on NUMA socket 1
EAL: probe driver: 8086:10d3 net_e1000_em
EAL: PCI device 0000:31:00.0 on NUMA socket 3
EAL: probe driver: 8086:1563 net_ixgbe
EAL: PCI device 0000:31:00.1 on NUMA socket 3
EAL: probe driver: 8086:1563 net_ixgbe
Interactive-mode selected
testpmd: create a new mbuf pool <mbuf_pool_socket_0>: n=163456, size=2176, socket=0
testpmd: preferred mempool ops selected: ring_mp_mc
testpmd: create a new mbuf pool <mbuf_pool_socket_1>: n=163456, size=2176, socket=1
testpmd: preferred mempool ops selected: ring_mp_mc
testpmd: create a new mbuf pool <mbuf_pool_socket_2>: n=163456, size=2176, socket=2
testpmd: preferred mempool ops selected: ring_mp_mc
testpmd: create a new mbuf pool <mbuf_pool_socket_3>: n=163456, size=2176, socket=3
testpmd: preferred mempool ops selected: ring_mp_mc
testpmd: create a new mbuf pool <mbuf_pool_socket_4>: n=163456, size=2176, socket=4
testpmd: preferred mempool ops selected: ring_mp_mc
EAL: Error - exiting with code: 1
Cause: Creation of mbuf pool for socket 4 failed: Cannot allocate memory
amd@amd:~/dpdk/app/test-pmd$
After changing CONFIG_RTE_MAX_MEM_MB_PER_TYPE=131072 to CONFIG_RTE_MAX_MEM_MB_PER_TYPE=65536, the error is gone.
amd@amd:~/dpdk/app/test-pmd$ sudo -E ./testpmd -c 0x7 -n 4 -- -i --portmask=0x3 --nb-cores=2
EAL: Detected 64 lcore(s)
EAL: Detected 8 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Probing VFIO support...
EAL: PCI device 0000:01:00.0 on NUMA socket 0
EAL: probe driver: 8086:1563 net_ixgbe
EAL: PCI device 0000:01:00.1 on NUMA socket 0
EAL: probe driver: 8086:1563 net_ixgbe
EAL: PCI device 0000:13:00.0 on NUMA socket 1
EAL: probe driver: 8086:10d3 net_e1000_em
EAL: PCI device 0000:31:00.0 on NUMA socket 3
EAL: probe driver: 8086:1563 net_ixgbe
EAL: PCI device 0000:31:00.1 on NUMA socket 3
EAL: probe driver: 8086:1563 net_ixgbe
Interactive-mode selected
testpmd: create a new mbuf pool <mbuf_pool_socket_0>: n=163456, size=2176, socket=0
testpmd: preferred mempool ops selected: ring_mp_mc
testpmd: create a new mbuf pool <mbuf_pool_socket_1>: n=163456, size=2176, socket=1
testpmd: preferred mempool ops selected: ring_mp_mc
testpmd: create a new mbuf pool <mbuf_pool_socket_2>: n=163456, size=2176, socket=2
testpmd: preferred mempool ops selected: ring_mp_mc
testpmd: create a new mbuf pool <mbuf_pool_socket_3>: n=163456, size=2176, socket=3
testpmd: preferred mempool ops selected: ring_mp_mc
testpmd: create a new mbuf pool <mbuf_pool_socket_4>: n=163456, size=2176, socket=4
testpmd: preferred mempool ops selected: ring_mp_mc
testpmd: create a new mbuf pool <mbuf_pool_socket_5>: n=163456, size=2176, socket=5
testpmd: preferred mempool ops selected: ring_mp_mc
testpmd: create a new mbuf pool <mbuf_pool_socket_6>: n=163456, size=2176, socket=6
testpmd: preferred mempool ops selected: ring_mp_mc
testpmd: create a new mbuf pool <mbuf_pool_socket_7>: n=163456, size=2176, socket=7
testpmd: preferred mempool ops selected: ring_mp_mc
Configuring Port 0 (socket 0)
Port 0: A0:36:9F:F7:94:68
Configuring Port 1 (socket 0)
Port 1: A0:36:9F:F7:94:69
Checking link statuses...
Done
testpmd>
Regards,
Ravi
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [RFC 00/11] Support externally allocated memory in DPDK
2018-07-13 17:10 2% ` Burakov, Anatoly
@ 2018-07-13 17:56 0% ` Wiles, Keith
2018-07-19 10:58 0% ` László Vadkerti
0 siblings, 1 reply; 200+ results
From: Wiles, Keith @ 2018-07-13 17:56 UTC (permalink / raw)
To: Burakov, Anatoly
Cc: dev, srinath.mannam, scott.branden, ajit.khaparde,
Thomas Monjalon, Shreyansh Jain, jerin.jacob
> On Jul 13, 2018, at 12:10 PM, Burakov, Anatoly <anatoly.burakov@intel.com> wrote:
>
> On 06-Jul-18 2:17 PM, Anatoly Burakov wrote:
>> This is a proposal to enable using externally allocated memory
>> in DPDK.
>> In a nutshell, here is what is being done here:
>> - Index malloc heaps by NUMA node index, rather than NUMA node itself
>> - Add identifier string to malloc heap, to uniquely identify it
>> - Allow creating named heaps and add/remove memory to/from those heaps
>> - Allocate memseg lists at runtime, to keep track of IOVA addresses
>> of externally allocated memory
>> - If IOVA addresses aren't provided, use RTE_BAD_IOVA
>> - Allow malloc and memzones to allocate from named heaps
>> The responsibility to ensure memory is accessible before using it is
>> on the shoulders of the user - there is no checking done with regards
>> to validity of the memory (nor could there be...).
>> The following limitations are present:
>> - No multiprocess support
>> - No thread safety
>> There is currently no way to allocate memory during initialization
>> stage, so even if multiprocess support is added, it is not guaranteed
>> to work because of underlying issues with mapping fbarrays in
>> secondary processes. This is not an issue in single process scenario,
>> but it may be an issue in a multiprocess scenario in case where
>> primary doesn't intend to share the externally allocated memory, yet
>> adding such memory could fail because some other process failed to
>> attach to this shared memory when it wasn't needed.
>> Anatoly Burakov (11):
>> mem: allow memseg lists to be marked as external
>> eal: add function to rerieve socket index by socket ID
>> malloc: index heaps using heap ID rather than NUMA node
>> malloc: add name to malloc heaps
>> malloc: enable retrieving statistics from named heaps
>> malloc: enable allocating from named heaps
>> malloc: enable creating new malloc heaps
>> malloc: allow adding memory to named heaps
>> malloc: allow removing memory from named heaps
>> malloc: allow destroying heaps
>> memzone: enable reserving memory from named heaps
>> config/common_base | 1 +
>> lib/librte_eal/common/eal_common_lcore.c | 15 +
>> lib/librte_eal/common/eal_common_memory.c | 51 +++-
>> lib/librte_eal/common/eal_common_memzone.c | 283 ++++++++++++++----
>> .../common/include/rte_eal_memconfig.h | 5 +-
>> lib/librte_eal/common/include/rte_lcore.h | 19 +-
>> lib/librte_eal/common/include/rte_malloc.h | 158 +++++++++-
>> .../common/include/rte_malloc_heap.h | 2 +
>> lib/librte_eal/common/include/rte_memzone.h | 183 +++++++++++
>> lib/librte_eal/common/malloc_heap.c | 277 +++++++++++++++--
>> lib/librte_eal/common/malloc_heap.h | 26 ++
>> lib/librte_eal/common/rte_malloc.c | 197 +++++++++++-
>> lib/librte_eal/rte_eal_version.map | 10 +
>> 13 files changed, 1118 insertions(+), 109 deletions(-)
>
> So, now that the RFC is out, i would like to ask a general question.
>
> One other thing that this patchset is missing, is the ability for data structures (e.g. hash, mempool, etc.) to be allocated from external heaps. Currently, we can kinda sorta do that with various _init() API's (initializing a data structure over already allocated memzone), but this is not ideal and is a hassle for anyone using external memory in DPDK.
>
> There are basically four ways to approach this problem (that i can see).
>
> First way is to change "socket ID" to mean "heap ID" everywhere. This has an upside of having a consistent API to allocate from internal and external heaps, with little to no API additions, only internal changes to account for the fact that "socket ID" is now "heap ID".
>
> However, there is a massive downside to this approach: it is a *giant* API change, and it's also a giant *ABI-compatible* API change. Meaning, replacing socket ID with heap ID will not cause compile failures for old code, which would result in many subtle bugs in already existing codebases. So, while in the perfect world this would've been my preferred approach, realistically i think this is a very, very bad idea.
>
> Second one is to add a separate "heap name" API's to everything. This has an upside of clean separation between allocation from internal and external heaps. (well, whether it's an upside is debatable...) This is the approach i expected to take when i was creating this patchset.
>
> The downside is that we have to add new API's to every library and every DPDK data structure, to allow explicit allocation from external heaps. We will have to maintain both, and things like hardware drivers will need to have a way to indicate the need to allocate things from a particular external heap.
>
> The third way is to expose the "heap ID" externally, and allow a single, unified API to reserve memory. That is, create an API that would map either a NUMA node ID or a heap name to an ID, and allow reserving memory through that ID regardless of whether it's internal or external memory. This would also allow to gradually phase out socket-based ID's in favor of heap ID API, should we choose to do so.
>
> The downside for this is, it adds a layer of indirection between socket ID and reserving memory on a particular NUMA node, and it makes it hard to produce a single value of "heap ID" in such a way as to replicate current functionality of allocating with SOCKET_ID_ANY. Most likely user will have to explicitly try to allocate on all sockets, unless we keep old API's around in parallel.
>
> Finally, a fourth way would be to abuse the socket ID to also mean something else, which is an approach i've seen numerous times already, and one that i don't like. We could register new heaps as a new, fake socket ID, and use that to address external heaps (each heap would get its own socket). So, keep current socket ID behavior, but for non-existent sockets it would be possible to be registered as a fake socket pointing to an external heap.
>
> The upside for this approach would be that no API changes are required whatsoever to existing libraries - this scheme is compatible with both internal and external heaps without adding a separate API.
>
> The downside is bad semantics - "special" sockets, handling of SOCKET_ID_ANY, handling of "invalid socket" vs. "invalid socket that happens to correspond to an existing external heap", and many other things that can be confusing. I don't like this option, but it's an option :)
>
> Thoughts? Comments?
#1 is super clean, but very disruptive to everyone. Very Bad IMO
#2 is also clean, but adds a lot of new APIs that everyone needs to use or at least in the external heap cases.
#3 not sure I fully understand it, but reproducing heap IDs for testing is a problem and requires new/old APIs
#4 Very easy to add, IMO it is clean and very small disruption to developers. It does require the special handling, but I feel it is OK and can be explained in the docs. Having a socket id as an ‘int’ gives us a lot room e.g. id < 64K is normal socket and > 64K is external id.
My vote would be #4, as it seems the least risk and work. :-)
>
> I myself still favor the second way, however there are good arguments to be made for each of these options.
>
> --
> Thanks,
> Anatoly
Regards,
Keith
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [RFC 00/11] Support externally allocated memory in DPDK
@ 2018-07-13 17:10 2% ` Burakov, Anatoly
2018-07-13 17:56 0% ` Wiles, Keith
0 siblings, 1 reply; 200+ results
From: Burakov, Anatoly @ 2018-07-13 17:10 UTC (permalink / raw)
To: dev
Cc: srinath.mannam, scott.branden, ajit.khaparde, Thomas Monjalon,
Shreyansh Jain, jerin.jacob, Keith Wiles
On 06-Jul-18 2:17 PM, Anatoly Burakov wrote:
> This is a proposal to enable using externally allocated memory
> in DPDK.
>
> In a nutshell, here is what is being done here:
>
> - Index malloc heaps by NUMA node index, rather than NUMA node itself
> - Add identifier string to malloc heap, to uniquely identify it
> - Allow creating named heaps and add/remove memory to/from those heaps
> - Allocate memseg lists at runtime, to keep track of IOVA addresses
> of externally allocated memory
> - If IOVA addresses aren't provided, use RTE_BAD_IOVA
> - Allow malloc and memzones to allocate from named heaps
>
> The responsibility to ensure memory is accessible before using it is
> on the shoulders of the user - there is no checking done with regards
> to validity of the memory (nor could there be...).
>
> The following limitations are present:
>
> - No multiprocess support
> - No thread safety
>
> There is currently no way to allocate memory during initialization
> stage, so even if multiprocess support is added, it is not guaranteed
> to work because of underlying issues with mapping fbarrays in
> secondary processes. This is not an issue in single process scenario,
> but it may be an issue in a multiprocess scenario in case where
> primary doesn't intend to share the externally allocated memory, yet
> adding such memory could fail because some other process failed to
> attach to this shared memory when it wasn't needed.
>
> Anatoly Burakov (11):
> mem: allow memseg lists to be marked as external
> eal: add function to rerieve socket index by socket ID
> malloc: index heaps using heap ID rather than NUMA node
> malloc: add name to malloc heaps
> malloc: enable retrieving statistics from named heaps
> malloc: enable allocating from named heaps
> malloc: enable creating new malloc heaps
> malloc: allow adding memory to named heaps
> malloc: allow removing memory from named heaps
> malloc: allow destroying heaps
> memzone: enable reserving memory from named heaps
>
> config/common_base | 1 +
> lib/librte_eal/common/eal_common_lcore.c | 15 +
> lib/librte_eal/common/eal_common_memory.c | 51 +++-
> lib/librte_eal/common/eal_common_memzone.c | 283 ++++++++++++++----
> .../common/include/rte_eal_memconfig.h | 5 +-
> lib/librte_eal/common/include/rte_lcore.h | 19 +-
> lib/librte_eal/common/include/rte_malloc.h | 158 +++++++++-
> .../common/include/rte_malloc_heap.h | 2 +
> lib/librte_eal/common/include/rte_memzone.h | 183 +++++++++++
> lib/librte_eal/common/malloc_heap.c | 277 +++++++++++++++--
> lib/librte_eal/common/malloc_heap.h | 26 ++
> lib/librte_eal/common/rte_malloc.c | 197 +++++++++++-
> lib/librte_eal/rte_eal_version.map | 10 +
> 13 files changed, 1118 insertions(+), 109 deletions(-)
>
So, now that the RFC is out, i would like to ask a general question.
One other thing that this patchset is missing, is the ability for data
structures (e.g. hash, mempool, etc.) to be allocated from external
heaps. Currently, we can kinda sorta do that with various _init() API's
(initializing a data structure over already allocated memzone), but this
is not ideal and is a hassle for anyone using external memory in DPDK.
There are basically four ways to approach this problem (that i can see).
First way is to change "socket ID" to mean "heap ID" everywhere. This
has an upside of having a consistent API to allocate from internal and
external heaps, with little to no API additions, only internal changes
to account for the fact that "socket ID" is now "heap ID".
However, there is a massive downside to this approach: it is a *giant*
API change, and it's also a giant *ABI-compatible* API change. Meaning,
replacing socket ID with heap ID will not cause compile failures for old
code, which would result in many subtle bugs in already existing
codebases. So, while in the perfect world this would've been my
preferred approach, realistically i think this is a very, very bad idea.
Second one is to add a separate "heap name" API's to everything. This
has an upside of clean separation between allocation from internal and
external heaps. (well, whether it's an upside is debatable...) This is
the approach i expected to take when i was creating this patchset.
The downside is that we have to add new API's to every library and every
DPDK data structure, to allow explicit allocation from external heaps.
We will have to maintain both, and things like hardware drivers will
need to have a way to indicate the need to allocate things from a
particular external heap.
The third way is to expose the "heap ID" externally, and allow a single,
unified API to reserve memory. That is, create an API that would map
either a NUMA node ID or a heap name to an ID, and allow reserving
memory through that ID regardless of whether it's internal or external
memory. This would also allow to gradually phase out socket-based ID's
in favor of heap ID API, should we choose to do so.
The downside for this is, it adds a layer of indirection between socket
ID and reserving memory on a particular NUMA node, and it makes it hard
to produce a single value of "heap ID" in such a way as to replicate
current functionality of allocating with SOCKET_ID_ANY. Most likely user
will have to explicitly try to allocate on all sockets, unless we keep
old API's around in parallel.
Finally, a fourth way would be to abuse the socket ID to also mean
something else, which is an approach i've seen numerous times already,
and one that i don't like. We could register new heaps as a new, fake
socket ID, and use that to address external heaps (each heap would get
its own socket). So, keep current socket ID behavior, but for
non-existent sockets it would be possible to be registered as a fake
socket pointing to an external heap.
The upside for this approach would be that no API changes are required
whatsoever to existing libraries - this scheme is compatible with both
internal and external heaps without adding a separate API.
The downside is bad semantics - "special" sockets, handling of
SOCKET_ID_ANY, handling of "invalid socket" vs. "invalid socket that
happens to correspond to an existing external heap", and many other
things that can be confusing. I don't like this option, but it's an
option :)
Thoughts? Comments?
I myself still favor the second way, however there are good arguments to
be made for each of these options.
--
Thanks,
Anatoly
^ permalink raw reply [relevance 2%]
* [dpdk-dev] [PATCH v2] eal: move runtime config file to new location
2018-05-31 15:35 5% [dpdk-dev] [PATCH] eal: move runtime config file to new location Anatoly Burakov
@ 2018-07-13 10:44 9% ` Anatoly Burakov
0 siblings, 0 replies; 200+ results
From: Anatoly Burakov @ 2018-07-13 10:44 UTC (permalink / raw)
To: dev
Cc: Neil Horman, John McNamara, Marko Kovacevic, thomas,
bruce.richardson, harry.van.haaren
As per deprecation notice [1], move DPDK runtime config to default
DPDK runtime data location. Also, remove the deprecation notice and
update release notes to indicate the changes.
[1] http://dpdk.org/dev/patchwork/patch/40418/
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
doc/guides/rel_notes/deprecation.rst | 10 ----------
doc/guides/rel_notes/release_18_08.rst | 7 +++++++
lib/librte_eal/common/eal_filesystem.h | 10 +++-------
3 files changed, 10 insertions(+), 17 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 5de59833d..14714fe94 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -8,16 +8,6 @@ API and ABI deprecation notices are to be posted here.
Deprecation Notices
-------------------
-* eal: DPDK runtime configuration file (located at
- ``/var/run/.<prefix>_config``) will be moved. The new path will be as follows:
-
- - if DPDK is running as root, path will be set to
- ``/var/run/dpdk/<prefix>/config``
- - if DPDK is not running as root and $XDG_RUNTIME_DIR is set, path will be set
- to ``$XDG_RUNTIME_DIR/dpdk/<prefix>/config``
- - if DPDK is not running as root and $XDG_RUNTIME_DIR is not set, path will be
- set to ``/tmp/dpdk/<prefix>/config``
-
* eal: both declaring and identifying devices will be streamlined in v18.08.
New functions will appear to query a specific port from buses, classes of
device and device drivers. Device declaration will be made coherent with the
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index d41546c27..ebe7e6bd6 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -129,6 +129,13 @@ API Changes
- ``RTE_COMP_FF_OOP_SGL_IN_LB_OUT``
- ``RTE_COMP_FF_OOP_LB_IN_SGL_OUT``
+* Path to runtime config file has changed. The new path is determined as
+ follows:
+ - If DPDK is running as root, ``/var/run/dpdk/<prefix>/config``
+ - If DPDK is not running as root:
+ - If ``$XDG_RUNTIME_DIR`` is set, ``${XDG_RUNTIME_DIR}/dpdk/<prefix>/config``
+ - Otherwise, ``/tmp/dpdk/<prefix>/config``
+
ABI Changes
-----------
diff --git a/lib/librte_eal/common/eal_filesystem.h b/lib/librte_eal/common/eal_filesystem.h
index 364f38d13..de05febf4 100644
--- a/lib/librte_eal/common/eal_filesystem.h
+++ b/lib/librte_eal/common/eal_filesystem.h
@@ -12,7 +12,6 @@
#define EAL_FILESYSTEM_H
/** Path of rte config file. */
-#define RUNTIME_CONFIG_FMT "%s/.%s_config"
#include <stdint.h>
#include <limits.h>
@@ -30,17 +29,14 @@ eal_create_runtime_dir(void);
const char *
eal_get_runtime_dir(void);
+#define RUNTIME_CONFIG_FNAME "config"
static inline const char *
eal_runtime_config_path(void)
{
static char buffer[PATH_MAX]; /* static so auto-zeroed */
- const char *directory = "/var/run";
- const char *home_dir = getenv("HOME");
- if (getuid() != 0 && home_dir != NULL)
- directory = home_dir;
- snprintf(buffer, sizeof(buffer) - 1, RUNTIME_CONFIG_FMT, directory,
- internal_config.hugefile_prefix);
+ snprintf(buffer, sizeof(buffer) - 1, "%s/%s", eal_get_runtime_dir(),
+ RUNTIME_CONFIG_FNAME);
return buffer;
}
--
2.17.1
^ permalink raw reply [relevance 9%]
* [dpdk-dev] [PATCH v2 8/9] doc: add deprecation notice for EAL command line options
2018-06-01 17:15 5% ` [dpdk-dev] [PATCH 8/9] doc: add deprecation notice for EAL command line options Anatoly Burakov
@ 2018-07-13 10:27 5% ` Anatoly Burakov
1 sibling, 0 replies; 200+ results
From: Anatoly Burakov @ 2018-07-13 10:27 UTC (permalink / raw)
To: dev
Cc: Neil Horman, John McNamara, Marko Kovacevic, ray.kinsella,
kuralamudhan.ramakrishnan, louise.m.daly, bruce.richardson,
ferruh.yigit, konstantin.ananyev, thomas
Options --no-shconf and --huge-unlink will be removed, and
replaced with --in-memory option, which will be a superset
of these two, and an offially support method to run DPDK
entirely in memory.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
Notes:
RFC->v1:
- Add this patch
doc/guides/rel_notes/deprecation.rst | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 5de59833d..dd1b5c5d8 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -8,6 +8,11 @@ API and ABI deprecation notices are to be posted here.
Deprecation Notices
-------------------
+* eal: command-line options ``--no-shconf`` and ``--huge-unlink`` will be
+ removed, and replaced with a single option ``--in-memory``, which will
+ enable DPDK to operate entirely in memory, without creating any files on any
+ filesystems.
+
* eal: DPDK runtime configuration file (located at
``/var/run/.<prefix>_config``) will be moved. The new path will be as follows:
--
2.17.1
^ permalink raw reply [relevance 5%]
* Re: [dpdk-dev] [PATCH 1/2] examples/ethtool: add to meson build
2018-07-12 7:54 3% ` Thomas Monjalon
@ 2018-07-12 10:46 0% ` Bruce Richardson
0 siblings, 0 replies; 200+ results
From: Bruce Richardson @ 2018-07-12 10:46 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev
On Thu, Jul 12, 2018 at 09:54:32AM +0200, Thomas Monjalon wrote:
> 29/03/2018 16:04, Bruce Richardson:
> > Add the ethtool example to the meson build. This example is more
> > complicated than the previously added ones as it has files in two
> > subdirectories. An ethtool "wrapper lib" in one, used by the actual
> > example "ethtool app" in the other.
> >
> > Rather than using recursive operation, like is done with the makefiles,
> > we instead can just special-case the building of the library from the
> > single .c file, and then use that as a dependency when building the app
> > proper.
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
>
> It does not compile because of experimental function:
> examples/ethtool/lib/rte_ethtool.c:186:2: error:
> ‘rte_eth_dev_get_module_info’ is deprecated: Symbol is not yet part of stable ABI
>
Ok. This set is fairly old, and I think I've found other issues with it
since. I suggest we drop this set for 18.08 consideration.
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [PATCH 1/2] examples/ethtool: add to meson build
@ 2018-07-12 7:54 3% ` Thomas Monjalon
2018-07-12 10:46 0% ` Bruce Richardson
0 siblings, 1 reply; 200+ results
From: Thomas Monjalon @ 2018-07-12 7:54 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev
29/03/2018 16:04, Bruce Richardson:
> Add the ethtool example to the meson build. This example is more
> complicated than the previously added ones as it has files in two
> subdirectories. An ethtool "wrapper lib" in one, used by the actual
> example "ethtool app" in the other.
>
> Rather than using recursive operation, like is done with the makefiles,
> we instead can just special-case the building of the library from the
> single .c file, and then use that as a dependency when building the app
> proper.
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
It does not compile because of experimental function:
examples/ethtool/lib/rte_ethtool.c:186:2: error:
‘rte_eth_dev_get_module_info’ is deprecated: Symbol is not yet part of stable ABI
^ permalink raw reply [relevance 3%]
* [dpdk-dev] [PATCH v13 00/19] enable hotplug on multi-process
` (11 preceding siblings ...)
2018-07-12 1:18 1% ` [dpdk-dev] [PATCH v12 00/19] enable hotplug on multi-process Qi Zhang
@ 2018-07-12 1:18 1% ` Qi Zhang
12 siblings, 0 replies; 200+ results
From: Qi Zhang @ 2018-07-12 1:18 UTC (permalink / raw)
To: thomas, anatoly.burakov
Cc: konstantin.ananyev, dev, bruce.richardson, ferruh.yigit,
benjamin.h.shelton, narender.vangati, Qi Zhang
v13:
- Since rte_eth_dev_attach/rte_eth_dev_detach will be deprecated,
so, modify the sample code to use rte_eal_hotplug_add and
rte_eal_hotplug_remove to attach/detach device.
v12:
- fix return value in eal_dev_hotplug_request_to_primary.
- add more error log in rte_eal_hotplug_add.
- fix return value in rte_eal_hotplug_add and rte_eal_hotplug_remove
any failure due to IPC error will return -ENOMSG, but not -1.
- remove unnecessary changes from previous rework.
v11:
- move out common code from pci_vfio_unmap_secondary and
pci_vfio_unmap_primary.
- move RTE_BUS_NAME_MAX_LEN and RTE_DEV_ARGS_MAX_LEN into hotplug_mp.h
- fix reply check in eal_dev_hotplug_request_to_primary.
- move skeleton code for attaching device from secondary from patch 6/19
to patch 5/19 to improve code readability.
v10:
- Since hotplug add/remove a vdev on a secondary process will sync on
all processes now, it is not necessary to support private vdev for
a secondary process which is identified by a not-NULL devargs in
"--vdev". So re-work on all vdev driver changes to simpified device
probe scenario on a secondary process, devargs will be ignored on
secondary process now.
- fix lisence header in example/multi-process/hotplug_mp/Makefile.
v9:
- Move hotplug IPC from rte_eth_dev_attach/rte_eth_dev_detach to
eal_dev_hotplug_add and eal_dev_hotplug_remove, now all kinds of
devices will be synced in multi-process.
- Fix couple issue when a device is bound to vfio.
1) The device can't be detached clearly in a secondary process, which
also cause it can't be attached again, due to the error that
/dev/vfio/<group_fd> is still busy.(see Patch 3/19 and 4/19)
2) repeat detach/attach device will cause "cannot find TAILQ entry
for PCI device" due to incorrect PCI address compare.
(see patch 2/19).
- Removed device lock.
- Removed private device support.
- Fix commit log grammar issue
v8:
- update rte_eal_version.map due to new API added.
- minor reword on release note.
- minor fix on commit log and code style.
NOTE:
Some issues which is not related with this patchset is expected when
play with hotplug_mp sample as belows.
- Attach a PCI device twice may cause device can't be detached
below fix is required:
https://patches.dpdk.org/patch/42030/
- ixgbe device can't detached, below fix is required
https://patches.dpdk.org/patch/42031/
v7:
- update rte_ethdev_version.map for new APIs.
- improve code readability in __handle_secondary_request by use goto.
- add comments to explain why need to call rte_eal_alarm_set.
- add error log when process_mp_init_callbacks failed.
- reword release notes base on Anatoly's suggestion.
- add back previous "Acked-by" and "Reviewed-by" in commit log.
NOTE: current patchset depends on below IPC fix, or it may not be able
to attach a shared vdev.
https://patches.dpdk.org/patch/41647/
v6:
- remove bus->scan_one, since ABI break is not necessary.
- remove patch for failsafe PMD since it will not support secondary.
- fix wrong implemenation on ixgbe.
- add rte_eth_dev_release_port_private into rte_eth_dev_pci_generic_remove for
secondary process, so we don't need to patch on PMD if PMD use the
default remove function.
- add release notes update.
- agreed to use strdup(peer) as workaround for repling a sync request in seperate
thread.
v5:
- since we will keep mp thread separate from interrupt thread,
it is not necessary to use temporary thread, we use rte_eal_alarm_set.
- remove the change in rte_eth_dev_release_port, since there is a better
way to prevent rte_eth_dev_release_port be called after
rte_eth_dev_release_port_private.
- fix the issue that lock does not take effect on secondary due to
previous re-work
- fix the issue when the first attached device is a private device from
secondary. (patch 8/24)
- work around for reply a sync request in separate thread, this is still
an open and in discussion as below.
https://mails.dpdk.org/archives/dev/2018-June/105359.html
v4:
- since mp thread will be merged to interrupt thread, the fix on v3
for sync IPC deadlock will not work. the new version enable the
machanism to invoke a mp action callback in a temporary thread to
avoid the IPC deadlock, with this, secondary to primary request
impelemtation also be simplified, since we can use sync request
directly in a separate thread.
v3:
- enable mp init callback register to help non-eal module to initialize
mp channel during rte_eal_init
- fix when attach share device from secondary.
1) dead lock due to sync IPC be invoked in rte_malloc in primary
process when handle secondary request to attach device, the
solution is primary process to issue share device attach/detach
in interrupt thread.
2) return port_id not correct.
- check nb_sent and nb_received in sync IPC.
- fix memory leak duirng error handling at attach_on_secondary.
- improve clean_lock_callback to only lock/unlock spinlock once
- improve error code return in check-reply during async IPC.
- remove rte_ prefix of internal function in ethdev_mp.c
- sample code improvement.
1) rename sample to "hotplug_mp", and move to example/multi-process.
2) cleanup header include.
3) call rte_eal_cleanup before exit.
v2:
- rename rte_ethdev_mp.* to ethdev_mp.*
- rename rte_ethdev_lock.* to ethdev_lock.*
- move internal funciton to ethdev_private.h
- separate rte_eth_dev_[un]lock into rte_eth_dev_[un]lock and
rte_eth_dev_[un]lock_with_callback
- lock callbacks will be removed automatically after device is detached.
- add experimental tag for all new APIs.
- fix coding style issue.
- fix wrong lisence header in sample code.
- fix spelling
- fix meson.build.
- improve comments.
Background:
===========
Currently secondary process will only sync ethdev from primary
process at init stage, but it will not be aware if device
is attached/detached on primary process at runtime.
While there is the requirement from application that take
primary-secondary process model. The primary process work as a
resource management process, it will create/destroy virtual device
at runtime, while the secondary process deal with the network stuff
with these devices.
Solution:
=========
So the orignial intention is to fix this gap, but beyond that
the patch set provide a more comprehesive solution to handle
different hotplug cases in multi-process situation, it cover below
scenario:
1. Attach a device from the primary
2. Detach a device from the primary
3. Attach a device from a secondary
4. Detach a device from a secondary
In primary-secondary process model, we assume ethernet devices are
shared by default. that means attach or detach a device on any process
will broadcast to all other processes through mp channel then device
information will be synchronized on all processes.
Any failure during attaching or detaching process will cause inconsistent
status between processes, so proper rollback action should be considered.
Scenario for Case 1, 2:
attach device from primary
a) primary attach the new device if failed goto h).
b) primary send attach sync request to all secondary.
c) secondary receive request and attach device and send reply.
d) primary check the reply if all success go to i).
e) primary send attach rollback sync request to all secondary.
f) secondary receive the request and detach device and send reply.
g) primary receive the reply and detach device as rollback action.
h) attach fail
i) attach success
detach device from primary
a) primary perform pre-detach check, if device is locked, goto i).
b) primary send pre-detach sync request to all secondary.
c) secondary perform pre-detach check and send reply.
d) primary check the reply if any fail goto i).
e) primary send detach sync request to all secondary
f) secondary detach the device and send reply (assume no fail)
g) primary detach the device.
h) detach success
i) detach failed
Scenario for case 3, 4:
attach device from secondary:
a) seconary send asycn request to primary and wait on a condition
which will be released by matched response from primary.
b) primary receive the request and attach the new device if failed
goto i).
c) primary forward attach request to all secondary as async request
(because this in mp thread context, use sync request will deadlock,
same reason for all following async request.)
d) secondary receive request and attach device and send reply.
e) primary check the reply if all success go to j).
f) primary send attach rollback async request to all secondary.
g) secondary receive the request and detach device and send reply.
h) primary receive the reply and detach device as rollback action.
i) send fail response to secondary, goto k).
j) send success response to secondary.
k) secondary process receive response and return.
detach device from secondary:
a) secondary send async request to primary and wait on a condition
which will be released by matched response from primary.
b) primary receive the request and perform pre-detach check, if device
is locked, goto j).
c) primary send pre-detach async request to all secondary.
d) secondary perform pre-detach check and send reply.
e) primary check the reply if any fail goto j).
f) primary send detach async request to all secondary
g) secondary detach the device and send reply
h) primary detach the device.
i) send success response to secondary, goto k).
j) send fail response to secondary.
k) secondary process receive response and return.
APIs chenages:
==============
scope of rte_eal_hotplug_add and rte_eal_hotplug_remove is extended.
In primary-secondary process model, rte_eal_hotplug_add will guarantee
that device be attached on all processes, while rte_eal_hotplug_remove will
guarantee device be detached on all processes.
PMD Impact:
===========
Currently device removing is not handled well in secondary process on
most pmd drivers, rte_eth_dev_relase_port will be invoked and will mess up
primary process since it reset all shared data. So we introduced new API
rte_eth_dev_release_port_local which only reset ethdev's state to unsued
but not touch shared data so other process will not be impacted.
Since not all device driver is target to support primary-secondary
process model, so the patch set only fix this on all Intel devices and
vdev, it can be refereneced by other driver when equevalent fix is
required
Example:
========
The patchset also contains a example to demonstrate device hotplug
in multi-process model, below are detail instructions.
/* start sample code as primary then secondary */
./hotplug_mp --proc-type=auto
Command Line Example:
>help
>list
/* attach a pci device */
> attach 0000:81:00.0
/* detach the pci device */
> detach 0000:81:00.0
/* attach a vdev af_packet device */
> attach net_af_packet,iface=eth0
/* detach the vdev af_packet device */
> detach net_af_packet
Qi Zhang (19):
ethdev: add function to release port in local process
bus/pci: fix PCI address compare
bus/pci: enable vfio unmap resource for secondary
vfio: remove uneccessary IPC for group fd clear
eal: enable hotplug on multi-process
eal: support attach or detach share device from secondary
net/i40e: enable hotplug on secondary process
net/ixgbe: enable hotplug on secondary process
net/af_packet: enable hotplug on secondary process
net/bonding: enable hotplug on secondary process
net/kni: enable hotplug on secondary process
net/null: enable hotplug on secondary process
net/octeontx: enable hotplug on secondary process
net/pcap: enable hotplug on secondary process
net/softnic: enable hotplug on secondary process
net/tap: enable hotplug on secondary process
net/vhost: enable hotplug on secondary process
examples/multi_process: add hotplug sample
doc: update release notes for multi process hotplug
doc/guides/rel_notes/release_18_08.rst | 11 +
drivers/bus/pci/linux/pci_vfio.c | 129 +++++++--
drivers/net/af_packet/rte_eth_af_packet.c | 7 +-
drivers/net/bonding/rte_eth_bond_pmd.c | 7 +-
drivers/net/i40e/i40e_ethdev.c | 2 +
drivers/net/ixgbe/ixgbe_ethdev.c | 3 +
drivers/net/kni/rte_eth_kni.c | 7 +-
drivers/net/null/rte_eth_null.c | 12 +-
drivers/net/octeontx/octeontx_ethdev.c | 9 +
drivers/net/pcap/rte_eth_pcap.c | 11 +-
drivers/net/softnic/rte_eth_softnic.c | 15 +-
drivers/net/tap/rte_eth_tap.c | 13 +-
drivers/net/vhost/rte_eth_vhost.c | 7 +-
examples/multi_process/Makefile | 1 +
examples/multi_process/hotplug_mp/Makefile | 23 ++
examples/multi_process/hotplug_mp/commands.c | 214 +++++++++++++++
examples/multi_process/hotplug_mp/commands.h | 10 +
examples/multi_process/hotplug_mp/main.c | 41 +++
lib/librte_eal/bsdapp/eal/Makefile | 1 +
lib/librte_eal/common/eal_common_dev.c | 177 ++++++++++++-
lib/librte_eal/common/eal_private.h | 37 +++
lib/librte_eal/common/hotplug_mp.c | 348 +++++++++++++++++++++++++
lib/librte_eal/common/hotplug_mp.h | 48 ++++
lib/librte_eal/common/include/rte_dev.h | 6 +
lib/librte_eal/common/meson.build | 1 +
lib/librte_eal/linuxapp/eal/Makefile | 1 +
lib/librte_eal/linuxapp/eal/eal.c | 6 +
lib/librte_eal/linuxapp/eal/eal_vfio.c | 45 +---
lib/librte_eal/linuxapp/eal/eal_vfio.h | 1 -
lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c | 8 -
lib/librte_ethdev/rte_ethdev.c | 12 +
lib/librte_ethdev/rte_ethdev_driver.h | 16 +-
lib/librte_ethdev/rte_ethdev_pci.h | 8 +
33 files changed, 1134 insertions(+), 103 deletions(-)
create mode 100644 examples/multi_process/hotplug_mp/Makefile
create mode 100644 examples/multi_process/hotplug_mp/commands.c
create mode 100644 examples/multi_process/hotplug_mp/commands.h
create mode 100644 examples/multi_process/hotplug_mp/main.c
create mode 100644 lib/librte_eal/common/hotplug_mp.c
create mode 100644 lib/librte_eal/common/hotplug_mp.h
--
2.13.6
^ permalink raw reply [relevance 1%]
* [dpdk-dev] [PATCH v12 00/19] enable hotplug on multi-process
` (10 preceding siblings ...)
2018-07-12 1:14 1% ` [dpdk-dev] [PATCH v12 00/19] enable hotplug on multi-process Qi Zhang
@ 2018-07-12 1:18 1% ` Qi Zhang
2018-07-12 1:18 1% ` [dpdk-dev] [PATCH v13 " Qi Zhang
12 siblings, 0 replies; 200+ results
From: Qi Zhang @ 2018-07-12 1:18 UTC (permalink / raw)
To: thomas, anatoly.burakov
Cc: konstantin.ananyev, dev, bruce.richardson, ferruh.yigit,
benjamin.h.shelton, narender.vangati, Qi Zhang
v13:
- Since rte_eth_dev_attach/rte_eth_dev_detach will be deprecated,
so, modify the sample code to use rte_eal_hotplug_add and
rte_eal_hotplug_remove to attach/detach device.
v12:
- fix return value in eal_dev_hotplug_request_to_primary.
- add more error log in rte_eal_hotplug_add.
- fix return value in rte_eal_hotplug_add and rte_eal_hotplug_remove
any failure due to IPC error will return -ENOMSG, but not -1.
- remove unnecessary changes from previous rework.
v11:
- move out common code from pci_vfio_unmap_secondary and
pci_vfio_unmap_primary.
- move RTE_BUS_NAME_MAX_LEN and RTE_DEV_ARGS_MAX_LEN into hotplug_mp.h
- fix reply check in eal_dev_hotplug_request_to_primary.
- move skeleton code for attaching device from secondary from patch 6/19
to patch 5/19 to improve code readability.
v10:
- Since hotplug add/remove a vdev on a secondary process will sync on
all processes now, it is not necessary to support private vdev for
a secondary process which is identified by a not-NULL devargs in
"--vdev". So re-work on all vdev driver changes to simpified device
probe scenario on a secondary process, devargs will be ignored on
secondary process now.
- fix lisence header in example/multi-process/hotplug_mp/Makefile.
v9:
- Move hotplug IPC from rte_eth_dev_attach/rte_eth_dev_detach to
eal_dev_hotplug_add and eal_dev_hotplug_remove, now all kinds of
devices will be synced in multi-process.
- Fix couple issue when a device is bound to vfio.
1) The device can't be detached clearly in a secondary process, which
also cause it can't be attached again, due to the error that
/dev/vfio/<group_fd> is still busy.(see Patch 3/19 and 4/19)
2) repeat detach/attach device will cause "cannot find TAILQ entry
for PCI device" due to incorrect PCI address compare.
(see patch 2/19).
- Removed device lock.
- Removed private device support.
- Fix commit log grammar issue
v8:
- update rte_eal_version.map due to new API added.
- minor reword on release note.
- minor fix on commit log and code style.
NOTE:
Some issues which is not related with this patchset is expected when
play with hotplug_mp sample as belows.
- Attach a PCI device twice may cause device can't be detached
below fix is required:
https://patches.dpdk.org/patch/42030/
- ixgbe device can't detached, below fix is required
https://patches.dpdk.org/patch/42031/
v7:
- update rte_ethdev_version.map for new APIs.
- improve code readability in __handle_secondary_request by use goto.
- add comments to explain why need to call rte_eal_alarm_set.
- add error log when process_mp_init_callbacks failed.
- reword release notes base on Anatoly's suggestion.
- add back previous "Acked-by" and "Reviewed-by" in commit log.
NOTE: current patchset depends on below IPC fix, or it may not be able
to attach a shared vdev.
https://patches.dpdk.org/patch/41647/
v6:
- remove bus->scan_one, since ABI break is not necessary.
- remove patch for failsafe PMD since it will not support secondary.
- fix wrong implemenation on ixgbe.
- add rte_eth_dev_release_port_private into rte_eth_dev_pci_generic_remove for
secondary process, so we don't need to patch on PMD if PMD use the
default remove function.
- add release notes update.
- agreed to use strdup(peer) as workaround for repling a sync request in seperate
thread.
v5:
- since we will keep mp thread separate from interrupt thread,
it is not necessary to use temporary thread, we use rte_eal_alarm_set.
- remove the change in rte_eth_dev_release_port, since there is a better
way to prevent rte_eth_dev_release_port be called after
rte_eth_dev_release_port_private.
- fix the issue that lock does not take effect on secondary due to
previous re-work
- fix the issue when the first attached device is a private device from
secondary. (patch 8/24)
- work around for reply a sync request in separate thread, this is still
an open and in discussion as below.
https://mails.dpdk.org/archives/dev/2018-June/105359.html
v4:
- since mp thread will be merged to interrupt thread, the fix on v3
for sync IPC deadlock will not work. the new version enable the
machanism to invoke a mp action callback in a temporary thread to
avoid the IPC deadlock, with this, secondary to primary request
impelemtation also be simplified, since we can use sync request
directly in a separate thread.
v3:
- enable mp init callback register to help non-eal module to initialize
mp channel during rte_eal_init
- fix when attach share device from secondary.
1) dead lock due to sync IPC be invoked in rte_malloc in primary
process when handle secondary request to attach device, the
solution is primary process to issue share device attach/detach
in interrupt thread.
2) return port_id not correct.
- check nb_sent and nb_received in sync IPC.
- fix memory leak duirng error handling at attach_on_secondary.
- improve clean_lock_callback to only lock/unlock spinlock once
- improve error code return in check-reply during async IPC.
- remove rte_ prefix of internal function in ethdev_mp.c
- sample code improvement.
1) rename sample to "hotplug_mp", and move to example/multi-process.
2) cleanup header include.
3) call rte_eal_cleanup before exit.
v2:
- rename rte_ethdev_mp.* to ethdev_mp.*
- rename rte_ethdev_lock.* to ethdev_lock.*
- move internal funciton to ethdev_private.h
- separate rte_eth_dev_[un]lock into rte_eth_dev_[un]lock and
rte_eth_dev_[un]lock_with_callback
- lock callbacks will be removed automatically after device is detached.
- add experimental tag for all new APIs.
- fix coding style issue.
- fix wrong lisence header in sample code.
- fix spelling
- fix meson.build.
- improve comments.
Background:
===========
Currently secondary process will only sync ethdev from primary
process at init stage, but it will not be aware if device
is attached/detached on primary process at runtime.
While there is the requirement from application that take
primary-secondary process model. The primary process work as a
resource management process, it will create/destroy virtual device
at runtime, while the secondary process deal with the network stuff
with these devices.
Solution:
=========
So the orignial intention is to fix this gap, but beyond that
the patch set provide a more comprehesive solution to handle
different hotplug cases in multi-process situation, it cover below
scenario:
1. Attach a device from the primary
2. Detach a device from the primary
3. Attach a device from a secondary
4. Detach a device from a secondary
In primary-secondary process model, we assume ethernet devices are
shared by default. that means attach or detach a device on any process
will broadcast to all other processes through mp channel then device
information will be synchronized on all processes.
Any failure during attaching or detaching process will cause inconsistent
status between processes, so proper rollback action should be considered.
Scenario for Case 1, 2:
attach device from primary
a) primary attach the new device if failed goto h).
b) primary send attach sync request to all secondary.
c) secondary receive request and attach device and send reply.
d) primary check the reply if all success go to i).
e) primary send attach rollback sync request to all secondary.
f) secondary receive the request and detach device and send reply.
g) primary receive the reply and detach device as rollback action.
h) attach fail
i) attach success
detach device from primary
a) primary perform pre-detach check, if device is locked, goto i).
b) primary send pre-detach sync request to all secondary.
c) secondary perform pre-detach check and send reply.
d) primary check the reply if any fail goto i).
e) primary send detach sync request to all secondary
f) secondary detach the device and send reply (assume no fail)
g) primary detach the device.
h) detach success
i) detach failed
Scenario for case 3, 4:
attach device from secondary:
a) seconary send asycn request to primary and wait on a condition
which will be released by matched response from primary.
b) primary receive the request and attach the new device if failed
goto i).
c) primary forward attach request to all secondary as async request
(because this in mp thread context, use sync request will deadlock,
same reason for all following async request.)
d) secondary receive request and attach device and send reply.
e) primary check the reply if all success go to j).
f) primary send attach rollback async request to all secondary.
g) secondary receive the request and detach device and send reply.
h) primary receive the reply and detach device as rollback action.
i) send fail response to secondary, goto k).
j) send success response to secondary.
k) secondary process receive response and return.
detach device from secondary:
a) secondary send async request to primary and wait on a condition
which will be released by matched response from primary.
b) primary receive the request and perform pre-detach check, if device
is locked, goto j).
c) primary send pre-detach async request to all secondary.
d) secondary perform pre-detach check and send reply.
e) primary check the reply if any fail goto j).
f) primary send detach async request to all secondary
g) secondary detach the device and send reply
h) primary detach the device.
i) send success response to secondary, goto k).
j) send fail response to secondary.
k) secondary process receive response and return.
APIs chenages:
==============
scope of rte_eal_hotplug_add and rte_eal_hotplug_remove is extended.
In primary-secondary process model, rte_eal_hotplug_add will guarantee
that device be attached on all processes, while rte_eal_hotplug_remove will
guarantee device be detached on all processes.
PMD Impact:
===========
Currently device removing is not handled well in secondary process on
most pmd drivers, rte_eth_dev_relase_port will be invoked and will mess up
primary process since it reset all shared data. So we introduced new API
rte_eth_dev_release_port_local which only reset ethdev's state to unsued
but not touch shared data so other process will not be impacted.
Since not all device driver is target to support primary-secondary
process model, so the patch set only fix this on all Intel devices and
vdev, it can be refereneced by other driver when equevalent fix is
required
Example:
========
The patchset also contains a example to demonstrate device hotplug
in multi-process model, below are detail instructions.
/* start sample code as primary then secondary */
./hotplug_mp --proc-type=auto
Command Line Example:
>help
>list
/* attach a pci device */
> attach 0000:81:00.0
/* detach the pci device */
> detach 0000:81:00.0
/* attach a vdev af_packet device */
> attach net_af_packet,iface=eth0
/* detach the vdev af_packet device */
> detach net_af_packet
Qi Zhang (19):
ethdev: add function to release port in local process
bus/pci: fix PCI address compare
bus/pci: enable vfio unmap resource for secondary
vfio: remove uneccessary IPC for group fd clear
eal: enable hotplug on multi-process
eal: support attach or detach share device from secondary
net/i40e: enable hotplug on secondary process
net/ixgbe: enable hotplug on secondary process
net/af_packet: enable hotplug on secondary process
net/bonding: enable hotplug on secondary process
net/kni: enable hotplug on secondary process
net/null: enable hotplug on secondary process
net/octeontx: enable hotplug on secondary process
net/pcap: enable hotplug on secondary process
net/softnic: enable hotplug on secondary process
net/tap: enable hotplug on secondary process
net/vhost: enable hotplug on secondary process
examples/multi_process: add hotplug sample
doc: update release notes for multi process hotplug
doc/guides/rel_notes/release_18_08.rst | 11 +
drivers/bus/pci/linux/pci_vfio.c | 129 +++++++--
drivers/net/af_packet/rte_eth_af_packet.c | 7 +-
drivers/net/bonding/rte_eth_bond_pmd.c | 7 +-
drivers/net/i40e/i40e_ethdev.c | 2 +
drivers/net/ixgbe/ixgbe_ethdev.c | 3 +
drivers/net/kni/rte_eth_kni.c | 7 +-
drivers/net/null/rte_eth_null.c | 12 +-
drivers/net/octeontx/octeontx_ethdev.c | 9 +
drivers/net/pcap/rte_eth_pcap.c | 11 +-
drivers/net/softnic/rte_eth_softnic.c | 15 +-
drivers/net/tap/rte_eth_tap.c | 13 +-
drivers/net/vhost/rte_eth_vhost.c | 7 +-
examples/multi_process/Makefile | 1 +
examples/multi_process/hotplug_mp/Makefile | 23 ++
examples/multi_process/hotplug_mp/commands.c | 214 +++++++++++++++
examples/multi_process/hotplug_mp/commands.h | 10 +
examples/multi_process/hotplug_mp/main.c | 41 +++
lib/librte_eal/bsdapp/eal/Makefile | 1 +
lib/librte_eal/common/eal_common_dev.c | 177 ++++++++++++-
lib/librte_eal/common/eal_private.h | 37 +++
lib/librte_eal/common/hotplug_mp.c | 348 +++++++++++++++++++++++++
lib/librte_eal/common/hotplug_mp.h | 48 ++++
lib/librte_eal/common/include/rte_dev.h | 6 +
lib/librte_eal/common/meson.build | 1 +
lib/librte_eal/linuxapp/eal/Makefile | 1 +
lib/librte_eal/linuxapp/eal/eal.c | 6 +
lib/librte_eal/linuxapp/eal/eal_vfio.c | 45 +---
lib/librte_eal/linuxapp/eal/eal_vfio.h | 1 -
lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c | 8 -
lib/librte_ethdev/rte_ethdev.c | 12 +
lib/librte_ethdev/rte_ethdev_driver.h | 16 +-
lib/librte_ethdev/rte_ethdev_pci.h | 8 +
33 files changed, 1134 insertions(+), 103 deletions(-)
create mode 100644 examples/multi_process/hotplug_mp/Makefile
create mode 100644 examples/multi_process/hotplug_mp/commands.c
create mode 100644 examples/multi_process/hotplug_mp/commands.h
create mode 100644 examples/multi_process/hotplug_mp/main.c
create mode 100644 lib/librte_eal/common/hotplug_mp.c
create mode 100644 lib/librte_eal/common/hotplug_mp.h
--
2.13.6
^ permalink raw reply [relevance 1%]
* [dpdk-dev] [PATCH v13 19/19] doc: update release notes for multi process hotplug
2018-07-12 1:14 1% ` [dpdk-dev] [PATCH v12 00/19] enable hotplug on multi-process Qi Zhang
@ 2018-07-12 1:15 4% ` Qi Zhang
0 siblings, 0 replies; 200+ results
From: Qi Zhang @ 2018-07-12 1:15 UTC (permalink / raw)
To: thomas, anatoly.burakov
Cc: konstantin.ananyev, dev, bruce.richardson, ferruh.yigit,
benjamin.h.shelton, narender.vangati, Qi Zhang
Update release notes for the new multi-process hotplug feature.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
doc/guides/rel_notes/release_18_08.rst | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index bc0124295..1251e4b5b 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -46,6 +46,12 @@ New Features
Flow API support has been added to CXGBE Poll Mode Driver to offload
flows to Chelsio T5/T6 NICs.
+* **Support device multi-process hotplug.**
+
+ Hotplug and hot-unplug for devices will now be supported in multiprocessing
+ scenario. Any ethdev devices created in the primary process will be regarded
+ as shared and will be available for all DPDK processes. Synchronization between
+ processes will be done using DPDK IPC.
API Changes
-----------
@@ -60,6 +66,11 @@ API Changes
Also, make sure to start the actual text at the margin.
=========================================================
+* eal: scope of rte_eal_hotplug_add and rte_eal_hotplug_remove is extended.
+
+ In primary-secondary process model, ``rte_eal_hotplug_add`` will guarantee
+ that device be attached on all processes, while ``rte_eal_hotplug_remove``
+ will guarantee device be detached on all processes.
ABI Changes
-----------
--
2.13.6
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH v12 00/19] enable hotplug on multi-process
` (9 preceding siblings ...)
2018-07-11 13:47 1% ` [dpdk-dev] [PATCH v12 00/19] enable hotplug on multi-process Qi Zhang
@ 2018-07-12 1:14 1% ` Qi Zhang
2018-07-12 1:15 4% ` [dpdk-dev] [PATCH v13 19/19] doc: update release notes for multi process hotplug Qi Zhang
2018-07-12 1:18 1% ` [dpdk-dev] [PATCH v12 00/19] enable hotplug on multi-process Qi Zhang
2018-07-12 1:18 1% ` [dpdk-dev] [PATCH v13 " Qi Zhang
12 siblings, 1 reply; 200+ results
From: Qi Zhang @ 2018-07-12 1:14 UTC (permalink / raw)
To: thomas, anatoly.burakov
Cc: konstantin.ananyev, dev, bruce.richardson, ferruh.yigit,
benjamin.h.shelton, narender.vangati, Qi Zhang
v13:
- Since rte_eth_dev_attach/rte_eth_dev_detach will be deprecated,
so, modify the sample code to use rte_eal_hotplug_add and
rte_eal_hotplug_remove to attach/detach device.
v12:
- fix return value in eal_dev_hotplug_request_to_primary.
- add more error log in rte_eal_hotplug_add.
- fix return value in rte_eal_hotplug_add and rte_eal_hotplug_remove
any failure due to IPC error will return -ENOMSG, but not -1.
- remove unnecessary changes from previous rework.
v11:
- move out common code from pci_vfio_unmap_secondary and
pci_vfio_unmap_primary.
- move RTE_BUS_NAME_MAX_LEN and RTE_DEV_ARGS_MAX_LEN into hotplug_mp.h
- fix reply check in eal_dev_hotplug_request_to_primary.
- move skeleton code for attaching device from secondary from patch 6/19
to patch 5/19 to improve code readability.
v10:
- Since hotplug add/remove a vdev on a secondary process will sync on
all processes now, it is not necessary to support private vdev for
a secondary process which is identified by a not-NULL devargs in
"--vdev". So re-work on all vdev driver changes to simpified device
probe scenario on a secondary process, devargs will be ignored on
secondary process now.
- fix lisence header in example/multi-process/hotplug_mp/Makefile.
v9:
- Move hotplug IPC from rte_eth_dev_attach/rte_eth_dev_detach to
eal_dev_hotplug_add and eal_dev_hotplug_remove, now all kinds of
devices will be synced in multi-process.
- Fix couple issue when a device is bound to vfio.
1) The device can't be detached clearly in a secondary process, which
also cause it can't be attached again, due to the error that
/dev/vfio/<group_fd> is still busy.(see Patch 3/19 and 4/19)
2) repeat detach/attach device will cause "cannot find TAILQ entry
for PCI device" due to incorrect PCI address compare.
(see patch 2/19).
- Removed device lock.
- Removed private device support.
- Fix commit log grammar issue
v8:
- update rte_eal_version.map due to new API added.
- minor reword on release note.
- minor fix on commit log and code style.
NOTE:
Some issues which is not related with this patchset is expected when
play with hotplug_mp sample as belows.
- Attach a PCI device twice may cause device can't be detached
below fix is required:
https://patches.dpdk.org/patch/42030/
- ixgbe device can't detached, below fix is required
https://patches.dpdk.org/patch/42031/
v7:
- update rte_ethdev_version.map for new APIs.
- improve code readability in __handle_secondary_request by use goto.
- add comments to explain why need to call rte_eal_alarm_set.
- add error log when process_mp_init_callbacks failed.
- reword release notes base on Anatoly's suggestion.
- add back previous "Acked-by" and "Reviewed-by" in commit log.
NOTE: current patchset depends on below IPC fix, or it may not be able
to attach a shared vdev.
https://patches.dpdk.org/patch/41647/
v6:
- remove bus->scan_one, since ABI break is not necessary.
- remove patch for failsafe PMD since it will not support secondary.
- fix wrong implemenation on ixgbe.
- add rte_eth_dev_release_port_private into rte_eth_dev_pci_generic_remove for
secondary process, so we don't need to patch on PMD if PMD use the
default remove function.
- add release notes update.
- agreed to use strdup(peer) as workaround for repling a sync request in seperate
thread.
v5:
- since we will keep mp thread separate from interrupt thread,
it is not necessary to use temporary thread, we use rte_eal_alarm_set.
- remove the change in rte_eth_dev_release_port, since there is a better
way to prevent rte_eth_dev_release_port be called after
rte_eth_dev_release_port_private.
- fix the issue that lock does not take effect on secondary due to
previous re-work
- fix the issue when the first attached device is a private device from
secondary. (patch 8/24)
- work around for reply a sync request in separate thread, this is still
an open and in discussion as below.
https://mails.dpdk.org/archives/dev/2018-June/105359.html
v4:
- since mp thread will be merged to interrupt thread, the fix on v3
for sync IPC deadlock will not work. the new version enable the
machanism to invoke a mp action callback in a temporary thread to
avoid the IPC deadlock, with this, secondary to primary request
impelemtation also be simplified, since we can use sync request
directly in a separate thread.
v3:
- enable mp init callback register to help non-eal module to initialize
mp channel during rte_eal_init
- fix when attach share device from secondary.
1) dead lock due to sync IPC be invoked in rte_malloc in primary
process when handle secondary request to attach device, the
solution is primary process to issue share device attach/detach
in interrupt thread.
2) return port_id not correct.
- check nb_sent and nb_received in sync IPC.
- fix memory leak duirng error handling at attach_on_secondary.
- improve clean_lock_callback to only lock/unlock spinlock once
- improve error code return in check-reply during async IPC.
- remove rte_ prefix of internal function in ethdev_mp.c
- sample code improvement.
1) rename sample to "hotplug_mp", and move to example/multi-process.
2) cleanup header include.
3) call rte_eal_cleanup before exit.
v2:
- rename rte_ethdev_mp.* to ethdev_mp.*
- rename rte_ethdev_lock.* to ethdev_lock.*
- move internal funciton to ethdev_private.h
- separate rte_eth_dev_[un]lock into rte_eth_dev_[un]lock and
rte_eth_dev_[un]lock_with_callback
- lock callbacks will be removed automatically after device is detached.
- add experimental tag for all new APIs.
- fix coding style issue.
- fix wrong lisence header in sample code.
- fix spelling
- fix meson.build.
- improve comments.
Background:
===========
Currently secondary process will only sync ethdev from primary
process at init stage, but it will not be aware if device
is attached/detached on primary process at runtime.
While there is the requirement from application that take
primary-secondary process model. The primary process work as a
resource management process, it will create/destroy virtual device
at runtime, while the secondary process deal with the network stuff
with these devices.
Solution:
=========
So the orignial intention is to fix this gap, but beyond that
the patch set provide a more comprehesive solution to handle
different hotplug cases in multi-process situation, it cover below
scenario:
1. Attach a device from the primary
2. Detach a device from the primary
3. Attach a device from a secondary
4. Detach a device from a secondary
In primary-secondary process model, we assume ethernet devices are
shared by default. that means attach or detach a device on any process
will broadcast to all other processes through mp channel then device
information will be synchronized on all processes.
Any failure during attaching or detaching process will cause inconsistent
status between processes, so proper rollback action should be considered.
Scenario for Case 1, 2:
attach device from primary
a) primary attach the new device if failed goto h).
b) primary send attach sync request to all secondary.
c) secondary receive request and attach device and send reply.
d) primary check the reply if all success go to i).
e) primary send attach rollback sync request to all secondary.
f) secondary receive the request and detach device and send reply.
g) primary receive the reply and detach device as rollback action.
h) attach fail
i) attach success
detach device from primary
a) primary perform pre-detach check, if device is locked, goto i).
b) primary send pre-detach sync request to all secondary.
c) secondary perform pre-detach check and send reply.
d) primary check the reply if any fail goto i).
e) primary send detach sync request to all secondary
f) secondary detach the device and send reply (assume no fail)
g) primary detach the device.
h) detach success
i) detach failed
Scenario for case 3, 4:
attach device from secondary:
a) seconary send asycn request to primary and wait on a condition
which will be released by matched response from primary.
b) primary receive the request and attach the new device if failed
goto i).
c) primary forward attach request to all secondary as async request
(because this in mp thread context, use sync request will deadlock,
same reason for all following async request.)
d) secondary receive request and attach device and send reply.
e) primary check the reply if all success go to j).
f) primary send attach rollback async request to all secondary.
g) secondary receive the request and detach device and send reply.
h) primary receive the reply and detach device as rollback action.
i) send fail response to secondary, goto k).
j) send success response to secondary.
k) secondary process receive response and return.
detach device from secondary:
a) secondary send async request to primary and wait on a condition
which will be released by matched response from primary.
b) primary receive the request and perform pre-detach check, if device
is locked, goto j).
c) primary send pre-detach async request to all secondary.
d) secondary perform pre-detach check and send reply.
e) primary check the reply if any fail goto j).
f) primary send detach async request to all secondary
g) secondary detach the device and send reply
h) primary detach the device.
i) send success response to secondary, goto k).
j) send fail response to secondary.
k) secondary process receive response and return.
APIs chenages:
==============
scope of rte_eal_hotplug_add and rte_eal_hotplug_remove is extended.
In primary-secondary process model, rte_eal_hotplug_add will guarantee
that device be attached on all processes, while rte_eal_hotplug_remove will
guarantee device be detached on all processes.
PMD Impact:
===========
Currently device removing is not handled well in secondary process on
most pmd drivers, rte_eth_dev_relase_port will be invoked and will mess up
primary process since it reset all shared data. So we introduced new API
rte_eth_dev_release_port_local which only reset ethdev's state to unsued
but not touch shared data so other process will not be impacted.
Since not all device driver is target to support primary-secondary
process model, so the patch set only fix this on all Intel devices and
vdev, it can be refereneced by other driver when equevalent fix is
required
Example:
========
The patchset also contains a example to demonstrate device hotplug
in multi-process model, below are detail instructions.
/* start sample code as primary then secondary */
./hotplug_mp --proc-type=auto
Command Line Example:
>help
>list
/* attach a pci device */
> attach 0000:81:00.0
/* detach the pci device */
> detach 0000:81:00.0
/* attach a vdev af_packet device */
> attach net_af_packet,iface=eth0
/* detach the vdev af_packet device */
> detach net_af_packet
Qi Zhang (19):
ethdev: add function to release port in local process
bus/pci: fix PCI address compare
bus/pci: enable vfio unmap resource for secondary
vfio: remove uneccessary IPC for group fd clear
eal: enable hotplug on multi-process
eal: support attach or detach share device from secondary
net/i40e: enable hotplug on secondary process
net/ixgbe: enable hotplug on secondary process
net/af_packet: enable hotplug on secondary process
net/bonding: enable hotplug on secondary process
net/kni: enable hotplug on secondary process
net/null: enable hotplug on secondary process
net/octeontx: enable hotplug on secondary process
net/pcap: enable hotplug on secondary process
net/softnic: enable hotplug on secondary process
net/tap: enable hotplug on secondary process
net/vhost: enable hotplug on secondary process
examples/multi_process: add hotplug sample
doc: update release notes for multi process hotplug
doc/guides/rel_notes/release_18_08.rst | 11 +
drivers/bus/pci/linux/pci_vfio.c | 129 +++++++--
drivers/net/af_packet/rte_eth_af_packet.c | 7 +-
drivers/net/bonding/rte_eth_bond_pmd.c | 7 +-
drivers/net/i40e/i40e_ethdev.c | 2 +
drivers/net/ixgbe/ixgbe_ethdev.c | 3 +
drivers/net/kni/rte_eth_kni.c | 7 +-
drivers/net/null/rte_eth_null.c | 12 +-
drivers/net/octeontx/octeontx_ethdev.c | 9 +
drivers/net/pcap/rte_eth_pcap.c | 11 +-
drivers/net/softnic/rte_eth_softnic.c | 15 +-
drivers/net/tap/rte_eth_tap.c | 13 +-
drivers/net/vhost/rte_eth_vhost.c | 7 +-
examples/multi_process/Makefile | 1 +
examples/multi_process/hotplug_mp/Makefile | 23 ++
examples/multi_process/hotplug_mp/commands.c | 214 +++++++++++++++
examples/multi_process/hotplug_mp/commands.h | 10 +
examples/multi_process/hotplug_mp/main.c | 41 +++
lib/librte_eal/bsdapp/eal/Makefile | 1 +
lib/librte_eal/common/eal_common_dev.c | 177 ++++++++++++-
lib/librte_eal/common/eal_private.h | 37 +++
lib/librte_eal/common/hotplug_mp.c | 348 +++++++++++++++++++++++++
lib/librte_eal/common/hotplug_mp.h | 48 ++++
lib/librte_eal/common/include/rte_dev.h | 6 +
lib/librte_eal/common/meson.build | 1 +
lib/librte_eal/linuxapp/eal/Makefile | 1 +
lib/librte_eal/linuxapp/eal/eal.c | 6 +
lib/librte_eal/linuxapp/eal/eal_vfio.c | 45 +---
lib/librte_eal/linuxapp/eal/eal_vfio.h | 1 -
lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c | 8 -
lib/librte_ethdev/rte_ethdev.c | 12 +
lib/librte_ethdev/rte_ethdev_driver.h | 16 +-
lib/librte_ethdev/rte_ethdev_pci.h | 8 +
33 files changed, 1134 insertions(+), 103 deletions(-)
create mode 100644 examples/multi_process/hotplug_mp/Makefile
create mode 100644 examples/multi_process/hotplug_mp/commands.c
create mode 100644 examples/multi_process/hotplug_mp/commands.h
create mode 100644 examples/multi_process/hotplug_mp/main.c
create mode 100644 lib/librte_eal/common/hotplug_mp.c
create mode 100644 lib/librte_eal/common/hotplug_mp.h
--
2.13.6
^ permalink raw reply [relevance 1%]
* [dpdk-dev] [PATCH v12 19/19] doc: update release notes for multi process hotplug
2018-07-11 13:47 1% ` [dpdk-dev] [PATCH v12 00/19] enable hotplug on multi-process Qi Zhang
@ 2018-07-11 13:48 4% ` Qi Zhang
0 siblings, 0 replies; 200+ results
From: Qi Zhang @ 2018-07-11 13:48 UTC (permalink / raw)
To: thomas, anatoly.burakov
Cc: konstantin.ananyev, dev, bruce.richardson, ferruh.yigit,
benjamin.h.shelton, narender.vangati, Qi Zhang
Update release notes for the new multi-process hotplug feature.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
doc/guides/rel_notes/release_18_08.rst | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index bc0124295..1251e4b5b 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -46,6 +46,12 @@ New Features
Flow API support has been added to CXGBE Poll Mode Driver to offload
flows to Chelsio T5/T6 NICs.
+* **Support device multi-process hotplug.**
+
+ Hotplug and hot-unplug for devices will now be supported in multiprocessing
+ scenario. Any ethdev devices created in the primary process will be regarded
+ as shared and will be available for all DPDK processes. Synchronization between
+ processes will be done using DPDK IPC.
API Changes
-----------
@@ -60,6 +66,11 @@ API Changes
Also, make sure to start the actual text at the margin.
=========================================================
+* eal: scope of rte_eal_hotplug_add and rte_eal_hotplug_remove is extended.
+
+ In primary-secondary process model, ``rte_eal_hotplug_add`` will guarantee
+ that device be attached on all processes, while ``rte_eal_hotplug_remove``
+ will guarantee device be detached on all processes.
ABI Changes
-----------
--
2.13.6
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH v12 00/19] enable hotplug on multi-process
` (8 preceding siblings ...)
2018-07-11 3:08 1% ` [dpdk-dev] [PATCH v11 00/19] enable hotplug on multi-process Qi Zhang
@ 2018-07-11 13:47 1% ` Qi Zhang
2018-07-11 13:48 4% ` [dpdk-dev] [PATCH v12 19/19] doc: update release notes for multi process hotplug Qi Zhang
2018-07-12 1:14 1% ` [dpdk-dev] [PATCH v12 00/19] enable hotplug on multi-process Qi Zhang
` (2 subsequent siblings)
12 siblings, 1 reply; 200+ results
From: Qi Zhang @ 2018-07-11 13:47 UTC (permalink / raw)
To: thomas, anatoly.burakov
Cc: konstantin.ananyev, dev, bruce.richardson, ferruh.yigit,
benjamin.h.shelton, narender.vangati, Qi Zhang
v12:
- fix return value in eal_dev_hotplug_request_to_primary.
- add more error log in rte_eal_hotplug_add.
- fix return value in rte_eal_hotplug_add and rte_eal_hotplug_remove
any failure due to IPC error will return -ENOMSG, but not -1.
- remove unnecessary changes from previous rework.
v11:
- move out common code from pci_vfio_unmap_secondary and
pci_vfio_unmap_primary.
- move RTE_BUS_NAME_MAX_LEN and RTE_DEV_ARGS_MAX_LEN into hotplug_mp.h
- fix reply check in eal_dev_hotplug_request_to_primary.
- move skeleton code for attaching device from secondary from patch 6/19
to patch 5/19 to improve code readability.
v10:
- Since hotplug add/remove a vdev on a secondary process will sync on
all processes now, it is not necessary to support private vdev for
a secondary process which is identified by a not-NULL devargs in
"--vdev". So re-work on all vdev driver changes to simpified device
probe scenario on a secondary process, devargs will be ignored on
secondary process now.
- fix lisence header in example/multi-process/hotplug_mp/Makefile.
v9:
- Move hotplug IPC from rte_eth_dev_attach/rte_eth_dev_detach to
eal_dev_hotplug_add and eal_dev_hotplug_remove, now all kinds of
devices will be synced in multi-process.
- Fix couple issue when a device is bound to vfio.
1) The device can't be detached clearly in a secondary process, which
also cause it can't be attached again, due to the error that
/dev/vfio/<group_fd> is still busy.(see Patch 3/19 and 4/19)
2) repeat detach/attach device will cause "cannot find TAILQ entry
for PCI device" due to incorrect PCI address compare.
(see patch 2/19).
- Removed device lock.
- Removed private device support.
- Fix commit log grammar issue
v8:
- update rte_eal_version.map due to new API added.
- minor reword on release note.
- minor fix on commit log and code style.
NOTE:
Some issues which is not related with this patchset is expected when
play with hotplug_mp sample as belows.
- Attach a PCI device twice may cause device can't be detached
below fix is required:
https://patches.dpdk.org/patch/42030/
- ixgbe device can't detached, below fix is required
https://patches.dpdk.org/patch/42031/
v7:
- update rte_ethdev_version.map for new APIs.
- improve code readability in __handle_secondary_request by use goto.
- add comments to explain why need to call rte_eal_alarm_set.
- add error log when process_mp_init_callbacks failed.
- reword release notes base on Anatoly's suggestion.
- add back previous "Acked-by" and "Reviewed-by" in commit log.
NOTE: current patchset depends on below IPC fix, or it may not be able
to attach a shared vdev.
https://patches.dpdk.org/patch/41647/
v6:
- remove bus->scan_one, since ABI break is not necessary.
- remove patch for failsafe PMD since it will not support secondary.
- fix wrong implemenation on ixgbe.
- add rte_eth_dev_release_port_private into rte_eth_dev_pci_generic_remove for
secondary process, so we don't need to patch on PMD if PMD use the
default remove function.
- add release notes update.
- agreed to use strdup(peer) as workaround for repling a sync request in seperate
thread.
v5:
- since we will keep mp thread separate from interrupt thread,
it is not necessary to use temporary thread, we use rte_eal_alarm_set.
- remove the change in rte_eth_dev_release_port, since there is a better
way to prevent rte_eth_dev_release_port be called after
rte_eth_dev_release_port_private.
- fix the issue that lock does not take effect on secondary due to
previous re-work
- fix the issue when the first attached device is a private device from
secondary. (patch 8/24)
- work around for reply a sync request in separate thread, this is still
an open and in discussion as below.
https://mails.dpdk.org/archives/dev/2018-June/105359.html
v4:
- since mp thread will be merged to interrupt thread, the fix on v3
for sync IPC deadlock will not work. the new version enable the
machanism to invoke a mp action callback in a temporary thread to
avoid the IPC deadlock, with this, secondary to primary request
impelemtation also be simplified, since we can use sync request
directly in a separate thread.
v3:
- enable mp init callback register to help non-eal module to initialize
mp channel during rte_eal_init
- fix when attach share device from secondary.
1) dead lock due to sync IPC be invoked in rte_malloc in primary
process when handle secondary request to attach device, the
solution is primary process to issue share device attach/detach
in interrupt thread.
2) return port_id not correct.
- check nb_sent and nb_received in sync IPC.
- fix memory leak duirng error handling at attach_on_secondary.
- improve clean_lock_callback to only lock/unlock spinlock once
- improve error code return in check-reply during async IPC.
- remove rte_ prefix of internal function in ethdev_mp.c
- sample code improvement.
1) rename sample to "hotplug_mp", and move to example/multi-process.
2) cleanup header include.
3) call rte_eal_cleanup before exit.
v2:
- rename rte_ethdev_mp.* to ethdev_mp.*
- rename rte_ethdev_lock.* to ethdev_lock.*
- move internal funciton to ethdev_private.h
- separate rte_eth_dev_[un]lock into rte_eth_dev_[un]lock and
rte_eth_dev_[un]lock_with_callback
- lock callbacks will be removed automatically after device is detached.
- add experimental tag for all new APIs.
- fix coding style issue.
- fix wrong lisence header in sample code.
- fix spelling
- fix meson.build.
- improve comments.
Background:
===========
Currently secondary process will only sync ethdev from primary
process at init stage, but it will not be aware if device
is attached/detached on primary process at runtime.
While there is the requirement from application that take
primary-secondary process model. The primary process work as a
resource management process, it will create/destroy virtual device
at runtime, while the secondary process deal with the network stuff
with these devices.
Solution:
=========
So the orignial intention is to fix this gap, but beyond that
the patch set provide a more comprehesive solution to handle
different hotplug cases in multi-process situation, it cover below
scenario:
1. Attach a device from the primary
2. Detach a device from the primary
3. Attach a device from a secondary
4. Detach a device from a secondary
In primary-secondary process model, we assume ethernet devices are
shared by default. that means attach or detach a device on any process
will broadcast to all other processes through mp channel then device
information will be synchronized on all processes.
Any failure during attaching or detaching process will cause inconsistent
status between processes, so proper rollback action should be considered.
Scenario for Case 1, 2:
attach device from primary
a) primary attach the new device if failed goto h).
b) primary send attach sync request to all secondary.
c) secondary receive request and attach device and send reply.
d) primary check the reply if all success go to i).
e) primary send attach rollback sync request to all secondary.
f) secondary receive the request and detach device and send reply.
g) primary receive the reply and detach device as rollback action.
h) attach fail
i) attach success
detach device from primary
a) primary perform pre-detach check, if device is locked, goto i).
b) primary send pre-detach sync request to all secondary.
c) secondary perform pre-detach check and send reply.
d) primary check the reply if any fail goto i).
e) primary send detach sync request to all secondary
f) secondary detach the device and send reply (assume no fail)
g) primary detach the device.
h) detach success
i) detach failed
Scenario for case 3, 4:
attach device from secondary:
a) seconary send asycn request to primary and wait on a condition
which will be released by matched response from primary.
b) primary receive the request and attach the new device if failed
goto i).
c) primary forward attach request to all secondary as async request
(because this in mp thread context, use sync request will deadlock,
same reason for all following async request.)
d) secondary receive request and attach device and send reply.
e) primary check the reply if all success go to j).
f) primary send attach rollback async request to all secondary.
g) secondary receive the request and detach device and send reply.
h) primary receive the reply and detach device as rollback action.
i) send fail response to secondary, goto k).
j) send success response to secondary.
k) secondary process receive response and return.
detach device from secondary:
a) secondary send async request to primary and wait on a condition
which will be released by matched response from primary.
b) primary receive the request and perform pre-detach check, if device
is locked, goto j).
c) primary send pre-detach async request to all secondary.
d) secondary perform pre-detach check and send reply.
e) primary check the reply if any fail goto j).
f) primary send detach async request to all secondary
g) secondary detach the device and send reply
h) primary detach the device.
i) send success response to secondary, goto k).
j) send fail response to secondary.
k) secondary process receive response and return.
APIs chenages:
==============
scope of rte_eal_hotplug_add and rte_eal_hotplug_remove is extended.
In primary-secondary process model, rte_eal_hotplug_add will guarantee
that device be attached on all processes, while rte_eal_hotplug_remove will
guarantee device be detached on all processes.
PMD Impact:
===========
Currently device removing is not handled well in secondary process on
most pmd drivers, rte_eth_dev_relase_port will be invoked and will mess up
primary process since it reset all shared data. So we introduced new API
rte_eth_dev_release_port_local which only reset ethdev's state to unsued
but not touch shared data so other process will not be impacted.
Since not all device driver is target to support primary-secondary
process model, so the patch set only fix this on all Intel devices and
vdev, it can be refereneced by other driver when equevalent fix is
required
Example:
========
The patchset also contains a example to demonstrate device hotplug
in multi-process model, below are detail instructions.
/* start sample code as primary then secondary */
./hotplug_mp --proc-type=auto
Command Line Example:
>help
>list
/* attach a af_packet vdev */
>attach net_af_packet,iface=eth0
/* detach port 0 */
>detach 0
Qi Zhang (19):
ethdev: add function to release port in local process
bus/pci: fix PCI address compare
bus/pci: enable vfio unmap resource for secondary
vfio: remove uneccessary IPC for group fd clear
eal: enable hotplug on multi-process
eal: support attach or detach share device from secondary
net/i40e: enable hotplug on secondary process
net/ixgbe: enable hotplug on secondary process
net/af_packet: enable hotplug on secondary process
net/bonding: enable hotplug on secondary process
net/kni: enable hotplug on secondary process
net/null: enable hotplug on secondary process
net/octeontx: enable hotplug on secondary process
net/pcap: enable hotplug on secondary process
net/softnic: enable hotplug on secondary process
net/tap: enable hotplug on secondary process
net/vhost: enable hotplug on secondary process
examples/multi_process: add hotplug sample
doc: update release notes for multi process hotplug
doc/guides/rel_notes/release_18_08.rst | 11 +
drivers/bus/pci/linux/pci_vfio.c | 129 +++++++--
drivers/net/af_packet/rte_eth_af_packet.c | 7 +-
drivers/net/bonding/rte_eth_bond_pmd.c | 7 +-
drivers/net/i40e/i40e_ethdev.c | 2 +
drivers/net/ixgbe/ixgbe_ethdev.c | 3 +
drivers/net/kni/rte_eth_kni.c | 7 +-
drivers/net/null/rte_eth_null.c | 12 +-
drivers/net/octeontx/octeontx_ethdev.c | 9 +
drivers/net/pcap/rte_eth_pcap.c | 11 +-
drivers/net/softnic/rte_eth_softnic.c | 15 +-
drivers/net/tap/rte_eth_tap.c | 13 +-
drivers/net/vhost/rte_eth_vhost.c | 7 +-
examples/multi_process/Makefile | 1 +
examples/multi_process/hotplug_mp/Makefile | 23 ++
examples/multi_process/hotplug_mp/commands.c | 197 ++++++++++++++
examples/multi_process/hotplug_mp/commands.h | 10 +
examples/multi_process/hotplug_mp/main.c | 41 +++
lib/librte_eal/bsdapp/eal/Makefile | 1 +
lib/librte_eal/common/eal_common_dev.c | 177 ++++++++++++-
lib/librte_eal/common/eal_private.h | 37 +++
lib/librte_eal/common/hotplug_mp.c | 348 +++++++++++++++++++++++++
lib/librte_eal/common/hotplug_mp.h | 48 ++++
lib/librte_eal/common/include/rte_dev.h | 6 +
lib/librte_eal/common/meson.build | 1 +
lib/librte_eal/linuxapp/eal/Makefile | 1 +
lib/librte_eal/linuxapp/eal/eal.c | 6 +
lib/librte_eal/linuxapp/eal/eal_vfio.c | 45 +---
lib/librte_eal/linuxapp/eal/eal_vfio.h | 1 -
lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c | 8 -
lib/librte_ethdev/rte_ethdev.c | 12 +
lib/librte_ethdev/rte_ethdev_driver.h | 16 +-
lib/librte_ethdev/rte_ethdev_pci.h | 8 +
33 files changed, 1117 insertions(+), 103 deletions(-)
create mode 100644 examples/multi_process/hotplug_mp/Makefile
create mode 100644 examples/multi_process/hotplug_mp/commands.c
create mode 100644 examples/multi_process/hotplug_mp/commands.h
create mode 100644 examples/multi_process/hotplug_mp/main.c
create mode 100644 lib/librte_eal/common/hotplug_mp.c
create mode 100644 lib/librte_eal/common/hotplug_mp.h
--
2.13.6
^ permalink raw reply [relevance 1%]
* Re: [dpdk-dev] [PATCH v10 05/19] eal: enable hotplug on multi-process
@ 2018-07-11 8:39 3% ` Burakov, Anatoly
0 siblings, 0 replies; 200+ results
From: Burakov, Anatoly @ 2018-07-11 8:39 UTC (permalink / raw)
To: Zhang, Qi Z, thomas
Cc: Ananyev, Konstantin, dev, Richardson, Bruce, Yigit, Ferruh,
Shelton, Benjamin H, Vangati, Narender
On 11-Jul-18 3:11 AM, Zhang, Qi Z wrote:
>>>> +/* Max length for a bus name */
>>>> +#define RTE_BUS_NAME_MAX_LEN 32
>>>
>>> Is this enforced anywhere in the bus codebase? Can we guarantee that
>>> bus name will never be bigger than this?
>>
>> I think 32 should be enough for a bus name even in future.
>
> Sorry, I missed your point, I think it is not enforced, we still can add a new bus exceed 32,
> but for RTE_DEV_NAME_MAX_LEN which is used in rte_devargs to enforce all device name not exceed 64.
> So, it's better to move RTE_BUS_NAME_MAX_LEN into hotplug_mp as internal , and this can be regarded as a limitation for hotplug so far, though it should be enough for all exist cases.
> And same for RTE_DEV_ARGS_MAX_LEN.
Can we fix it in this patchset, or would that involve an ABI break of
some sort?
--
Thanks,
Anatoly
^ permalink raw reply [relevance 3%]
* [dpdk-dev] [PATCH v11 19/19] doc: update release notes for multi process hotplug
2018-07-11 3:08 1% ` [dpdk-dev] [PATCH v11 00/19] enable hotplug on multi-process Qi Zhang
@ 2018-07-11 3:09 4% ` Qi Zhang
0 siblings, 0 replies; 200+ results
From: Qi Zhang @ 2018-07-11 3:09 UTC (permalink / raw)
To: thomas, anatoly.burakov
Cc: konstantin.ananyev, dev, bruce.richardson, ferruh.yigit,
benjamin.h.shelton, narender.vangati, Qi Zhang
Update release notes for the new multi-process hotplug feature.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
doc/guides/rel_notes/release_18_08.rst | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index bc0124295..1251e4b5b 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -46,6 +46,12 @@ New Features
Flow API support has been added to CXGBE Poll Mode Driver to offload
flows to Chelsio T5/T6 NICs.
+* **Support device multi-process hotplug.**
+
+ Hotplug and hot-unplug for devices will now be supported in multiprocessing
+ scenario. Any ethdev devices created in the primary process will be regarded
+ as shared and will be available for all DPDK processes. Synchronization between
+ processes will be done using DPDK IPC.
API Changes
-----------
@@ -60,6 +66,11 @@ API Changes
Also, make sure to start the actual text at the margin.
=========================================================
+* eal: scope of rte_eal_hotplug_add and rte_eal_hotplug_remove is extended.
+
+ In primary-secondary process model, ``rte_eal_hotplug_add`` will guarantee
+ that device be attached on all processes, while ``rte_eal_hotplug_remove``
+ will guarantee device be detached on all processes.
ABI Changes
-----------
--
2.13.6
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH v11 00/19] enable hotplug on multi-process
` (7 preceding siblings ...)
2018-07-09 3:36 1% ` [dpdk-dev] [PATCH v10 00/19] enable hotplug on multi-process Qi Zhang
@ 2018-07-11 3:08 1% ` Qi Zhang
2018-07-11 3:09 4% ` [dpdk-dev] [PATCH v11 19/19] doc: update release notes for multi process hotplug Qi Zhang
2018-07-11 13:47 1% ` [dpdk-dev] [PATCH v12 00/19] enable hotplug on multi-process Qi Zhang
` (3 subsequent siblings)
12 siblings, 1 reply; 200+ results
From: Qi Zhang @ 2018-07-11 3:08 UTC (permalink / raw)
To: thomas, anatoly.burakov
Cc: konstantin.ananyev, dev, bruce.richardson, ferruh.yigit,
benjamin.h.shelton, narender.vangati, Qi Zhang
v11:
- move out common code from pci_vfio_unmap_secondary and
pci_vfio_unmap_primary.
- move RTE_BUS_NAME_MAX_LEN and RTE_DEV_ARGS_MAX_LEN into hotplug_mp.h
- fix reply check in eal_dev_hotplug_request_to_primary.
- move skeleton code for attaching device from secondary from patch 6/19
to patch 5/19 to improve code readability.
v10:
- Since hotplug add/remove a vdev on a secondary process will sync on
all processes now, it is not necessary to support private vdev for
a secondary process which is identified by a not-NULL devargs in
"--vdev". So re-work on all vdev driver changes to simpified device
probe scenario on a secondary process, devargs will be ignored on
secondary process now.
- fix lisence header in example/multi-process/hotplug_mp/Makefile.
v9:
- Move hotplug IPC from rte_eth_dev_attach/rte_eth_dev_detach to
eal_dev_hotplug_add and eal_dev_hotplug_remove, now all kinds of
devices will be synced in multi-process.
- Fix couple issue when a device is bound to vfio.
1) The device can't be detached clearly in a secondary process, which
also cause it can't be attached again, due to the error that
/dev/vfio/<group_fd> is still busy.(see Patch 3/19 and 4/19)
2) repeat detach/attach device will cause "cannot find TAILQ entry
for PCI device" due to incorrect PCI address compare.
(see patch 2/19).
- Removed device lock.
- Removed private device support.
- Fix commit log grammar issue
v8:
- update rte_eal_version.map due to new API added.
- minor reword on release note.
- minor fix on commit log and code style.
NOTE:
Some issues which is not related with this patchset is expected when
play with hotplug_mp sample as belows.
- Attach a PCI device twice may cause device can't be detached
below fix is required:
https://patches.dpdk.org/patch/42030/
- ixgbe device can't detached, below fix is required
https://patches.dpdk.org/patch/42031/
v7:
- update rte_ethdev_version.map for new APIs.
- improve code readability in __handle_secondary_request by use goto.
- add comments to explain why need to call rte_eal_alarm_set.
- add error log when process_mp_init_callbacks failed.
- reword release notes base on Anatoly's suggestion.
- add back previous "Acked-by" and "Reviewed-by" in commit log.
NOTE: current patchset depends on below IPC fix, or it may not be able
to attach a shared vdev.
https://patches.dpdk.org/patch/41647/
v6:
- remove bus->scan_one, since ABI break is not necessary.
- remove patch for failsafe PMD since it will not support secondary.
- fix wrong implemenation on ixgbe.
- add rte_eth_dev_release_port_private into rte_eth_dev_pci_generic_remove for
secondary process, so we don't need to patch on PMD if PMD use the
default remove function.
- add release notes update.
- agreed to use strdup(peer) as workaround for repling a sync request in seperate
thread.
v5:
- since we will keep mp thread separate from interrupt thread,
it is not necessary to use temporary thread, we use rte_eal_alarm_set.
- remove the change in rte_eth_dev_release_port, since there is a better
way to prevent rte_eth_dev_release_port be called after
rte_eth_dev_release_port_private.
- fix the issue that lock does not take effect on secondary due to
previous re-work
- fix the issue when the first attached device is a private device from
secondary. (patch 8/24)
- work around for reply a sync request in separate thread, this is still
an open and in discussion as below.
https://mails.dpdk.org/archives/dev/2018-June/105359.html
v4:
- since mp thread will be merged to interrupt thread, the fix on v3
for sync IPC deadlock will not work. the new version enable the
machanism to invoke a mp action callback in a temporary thread to
avoid the IPC deadlock, with this, secondary to primary request
impelemtation also be simplified, since we can use sync request
directly in a separate thread.
v3:
- enable mp init callback register to help non-eal module to initialize
mp channel during rte_eal_init
- fix when attach share device from secondary.
1) dead lock due to sync IPC be invoked in rte_malloc in primary
process when handle secondary request to attach device, the
solution is primary process to issue share device attach/detach
in interrupt thread.
2) return port_id not correct.
- check nb_sent and nb_received in sync IPC.
- fix memory leak duirng error handling at attach_on_secondary.
- improve clean_lock_callback to only lock/unlock spinlock once
- improve error code return in check-reply during async IPC.
- remove rte_ prefix of internal function in ethdev_mp.c
- sample code improvement.
1) rename sample to "hotplug_mp", and move to example/multi-process.
2) cleanup header include.
3) call rte_eal_cleanup before exit.
v2:
- rename rte_ethdev_mp.* to ethdev_mp.*
- rename rte_ethdev_lock.* to ethdev_lock.*
- move internal funciton to ethdev_private.h
- separate rte_eth_dev_[un]lock into rte_eth_dev_[un]lock and
rte_eth_dev_[un]lock_with_callback
- lock callbacks will be removed automatically after device is detached.
- add experimental tag for all new APIs.
- fix coding style issue.
- fix wrong lisence header in sample code.
- fix spelling
- fix meson.build.
- improve comments.
Background:
===========
Currently secondary process will only sync ethdev from primary
process at init stage, but it will not be aware if device
is attached/detached on primary process at runtime.
While there is the requirement from application that take
primary-secondary process model. The primary process work as a
resource management process, it will create/destroy virtual device
at runtime, while the secondary process deal with the network stuff
with these devices.
Solution:
=========
So the orignial intention is to fix this gap, but beyond that
the patch set provide a more comprehesive solution to handle
different hotplug cases in multi-process situation, it cover below
scenario:
1. Attach a device from the primary
2. Detach a device from the primary
3. Attach a device from a secondary
4. Detach a device from a secondary
In primary-secondary process model, we assume ethernet devices are
shared by default. that means attach or detach a device on any process
will broadcast to all other processes through mp channel then device
information will be synchronized on all processes.
Any failure during attaching or detaching process will cause inconsistent
status between processes, so proper rollback action should be considered.
Scenario for Case 1, 2:
attach device from primary
a) primary attach the new device if failed goto h).
b) primary send attach sync request to all secondary.
c) secondary receive request and attach device and send reply.
d) primary check the reply if all success go to i).
e) primary send attach rollback sync request to all secondary.
f) secondary receive the request and detach device and send reply.
g) primary receive the reply and detach device as rollback action.
h) attach fail
i) attach success
detach device from primary
a) primary perform pre-detach check, if device is locked, goto i).
b) primary send pre-detach sync request to all secondary.
c) secondary perform pre-detach check and send reply.
d) primary check the reply if any fail goto i).
e) primary send detach sync request to all secondary
f) secondary detach the device and send reply (assume no fail)
g) primary detach the device.
h) detach success
i) detach failed
Scenario for case 3, 4:
attach device from secondary:
a) seconary send asycn request to primary and wait on a condition
which will be released by matched response from primary.
b) primary receive the request and attach the new device if failed
goto i).
c) primary forward attach request to all secondary as async request
(because this in mp thread context, use sync request will deadlock,
same reason for all following async request.)
d) secondary receive request and attach device and send reply.
e) primary check the reply if all success go to j).
f) primary send attach rollback async request to all secondary.
g) secondary receive the request and detach device and send reply.
h) primary receive the reply and detach device as rollback action.
i) send fail response to secondary, goto k).
j) send success response to secondary.
k) secondary process receive response and return.
detach device from secondary:
a) secondary send async request to primary and wait on a condition
which will be released by matched response from primary.
b) primary receive the request and perform pre-detach check, if device
is locked, goto j).
c) primary send pre-detach async request to all secondary.
d) secondary perform pre-detach check and send reply.
e) primary check the reply if any fail goto j).
f) primary send detach async request to all secondary
g) secondary detach the device and send reply
h) primary detach the device.
i) send success response to secondary, goto k).
j) send fail response to secondary.
k) secondary process receive response and return.
APIs chenages:
==============
scope of rte_eal_hotplug_add and rte_eal_hotplug_remove is extended.
In primary-secondary process model, rte_eal_hotplug_add will guarantee
that device be attached on all processes, while rte_eal_hotplug_remove will
guarantee device be detached on all processes.
PMD Impact:
===========
Currently device removing is not handled well in secondary process on
most pmd drivers, rte_eth_dev_relase_port will be invoked and will mess up
primary process since it reset all shared data. So we introduced new API
rte_eth_dev_release_port_local which only reset ethdev's state to unsued
but not touch shared data so other process will not be impacted.
Since not all device driver is target to support primary-secondary
process model, so the patch set only fix this on all Intel devices and
vdev, it can be refereneced by other driver when equevalent fix is
required
Example:
========
The patchset also contains a example to demonstrate device hotplug
in multi-process model, below are detail instructions.
/* start sample code as primary then secondary */
./hotplug_mp --proc-type=auto
Command Line Example:
>help
>list
/* attach a af_packet vdev */
>attach net_af_packet,iface=eth0
/* detach port 0 */
>detach 0
Qi Zhang (19):
ethdev: add function to release port in local process
bus/pci: fix PCI address compare
bus/pci: enable vfio unmap resource for secondary
vfio: remove uneccessary IPC for group fd clear
eal: enable hotplug on multi-process
eal: support attach or detach share device from secondary
net/i40e: enable hotplug on secondary process
net/ixgbe: enable hotplug on secondary process
net/af_packet: enable hotplug on secondary process
net/bonding: enable hotplug on secondary process
net/kni: enable hotplug on secondary process
net/null: enable hotplug on secondary process
net/octeontx: enable hotplug on secondary process
net/pcap: enable hotplug on secondary process
net/softnic: enable hotplug on secondary process
net/tap: enable hotplug on secondary process
net/vhost: enable hotplug on secondary process
examples/multi_process: add hotplug sample
doc: update release notes for multi process hotplug
doc/guides/rel_notes/release_18_08.rst | 11 +
drivers/bus/pci/linux/pci_vfio.c | 129 +++++++--
drivers/net/af_packet/rte_eth_af_packet.c | 7 +-
drivers/net/bonding/rte_eth_bond_pmd.c | 7 +-
drivers/net/i40e/i40e_ethdev.c | 2 +
drivers/net/ixgbe/ixgbe_ethdev.c | 3 +
drivers/net/kni/rte_eth_kni.c | 7 +-
drivers/net/null/rte_eth_null.c | 12 +-
drivers/net/octeontx/octeontx_ethdev.c | 9 +
drivers/net/pcap/rte_eth_pcap.c | 11 +-
drivers/net/softnic/rte_eth_softnic.c | 15 +-
drivers/net/tap/rte_eth_tap.c | 13 +-
drivers/net/vhost/rte_eth_vhost.c | 7 +-
examples/multi_process/Makefile | 1 +
examples/multi_process/hotplug_mp/Makefile | 23 ++
examples/multi_process/hotplug_mp/commands.c | 197 ++++++++++++++
examples/multi_process/hotplug_mp/commands.h | 10 +
examples/multi_process/hotplug_mp/main.c | 41 +++
lib/librte_eal/bsdapp/eal/Makefile | 1 +
lib/librte_eal/common/eal_common_dev.c | 184 ++++++++++++-
lib/librte_eal/common/eal_private.h | 37 +++
lib/librte_eal/common/hotplug_mp.c | 346 +++++++++++++++++++++++++
lib/librte_eal/common/hotplug_mp.h | 48 ++++
lib/librte_eal/common/include/rte_dev.h | 6 +
lib/librte_eal/common/meson.build | 1 +
lib/librte_eal/linuxapp/eal/Makefile | 1 +
lib/librte_eal/linuxapp/eal/eal.c | 6 +
lib/librte_eal/linuxapp/eal/eal_vfio.c | 45 +---
lib/librte_eal/linuxapp/eal/eal_vfio.h | 1 -
lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c | 8 -
lib/librte_ethdev/rte_ethdev.c | 12 +
lib/librte_ethdev/rte_ethdev_driver.h | 16 +-
lib/librte_ethdev/rte_ethdev_pci.h | 8 +
33 files changed, 1122 insertions(+), 103 deletions(-)
create mode 100644 examples/multi_process/hotplug_mp/Makefile
create mode 100644 examples/multi_process/hotplug_mp/commands.c
create mode 100644 examples/multi_process/hotplug_mp/commands.h
create mode 100644 examples/multi_process/hotplug_mp/main.c
create mode 100644 lib/librte_eal/common/hotplug_mp.c
create mode 100644 lib/librte_eal/common/hotplug_mp.h
--
2.13.6
^ permalink raw reply [relevance 1%]
* [dpdk-dev] [PATCH v2 1/4] cryptodev: add min headroom and tailroom requirement
@ 2018-07-10 14:42 5% ` Anoob Joseph
0 siblings, 0 replies; 200+ results
From: Anoob Joseph @ 2018-07-10 14:42 UTC (permalink / raw)
To: Declan Doherty, Pablo de Lara
Cc: Anoob Joseph, Akhil Goyal, Ankur Dwivedi, Jerin Jacob,
Narayana Prasad, dev
Enabling crypto devs to specify the minimum headroom and tailroom it
expects in the mbuf. For net PMDs, standard headroom has to be honoured
by applications, which is not strictly followed for crypto devs. This
prevents crypto devs from using free space in mbuf (available as
head/tailroom) for internal requirements in crypto operations. Addition
of head/tailroom requirement will help PMDs to communicate such
requirements to the application.
The availability and use of head/tailroom is an optimization if the
hardware supports use of head/tailroom for crypto-op info. For devices
that do not support using the head/tailroom, they can continue to operate
without any performance-drop.
Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
---
v2:
* No change
v1:
* Removed deprecation notice
* Updated release note
* Renamed new fields to have 'mbuf' in the name
* Changed the type of new fields to uint16_t (instead of uint32_t)
doc/guides/rel_notes/release_18_08.rst | 6 ++++++
lib/librte_cryptodev/rte_cryptodev.h | 6 ++++++
2 files changed, 12 insertions(+)
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 5bc23c5..fae0d26 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -70,6 +70,12 @@ ABI Changes
Also, make sure to start the actual text at the margin.
=========================================================
+* cryptodev: Additional fields in rte_cryptodev_info.
+
+ Two new fields of type ``uint16_t`` added in ``rte_cryptodev_info``
+ structure: ``min_mbuf_headroom_req`` and ``min_mbuf_tailroom_req``. These
+ parameters specify the recommended headroom and tailroom for mbufs to be
+ processed by the PMD.
Removed Items
-------------
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 92ce6d4..4e5b5b4 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -382,6 +382,12 @@ struct rte_cryptodev_info {
unsigned max_nb_queue_pairs;
/**< Maximum number of queues pairs supported by device. */
+ uint16_t min_mbuf_headroom_req;
+ /**< Minimum mbuf headroom required by device */
+
+ uint16_t min_mbuf_tailroom_req;
+ /**< Minimum mbuf tailroom required by device */
+
struct {
unsigned max_nb_sessions;
/**< Maximum number of sessions supported by device. */
--
2.7.4
^ permalink raw reply [relevance 5%]
* Re: [dpdk-dev] [PATCH 1/4] eventdev: add eth Tx adapter APIs
@ 2018-07-10 12:17 3% ` Jerin Jacob
2018-07-16 8:34 0% ` Rao, Nikhil
0 siblings, 1 reply; 200+ results
From: Jerin Jacob @ 2018-07-10 12:17 UTC (permalink / raw)
To: Nikhil Rao; +Cc: olivier.matz, dev, anoob.joseph
-----Original Message-----
> Date: Fri, 6 Jul 2018 12:12:06 +0530
> From: Nikhil Rao <nikhil.rao@intel.com>
> To: jerin.jacob@caviumnetworks.com, olivier.matz@6wind.com
> CC: nikhil.rao@intel.com, dev@dpdk.org
> Subject: [PATCH 1/4] eventdev: add eth Tx adapter APIs
> X-Mailer: git-send-email 1.8.3.1
>
>
> The ethernet Tx adapter abstracts the transmit stage of an
> event driven packet processing application. The transmit
> stage may be implemented with eventdev PMD support or use a
> rte_service function implemented in the adapter. These APIs
> provide a common configuration and control interface and
> an transmit API for the eventdev PMD implementation.
>
> The transmit port is specified using mbuf::port. The transmit
> queue is specified using the rte_event_eth_tx_adapter_txq_set()
> function. The mbuf will specify a queue ID in the future
> (http://mails.dpdk.org/archives/dev/2018-February/090651.html)
> at which point this function will be replaced with a macro.
>
> Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
> ---
1) Update doc/api/doxy-api-index.md
2) Update lib/librte_eventdev/Makefile
+SYMLINK-y-include += rte_event_eth_tx_adapter.h
I think, the following working is _pending_
1) Update app/test-eventdev/ for Tx adapter
2) Update examples/eventdev_pipeline/ for Tx adapter
3) Add Tx adapter documentation
4) Add Tx adapter ops for octeontx driver
5) Add Tx adapter ops for dpaa driver(if need)
Nikhil,
If you are OK then Cavium would like to take up (1), (2) and (4) activities.
Let me know your thoughts.
Since this patch set already crossed the RC1 deadline. We will complete
all the _pending_ work and push to next-eventdev tree in the very beginning of
v18.11 so that Anoob's adapter helper function work can be added v18.11.
>
> This patch series adds the event ethernet Tx adapter which is
> based on a previous RFC
> * RFCv1 - http://mails.dpdk.org/archives/dev/2018-May/102936.html
> * RFCv2 - http://mails.dpdk.org/archives/dev/2018-June/104075.html
>
> RFC -> V1:
> =========
>
> * Move port and tx queue id to mbuf from mbuf private area. (Jerin Jacob)
>
> * Support for PMD transmit function. (Jerin Jacob)
>
> * mbuf change has been replaced with rte_event_eth_tx_adapter_txq_set().
> The goal is to align with the mbuf change for a qid field.
> (http://mails.dpdk.org/archives/dev/2018-February/090651.html). Once the mbuf
> change is available, the function can be replaced with a macro with no impact
> to applications.
>
> * Various cleanups (Jerin Jacob)
>
> lib/librte_eventdev/rte_event_eth_tx_adapter.h | 497 +++++++++++++++++++++++++
> lib/librte_mbuf/rte_mbuf.h | 4 +-
> MAINTAINERS | 5 +
> 3 files changed, 505 insertions(+), 1 deletion(-)
> create mode 100644 lib/librte_eventdev/rte_event_eth_tx_adapter.h
>
> +/**
> + * @warning
> + * @b EXPERIMENTAL: this API may change without prior notice
> + *
> + * A structure used to retrieve statistics for an eth tx adapter instance.
> + */
> +struct rte_event_eth_tx_adapter_stats {
> + uint64_t tx_retry;
> + /**< Number of transmit retries */
> + uint64_t tx_packets;
> + /**< Number of packets transmitted */
> + uint64_t tx_dropped;
> + /**< Number of packets dropped */
> +};
> +
> +/** Event Eth Tx Adapter Structure */
> +struct rte_event_eth_tx_adapter {
> + uint8_t id;
> + /**< Adapter Identifier */
> + uint8_t eventdev_id;
> + /**< Max mbufs processed in any service function invocation */
> + uint32_t max_nb_tx;
> + /**< The adapter can return early if it has processed at least
> + * max_nb_tx mbufs. This isn't treated as a requirement; batching may
> + * cause the adapter to process more than max_nb_tx mbufs.
> + */
> + uint32_t nb_queues;
> + /**< Number of Tx queues in adapter */
> + int socket_id;
> + /**< socket id */
> + rte_spinlock_t tx_lock;
> + /**< Synchronization with data path */
> + void *dev_private;
> + /**< PMD private data */
> + char mem_name[RTE_EVENT_ETH_TX_ADAPTER_SERVICE_NAME_LEN];
> + /**< Memory allocation name */
> + rte_event_eth_tx_adapter_conf_cb conf_cb;
> + /** Configuration callback */
> + void *conf_arg;
> + /**< Configuration callback argument */
> + uint16_t dev_count;
> + /**< Highest port id supported + 1 */
> + struct rte_event_eth_tx_adapter_ethdev *txa_ethdev;
> + /**< Per ethernet device structure */
> + struct rte_event_eth_tx_adapter_stats stats;
> +} __rte_cache_aligned;
Can you move this structure to .c file as implementation, Reasons are -
a) It should not be under ABI deprecation
b) INTERNAL_PORT based adapter may have different values.i.e the above
structure is implementation defined.
> +
> +struct rte_event_eth_tx_adapters {
> + struct rte_event_eth_tx_adapter **data;
> +};
> +
same as above
> +/* Per eth device structure */
> +struct rte_event_eth_tx_adapter_ethdev {
> + /* Pointer to ethernet device */
> + struct rte_eth_dev *dev;
> + /* Number of queues added */
> + uint16_t nb_queues;
> + /* PMD specific queue data */
> + void *queues;
> +};
same as above
> +
> +extern struct rte_event_eth_tx_adapters rte_event_eth_tx_adapters;
> +
same as above
> +/**
> + * @warning
> + * @b EXPERIMENTAL: this API may change without prior notice
> + *
> + * Create a new event ethernet Tx adapter with the specified identifier.
> + *
> + * @param id
> + * The identifier of the event ethernet Tx adapter.
> + * @param dev_id
> + * The event device identifier.
> + * @param port_config
> + * Event port configuration, the adapter uses this configuration to
> + * create an event port if needed.
> + * @return
> + * - 0: Success
> + * - <0: Error code on failure
> + */
> +int __rte_experimental
> +rte_event_eth_tx_adapter_create(uint8_t id, uint8_t dev_id,
> + struct rte_event_port_conf *port_config);
> +
> +/**
> + * @warning
> + * @b EXPERIMENTAL: this API may change without prior notice
> + *
> + * Create a new event ethernet Tx adapter with the specified identifier.
> + *
> + * @param id
> + * The identifier of the event ethernet Tx adapter.
> + * @param dev_id
> + * The event device identifier.
> + * @param conf_cb
> + * Callback function that initalizes members of the
s/initalizes/initializes
> + * struct rte_event_eth_tx_adapter_conf struct passed into
> + * it.
> + * @param conf_arg
> + * Argument that is passed to the conf_cb function.
> + * @return
> + * - 0: Success
> + * - <0: Error code on failure
> + */
> +int __rte_experimental
> +rte_event_eth_tx_adapter_create_ext(uint8_t id, uint8_t dev_id,
> + rte_event_eth_tx_adapter_conf_cb conf_cb,
> + void *conf_arg);
> +
> +/**
> +/**
> + * @warning
> + * @b EXPERIMENTAL: this API may change without prior notice
> + *
> + * Add a Tx queue to the adapter.
> + * A queue value of -1 is used to indicate all
> + * queues within the device.
> + *
> + * @param id
> + * Adapter identifier.
> + * @param eth_dev_id
> + * Ethernet Port Identifier.
> + * @param queue
> + * Tx queue index.
> + * @return
> + * - 0: Success, Queues added succcessfully.
s/succcessfully/successfully
> + * - <0: Error code on failure.
> + */
> +int __rte_experimental
> +rte_event_eth_tx_adapter_queue_add(uint8_t id,
> + uint16_t eth_dev_id,
> + int32_t queue);
> +
> +/**
> + * @warning
> + * @b EXPERIMENTAL: this API may change without prior notice
> + *
> + *
> + * Set Tx queue in the mbuf.
> + *
> + * @param pkt
> + * Pointer to the mbuf.
> + * @param queue
> + * Tx queue index.
> + */
> +void __rte_experimental
> +rte_event_eth_tx_adapter_txq_set(struct rte_mbuf *pkt, uint16_t queue);
1) Can you make this as static inline for better performance(as it is just
a mbuf field access)?
2) Please add _get function, It will be useful for application and
Tx adapter op implementation.
> +
> +/**
> + * @warning
> + * @b EXPERIMENTAL: this API may change without prior notice
> + *
> + * Retrieve the adapter event port. The adapter creates an event port if
> + * the RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT is not set in the
> + * eth Tx capabilities of the event device.
> + *
> + * @param id
> + * Adapter Identifier.
> + * @param[out] event_port_id
> + * Event port pointer.
> + * @return
> + * - 0: Success.
> + * - <0: Error code on failure.
> + */
> +int __rte_experimental
> +rte_event_eth_tx_adapter_event_port_get(uint8_t id, uint8_t *event_port_id);
> +
> +static __rte_always_inline uint16_t __rte_experimental
> +__rte_event_eth_tx_adapter_enqueue(uint8_t id, uint8_t dev_id, uint8_t port_id,
> + struct rte_event ev[],
> + uint16_t nb_events,
> + const event_tx_adapter_enqueue fn)
> +{
> + const struct rte_eventdev *dev = &rte_eventdevs[dev_id];
Access to *dev twice(see below rte_event_eth_tx_adapter_enqueue())
> + struct rte_event_eth_tx_adapter *txa =
> + rte_event_eth_tx_adapters.data[id];
Just like common Tx adapter implementation, We can manage ethdev queue to adapter mapping
internally. So this deference is not required in fastpath.
Please simply call the following, just like other eventdev ops.
fn(dev->data->ports[port_id], ev, nb_events)
> +
> +#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
> + if (id >= RTE_EVENT_ETH_TX_ADAPTER_MAX_INSTANCE ||
> + dev_id >= RTE_EVENT_MAX_DEVS ||
> + !rte_eventdevs[dev_id].attached) {
> + rte_errno = -EINVAL;
> + return 0;
> + }
> +
> + if (port_id >= dev->data->nb_ports) {
> + rte_errno = -EINVAL;
> + return 0;
> + }
> +#endif
> + return fn((void *)txa, dev, dev->data->ports[port_id], ev, nb_events);
> +}
> +
> +/**
> + * Enqueue a burst of events objects or an event object supplied in *rte_event*
> + * structure on an event device designated by its *dev_id* through the event
> + * port specified by *port_id*. This function is supported if the eventdev PMD
> + * has the RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT capability flag set.
> + *
> + * The *nb_events* parameter is the number of event objects to enqueue which are
> + * supplied in the *ev* array of *rte_event* structure.
> + *
> + * The rte_event_eth_tx_adapter_enqueue() function returns the number of
> + * events objects it actually enqueued. A return value equal to *nb_events*
> + * means that all event objects have been enqueued.
> + *
> + * @param id
> + * The identifier of the tx adapter.
> + * @param dev_id
> + * The identifier of the device.
> + * @param port_id
> + * The identifier of the event port.
> + * @param ev
> + * Points to an array of *nb_events* objects of type *rte_event* structure
> + * which contain the event object enqueue operations to be processed.
> + * @param nb_events
> + * The number of event objects to enqueue, typically number of
> + * rte_event_port_enqueue_depth() available for this port.
> + *
> + * @return
> + * The number of event objects actually enqueued on the event device. The
> + * return value can be less than the value of the *nb_events* parameter when
> + * the event devices queue is full or if invalid parameters are specified in a
> + * *rte_event*. If the return value is less than *nb_events*, the remaining
> + * events at the end of ev[] are not consumed and the caller has to take care
> + * of them, and rte_errno is set accordingly. Possible errno values include:
> + * - -EINVAL The port ID is invalid, device ID is invalid, an event's queue
> + * ID is invalid, or an event's sched type doesn't match the
> + * capabilities of the destination queue.
> + * - -ENOSPC The event port was backpressured and unable to enqueue
> + * one or more events. This error code is only applicable to
> + * closed systems.
> + */
> +static inline uint16_t __rte_experimental
> +rte_event_eth_tx_adapter_enqueue(uint8_t id, uint8_t dev_id,
> + uint8_t port_id,
> + struct rte_event ev[],
> + uint16_t nb_events)
> +{
> + const struct rte_eventdev *dev = &rte_eventdevs[dev_id];
> +
> + return __rte_event_eth_tx_adapter_enqueue(id, dev_id, port_id, ev,
> + nb_events,
> + dev->txa_enqueue);
As per above, Since the function call logic is simplified you can add the
above function logic here.
> +}
> +
> index dabb12d..ab23503 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -388,6 +388,11 @@ F: lib/librte_eventdev/*crypto_adapter*
> F: test/test/test_event_crypto_adapter.c
> F: doc/guides/prog_guide/event_crypto_adapter.rst
>
> +Eventdev Ethdev Tx Adapter API - EXPERIMENTAL
> +M: Nikhil Rao <nikhil.rao@intel.com>
> +T: git://dpdk.org/next/dpdk-next-eventdev
> +F: lib/librte_eventdev/*eth_tx_adapter*
Add the testcase also.
Overall it looks good. No more comments on specification.
> +
> Raw device API - EXPERIMENTAL
> M: Shreyansh Jain <shreyansh.jain@nxp.com>
> M: Hemant Agrawal <hemant.agrawal@nxp.com>
> --
> 1.8.3.1
>
^ permalink raw reply [relevance 3%]
* Re: [dpdk-dev] [PATCH v1 1/3] cryptodev: add min headroom and tailroom requirement
2018-07-10 10:26 0% ` De Lara Guarch, Pablo
@ 2018-07-10 10:50 0% ` Anoob Joseph
0 siblings, 0 replies; 200+ results
From: Anoob Joseph @ 2018-07-10 10:50 UTC (permalink / raw)
To: De Lara Guarch, Pablo, Doherty, Declan
Cc: Akhil Goyal, Ankur Dwivedi, Jerin Jacob, Narayana Prasad, dev
Hi Pablo,
I'll look into this and will give you an updated patch.
Thanks,
Anoob
On 10-07-2018 15:56, De Lara Guarch, Pablo wrote:
> External Email
>
> Hi Anoob,
>
>> -----Original Message-----
>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Anoob Joseph
>> Sent: Wednesday, July 4, 2018 2:56 PM
>> To: Doherty, Declan <declan.doherty@intel.com>; De Lara Guarch, Pablo
>> <pablo.de.lara.guarch@intel.com>
>> Cc: Anoob Joseph <anoob.joseph@caviumnetworks.com>; Akhil Goyal
>> <akhil.goyal@nxp.com>; Ankur Dwivedi
>> <ankur.dwivedi@caviumnetworks.com>; Jerin Jacob
>> <jerin.jacob@caviumnetworks.com>; Narayana Prasad
>> <narayanaprasad.athreya@caviumnetworks.com>; dev@dpdk.org
>> Subject: [dpdk-dev] [PATCH v1 1/3] cryptodev: add min headroom and tailroom
>> requirement
>>
>> Enabling crypto devs to specify the minimum headroom and tailroom it expects
>> in the mbuf. For net PMDs, standard headroom has to be honoured by
>> applications, which is not strictly followed for crypto devs. This prevents crypto
>> devs from using free space in mbuf (available as
>> head/tailroom) for internal requirements in crypto operations. Addition of
>> head/tailroom requirement will help PMDs to communicate such requirements
>> to the application.
>>
>> The availability and use of head/tailroom is an optimization if the hardware
>> supports use of head/tailroom for crypto-op info. For devices that do not
>> support using the head/tailroom, they can continue to operate without any
>> performance-drop.
>>
>> Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
>> ---
>> v1:
>> * Removed deprecation notice
>> * Updated release note
>> * Renamed new fields to have 'mbuf' in the name
>> * Changed the type of new fields to uint16_t (instead of uint32_t)
>>
>> doc/guides/rel_notes/release_18_08.rst | 6 ++++++
>> lib/librte_cryptodev/rte_cryptodev.h | 6 ++++++
>> 2 files changed, 12 insertions(+)
>>
>> diff --git a/doc/guides/rel_notes/release_18_08.rst
>> b/doc/guides/rel_notes/release_18_08.rst
>> index 5bc23c5..fae0d26 100644
>> --- a/doc/guides/rel_notes/release_18_08.rst
>> +++ b/doc/guides/rel_notes/release_18_08.rst
>> @@ -70,6 +70,12 @@ ABI Changes
>> Also, make sure to start the actual text at the margin.
>> =========================================================
>>
>> +* cryptodev: Additional fields in rte_cryptodev_info.
>> +
>> + Two new fields of type ``uint16_t`` added in ``rte_cryptodev_info``
>> + structure: ``min_mbuf_headroom_req`` and ``min_mbuf_tailroom_req``.
>> + These parameters specify the recommended headroom and tailroom for
>> + mbufs to be processed by the PMD.
> I think the "cryptodev scheduler PMD" needs changes to take these new parameters into consideration.
> Scheduler_pmd_info_get should return the maximum number of these two fields on all the slaves
> (like what's done with max number of sessions).
>
> We need to close the subtree today, with all API changes done. Will you have time to make this change today?
>
> Thanks!
> Pablo
>
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [PATCH v1 1/3] cryptodev: add min headroom and tailroom requirement
2018-07-04 13:55 5% ` [dpdk-dev] [PATCH v1 1/3] cryptodev: add min headroom and tailroom requirement Anoob Joseph
@ 2018-07-10 10:26 0% ` De Lara Guarch, Pablo
2018-07-10 10:50 0% ` Anoob Joseph
0 siblings, 1 reply; 200+ results
From: De Lara Guarch, Pablo @ 2018-07-10 10:26 UTC (permalink / raw)
To: Anoob Joseph, Doherty, Declan
Cc: Akhil Goyal, Ankur Dwivedi, Jerin Jacob, Narayana Prasad, dev
Hi Anoob,
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Anoob Joseph
> Sent: Wednesday, July 4, 2018 2:56 PM
> To: Doherty, Declan <declan.doherty@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>
> Cc: Anoob Joseph <anoob.joseph@caviumnetworks.com>; Akhil Goyal
> <akhil.goyal@nxp.com>; Ankur Dwivedi
> <ankur.dwivedi@caviumnetworks.com>; Jerin Jacob
> <jerin.jacob@caviumnetworks.com>; Narayana Prasad
> <narayanaprasad.athreya@caviumnetworks.com>; dev@dpdk.org
> Subject: [dpdk-dev] [PATCH v1 1/3] cryptodev: add min headroom and tailroom
> requirement
>
> Enabling crypto devs to specify the minimum headroom and tailroom it expects
> in the mbuf. For net PMDs, standard headroom has to be honoured by
> applications, which is not strictly followed for crypto devs. This prevents crypto
> devs from using free space in mbuf (available as
> head/tailroom) for internal requirements in crypto operations. Addition of
> head/tailroom requirement will help PMDs to communicate such requirements
> to the application.
>
> The availability and use of head/tailroom is an optimization if the hardware
> supports use of head/tailroom for crypto-op info. For devices that do not
> support using the head/tailroom, they can continue to operate without any
> performance-drop.
>
> Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
> ---
> v1:
> * Removed deprecation notice
> * Updated release note
> * Renamed new fields to have 'mbuf' in the name
> * Changed the type of new fields to uint16_t (instead of uint32_t)
>
> doc/guides/rel_notes/release_18_08.rst | 6 ++++++
> lib/librte_cryptodev/rte_cryptodev.h | 6 ++++++
> 2 files changed, 12 insertions(+)
>
> diff --git a/doc/guides/rel_notes/release_18_08.rst
> b/doc/guides/rel_notes/release_18_08.rst
> index 5bc23c5..fae0d26 100644
> --- a/doc/guides/rel_notes/release_18_08.rst
> +++ b/doc/guides/rel_notes/release_18_08.rst
> @@ -70,6 +70,12 @@ ABI Changes
> Also, make sure to start the actual text at the margin.
> =========================================================
>
> +* cryptodev: Additional fields in rte_cryptodev_info.
> +
> + Two new fields of type ``uint16_t`` added in ``rte_cryptodev_info``
> + structure: ``min_mbuf_headroom_req`` and ``min_mbuf_tailroom_req``.
> + These parameters specify the recommended headroom and tailroom for
> + mbufs to be processed by the PMD.
I think the "cryptodev scheduler PMD" needs changes to take these new parameters into consideration.
Scheduler_pmd_info_get should return the maximum number of these two fields on all the slaves
(like what's done with max number of sessions).
We need to close the subtree today, with all API changes done. Will you have time to make this change today?
Thanks!
Pablo
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [PATCH] cryptodev: rename experimental private data APIs
2018-07-06 13:39 3% [dpdk-dev] [PATCH] cryptodev: rename experimental private data APIs Fiona Trahe
2018-07-09 7:34 0% ` Gujjar, Abhinandan S
@ 2018-07-10 6:29 0% ` Gujjar, Abhinandan S
1 sibling, 0 replies; 200+ results
From: Gujjar, Abhinandan S @ 2018-07-10 6:29 UTC (permalink / raw)
To: Trahe, Fiona, dev
Cc: De Lara Guarch, Pablo, jerin.jacob, Vangati, Narender, Akhil Goyal
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
> -----Original Message-----
> From: Trahe, Fiona
> Sent: Friday, July 6, 2018 7:10 PM
> To: dev@dpdk.org
> Cc: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Trahe, Fiona
> <fiona.trahe@intel.com>; Gujjar, Abhinandan S <abhinandan.gujjar@intel.com>
> Subject: [PATCH] cryptodev: rename experimental private data APIs
>
> The name private_data is confusing in these APIs:
> rte_cryptodev_sym_session_set_private_data()
> rte_cryptodev_sym_session_get_private_data()
> It refers to data added at the end of the session hdr for use by the application.
> The session already contains sess_private_data[index] which is used to store
> private pmd data and most references to private data refer to that.
> e.g. external apis
> rte_cryptodev_sym_get_private_session_size() and internal
> set/get_session_private_data() refer to sess_private_data[].
>
> So rename to user_data, i.e.
> rte_cryptodev_sym_session_set_user_data()
> rte_cryptodev_sym_session_get_user_data()
>
> Refers to changes introduced here:
> https://patches.dpdk.org/patch/38172/
>
> Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
> ---
> doc/guides/prog_guide/cryptodev_lib.rst | 14 +++++++-------
> doc/guides/prog_guide/event_crypto_adapter.rst | 6 +++---
> doc/guides/rel_notes/release_18_08.rst | 8 ++++++++
> lib/librte_cryptodev/rte_cryptodev.c | 16 ++++++++--------
> lib/librte_cryptodev/rte_cryptodev.h | 14 +++++++-------
> lib/librte_cryptodev/rte_cryptodev_version.map | 4 ++--
> lib/librte_eventdev/rte_event_crypto_adapter.c | 4 ++--
> test/test/test_event_crypto_adapter.c | 8 ++++----
> 8 files changed, 41 insertions(+), 33 deletions(-)
>
> diff --git a/doc/guides/prog_guide/cryptodev_lib.rst
> b/doc/guides/prog_guide/cryptodev_lib.rst
> index 30f0bcf7a..3dbf4dde6 100644
> --- a/doc/guides/prog_guide/cryptodev_lib.rst
> +++ b/doc/guides/prog_guide/cryptodev_lib.rst
> @@ -302,24 +302,24 @@ enqueue call.
> Private data
> ~~~~~~~~~~~~
> For session-based operations, the set and get API provides a mechanism for an -
> application to store and retrieve the private data information stored along with -
> the crypto session.
> +application to store and retrieve the private user data information
> +stored along with the crypto session.
>
> For example, suppose an application is submitting a crypto operation with a
> session -associated and wants to indicate private data information which is
> required to be
> +associated and wants to indicate private user data information which is
> +required to be
> used after completion of the crypto operation. In this case, the application can
> use -the set API to set the private data and retrieve it using get API.
> +the set API to set the user data and retrieve it using get API.
>
> .. code-block:: c
>
> - int rte_cryptodev_sym_session_set_private_data(
> + int rte_cryptodev_sym_session_set_user_data(
> struct rte_cryptodev_sym_session *sess, void *data, uint16_t
> size);
>
> - void * rte_cryptodev_sym_session_get_private_data(
> + void * rte_cryptodev_sym_session_get_user_data(
> struct rte_cryptodev_sym_session *sess);
>
>
> -For session-less mode, the private data information can be placed along with
> the
> +For session-less mode, the private user data information can be placed
> +along with the
> ``struct rte_crypto_op``. The ``rte_crypto_op::private_data_offset`` indicates
> the start of private data information. The offset is counted from the start of the
> rte_crypto_op including other crypto information such as the IVs (since there
> can diff --git a/doc/guides/prog_guide/event_crypto_adapter.rst
> b/doc/guides/prog_guide/event_crypto_adapter.rst
> index 5c1354dec..9fe09c805 100644
> --- a/doc/guides/prog_guide/event_crypto_adapter.rst
> +++ b/doc/guides/prog_guide/event_crypto_adapter.rst
> @@ -223,9 +223,9 @@ crypto security session or at an offset in the ``struct
> rte_crypto_op``.
> The ``rte_crypto_op::private_data_offset`` is used to locate the request/
> response in the ``rte_crypto_op``.
>
> -For crypto session, ``rte_cryptodev_sym_session_set_private_data()`` API
> +For crypto session, ``rte_cryptodev_sym_session_set_user_data()`` API
> will be used to set request/response data. The same data will be obtained -by
> ``rte_cryptodev_sym_session_get_private_data()`` API. The
> +by ``rte_cryptodev_sym_session_get_user_data()`` API. The
> RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA capability
> indicates whether HW or SW supports this feature.
>
> @@ -257,7 +257,7 @@ the ``rte_crypto_op``.
> m_data.request_info.cdev_id = cdev_id;
> m_data.request_info.queue_pair_id = qp_id;
> /* Call set API to store private data information */
> - rte_cryptodev_sym_session_set_private_data(
> + rte_cryptodev_sym_session_set_user_data(
> op->sym->session,
> &m_data,
> sizeof(m_data)); diff --git
> a/doc/guides/rel_notes/release_18_08.rst
> b/doc/guides/rel_notes/release_18_08.rst
> index bc0124295..8f84a088c 100644
> --- a/doc/guides/rel_notes/release_18_08.rst
> +++ b/doc/guides/rel_notes/release_18_08.rst
> @@ -60,6 +60,14 @@ API Changes
> Also, make sure to start the actual text at the margin.
> =========================================================
>
> +* **Renamed cryptodev experimental APIs.**
> +
> + Used user_data instead of private_data in following APIs to avoid
> + confusion with the existing session parameter ``sess_private_data[]`` and
> related APIs.
> + ``rte_cryptodev_sym_session_set_private_data()`` changed to
> + ``rte_cryptodev_sym_session_set_user_data()``
> + ``rte_cryptodev_sym_session_get_private_data()`` changed to
> + ``rte_cryptodev_sym_session_get_user_data()``
>
> ABI Changes
> -----------
> diff --git a/lib/librte_cryptodev/rte_cryptodev.c
> b/lib/librte_cryptodev/rte_cryptodev.c
> index 7e5821246..88f4af5f6 100644
> --- a/lib/librte_cryptodev/rte_cryptodev.c
> +++ b/lib/librte_cryptodev/rte_cryptodev.c
> @@ -1123,7 +1123,7 @@ rte_cryptodev_sym_session_create(struct
> rte_mempool *mp)
> }
>
> /* Clear device session pointer.
> - * Include the flag indicating presence of private data
> + * Include the flag indicating presence of user data
> */
> memset(sess, 0, (sizeof(void *) * nb_drivers) + sizeof(uint8_t));
>
> @@ -1236,7 +1236,7 @@ rte_cryptodev_sym_get_header_session_size(void)
> /*
> * Header contains pointers to the private data
> * of all registered drivers, and a flag which
> - * indicates presence of private data
> + * indicates presence of user data
> */
> return ((sizeof(void *) * nb_drivers) + sizeof(uint8_t)); } @@ -1277,31
> +1277,31 @@ rte_cryptodev_sym_get_private_session_size(uint8_t dev_id) }
>
> int __rte_experimental
> -rte_cryptodev_sym_session_set_private_data(
> +rte_cryptodev_sym_session_set_user_data(
> struct rte_cryptodev_sym_session
> *sess,
> void *data,
> uint16_t size)
> {
> uint16_t off_set = sizeof(void *) * nb_drivers;
> - uint8_t *private_data_present = (uint8_t *)sess + off_set;
> + uint8_t *user_data_present = (uint8_t *)sess + off_set;
>
> if (sess == NULL)
> return -EINVAL;
>
> - *private_data_present = 1;
> + *user_data_present = 1;
> off_set += sizeof(uint8_t);
> rte_memcpy((uint8_t *)sess + off_set, data, size);
> return 0;
> }
>
> void * __rte_experimental
> -rte_cryptodev_sym_session_get_private_data(
> +rte_cryptodev_sym_session_get_user_data(
> struct rte_cryptodev_sym_session
> *sess) {
> uint16_t off_set = sizeof(void *) * nb_drivers;
> - uint8_t *private_data_present = (uint8_t *)sess + off_set;
> + uint8_t *user_data_present = (uint8_t *)sess + off_set;
>
> - if (sess == NULL || !*private_data_present)
> + if (sess == NULL || !*user_data_present)
> return NULL;
>
> off_set += sizeof(uint8_t);
> diff --git a/lib/librte_cryptodev/rte_cryptodev.h
> b/lib/librte_cryptodev/rte_cryptodev.h
> index ccc0f73fd..5d4e690c2 100644
> --- a/lib/librte_cryptodev/rte_cryptodev.h
> +++ b/lib/librte_cryptodev/rte_cryptodev.h
> @@ -1041,35 +1041,35 @@ int rte_cryptodev_driver_id_get(const char
> *name); const char *rte_cryptodev_driver_name_get(uint8_t driver_id);
>
> /**
> - * Set private data for a session.
> + * Store user data in a session.
> *
> * @param sess Session pointer allocated by
> * *rte_cryptodev_sym_session_create*.
> - * @param data Pointer to the private data.
> - * @param size Size of the private data.
> + * @param data Pointer to the user data.
> + * @param size Size of the user data.
> *
> * @return
> * - On success, zero.
> * - On failure, a negative value.
> */
> int __rte_experimental
> -rte_cryptodev_sym_session_set_private_data(
> +rte_cryptodev_sym_session_set_user_data(
> struct rte_cryptodev_sym_session
> *sess,
> void *data,
> uint16_t size);
>
> /**
> - * Get private data of a session.
> + * Get user data stored in a session.
> *
> * @param sess Session pointer allocated by
> * *rte_cryptodev_sym_session_create*.
> *
> * @return
> - * - On success return pointer to private data.
> + * - On success return pointer to user data.
> * - On failure returns NULL.
> */
> void * __rte_experimental
> -rte_cryptodev_sym_session_get_private_data(
> +rte_cryptodev_sym_session_get_user_data(
> struct rte_cryptodev_sym_session
> *sess);
>
> #ifdef __cplusplus
> diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map
> b/lib/librte_cryptodev/rte_cryptodev_version.map
> index be8f4c1a7..c0ea9c875 100644
> --- a/lib/librte_cryptodev/rte_cryptodev_version.map
> +++ b/lib/librte_cryptodev/rte_cryptodev_version.map
> @@ -97,6 +97,6 @@ DPDK_18.05 {
> EXPERIMENTAL {
> global:
>
> - rte_cryptodev_sym_session_get_private_data;
> - rte_cryptodev_sym_session_set_private_data;
> + rte_cryptodev_sym_session_get_user_data;
> + rte_cryptodev_sym_session_set_user_data;
> };
> diff --git a/lib/librte_eventdev/rte_event_crypto_adapter.c
> b/lib/librte_eventdev/rte_event_crypto_adapter.c
> index ba63a87b7..11b28ca9b 100644
> --- a/lib/librte_eventdev/rte_event_crypto_adapter.c
> +++ b/lib/librte_eventdev/rte_event_crypto_adapter.c
> @@ -342,7 +342,7 @@ eca_enq_to_cryptodev(struct
> rte_event_crypto_adapter *adapter,
> if (crypto_op == NULL)
> continue;
> if (crypto_op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
> - m_data =
> rte_cryptodev_sym_session_get_private_data(
> + m_data = rte_cryptodev_sym_session_get_user_data(
> crypto_op->sym->session);
> if (m_data == NULL) {
> rte_pktmbuf_free(crypto_op->sym->m_src);
> @@ -512,7 +512,7 @@ eca_ops_enqueue_burst(struct
> rte_event_crypto_adapter *adapter,
> for (i = 0; i < num; i++) {
> struct rte_event *ev = &events[nb_ev++];
> if (ops[i]->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
> - m_data =
> rte_cryptodev_sym_session_get_private_data(
> + m_data = rte_cryptodev_sym_session_get_user_data(
> ops[i]->sym->session);
> } else if (ops[i]->sess_type == RTE_CRYPTO_OP_SESSIONLESS
> &&
> ops[i]->private_data_offset) {
> diff --git a/test/test/test_event_crypto_adapter.c
> b/test/test/test_event_crypto_adapter.c
> index 066b0adef..de258c346 100644
> --- a/test/test/test_event_crypto_adapter.c
> +++ b/test/test/test_event_crypto_adapter.c
> @@ -205,12 +205,12 @@ test_op_forward_mode(uint8_t session_less)
> TEST_ASSERT_SUCCESS(ret, "Failed to get adapter
> capabilities\n");
>
> if (cap &
> RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA) {
> - /* Fill in private date information */
> + /* Fill in private user data information */
> rte_memcpy(&m_data.response_info, &response_info,
> sizeof(response_info));
> rte_memcpy(&m_data.request_info, &request_info,
> sizeof(request_info));
> - rte_cryptodev_sym_session_set_private_data(sess,
> + rte_cryptodev_sym_session_set_user_data(sess,
> &m_data, sizeof(m_data));
> }
>
> @@ -389,10 +389,10 @@ test_op_new_mode(uint8_t session_less)
> TEST_ASSERT_SUCCESS(ret, "Failed to get adapter
> capabilities\n");
>
> if (cap &
> RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA) {
> - /* Fill in private data information */
> + /* Fill in private user data information */
> rte_memcpy(&m_data.response_info, &response_info,
> sizeof(m_data));
> - rte_cryptodev_sym_session_set_private_data(sess,
> + rte_cryptodev_sym_session_set_user_data(sess,
> &m_data, sizeof(m_data));
> }
> rte_cryptodev_sym_session_init(TEST_CDEV_ID, sess,
> --
> 2.13.6
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [PATCH] eal: add request to map reserved physical memory
2018-07-09 16:02 0% ` Burakov, Anatoly
2018-07-09 16:12 0% ` Srinath Mannam
@ 2018-07-09 20:44 0% ` Scott Branden
1 sibling, 0 replies; 200+ results
From: Scott Branden @ 2018-07-09 20:44 UTC (permalink / raw)
To: Burakov, Anatoly, Srinath Mannam; +Cc: Ajit Khaparde, dev
On 18-07-09 09:02 AM, Burakov, Anatoly wrote:
> On 07-Jun-18 1:15 PM, Burakov, Anatoly wrote:
>> On 06-Jun-18 1:18 AM, Scott Branden wrote:
>>> Hi Anatoly,
>>>
>>>
>>> On 18-04-27 09:49 AM, Burakov, Anatoly wrote:
>>>> On 27-Apr-18 5:30 PM, Scott Branden wrote:
>>>>> Hi Anatoly,
>>>>>
>>>>> We'd appreciate your input so we can come to a solution of
>>>>> supporting the necessary memory allocations?
>>>>>
>>>>
>>>> Hi Scott,
>>>>
>>>> I'm currently starting to work on a prototype that will be at least
>>>> RFC'd (if not v1'd) during 18.08 timeframe. Basically, the idea is
>>>> to create/destroy named malloc heaps dynamically, and allow user to
>>>> request memory from them. You may then mmap() whatever you want and
>>>> create a malloc heap out of it.
>>>>
>>>> Does that sound reasonable?
>>>>
>>> Is the plan still to have a patch for 18.08?
>>>
>>> Thanks,
>>> Scott
>>>
>> Hi Scott,
>>
>> The plan is still to submit an RFC during 18.08 timeframe, but since
>> it will be an ABI break, it will only be integrated in the next
>> (18.11) release.
>>
> Hi Scott,
>
> You're welcome to offer feedback on the proposal :)
>
> http://patches.dpdk.org/project/dpdk/list/?series=453
Thanks, Srinath is looking into it.
Scott
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [PATCH] eal: add request to map reserved physical memory
2018-07-09 16:02 0% ` Burakov, Anatoly
@ 2018-07-09 16:12 0% ` Srinath Mannam
2018-07-09 20:44 0% ` Scott Branden
1 sibling, 0 replies; 200+ results
From: Srinath Mannam @ 2018-07-09 16:12 UTC (permalink / raw)
To: Burakov, Anatoly; +Cc: Scott Branden, Ajit Khaparde, dev
Hi Anatoly,
Thank you for your inputs.
We will port all your patches to our platform and update you.
Regards,
Srinath.
On Mon, Jul 9, 2018 at 9:32 PM, Burakov, Anatoly
<anatoly.burakov@intel.com> wrote:
> On 07-Jun-18 1:15 PM, Burakov, Anatoly wrote:
>>
>> On 06-Jun-18 1:18 AM, Scott Branden wrote:
>>>
>>> Hi Anatoly,
>>>
>>>
>>> On 18-04-27 09:49 AM, Burakov, Anatoly wrote:
>>>>
>>>> On 27-Apr-18 5:30 PM, Scott Branden wrote:
>>>>>
>>>>> Hi Anatoly,
>>>>>
>>>>> We'd appreciate your input so we can come to a solution of supporting
>>>>> the necessary memory allocations?
>>>>>
>>>>
>>>> Hi Scott,
>>>>
>>>> I'm currently starting to work on a prototype that will be at least
>>>> RFC'd (if not v1'd) during 18.08 timeframe. Basically, the idea is to
>>>> create/destroy named malloc heaps dynamically, and allow user to request
>>>> memory from them. You may then mmap() whatever you want and create a malloc
>>>> heap out of it.
>>>>
>>>> Does that sound reasonable?
>>>>
>>> Is the plan still to have a patch for 18.08?
>>>
>>> Thanks,
>>> Scott
>>>
>> Hi Scott,
>>
>> The plan is still to submit an RFC during 18.08 timeframe, but since it
>> will be an ABI break, it will only be integrated in the next (18.11)
>> release.
>>
> Hi Scott,
>
> You're welcome to offer feedback on the proposal :)
>
> http://patches.dpdk.org/project/dpdk/list/?series=453
>
> --
> Thanks,
> Anatoly
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [PATCH] eal: add request to map reserved physical memory
2018-06-07 12:15 3% ` Burakov, Anatoly
@ 2018-07-09 16:02 0% ` Burakov, Anatoly
2018-07-09 16:12 0% ` Srinath Mannam
2018-07-09 20:44 0% ` Scott Branden
0 siblings, 2 replies; 200+ results
From: Burakov, Anatoly @ 2018-07-09 16:02 UTC (permalink / raw)
To: Scott Branden, Srinath Mannam; +Cc: Ajit Khaparde, dev
On 07-Jun-18 1:15 PM, Burakov, Anatoly wrote:
> On 06-Jun-18 1:18 AM, Scott Branden wrote:
>> Hi Anatoly,
>>
>>
>> On 18-04-27 09:49 AM, Burakov, Anatoly wrote:
>>> On 27-Apr-18 5:30 PM, Scott Branden wrote:
>>>> Hi Anatoly,
>>>>
>>>> We'd appreciate your input so we can come to a solution of
>>>> supporting the necessary memory allocations?
>>>>
>>>
>>> Hi Scott,
>>>
>>> I'm currently starting to work on a prototype that will be at least
>>> RFC'd (if not v1'd) during 18.08 timeframe. Basically, the idea is to
>>> create/destroy named malloc heaps dynamically, and allow user to
>>> request memory from them. You may then mmap() whatever you want and
>>> create a malloc heap out of it.
>>>
>>> Does that sound reasonable?
>>>
>> Is the plan still to have a patch for 18.08?
>>
>> Thanks,
>> Scott
>>
> Hi Scott,
>
> The plan is still to submit an RFC during 18.08 timeframe, but since it
> will be an ABI break, it will only be integrated in the next (18.11)
> release.
>
Hi Scott,
You're welcome to offer feedback on the proposal :)
http://patches.dpdk.org/project/dpdk/list/?series=453
--
Thanks,
Anatoly
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [PATCH] cryptodev: rename experimental private data APIs
2018-07-06 13:39 3% [dpdk-dev] [PATCH] cryptodev: rename experimental private data APIs Fiona Trahe
@ 2018-07-09 7:34 0% ` Gujjar, Abhinandan S
2018-07-10 6:29 0% ` Gujjar, Abhinandan S
1 sibling, 0 replies; 200+ results
From: Gujjar, Abhinandan S @ 2018-07-09 7:34 UTC (permalink / raw)
To: Trahe, Fiona, dev, jerin.jacob, Akhil Goyal; +Cc: De Lara Guarch, Pablo
Adding Jerin & Akhil into the loop.
Since these APIs are experimental, does the changes require announcement?
Regards
Abhinandan
> -----Original Message-----
> From: Trahe, Fiona
> Sent: Friday, July 6, 2018 7:10 PM
> To: dev@dpdk.org
> Cc: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Trahe, Fiona
> <fiona.trahe@intel.com>; Gujjar, Abhinandan S <abhinandan.gujjar@intel.com>
> Subject: [PATCH] cryptodev: rename experimental private data APIs
>
> The name private_data is confusing in these APIs:
> rte_cryptodev_sym_session_set_private_data()
> rte_cryptodev_sym_session_get_private_data()
> It refers to data added at the end of the session hdr for use by the application.
> The session already contains sess_private_data[index] which is used to store
> private pmd data and most references to private data refer to that.
> e.g. external apis
> rte_cryptodev_sym_get_private_session_size() and internal
> set/get_session_private_data() refer to sess_private_data[].
>
> So rename to user_data, i.e.
> rte_cryptodev_sym_session_set_user_data()
> rte_cryptodev_sym_session_get_user_data()
>
> Refers to changes introduced here:
> https://patches.dpdk.org/patch/38172/
>
> Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
> ---
> doc/guides/prog_guide/cryptodev_lib.rst | 14 +++++++-------
> doc/guides/prog_guide/event_crypto_adapter.rst | 6 +++---
> doc/guides/rel_notes/release_18_08.rst | 8 ++++++++
> lib/librte_cryptodev/rte_cryptodev.c | 16 ++++++++--------
> lib/librte_cryptodev/rte_cryptodev.h | 14 +++++++-------
> lib/librte_cryptodev/rte_cryptodev_version.map | 4 ++--
> lib/librte_eventdev/rte_event_crypto_adapter.c | 4 ++--
> test/test/test_event_crypto_adapter.c | 8 ++++----
> 8 files changed, 41 insertions(+), 33 deletions(-)
>
> diff --git a/doc/guides/prog_guide/cryptodev_lib.rst
> b/doc/guides/prog_guide/cryptodev_lib.rst
> index 30f0bcf7a..3dbf4dde6 100644
> --- a/doc/guides/prog_guide/cryptodev_lib.rst
> +++ b/doc/guides/prog_guide/cryptodev_lib.rst
> @@ -302,24 +302,24 @@ enqueue call.
> Private data
> ~~~~~~~~~~~~
> For session-based operations, the set and get API provides a mechanism for an -
> application to store and retrieve the private data information stored along with -
> the crypto session.
> +application to store and retrieve the private user data information
> +stored along with the crypto session.
>
> For example, suppose an application is submitting a crypto operation with a
> session -associated and wants to indicate private data information which is
> required to be
> +associated and wants to indicate private user data information which is
> +required to be
> used after completion of the crypto operation. In this case, the application can
> use -the set API to set the private data and retrieve it using get API.
> +the set API to set the user data and retrieve it using get API.
>
> .. code-block:: c
>
> - int rte_cryptodev_sym_session_set_private_data(
> + int rte_cryptodev_sym_session_set_user_data(
> struct rte_cryptodev_sym_session *sess, void *data, uint16_t
> size);
>
> - void * rte_cryptodev_sym_session_get_private_data(
> + void * rte_cryptodev_sym_session_get_user_data(
> struct rte_cryptodev_sym_session *sess);
>
>
> -For session-less mode, the private data information can be placed along with
> the
> +For session-less mode, the private user data information can be placed
> +along with the
> ``struct rte_crypto_op``. The ``rte_crypto_op::private_data_offset`` indicates
> the start of private data information. The offset is counted from the start of the
> rte_crypto_op including other crypto information such as the IVs (since there
> can diff --git a/doc/guides/prog_guide/event_crypto_adapter.rst
> b/doc/guides/prog_guide/event_crypto_adapter.rst
> index 5c1354dec..9fe09c805 100644
> --- a/doc/guides/prog_guide/event_crypto_adapter.rst
> +++ b/doc/guides/prog_guide/event_crypto_adapter.rst
> @@ -223,9 +223,9 @@ crypto security session or at an offset in the ``struct
> rte_crypto_op``.
> The ``rte_crypto_op::private_data_offset`` is used to locate the request/
> response in the ``rte_crypto_op``.
>
> -For crypto session, ``rte_cryptodev_sym_session_set_private_data()`` API
> +For crypto session, ``rte_cryptodev_sym_session_set_user_data()`` API
> will be used to set request/response data. The same data will be obtained -by
> ``rte_cryptodev_sym_session_get_private_data()`` API. The
> +by ``rte_cryptodev_sym_session_get_user_data()`` API. The
> RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA capability
> indicates whether HW or SW supports this feature.
>
> @@ -257,7 +257,7 @@ the ``rte_crypto_op``.
> m_data.request_info.cdev_id = cdev_id;
> m_data.request_info.queue_pair_id = qp_id;
> /* Call set API to store private data information */
> - rte_cryptodev_sym_session_set_private_data(
> + rte_cryptodev_sym_session_set_user_data(
> op->sym->session,
> &m_data,
> sizeof(m_data)); diff --git
> a/doc/guides/rel_notes/release_18_08.rst
> b/doc/guides/rel_notes/release_18_08.rst
> index bc0124295..8f84a088c 100644
> --- a/doc/guides/rel_notes/release_18_08.rst
> +++ b/doc/guides/rel_notes/release_18_08.rst
> @@ -60,6 +60,14 @@ API Changes
> Also, make sure to start the actual text at the margin.
> =========================================================
>
> +* **Renamed cryptodev experimental APIs.**
> +
> + Used user_data instead of private_data in following APIs to avoid
> + confusion with the existing session parameter ``sess_private_data[]`` and
> related APIs.
> + ``rte_cryptodev_sym_session_set_private_data()`` changed to
> + ``rte_cryptodev_sym_session_set_user_data()``
> + ``rte_cryptodev_sym_session_get_private_data()`` changed to
> + ``rte_cryptodev_sym_session_get_user_data()``
>
> ABI Changes
> -----------
> diff --git a/lib/librte_cryptodev/rte_cryptodev.c
> b/lib/librte_cryptodev/rte_cryptodev.c
> index 7e5821246..88f4af5f6 100644
> --- a/lib/librte_cryptodev/rte_cryptodev.c
> +++ b/lib/librte_cryptodev/rte_cryptodev.c
> @@ -1123,7 +1123,7 @@ rte_cryptodev_sym_session_create(struct
> rte_mempool *mp)
> }
>
> /* Clear device session pointer.
> - * Include the flag indicating presence of private data
> + * Include the flag indicating presence of user data
> */
> memset(sess, 0, (sizeof(void *) * nb_drivers) + sizeof(uint8_t));
>
> @@ -1236,7 +1236,7 @@ rte_cryptodev_sym_get_header_session_size(void)
> /*
> * Header contains pointers to the private data
> * of all registered drivers, and a flag which
> - * indicates presence of private data
> + * indicates presence of user data
> */
> return ((sizeof(void *) * nb_drivers) + sizeof(uint8_t)); } @@ -1277,31
> +1277,31 @@ rte_cryptodev_sym_get_private_session_size(uint8_t dev_id) }
>
> int __rte_experimental
> -rte_cryptodev_sym_session_set_private_data(
> +rte_cryptodev_sym_session_set_user_data(
> struct rte_cryptodev_sym_session
> *sess,
> void *data,
> uint16_t size)
> {
> uint16_t off_set = sizeof(void *) * nb_drivers;
> - uint8_t *private_data_present = (uint8_t *)sess + off_set;
> + uint8_t *user_data_present = (uint8_t *)sess + off_set;
>
> if (sess == NULL)
> return -EINVAL;
>
> - *private_data_present = 1;
> + *user_data_present = 1;
> off_set += sizeof(uint8_t);
> rte_memcpy((uint8_t *)sess + off_set, data, size);
> return 0;
> }
>
> void * __rte_experimental
> -rte_cryptodev_sym_session_get_private_data(
> +rte_cryptodev_sym_session_get_user_data(
> struct rte_cryptodev_sym_session
> *sess) {
> uint16_t off_set = sizeof(void *) * nb_drivers;
> - uint8_t *private_data_present = (uint8_t *)sess + off_set;
> + uint8_t *user_data_present = (uint8_t *)sess + off_set;
>
> - if (sess == NULL || !*private_data_present)
> + if (sess == NULL || !*user_data_present)
> return NULL;
>
> off_set += sizeof(uint8_t);
> diff --git a/lib/librte_cryptodev/rte_cryptodev.h
> b/lib/librte_cryptodev/rte_cryptodev.h
> index ccc0f73fd..5d4e690c2 100644
> --- a/lib/librte_cryptodev/rte_cryptodev.h
> +++ b/lib/librte_cryptodev/rte_cryptodev.h
> @@ -1041,35 +1041,35 @@ int rte_cryptodev_driver_id_get(const char
> *name); const char *rte_cryptodev_driver_name_get(uint8_t driver_id);
>
> /**
> - * Set private data for a session.
> + * Store user data in a session.
> *
> * @param sess Session pointer allocated by
> * *rte_cryptodev_sym_session_create*.
> - * @param data Pointer to the private data.
> - * @param size Size of the private data.
> + * @param data Pointer to the user data.
> + * @param size Size of the user data.
> *
> * @return
> * - On success, zero.
> * - On failure, a negative value.
> */
> int __rte_experimental
> -rte_cryptodev_sym_session_set_private_data(
> +rte_cryptodev_sym_session_set_user_data(
> struct rte_cryptodev_sym_session
> *sess,
> void *data,
> uint16_t size);
>
> /**
> - * Get private data of a session.
> + * Get user data stored in a session.
> *
> * @param sess Session pointer allocated by
> * *rte_cryptodev_sym_session_create*.
> *
> * @return
> - * - On success return pointer to private data.
> + * - On success return pointer to user data.
> * - On failure returns NULL.
> */
> void * __rte_experimental
> -rte_cryptodev_sym_session_get_private_data(
> +rte_cryptodev_sym_session_get_user_data(
> struct rte_cryptodev_sym_session
> *sess);
>
> #ifdef __cplusplus
> diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map
> b/lib/librte_cryptodev/rte_cryptodev_version.map
> index be8f4c1a7..c0ea9c875 100644
> --- a/lib/librte_cryptodev/rte_cryptodev_version.map
> +++ b/lib/librte_cryptodev/rte_cryptodev_version.map
> @@ -97,6 +97,6 @@ DPDK_18.05 {
> EXPERIMENTAL {
> global:
>
> - rte_cryptodev_sym_session_get_private_data;
> - rte_cryptodev_sym_session_set_private_data;
> + rte_cryptodev_sym_session_get_user_data;
> + rte_cryptodev_sym_session_set_user_data;
> };
> diff --git a/lib/librte_eventdev/rte_event_crypto_adapter.c
> b/lib/librte_eventdev/rte_event_crypto_adapter.c
> index ba63a87b7..11b28ca9b 100644
> --- a/lib/librte_eventdev/rte_event_crypto_adapter.c
> +++ b/lib/librte_eventdev/rte_event_crypto_adapter.c
> @@ -342,7 +342,7 @@ eca_enq_to_cryptodev(struct
> rte_event_crypto_adapter *adapter,
> if (crypto_op == NULL)
> continue;
> if (crypto_op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
> - m_data =
> rte_cryptodev_sym_session_get_private_data(
> + m_data = rte_cryptodev_sym_session_get_user_data(
> crypto_op->sym->session);
> if (m_data == NULL) {
> rte_pktmbuf_free(crypto_op->sym->m_src);
> @@ -512,7 +512,7 @@ eca_ops_enqueue_burst(struct
> rte_event_crypto_adapter *adapter,
> for (i = 0; i < num; i++) {
> struct rte_event *ev = &events[nb_ev++];
> if (ops[i]->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
> - m_data =
> rte_cryptodev_sym_session_get_private_data(
> + m_data = rte_cryptodev_sym_session_get_user_data(
> ops[i]->sym->session);
> } else if (ops[i]->sess_type == RTE_CRYPTO_OP_SESSIONLESS
> &&
> ops[i]->private_data_offset) {
> diff --git a/test/test/test_event_crypto_adapter.c
> b/test/test/test_event_crypto_adapter.c
> index 066b0adef..de258c346 100644
> --- a/test/test/test_event_crypto_adapter.c
> +++ b/test/test/test_event_crypto_adapter.c
> @@ -205,12 +205,12 @@ test_op_forward_mode(uint8_t session_less)
> TEST_ASSERT_SUCCESS(ret, "Failed to get adapter
> capabilities\n");
>
> if (cap &
> RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA) {
> - /* Fill in private date information */
> + /* Fill in private user data information */
> rte_memcpy(&m_data.response_info, &response_info,
> sizeof(response_info));
> rte_memcpy(&m_data.request_info, &request_info,
> sizeof(request_info));
> - rte_cryptodev_sym_session_set_private_data(sess,
> + rte_cryptodev_sym_session_set_user_data(sess,
> &m_data, sizeof(m_data));
> }
>
> @@ -389,10 +389,10 @@ test_op_new_mode(uint8_t session_less)
> TEST_ASSERT_SUCCESS(ret, "Failed to get adapter
> capabilities\n");
>
> if (cap &
> RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA) {
> - /* Fill in private data information */
> + /* Fill in private user data information */
> rte_memcpy(&m_data.response_info, &response_info,
> sizeof(m_data));
> - rte_cryptodev_sym_session_set_private_data(sess,
> + rte_cryptodev_sym_session_set_user_data(sess,
> &m_data, sizeof(m_data));
> }
> rte_cryptodev_sym_session_init(TEST_CDEV_ID, sess,
> --
> 2.13.6
^ permalink raw reply [relevance 0%]
* [dpdk-dev] [PATCH v10 19/19] doc: update release notes for multi process hotplug
2018-07-09 3:36 1% ` [dpdk-dev] [PATCH v10 00/19] enable hotplug on multi-process Qi Zhang
@ 2018-07-09 3:37 4% ` Qi Zhang
1 sibling, 0 replies; 200+ results
From: Qi Zhang @ 2018-07-09 3:37 UTC (permalink / raw)
To: thomas, anatoly.burakov
Cc: konstantin.ananyev, dev, bruce.richardson, ferruh.yigit,
benjamin.h.shelton, narender.vangati, Qi Zhang
Update release notes for the new multi-process hotplug feature.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
doc/guides/rel_notes/release_18_08.rst | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index bc0124295..1251e4b5b 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -46,6 +46,12 @@ New Features
Flow API support has been added to CXGBE Poll Mode Driver to offload
flows to Chelsio T5/T6 NICs.
+* **Support device multi-process hotplug.**
+
+ Hotplug and hot-unplug for devices will now be supported in multiprocessing
+ scenario. Any ethdev devices created in the primary process will be regarded
+ as shared and will be available for all DPDK processes. Synchronization between
+ processes will be done using DPDK IPC.
API Changes
-----------
@@ -60,6 +66,11 @@ API Changes
Also, make sure to start the actual text at the margin.
=========================================================
+* eal: scope of rte_eal_hotplug_add and rte_eal_hotplug_remove is extended.
+
+ In primary-secondary process model, ``rte_eal_hotplug_add`` will guarantee
+ that device be attached on all processes, while ``rte_eal_hotplug_remove``
+ will guarantee device be detached on all processes.
ABI Changes
-----------
--
2.13.6
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH v10 00/19] enable hotplug on multi-process
` (6 preceding siblings ...)
2018-07-06 14:18 2% ` [dpdk-dev] [PATCH v9 00/19] enable hotplug on multi-process Qi Zhang
@ 2018-07-09 3:36 1% ` Qi Zhang
2018-07-09 3:37 4% ` [dpdk-dev] [PATCH v10 19/19] doc: update release notes for multi process hotplug Qi Zhang
2018-07-11 3:08 1% ` [dpdk-dev] [PATCH v11 00/19] enable hotplug on multi-process Qi Zhang
` (4 subsequent siblings)
12 siblings, 2 replies; 200+ results
From: Qi Zhang @ 2018-07-09 3:36 UTC (permalink / raw)
To: thomas, anatoly.burakov
Cc: konstantin.ananyev, dev, bruce.richardson, ferruh.yigit,
benjamin.h.shelton, narender.vangati, Qi Zhang
v10:
Since hotplug add/remove a vdev on a secondary process will sync on
all processes now, it is not necessary to support private vdev for
a secondary process which is identified by a not-NULL devargs in
"--vdev". So re-work on all vdev driver changes to simpified device
probe scenario on a secondary process, devargs will be ignored on
secondary process now.
- fix lisence header in example/multi-process/hotplug_mp/Makefile.
v9:
- Move hotplug IPC from rte_eth_dev_attach/rte_eth_dev_detach to
eal_dev_hotplug_add and eal_dev_hotplug_remove, now all kinds of
devices will be synced in multi-process.
- Fix couple issue when a device is bound to vfio.
1) The device can't be detached clearly in a secondary process, which
also cause it can't be attached again, due to the error that
/dev/vfio/<group_fd> is still busy.(see Patch 3/19 and 4/19)
2) repeat detach/attach device will cause "cannot find TAILQ entry
for PCI device" due to incorrect PCI address compare.
(see patch 2/19).
- Removed device lock.
- Removed private device support.
- Fix commit log grammar issue
v8:
- update rte_eal_version.map due to new API added.
- minor reword on release note.
- minor fix on commit log and code style.
NOTE:
Some issues which is not related with this patchset is expected when
play with hotplug_mp sample as belows.
- Attach a PCI device twice may cause device can't be detached
below fix is required:
https://patches.dpdk.org/patch/42030/
- ixgbe device can't detached, below fix is required
https://patches.dpdk.org/patch/42031/
v7:
- update rte_ethdev_version.map for new APIs.
- improve code readability in __handle_secondary_request by use goto.
- add comments to explain why need to call rte_eal_alarm_set.
- add error log when process_mp_init_callbacks failed.
- reword release notes base on Anatoly's suggestion.
- add back previous "Acked-by" and "Reviewed-by" in commit log.
NOTE: current patchset depends on below IPC fix, or it may not be able
to attach a shared vdev.
https://patches.dpdk.org/patch/41647/
v6:
- remove bus->scan_one, since ABI break is not necessary.
- remove patch for failsafe PMD since it will not support secondary.
- fix wrong implemenation on ixgbe.
- add rte_eth_dev_release_port_private into rte_eth_dev_pci_generic_remove for
secondary process, so we don't need to patch on PMD if PMD use the
default remove function.
- add release notes update.
- agreed to use strdup(peer) as workaround for repling a sync request in seperate
thread.
v5:
- since we will keep mp thread separate from interrupt thread,
it is not necessary to use temporary thread, we use rte_eal_alarm_set.
- remove the change in rte_eth_dev_release_port, since there is a better
way to prevent rte_eth_dev_release_port be called after
rte_eth_dev_release_port_private.
- fix the issue that lock does not take effect on secondary due to
previous re-work
- fix the issue when the first attached device is a private device from
secondary. (patch 8/24)
- work around for reply a sync request in separate thread, this is still
an open and in discussion as below.
https://mails.dpdk.org/archives/dev/2018-June/105359.html
v4:
- since mp thread will be merged to interrupt thread, the fix on v3
for sync IPC deadlock will not work. the new version enable the
machanism to invoke a mp action callback in a temporary thread to
avoid the IPC deadlock, with this, secondary to primary request
impelemtation also be simplified, since we can use sync request
directly in a separate thread.
v3:
- enable mp init callback register to help non-eal module to initialize
mp channel during rte_eal_init
- fix when attach share device from secondary.
1) dead lock due to sync IPC be invoked in rte_malloc in primary
process when handle secondary request to attach device, the
solution is primary process to issue share device attach/detach
in interrupt thread.
2) return port_id not correct.
- check nb_sent and nb_received in sync IPC.
- fix memory leak duirng error handling at attach_on_secondary.
- improve clean_lock_callback to only lock/unlock spinlock once
- improve error code return in check-reply during async IPC.
- remove rte_ prefix of internal function in ethdev_mp.c
- sample code improvement.
1) rename sample to "hotplug_mp", and move to example/multi-process.
2) cleanup header include.
3) call rte_eal_cleanup before exit.
v2:
- rename rte_ethdev_mp.* to ethdev_mp.*
- rename rte_ethdev_lock.* to ethdev_lock.*
- move internal funciton to ethdev_private.h
- separate rte_eth_dev_[un]lock into rte_eth_dev_[un]lock and
rte_eth_dev_[un]lock_with_callback
- lock callbacks will be removed automatically after device is detached.
- add experimental tag for all new APIs.
- fix coding style issue.
- fix wrong lisence header in sample code.
- fix spelling
- fix meson.build.
- improve comments.
Background:
===========
Currently secondary process will only sync ethdev from primary
process at init stage, but it will not be aware if device
is attached/detached on primary process at runtime.
While there is the requirement from application that take
primary-secondary process model. The primary process work as a
resource management process, it will create/destroy virtual device
at runtime, while the secondary process deal with the network stuff
with these devices.
Solution:
=========
So the orignial intention is to fix this gap, but beyond that
the patch set provide a more comprehesive solution to handle
different hotplug cases in multi-process situation, it cover below
scenario:
1. Attach a device from the primary
2. Detach a device from the primary
3. Attach a device from a secondary
4. Detach a device from a secondary
In primary-secondary process model, we assume ethernet devices are
shared by default. that means attach or detach a device on any process
will broadcast to all other processes through mp channel then device
information will be synchronized on all processes.
Any failure during attaching or detaching process will cause inconsistent
status between processes, so proper rollback action should be considered.
Scenario for Case 1, 2:
attach device from primary
a) primary attach the new device if failed goto h).
b) primary send attach sync request to all secondary.
c) secondary receive request and attach device and send reply.
d) primary check the reply if all success go to i).
e) primary send attach rollback sync request to all secondary.
f) secondary receive the request and detach device and send reply.
g) primary receive the reply and detach device as rollback action.
h) attach fail
i) attach success
detach device from primary
a) primary perform pre-detach check, if device is locked, goto i).
b) primary send pre-detach sync request to all secondary.
c) secondary perform pre-detach check and send reply.
d) primary check the reply if any fail goto i).
e) primary send detach sync request to all secondary
f) secondary detach the device and send reply (assume no fail)
g) primary detach the device.
h) detach success
i) detach failed
Scenario for case 3, 4:
attach device from secondary:
a) seconary send asycn request to primary and wait on a condition
which will be released by matched response from primary.
b) primary receive the request and attach the new device if failed
goto i).
c) primary forward attach request to all secondary as async request
(because this in mp thread context, use sync request will deadlock,
same reason for all following async request.)
d) secondary receive request and attach device and send reply.
e) primary check the reply if all success go to j).
f) primary send attach rollback async request to all secondary.
g) secondary receive the request and detach device and send reply.
h) primary receive the reply and detach device as rollback action.
i) send fail response to secondary, goto k).
j) send success response to secondary.
k) secondary process receive response and return.
detach device from secondary:
a) secondary send async request to primary and wait on a condition
which will be released by matched response from primary.
b) primary receive the request and perform pre-detach check, if device
is locked, goto j).
c) primary send pre-detach async request to all secondary.
d) secondary perform pre-detach check and send reply.
e) primary check the reply if any fail goto j).
f) primary send detach async request to all secondary
g) secondary detach the device and send reply
h) primary detach the device.
i) send success response to secondary, goto k).
j) send fail response to secondary.
k) secondary process receive response and return.
APIs chenages:
==============
scope of rte_eal_hotplug_add and rte_eal_hotplug_remove is extended.
In primary-secondary process model, rte_eal_hotplug_add will guarantee
that device be attached on all processes, while rte_eal_hotplug_remove will
guarantee device be detached on all processes.
PMD Impact:
===========
Currently device removing is not handled well in secondary process on
most pmd drivers, rte_eth_dev_relase_port will be invoked and will mess up
primary process since it reset all shared data. So we introduced new API
rte_eth_dev_release_port_local which only reset ethdev's state to unsued
but not touch shared data so other process will not be impacted.
Since not all device driver is target to support primary-secondary
process model, so the patch set only fix this on all Intel devices and
vdev, it can be refereneced by other driver when equevalent fix is
required
Example:
========
The patchset also contains a example to demonstrate device hotplug
in multi-process model, below are detail instructions.
/* start sample code as primary then secondary */
./hotplug_mp --proc-type=auto
Command Line Example:
>help
>list
/* attach a af_packet vdev */
>attach net_af_packet,iface=eth0
/* detach port 0 */
>detach 0
Qi Zhang (19):
ethdev: add function to release port in local process
bus/pci: fix PCI address compare
bus/pci: enable vfio unmap resource for secondary
vfio: remove uneccessary IPC for group fd clear
eal: enable hotplug on multi-process
eal: support attach or detach share device from secondary
net/i40e: enable hotplug on secondary process
net/ixgbe: enable hotplug on secondary process
net/af_packet: enable hotplug on secondary process
net/bonding: enable hotplug on secondary process
net/kni: enable hotplug on secondary process
net/null: enable hotplug on secondary process
net/octeontx: enable hotplug on secondary process
net/pcap: enable hotplug on secondary process
net/softnic: enable hotplug on secondary process
net/tap: enable hotplug on secondary process
net/vhost: enable hotplug on secondary process
examples/multi_process: add hotplug sample
doc: update release notes for multi process hotplug
doc/guides/rel_notes/release_18_08.rst | 11 +
drivers/bus/pci/linux/pci_vfio.c | 88 ++++++-
drivers/net/af_packet/rte_eth_af_packet.c | 7 +-
drivers/net/bonding/rte_eth_bond_pmd.c | 7 +-
drivers/net/i40e/i40e_ethdev.c | 2 +
drivers/net/ixgbe/ixgbe_ethdev.c | 3 +
drivers/net/kni/rte_eth_kni.c | 7 +-
drivers/net/null/rte_eth_null.c | 12 +-
drivers/net/octeontx/octeontx_ethdev.c | 9 +
drivers/net/pcap/rte_eth_pcap.c | 11 +-
drivers/net/softnic/rte_eth_softnic.c | 15 +-
drivers/net/tap/rte_eth_tap.c | 13 +-
drivers/net/vhost/rte_eth_vhost.c | 7 +-
examples/multi_process/Makefile | 1 +
examples/multi_process/hotplug_mp/Makefile | 23 ++
examples/multi_process/hotplug_mp/commands.c | 197 ++++++++++++++
examples/multi_process/hotplug_mp/commands.h | 10 +
examples/multi_process/hotplug_mp/main.c | 41 +++
lib/librte_eal/bsdapp/eal/Makefile | 1 +
lib/librte_eal/common/eal_common_dev.c | 168 +++++++++++-
lib/librte_eal/common/eal_private.h | 37 +++
lib/librte_eal/common/hotplug_mp.c | 346 +++++++++++++++++++++++++
lib/librte_eal/common/hotplug_mp.h | 44 ++++
lib/librte_eal/common/include/rte_bus.h | 3 +
lib/librte_eal/common/include/rte_dev.h | 9 +
lib/librte_eal/common/meson.build | 1 +
lib/librte_eal/linuxapp/eal/Makefile | 1 +
lib/librte_eal/linuxapp/eal/eal.c | 6 +
lib/librte_eal/linuxapp/eal/eal_vfio.c | 45 +---
lib/librte_eal/linuxapp/eal/eal_vfio.h | 1 -
lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c | 8 -
lib/librte_ethdev/rte_ethdev.c | 12 +
lib/librte_ethdev/rte_ethdev_driver.h | 16 +-
lib/librte_ethdev/rte_ethdev_pci.h | 8 +
34 files changed, 1092 insertions(+), 78 deletions(-)
create mode 100644 examples/multi_process/hotplug_mp/Makefile
create mode 100644 examples/multi_process/hotplug_mp/commands.c
create mode 100644 examples/multi_process/hotplug_mp/commands.h
create mode 100644 examples/multi_process/hotplug_mp/main.c
create mode 100644 lib/librte_eal/common/hotplug_mp.c
create mode 100644 lib/librte_eal/common/hotplug_mp.h
--
2.13.6
^ permalink raw reply [relevance 1%]
* Re: [dpdk-dev] Compilation of MLX5 driver
2018-07-03 11:15 0% ` Shahaf Shuler
@ 2018-07-08 4:57 0% ` Asaf Sinai
0 siblings, 0 replies; 200+ results
From: Asaf Sinai @ 2018-07-08 4:57 UTC (permalink / raw)
To: Shahaf Shuler; +Cc: dev, Nitin Katiyar, Nélio Laranjeiro
Hi Shahaf,
Thanks for the useful information!
-----Original Message-----
From: Shahaf Shuler [mailto:shahafs@mellanox.com]
Sent: Tuesday, July 3, 2018 02:16 PM
To: Asaf Sinai <AsafSi@Radware.com>
Cc: dev@dpdk.org; Nitin Katiyar <nitin.katiyar@ericsson.com>; Nélio Laranjeiro <nelio.laranjeiro@6wind.com>
Subject: RE: [dpdk-dev] Compilation of MLX5 driver
Tuesday, July 3, 2018 10:01 AM, Asaf Sinai:
> Subject: Re: [dpdk-dev] Compilation of MLX5 driver
>
> Additional questions:
> Is it possible to use MLNX_OFED-4.3 on Ubuntu 12.04?
I am not sure if there is such build, the oldest OFED build I see is for ubuntu14.10. ubuntu12.04 is really old.
> Why is the driver related to OS version?
Because once you install MLNX_OFED it needs to backport patches, so the base version is important.
>
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Asaf Sinai
> Sent: Monday, July 2, 2018 05:22 PM
> To: Shahaf Shuler <shahafs@mellanox.com>
> Cc: dev@dpdk.org; Nitin Katiyar <nitin.katiyar@ericsson.com>; Nélio
> Laranjeiro <nelio.laranjeiro@6wind.com>
> Subject: Re: [dpdk-dev] Compilation of MLX5 driver
>
> Hi Shahaf,
>
> 1. Can you please explain what is the meaning of upstream-libs?
Upstream-libs means the DPDK works w/ rdma-core library instead of legacy verbs which exists only on Mellanox OFED.
> 2. We use Ubuntu 12.04. so if we would like to stay with it, and use
> MLNX_OFED-4.0, which latest DPDK version should be used?
That will be v17.05
>
> Thanks,
> Asaf
>
> -----Original Message-----
> From: Shahaf Shuler [mailto:shahafs@mellanox.com]
> Sent: Monday, July 2, 2018 05:11 PM
> To: Asaf Sinai <AsafSi@Radware.com>
> Cc: dev@dpdk.org; Nitin Katiyar <nitin.katiyar@ericsson.com>; Nélio
> Laranjeiro <nelio.laranjeiro@6wind.com>
> Subject: RE: [dpdk-dev] Compilation of MLX5 driver
>
> Hi Asaf,
>
> Monday, July 2, 2018 3:46 PM, Asaf Sinai:
> > Subject: RE: [dpdk-dev] Compilation of MLX5 driver
> >
> > Additional details:
> >
> > Ubuntu: 12.04.3
> > Linux: 3.2.0-53-virtual
> > GCC: 4.7.2 (Ubuntu/Linaro 4.7.2-11precise2)
> >
> > I tried to build DPDK 18.05 after installing the Mellanox OFED
> > driver
>
> DPDK version 18.05 supports only upstream-libs (rdma-core).
>
> > (MLNX_OFED_LINUX-4.0-2.0.0.1-ubuntu12.04-x86_64), but it failed with
> > the mentioned error.
> > So I removed the OFED driver and installed the EN driver
> > (mlnx-en-4.0- 2.0.0.1-ubuntu12.04-x86_64), but it also failed with the same error.
> > Both drivers were compiled with "--dpdk" argument ("--upstream-libs"
> > is not supported).
>
> Yes MLNX_OFED-4.0 is too old for upstream libs. You should use
> MLNX_OFED-4.2 and above.
> Or alternatively use an older DPDK version (not recommended).
>
> >
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Asaf Sinai
> > Sent: Monday, July 2, 2018 03:20 PM
> > To: Shahaf Shuler <shahafs@mellanox.com>
> > Cc: dev@dpdk.org; Nitin Katiyar <nitin.katiyar@ericsson.com>; Nélio
> > Laranjeiro <nelio.laranjeiro@6wind.com>
> > Subject: Re: [dpdk-dev] Compilation of MLX5 driver
> >
> > Hi Shahaf,
> >
> > I face similar problem with DPDK 18.05, where missing file is "mlx5dv.h":
> >
> > == Build drivers/net/mlx5
> > CC mlx5.o
> > In file included from
> > /net/emcradware/CM_Users/asafsi/work/drivers/dpdk/dpdk-
> > 18.05/drivers/net/mlx5/mlx5.h:35:0,
> > from
> > /net/emcradware/CM_Users/asafsi/work/drivers/dpdk/dpdk-
> > 18.05/drivers/net/mlx5/mlx5.c:40:
> > /net/emcradware/CM_Users/asafsi/work/drivers/dpdk/dpdk-
> > 18.05/drivers/net/mlx5/mlx5_mr.h:19:31: fatal error: infiniband/mlx5dv.h:
> > No such file or directory
> > #include <infiniband/mlx5dv.h>
> > ^
> > compilation terminated.
> >
> > Can you please advise?
> >
> > Thanks,
> > Asaf
> >
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Nitin Katiyar
> > Sent: Thursday, May 31, 2018 02:44 PM
> > To: Nélio Laranjeiro <nelio.laranjeiro@6wind.com>
> > Cc: Shahaf Shuler <shahafs@mellanox.com>; dev@dpdk.org
> > Subject: Re: [dpdk-dev] Compilation of MLX5 driver
> >
> > Thanks Shahaf, it worked after removing the options you specified.
> >
> > Regards,
> > Nitin
> >
> > -----Original Message-----
> > From: Nélio Laranjeiro [mailto:nelio.laranjeiro@6wind.com]
> > Sent: Thursday, May 31, 2018 3:23 PM
> > To: Nitin Katiyar <nitin.katiyar@ericsson.com>
> > Cc: Shahaf Shuler <shahafs@mellanox.com>; dev@dpdk.org
> > Subject: Re: [dpdk-dev] Compilation of MLX5 driver
> >
> > On Thu, May 31, 2018 at 09:14:03AM +0000, Nitin Katiyar wrote:
> > > Yes,I installed it using --dpdk --upstream-libs. What is the way
> > > forward now?
> >
> > In v17.05 MLX5 PMD is still relying on libibverbs and libmlx5, the
> > way Those options you used are necessary to select in their package
> > the installation of
> > libverbs,libmlx5 or rdma-core.
> > Doing this you have selected rdma-core which is not supported in
> > v17.05 DPDK version.
> >
> > You need to install Mellanox OFED without those two options to
> > select libibverbs, libmlx5 to make it work.
> >
> > Regards,
> >
> > > Regards,
> > > Nitin
> > >
> > > -----Original Message-----
> > > From: Nélio Laranjeiro [mailto:nelio.laranjeiro@6wind.com]
> > > Sent: Thursday, May 31, 2018 1:36 PM
> > > To: Nitin Katiyar <nitin.katiyar@ericsson.com>
> > > Cc: Shahaf Shuler <shahafs@mellanox.com>; dev@dpdk.org
> > > Subject: Re: [dpdk-dev] Compilation of MLX5 driver
> > >
> > > On Thu, May 31, 2018 at 07:01:17AM +0000, Nitin Katiyar wrote:
> > > > Hi,
> > > > It has following files:
> > > >
> > > > arch.h ib.h kern-abi.h mlx4dv.h mlx5dv.h opcode.h sa.h
> > > > sa-kern-abi.h verbs.h
> > > >
> > > > I tried with both MLNX_OFED_LINUX-4.2-1.0.0.0 and
> > > > MLNX_OFED_LINUX-4.2-1.2.0.0-ubuntu14.04-x86_64
> > >
> > > Did you installed Mellanox OFED with the --dpdk --upstream-libs
> > arguments for the installation script?
> > >
> > > If it is the case, you should not add them for this version, those
> > > options are
> > for DPDK v17.11 and higher.
> > >
> > > Regards,
> > >
> > > > Regards,
> > > > Nitin
> > > >
> > > > -----Original Message-----
> > > > From: Shahaf Shuler [mailto:shahafs@mellanox.com]
> > > > Sent: Thursday, May 31, 2018 10:51 AM
> > > > To: Nitin Katiyar <nitin.katiyar@ericsson.com>; Nélio Laranjeiro
> > > > <nelio.laranjeiro@6wind.com>
> > > > Cc: dev@dpdk.org
> > > > Subject: RE: [dpdk-dev] Compilation of MLX5 driver
> > > >
> > > > Wednesday, May 30, 2018 7:45 PM, Nitin Katiyar:
> > > > >
> > > > > Hi,
> > > > > I was compiling 17.05.02.
> > > > > Regards,
> > > > > Nitin
> > > > >
> > > > > -----Original Message-----
> > > > > From: Nélio Laranjeiro [mailto:nelio.laranjeiro@6wind.com]
> > > > > Sent: Wednesday, May 30, 2018 6:42 PM
> > > > > To: Nitin Katiyar <nitin.katiyar@ericsson.com>
> > > > > Cc: dev@dpdk.org
> > > > > Subject: Re: [dpdk-dev] Compilation of MLX5 driver
> > > > >
> > > > > Hi,
> > > > >
> > > > > On Wed, May 30, 2018 at 11:54:31AM +0000, Nitin Katiyar wrote:
> > > > > > Hi,
> > > > > > I am trying to compile MLX5 PMD driver by setting
> > > > > "CONFIG_RTE_LIBRTE_MLX5_PMD=y" and hitting following
> compilation
> > > > > error.
> > > > > >
> > > > > > fatal error: infiniband/mlx5_hw.h: No such file or directory
> > > >
> > > > Can you list the files you have under /usr/include/infiniband ?
> > > >
> > > > > >
> > > > > > I have installed MLNX_OFED _LINUX-4.2-1.2.0 on my Ubuntu
> > > > > > 14.04 machine
> > > > > but still hitting the same error. Am I missing some other package?
> > > > >
> > > > > Which version of DPDK are you using (it is important to help)?
> > > > >
> > > > > Regards,
> > > > >
> > > > > --
> > > > > Nélio Laranjeiro
> > > > > 6WIND
> > >
> > > --
> > > Nélio Laranjeiro
> > > 6WIND
> >
> > --
> > Nélio Laranjeiro
> > 6WIND
^ permalink raw reply [relevance 0%]
* [dpdk-dev] [PATCH v9 19/19] doc: update release notes for multi process hotplug
2018-07-06 14:18 2% ` [dpdk-dev] [PATCH v9 00/19] enable hotplug on multi-process Qi Zhang
@ 2018-07-06 14:18 4% ` Qi Zhang
0 siblings, 0 replies; 200+ results
From: Qi Zhang @ 2018-07-06 14:18 UTC (permalink / raw)
To: thomas, anatoly.burakov
Cc: konstantin.ananyev, dev, bruce.richardson, ferruh.yigit,
benjamin.h.shelton, narender.vangati, Qi Zhang
Update release notes for the new multi-process hotplug feature.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
doc/guides/rel_notes/release_18_08.rst | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index bc0124295..1251e4b5b 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -46,6 +46,12 @@ New Features
Flow API support has been added to CXGBE Poll Mode Driver to offload
flows to Chelsio T5/T6 NICs.
+* **Support device multi-process hotplug.**
+
+ Hotplug and hot-unplug for devices will now be supported in multiprocessing
+ scenario. Any ethdev devices created in the primary process will be regarded
+ as shared and will be available for all DPDK processes. Synchronization between
+ processes will be done using DPDK IPC.
API Changes
-----------
@@ -60,6 +66,11 @@ API Changes
Also, make sure to start the actual text at the margin.
=========================================================
+* eal: scope of rte_eal_hotplug_add and rte_eal_hotplug_remove is extended.
+
+ In primary-secondary process model, ``rte_eal_hotplug_add`` will guarantee
+ that device be attached on all processes, while ``rte_eal_hotplug_remove``
+ will guarantee device be detached on all processes.
ABI Changes
-----------
--
2.13.6
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH v9 00/19] enable hotplug on multi-process
` (5 preceding siblings ...)
2018-07-02 5:44 1% ` [dpdk-dev] [PATCH v8 00/19] enable hotplug on multi-process Qi Zhang
@ 2018-07-06 14:18 2% ` Qi Zhang
2018-07-06 14:18 4% ` [dpdk-dev] [PATCH v9 19/19] doc: update release notes for multi process hotplug Qi Zhang
2018-07-09 3:36 1% ` [dpdk-dev] [PATCH v10 00/19] enable hotplug on multi-process Qi Zhang
` (5 subsequent siblings)
12 siblings, 1 reply; 200+ results
From: Qi Zhang @ 2018-07-06 14:18 UTC (permalink / raw)
To: thomas, anatoly.burakov
Cc: konstantin.ananyev, dev, bruce.richardson, ferruh.yigit,
benjamin.h.shelton, narender.vangati, Qi Zhang
v9:
- Move hotplug IPC from rte_eth_dev_attach/rte_eth_dev_detach to
eal_dev_hotplug_add and eal_dev_hotplug_remove, now all kinds of
devices will be synced in multi-process.
- Fix couple issue when a device is bound to vfio.
1) The device can't be detached clearly in a secondary process, which
also cause it can't be attached again, due to the error that
/dev/vfio/<group_fd> is still busy.(see Patch 3/19 and 4/19)
2) repeat detach/attach device will cause "cannot find TAILQ entry
for PCI device" due to incorrect PCI address compare.
(see patch 2/19).
- Removed device lock.
- Removed private device support.
- Fix commit log grammar issue
v8:
- update rte_eal_version.map due to new API added.
- minor reword on release note.
- minor fix on commit log and code style.
NOTE:
Some issues which is not related with this patchset is expected when
play with hotplug_mp sample as belows.
- Attach a PCI device twice may cause device can't be detached
below fix is required:
https://patches.dpdk.org/patch/42030/
- ixgbe device can't detached, below fix is required
https://patches.dpdk.org/patch/42031/
v7:
- update rte_ethdev_version.map for new APIs.
- improve code readability in __handle_secondary_request by use goto.
- add comments to explain why need to call rte_eal_alarm_set.
- add error log when process_mp_init_callbacks failed.
- reword release notes base on Anatoly's suggestion.
- add back previous "Acked-by" and "Reviewed-by" in commit log.
NOTE: current patchset depends on below IPC fix, or it may not be able
to attach a shared vdev.
https://patches.dpdk.org/patch/41647/
v6:
- remove bus->scan_one, since ABI break is not necessary.
- remove patch for failsafe PMD since it will not support secondary.
- fix wrong implemenation on ixgbe.
- add rte_eth_dev_release_port_private into rte_eth_dev_pci_generic_remove for
secondary process, so we don't need to patch on PMD if PMD use the
default remove function.
- add release notes update.
- agreed to use strdup(peer) as workaround for repling a sync request in seperate
thread.
v5:
- since we will keep mp thread separate from interrupt thread,
it is not necessary to use temporary thread, we use rte_eal_alarm_set.
- remove the change in rte_eth_dev_release_port, since there is a better
way to prevent rte_eth_dev_release_port be called after
rte_eth_dev_release_port_private.
- fix the issue that lock does not take effect on secondary due to
previous re-work
- fix the issue when the first attached device is a private device from
secondary. (patch 8/24)
- work around for reply a sync request in separate thread, this is still
an open and in discussion as below.
https://mails.dpdk.org/archives/dev/2018-June/105359.html
v4:
- since mp thread will be merged to interrupt thread, the fix on v3
for sync IPC deadlock will not work. the new version enable the
machanism to invoke a mp action callback in a temporary thread to
avoid the IPC deadlock, with this, secondary to primary request
impelemtation also be simplified, since we can use sync request
directly in a separate thread.
v3:
- enable mp init callback register to help non-eal module to initialize
mp channel during rte_eal_init
- fix when attach share device from secondary.
1) dead lock due to sync IPC be invoked in rte_malloc in primary
process when handle secondary request to attach device, the
solution is primary process to issue share device attach/detach
in interrupt thread.
2) return port_id not correct.
- check nb_sent and nb_received in sync IPC.
- fix memory leak duirng error handling at attach_on_secondary.
- improve clean_lock_callback to only lock/unlock spinlock once
- improve error code return in check-reply during async IPC.
- remove rte_ prefix of internal function in ethdev_mp.c
- sample code improvement.
1) rename sample to "hotplug_mp", and move to example/multi-process.
2) cleanup header include.
3) call rte_eal_cleanup before exit.
v2:
- rename rte_ethdev_mp.* to ethdev_mp.*
- rename rte_ethdev_lock.* to ethdev_lock.*
- move internal funciton to ethdev_private.h
- separate rte_eth_dev_[un]lock into rte_eth_dev_[un]lock and
rte_eth_dev_[un]lock_with_callback
- lock callbacks will be removed automatically after device is detached.
- add experimental tag for all new APIs.
- fix coding style issue.
- fix wrong lisence header in sample code.
- fix spelling
- fix meson.build.
- improve comments.
Background:
===========
Currently secondary process will only sync ethdev from primary
process at init stage, but it will not be aware if device
is attached/detached on primary process at runtime.
While there is the requirement from application that take
primary-secondary process model. The primary process work as a
resource management process, it will create/destroy virtual device
at runtime, while the secondary process deal with the network stuff
with these devices.
Solution:
=========
So the orignial intention is to fix this gap, but beyond that
the patch set provide a more comprehesive solution to handle
different hotplug cases in multi-process situation, it cover below
scenario:
1. Attach a device from the primary
2. Detach a device from the primary
3. Attach a device from a secondary
4. Detach a device from a secondary
In primary-secondary process model, we assume ethernet devices are
shared by default. that means attach or detach a device on any process
will broadcast to all other processes through mp channel then device
information will be synchronized on all processes.
Any failure during attaching or detaching process will cause inconsistent
status between processes, so proper rollback action should be considered.
Scenario for Case 1, 2:
attach device from primary
a) primary attach the new device if failed goto h).
b) primary send attach sync request to all secondary.
c) secondary receive request and attach device and send reply.
d) primary check the reply if all success go to i).
e) primary send attach rollback sync request to all secondary.
f) secondary receive the request and detach device and send reply.
g) primary receive the reply and detach device as rollback action.
h) attach fail
i) attach success
detach device from primary
a) primary perform pre-detach check, if device is locked, goto i).
b) primary send pre-detach sync request to all secondary.
c) secondary perform pre-detach check and send reply.
d) primary check the reply if any fail goto i).
e) primary send detach sync request to all secondary
f) secondary detach the device and send reply (assume no fail)
g) primary detach the device.
h) detach success
i) detach failed
Scenario for case 3, 4:
attach device from secondary:
a) seconary send asycn request to primary and wait on a condition
which will be released by matched response from primary.
b) primary receive the request and attach the new device if failed
goto i).
c) primary forward attach request to all secondary as async request
(because this in mp thread context, use sync request will deadlock,
same reason for all following async request.)
d) secondary receive request and attach device and send reply.
e) primary check the reply if all success go to j).
f) primary send attach rollback async request to all secondary.
g) secondary receive the request and detach device and send reply.
h) primary receive the reply and detach device as rollback action.
i) send fail response to secondary, goto k).
j) send success response to secondary.
k) secondary process receive response and return.
detach device from secondary:
a) secondary send async request to primary and wait on a condition
which will be released by matched response from primary.
b) primary receive the request and perform pre-detach check, if device
is locked, goto j).
c) primary send pre-detach async request to all secondary.
d) secondary perform pre-detach check and send reply.
e) primary check the reply if any fail goto j).
f) primary send detach async request to all secondary
g) secondary detach the device and send reply
h) primary detach the device.
i) send success response to secondary, goto k).
j) send fail response to secondary.
k) secondary process receive response and return.
APIs chenages:
==============
scope of rte_eal_hotplug_add and rte_eal_hotplug_remove is extended.
In primary-secondary process model, rte_eal_hotplug_add will guarantee
that device be attached on all processes, while rte_eal_hotplug_remove will
guarantee device be detached on all processes.
PMD Impact:
===========
Currently device removing is not handled well in secondary process on
most pmd drivers, rte_eth_dev_relase_port will be invoked and will mess up
primary process since it reset all shared data. So we introduced new API
rte_eth_dev_release_port_local which only reset ethdev's state to unsued
but not touch shared data so other process will not be impacted.
Since not all device driver is target to support primary-secondary
process model, so the patch set only fix this on all Intel devices and
vdev, it can be refereneced by other driver when equevalent fix is
required
Example:
========
The patchset also contains a example to demonstrate device hotplug
in multi-process model, below are detail instructions.
/* start sample code as primary then secondary */
./hotplug_mp --proc-type=auto
Command Line Example:
>help
>list
/* attach a af_packet vdev */
>attach net_af_packet,iface=eth0
/* detach port 0 */
>detach 0
Qi Zhang (19):
ethdev: add function to release port in local process
bus/pci: fix PCI address compare
bus/pci: enable vfio unmap resource for secondary
vfio: remove uneccessary IPC for group fd clear
eal: enable hotplug on multi-process
eal: support attach or detach share device from secondary
net/i40e: enable port detach on secondary process
net/ixgbe: enable port detach on secondary process
net/af_packet: enable port detach on secondary process
net/bonding: enable port detach on secondary process
net/kni: enable port detach on secondary process
net/null: enable port detach on secondary process
net/octeontx: enable port detach on secondary process
net/pcap: enable port detach on secondary process
net/softnic: enable port detach on secondary process
net/tap: enable port detach on secondary process
net/vhost: enable port detach on secondary process
examples/multi_process: add hotplug sample
doc: update release notes for multi process hotplug
doc/guides/rel_notes/release_18_08.rst | 11 +
drivers/bus/pci/linux/pci_vfio.c | 88 ++++++-
drivers/net/af_packet/rte_eth_af_packet.c | 11 +
drivers/net/bonding/rte_eth_bond_pmd.c | 11 +
drivers/net/i40e/i40e_ethdev.c | 2 +
drivers/net/ixgbe/ixgbe_ethdev.c | 3 +
drivers/net/kni/rte_eth_kni.c | 11 +
drivers/net/null/rte_eth_null.c | 16 +-
drivers/net/octeontx/octeontx_ethdev.c | 16 ++
drivers/net/pcap/rte_eth_pcap.c | 15 +-
drivers/net/softnic/rte_eth_softnic.c | 19 +-
drivers/net/tap/rte_eth_tap.c | 17 +-
drivers/net/vhost/rte_eth_vhost.c | 11 +
examples/multi_process/Makefile | 1 +
examples/multi_process/hotplug_mp/Makefile | 23 ++
examples/multi_process/hotplug_mp/commands.c | 197 ++++++++++++++
examples/multi_process/hotplug_mp/commands.h | 10 +
examples/multi_process/hotplug_mp/main.c | 41 +++
lib/librte_eal/bsdapp/eal/Makefile | 1 +
lib/librte_eal/common/eal_common_dev.c | 168 +++++++++++-
lib/librte_eal/common/eal_private.h | 37 +++
lib/librte_eal/common/hotplug_mp.c | 346 +++++++++++++++++++++++++
lib/librte_eal/common/hotplug_mp.h | 44 ++++
lib/librte_eal/common/include/rte_bus.h | 3 +
lib/librte_eal/common/include/rte_dev.h | 9 +
lib/librte_eal/common/meson.build | 1 +
lib/librte_eal/linuxapp/eal/Makefile | 1 +
lib/librte_eal/linuxapp/eal/eal.c | 6 +
lib/librte_eal/linuxapp/eal/eal_vfio.c | 45 +---
lib/librte_eal/linuxapp/eal/eal_vfio.h | 1 -
lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c | 8 -
lib/librte_ethdev/rte_ethdev.c | 12 +
lib/librte_ethdev/rte_ethdev_driver.h | 16 +-
lib/librte_ethdev/rte_ethdev_pci.h | 8 +
34 files changed, 1147 insertions(+), 62 deletions(-)
create mode 100644 examples/multi_process/hotplug_mp/Makefile
create mode 100644 examples/multi_process/hotplug_mp/commands.c
create mode 100644 examples/multi_process/hotplug_mp/commands.h
create mode 100644 examples/multi_process/hotplug_mp/main.c
create mode 100644 lib/librte_eal/common/hotplug_mp.c
create mode 100644 lib/librte_eal/common/hotplug_mp.h
--
2.13.6
^ permalink raw reply [relevance 2%]
* [dpdk-dev] [PATCH] cryptodev: rename experimental private data APIs
@ 2018-07-06 13:39 3% Fiona Trahe
2018-07-09 7:34 0% ` Gujjar, Abhinandan S
2018-07-10 6:29 0% ` Gujjar, Abhinandan S
0 siblings, 2 replies; 200+ results
From: Fiona Trahe @ 2018-07-06 13:39 UTC (permalink / raw)
To: dev; +Cc: pablo.de.lara.guarch, fiona.trahe, abhinandan.gujjar
The name private_data is confusing in these APIs:
rte_cryptodev_sym_session_set_private_data()
rte_cryptodev_sym_session_get_private_data()
It refers to data added at the end of the session hdr for
use by the application.
The session already contains sess_private_data[index]
which is used to store private pmd data and most references to private
data refer to that.
e.g. external apis
rte_cryptodev_sym_get_private_session_size() and internal
set/get_session_private_data() refer to sess_private_data[].
So rename to user_data, i.e.
rte_cryptodev_sym_session_set_user_data()
rte_cryptodev_sym_session_get_user_data()
Refers to changes introduced here:
https://patches.dpdk.org/patch/38172/
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
---
doc/guides/prog_guide/cryptodev_lib.rst | 14 +++++++-------
doc/guides/prog_guide/event_crypto_adapter.rst | 6 +++---
doc/guides/rel_notes/release_18_08.rst | 8 ++++++++
lib/librte_cryptodev/rte_cryptodev.c | 16 ++++++++--------
lib/librte_cryptodev/rte_cryptodev.h | 14 +++++++-------
lib/librte_cryptodev/rte_cryptodev_version.map | 4 ++--
lib/librte_eventdev/rte_event_crypto_adapter.c | 4 ++--
test/test/test_event_crypto_adapter.c | 8 ++++----
8 files changed, 41 insertions(+), 33 deletions(-)
diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst
index 30f0bcf7a..3dbf4dde6 100644
--- a/doc/guides/prog_guide/cryptodev_lib.rst
+++ b/doc/guides/prog_guide/cryptodev_lib.rst
@@ -302,24 +302,24 @@ enqueue call.
Private data
~~~~~~~~~~~~
For session-based operations, the set and get API provides a mechanism for an
-application to store and retrieve the private data information stored along with
-the crypto session.
+application to store and retrieve the private user data information stored along
+with the crypto session.
For example, suppose an application is submitting a crypto operation with a session
-associated and wants to indicate private data information which is required to be
+associated and wants to indicate private user data information which is required to be
used after completion of the crypto operation. In this case, the application can use
-the set API to set the private data and retrieve it using get API.
+the set API to set the user data and retrieve it using get API.
.. code-block:: c
- int rte_cryptodev_sym_session_set_private_data(
+ int rte_cryptodev_sym_session_set_user_data(
struct rte_cryptodev_sym_session *sess, void *data, uint16_t size);
- void * rte_cryptodev_sym_session_get_private_data(
+ void * rte_cryptodev_sym_session_get_user_data(
struct rte_cryptodev_sym_session *sess);
-For session-less mode, the private data information can be placed along with the
+For session-less mode, the private user data information can be placed along with the
``struct rte_crypto_op``. The ``rte_crypto_op::private_data_offset`` indicates the
start of private data information. The offset is counted from the start of the
rte_crypto_op including other crypto information such as the IVs (since there can
diff --git a/doc/guides/prog_guide/event_crypto_adapter.rst b/doc/guides/prog_guide/event_crypto_adapter.rst
index 5c1354dec..9fe09c805 100644
--- a/doc/guides/prog_guide/event_crypto_adapter.rst
+++ b/doc/guides/prog_guide/event_crypto_adapter.rst
@@ -223,9 +223,9 @@ crypto security session or at an offset in the ``struct rte_crypto_op``.
The ``rte_crypto_op::private_data_offset`` is used to locate the request/
response in the ``rte_crypto_op``.
-For crypto session, ``rte_cryptodev_sym_session_set_private_data()`` API
+For crypto session, ``rte_cryptodev_sym_session_set_user_data()`` API
will be used to set request/response data. The same data will be obtained
-by ``rte_cryptodev_sym_session_get_private_data()`` API. The
+by ``rte_cryptodev_sym_session_get_user_data()`` API. The
RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA capability indicates
whether HW or SW supports this feature.
@@ -257,7 +257,7 @@ the ``rte_crypto_op``.
m_data.request_info.cdev_id = cdev_id;
m_data.request_info.queue_pair_id = qp_id;
/* Call set API to store private data information */
- rte_cryptodev_sym_session_set_private_data(
+ rte_cryptodev_sym_session_set_user_data(
op->sym->session,
&m_data,
sizeof(m_data));
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index bc0124295..8f84a088c 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -60,6 +60,14 @@ API Changes
Also, make sure to start the actual text at the margin.
=========================================================
+* **Renamed cryptodev experimental APIs.**
+
+ Used user_data instead of private_data in following APIs to avoid confusion
+ with the existing session parameter ``sess_private_data[]`` and related APIs.
+ ``rte_cryptodev_sym_session_set_private_data()`` changed to
+ ``rte_cryptodev_sym_session_set_user_data()``
+ ``rte_cryptodev_sym_session_get_private_data()`` changed to
+ ``rte_cryptodev_sym_session_get_user_data()``
ABI Changes
-----------
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 7e5821246..88f4af5f6 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -1123,7 +1123,7 @@ rte_cryptodev_sym_session_create(struct rte_mempool *mp)
}
/* Clear device session pointer.
- * Include the flag indicating presence of private data
+ * Include the flag indicating presence of user data
*/
memset(sess, 0, (sizeof(void *) * nb_drivers) + sizeof(uint8_t));
@@ -1236,7 +1236,7 @@ rte_cryptodev_sym_get_header_session_size(void)
/*
* Header contains pointers to the private data
* of all registered drivers, and a flag which
- * indicates presence of private data
+ * indicates presence of user data
*/
return ((sizeof(void *) * nb_drivers) + sizeof(uint8_t));
}
@@ -1277,31 +1277,31 @@ rte_cryptodev_sym_get_private_session_size(uint8_t dev_id)
}
int __rte_experimental
-rte_cryptodev_sym_session_set_private_data(
+rte_cryptodev_sym_session_set_user_data(
struct rte_cryptodev_sym_session *sess,
void *data,
uint16_t size)
{
uint16_t off_set = sizeof(void *) * nb_drivers;
- uint8_t *private_data_present = (uint8_t *)sess + off_set;
+ uint8_t *user_data_present = (uint8_t *)sess + off_set;
if (sess == NULL)
return -EINVAL;
- *private_data_present = 1;
+ *user_data_present = 1;
off_set += sizeof(uint8_t);
rte_memcpy((uint8_t *)sess + off_set, data, size);
return 0;
}
void * __rte_experimental
-rte_cryptodev_sym_session_get_private_data(
+rte_cryptodev_sym_session_get_user_data(
struct rte_cryptodev_sym_session *sess)
{
uint16_t off_set = sizeof(void *) * nb_drivers;
- uint8_t *private_data_present = (uint8_t *)sess + off_set;
+ uint8_t *user_data_present = (uint8_t *)sess + off_set;
- if (sess == NULL || !*private_data_present)
+ if (sess == NULL || !*user_data_present)
return NULL;
off_set += sizeof(uint8_t);
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index ccc0f73fd..5d4e690c2 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -1041,35 +1041,35 @@ int rte_cryptodev_driver_id_get(const char *name);
const char *rte_cryptodev_driver_name_get(uint8_t driver_id);
/**
- * Set private data for a session.
+ * Store user data in a session.
*
* @param sess Session pointer allocated by
* *rte_cryptodev_sym_session_create*.
- * @param data Pointer to the private data.
- * @param size Size of the private data.
+ * @param data Pointer to the user data.
+ * @param size Size of the user data.
*
* @return
* - On success, zero.
* - On failure, a negative value.
*/
int __rte_experimental
-rte_cryptodev_sym_session_set_private_data(
+rte_cryptodev_sym_session_set_user_data(
struct rte_cryptodev_sym_session *sess,
void *data,
uint16_t size);
/**
- * Get private data of a session.
+ * Get user data stored in a session.
*
* @param sess Session pointer allocated by
* *rte_cryptodev_sym_session_create*.
*
* @return
- * - On success return pointer to private data.
+ * - On success return pointer to user data.
* - On failure returns NULL.
*/
void * __rte_experimental
-rte_cryptodev_sym_session_get_private_data(
+rte_cryptodev_sym_session_get_user_data(
struct rte_cryptodev_sym_session *sess);
#ifdef __cplusplus
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index be8f4c1a7..c0ea9c875 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -97,6 +97,6 @@ DPDK_18.05 {
EXPERIMENTAL {
global:
- rte_cryptodev_sym_session_get_private_data;
- rte_cryptodev_sym_session_set_private_data;
+ rte_cryptodev_sym_session_get_user_data;
+ rte_cryptodev_sym_session_set_user_data;
};
diff --git a/lib/librte_eventdev/rte_event_crypto_adapter.c b/lib/librte_eventdev/rte_event_crypto_adapter.c
index ba63a87b7..11b28ca9b 100644
--- a/lib/librte_eventdev/rte_event_crypto_adapter.c
+++ b/lib/librte_eventdev/rte_event_crypto_adapter.c
@@ -342,7 +342,7 @@ eca_enq_to_cryptodev(struct rte_event_crypto_adapter *adapter,
if (crypto_op == NULL)
continue;
if (crypto_op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
- m_data = rte_cryptodev_sym_session_get_private_data(
+ m_data = rte_cryptodev_sym_session_get_user_data(
crypto_op->sym->session);
if (m_data == NULL) {
rte_pktmbuf_free(crypto_op->sym->m_src);
@@ -512,7 +512,7 @@ eca_ops_enqueue_burst(struct rte_event_crypto_adapter *adapter,
for (i = 0; i < num; i++) {
struct rte_event *ev = &events[nb_ev++];
if (ops[i]->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
- m_data = rte_cryptodev_sym_session_get_private_data(
+ m_data = rte_cryptodev_sym_session_get_user_data(
ops[i]->sym->session);
} else if (ops[i]->sess_type == RTE_CRYPTO_OP_SESSIONLESS &&
ops[i]->private_data_offset) {
diff --git a/test/test/test_event_crypto_adapter.c b/test/test/test_event_crypto_adapter.c
index 066b0adef..de258c346 100644
--- a/test/test/test_event_crypto_adapter.c
+++ b/test/test/test_event_crypto_adapter.c
@@ -205,12 +205,12 @@ test_op_forward_mode(uint8_t session_less)
TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n");
if (cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA) {
- /* Fill in private date information */
+ /* Fill in private user data information */
rte_memcpy(&m_data.response_info, &response_info,
sizeof(response_info));
rte_memcpy(&m_data.request_info, &request_info,
sizeof(request_info));
- rte_cryptodev_sym_session_set_private_data(sess,
+ rte_cryptodev_sym_session_set_user_data(sess,
&m_data, sizeof(m_data));
}
@@ -389,10 +389,10 @@ test_op_new_mode(uint8_t session_less)
TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n");
if (cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA) {
- /* Fill in private data information */
+ /* Fill in private user data information */
rte_memcpy(&m_data.response_info, &response_info,
sizeof(m_data));
- rte_cryptodev_sym_session_set_private_data(sess,
+ rte_cryptodev_sym_session_set_user_data(sess,
&m_data, sizeof(m_data));
}
rte_cryptodev_sym_session_init(TEST_CDEV_ID, sess,
--
2.13.6
^ permalink raw reply [relevance 3%]
* [dpdk-dev] [PATCH v5 3/4] compressdev: replace mbuf scatter gather flag
@ 2018-07-06 5:28 3% ` Pablo de Lara
0 siblings, 0 replies; 200+ results
From: Pablo de Lara @ 2018-07-06 5:28 UTC (permalink / raw)
To: shally.verma, ashish.gupta, fiona.trahe, lee.daly; +Cc: dev, Pablo de Lara
The current mbuf scatter gather feature flag is
too ambiguous, as it is not clear if input and/or output
buffers can be scatter gather mbufs or not.
Therefore, three new flags will replace this flag:
- RTE_COMP_FF_OOP_SGL_IN_SGL_OUT
- RTE_COMP_FF_OOP_SGL_IN_FB_OUT
- RTE_COMP_FF_OOP_LB_IN_SGL_OUT
Note that out-of-place flat buffers is supported by default
and in-place is not supported by the library.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
v5:
- Replaced left "Flat Buffer" with "Linear Buffer" (Shally)
- Rephrased comment about new feature flags (Shally)
v4:
- Replaced FB (Flat Buffers) with LB (Linear Buffers) (Shally)
- Add extra explanation on comments about Linear Buffers vs
Scatter-gather lists
v3:
- Replaced Out-of-place with OOP
- Added new feature flags in default.ini
v2:
- Fixed typos
- Rephrased comments
doc/guides/compressdevs/features/default.ini | 34 +++++++++++++++-------------
doc/guides/compressdevs/overview.rst | 14 ++++++++++++
doc/guides/rel_notes/release_18_08.rst | 6 +++++
lib/librte_compressdev/rte_comp.c | 8 +++++--
lib/librte_compressdev/rte_comp.h | 31 +++++++++++++++++--------
5 files changed, 65 insertions(+), 28 deletions(-)
diff --git a/doc/guides/compressdevs/features/default.ini b/doc/guides/compressdevs/features/default.ini
index a88414d23..829e4df61 100644
--- a/doc/guides/compressdevs/features/default.ini
+++ b/doc/guides/compressdevs/features/default.ini
@@ -6,19 +6,21 @@
; the features table in the documentation.
;
[Features]
-HW Accelerated =
-CPU SSE =
-CPU AVX =
-CPU AVX2 =
-CPU AVX512 =
-CPU NEON =
-Stateful =
-Pass-through =
-Chained mbufs =
-Deflate =
-LZS =
-Adler32 =
-Crc32 =
-Adler32&Crc32 =
-Fixed =
-Dynamic =
+HW Accelerated =
+CPU SSE =
+CPU AVX =
+CPU AVX2 =
+CPU AVX512 =
+CPU NEON =
+Stateful =
+Pass-through =
+OOP SGL In SGL Out =
+OOP SGL In LB Out =
+OOP LB In SGL Out =
+Deflate =
+LZS =
+Adler32 =
+Crc32 =
+Adler32&Crc32 =
+Fixed =
+Dynamic =
diff --git a/doc/guides/compressdevs/overview.rst b/doc/guides/compressdevs/overview.rst
index d01c1a966..70bbe82b7 100644
--- a/doc/guides/compressdevs/overview.rst
+++ b/doc/guides/compressdevs/overview.rst
@@ -16,3 +16,17 @@ Supported Feature Flags
- "Pass-through" feature flag refers to the ability of the PMD
to let input buffers pass-through it, copying the input to the output,
without making any modifications to it (no compression done).
+
+ - "OOP SGL In SGL Out" feature flag stands for
+ "Out-of-place Scatter-gather list Input, Scatter-gater list Output",
+ which means PMD supports different scatter-gather styled input and output buffers
+ (i.e. both can consists of multiple segments).
+
+ - "OOP SGL In LB Out" feature flag stands for
+ "Out-of-place Scatter-gather list Input, Linear Buffers Output",
+ which means PMD supports input from scatter-gathered styled buffers, outputting linear buffers
+ (i.e. single segment).
+
+ - "OOP LB In SGL Out" feature flag stands for
+ "Out-of-place Linear Buffers Input, Scatter-gather list Output",
+ which means PMD supports input from linear buffer, outputting scatter-gathered styled buffers.
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index bc0124295..3487e3fb9 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -60,6 +60,12 @@ API Changes
Also, make sure to start the actual text at the margin.
=========================================================
+* compressdev: Feature flag ``RTE_COMP_FF_MBUF_SCATTER_GATHER`` is
+ replaced with the following more explicit flags:
+ - ``RTE_COMP_FF_OOP_SGL_IN_SGL_OUT``
+ - ``RTE_COMP_FF_OOP_SGL_IN_LB_OUT``
+ - ``RTE_COMP_FF_OOP_LB_IN_SGL_OUT``
+
ABI Changes
-----------
diff --git a/lib/librte_compressdev/rte_comp.c b/lib/librte_compressdev/rte_comp.c
index d596ba872..97ea0d922 100644
--- a/lib/librte_compressdev/rte_comp.c
+++ b/lib/librte_compressdev/rte_comp.c
@@ -14,8 +14,12 @@ rte_comp_get_feature_name(uint64_t flag)
return "STATEFUL_COMPRESSION";
case RTE_COMP_FF_STATEFUL_DECOMPRESSION:
return "STATEFUL_DECOMPRESSION";
- case RTE_COMP_FF_MBUF_SCATTER_GATHER:
- return "MBUF_SCATTER_GATHER";
+ case RTE_COMP_FF_OOP_SGL_IN_SGL_OUT:
+ return "OOP_SGL_IN_SGL_OUT";
+ case RTE_COMP_FF_OOP_SGL_IN_LB_OUT:
+ return "OOP_SGL_IN_LB_OUT";
+ case RTE_COMP_FF_OOP_LB_IN_SGL_OUT:
+ return "OOP_LB_IN_SGL_OUT";
case RTE_COMP_FF_MULTI_PKT_CHECKSUM:
return "MULTI_PKT_CHECKSUM";
case RTE_COMP_FF_ADLER32_CHECKSUM:
diff --git a/lib/librte_compressdev/rte_comp.h b/lib/librte_compressdev/rte_comp.h
index 5b513c77e..274b5eadf 100644
--- a/lib/librte_compressdev/rte_comp.h
+++ b/lib/librte_compressdev/rte_comp.h
@@ -30,23 +30,34 @@ extern "C" {
/**< Stateful compression is supported */
#define RTE_COMP_FF_STATEFUL_DECOMPRESSION (1ULL << 1)
/**< Stateful decompression is supported */
-#define RTE_COMP_FF_MBUF_SCATTER_GATHER (1ULL << 2)
-/**< Scatter-gather mbufs are supported */
-#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 3)
+#define RTE_COMP_FF_OOP_SGL_IN_SGL_OUT (1ULL << 2)
+/**< Out-of-place Scatter-gather (SGL) buffers,
+ * with multiple segments, are supported in input and output
+ */
+#define RTE_COMP_FF_OOP_SGL_IN_LB_OUT (1ULL << 3)
+/**< Out-of-place Scatter-gather (SGL) buffers are supported
+ * in input, combined with linear buffers (LB), with a
+ * single segment, in output
+ */
+#define RTE_COMP_FF_OOP_LB_IN_SGL_OUT (1ULL << 4)
+/**< Out-of-place Scatter-gather (SGL) mbufs are supported
+ * in output, combined with linear buffers (LB) in input
+ */
+#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 5)
/**< Adler-32 Checksum is supported */
-#define RTE_COMP_FF_CRC32_CHECKSUM (1ULL << 4)
+#define RTE_COMP_FF_CRC32_CHECKSUM (1ULL << 6)
/**< CRC32 Checksum is supported */
-#define RTE_COMP_FF_CRC32_ADLER32_CHECKSUM (1ULL << 5)
+#define RTE_COMP_FF_CRC32_ADLER32_CHECKSUM (1ULL << 7)
/**< Adler-32/CRC32 Checksum is supported */
-#define RTE_COMP_FF_MULTI_PKT_CHECKSUM (1ULL << 6)
+#define RTE_COMP_FF_MULTI_PKT_CHECKSUM (1ULL << 8)
/**< Generation of checksum across multiple stateless packets is supported */
-#define RTE_COMP_FF_SHA1_HASH (1ULL << 7)
+#define RTE_COMP_FF_SHA1_HASH (1ULL << 9)
/**< SHA1 Hash is supported */
-#define RTE_COMP_FF_SHA2_SHA256_HASH (1ULL << 8)
+#define RTE_COMP_FF_SHA2_SHA256_HASH (1ULL << 10)
/**< SHA256 Hash of SHA2 family is supported */
-#define RTE_COMP_FF_NONCOMPRESSED_BLOCKS (1ULL << 9)
+#define RTE_COMP_FF_NONCOMPRESSED_BLOCKS (1ULL << 11)
/**< Creation of non-compressed blocks using RTE_COMP_LEVEL_NONE is supported */
-#define RTE_COMP_FF_SHAREABLE_PRIV_XFORM (1ULL << 10)
+#define RTE_COMP_FF_SHAREABLE_PRIV_XFORM (1ULL << 12)
/**< Private xforms created by the PMD can be shared
* across multiple stateless operations. If not set, then app needs
* to create as many priv_xforms as it expects to have stateless
--
2.14.4
^ permalink raw reply [relevance 3%]
* Re: [dpdk-dev] [PATCH v4 3/4] compressdev: replace mbuf scatter gather flag
2018-07-06 2:54 3% ` [dpdk-dev] [PATCH v4 3/4] compressdev: replace mbuf scatter gather flag Pablo de Lara
@ 2018-07-06 12:33 0% ` Verma, Shally
0 siblings, 0 replies; 200+ results
From: Verma, Shally @ 2018-07-06 12:33 UTC (permalink / raw)
To: Pablo de Lara, Gupta, Ashish, fiona.trahe, lee.daly; +Cc: dev
Hi Pablo
Looks fine. Just minor comments:
>-----Original Message-----
>From: Pablo de Lara [mailto:pablo.de.lara.guarch@intel.com]
>Sent: 06 July 2018 08:24
>To: Verma, Shally <Shally.Verma@cavium.com>; Gupta, Ashish <Ashish.Gupta@cavium.com>; fiona.trahe@intel.com;
>lee.daly@intel.com
>Cc: dev@dpdk.org; Pablo de Lara <pablo.de.lara.guarch@intel.com>
>Subject: [PATCH v4 3/4] compressdev: replace mbuf scatter gather flag
>
...
>@@ -6,19 +6,21 @@
>diff --git a/doc/guides/compressdevs/overview.rst b/doc/guides/compressdevs/overview.rst
>index d01c1a966..6d12c3bd6 100644
>--- a/doc/guides/compressdevs/overview.rst
>+++ b/doc/guides/compressdevs/overview.rst
>@@ -16,3 +16,17 @@ Supported Feature Flags
> - "Pass-through" feature flag refers to the ability of the PMD
> to let input buffers pass-through it, copying the input to the output,
> without making any modifications to it (no compression done).
>+
>+ - "OOP SGL In SGL Out" feature flag stands for
>+ "Out-of-place Scatter-gather list Input, Scatter-gater list Output",
>+ which means that the input and output buffers can consist of multiple segments.
>+
May be its simpler to rephrase it and following somewhat this way:
Which means " PMD support different scatter-gather styled input and output buffers i.e. both can consists of multiple segments"
>+ - "OOP SGL In LB Out" feature flag stands for
>+ "Out-of-place Scatter-gather list Input, Flat Buffers Output",
>+ which means that the input buffer can consist of multiple segments combined
>+ with a single segment buffer in the output.
Which means "PMD support input from scatter-gathered styled buffers , but can output to linear buffers.
And better to replace "flat" by "linear" to be consistent with name.
>+
>+ - "OOP LB In SGL Out" feature flag stands for
>+ "Out-of-place Flat Buffers Input, Scatter-gather list Output",
>+ which means that the output buffer can consist of multiple segments combined
>+ with a single segment buffer in the input.
Thanks
Shally
>diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
>index bc0124295..3487e3fb9 100644
>--- a/doc/guides/rel_notes/release_18_08.rst
>+++ b/doc/guides/rel_notes/release_18_08.rst
>@@ -60,6 +60,12 @@ API Changes
> Also, make sure to start the actual text at the margin.
> =========================================================
>
>+* compressdev: Feature flag ``RTE_COMP_FF_MBUF_SCATTER_GATHER`` is
>+ replaced with the following more explicit flags:
>+ - ``RTE_COMP_FF_OOP_SGL_IN_SGL_OUT``
>+ - ``RTE_COMP_FF_OOP_SGL_IN_LB_OUT``
>+ - ``RTE_COMP_FF_OOP_LB_IN_SGL_OUT``
>+
>
> ABI Changes
> -----------
>diff --git a/lib/librte_compressdev/rte_comp.c b/lib/librte_compressdev/rte_comp.c
>index d596ba872..97ea0d922 100644
>--- a/lib/librte_compressdev/rte_comp.c
>+++ b/lib/librte_compressdev/rte_comp.c
>@@ -14,8 +14,12 @@ rte_comp_get_feature_name(uint64_t flag)
> return "STATEFUL_COMPRESSION";
> case RTE_COMP_FF_STATEFUL_DECOMPRESSION:
> return "STATEFUL_DECOMPRESSION";
>- case RTE_COMP_FF_MBUF_SCATTER_GATHER:
>- return "MBUF_SCATTER_GATHER";
>+ case RTE_COMP_FF_OOP_SGL_IN_SGL_OUT:
>+ return "OOP_SGL_IN_SGL_OUT";
>+ case RTE_COMP_FF_OOP_SGL_IN_LB_OUT:
>+ return "OOP_SGL_IN_LB_OUT";
>+ case RTE_COMP_FF_OOP_LB_IN_SGL_OUT:
>+ return "OOP_LB_IN_SGL_OUT";
> case RTE_COMP_FF_MULTI_PKT_CHECKSUM:
> return "MULTI_PKT_CHECKSUM";
> case RTE_COMP_FF_ADLER32_CHECKSUM:
>diff --git a/lib/librte_compressdev/rte_comp.h b/lib/librte_compressdev/rte_comp.h
>index 5b513c77e..274b5eadf 100644
>--- a/lib/librte_compressdev/rte_comp.h
>+++ b/lib/librte_compressdev/rte_comp.h
>@@ -30,23 +30,34 @@ extern "C" {
> /**< Stateful compression is supported */
> #define RTE_COMP_FF_STATEFUL_DECOMPRESSION (1ULL << 1)
> /**< Stateful decompression is supported */
>-#define RTE_COMP_FF_MBUF_SCATTER_GATHER (1ULL << 2)
>-/**< Scatter-gather mbufs are supported */
>-#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 3)
>+#define RTE_COMP_FF_OOP_SGL_IN_SGL_OUT (1ULL << 2)
>+/**< Out-of-place Scatter-gather (SGL) buffers,
>+ * with multiple segments, are supported in input and output
>+ */
>+#define RTE_COMP_FF_OOP_SGL_IN_LB_OUT (1ULL << 3)
>+/**< Out-of-place Scatter-gather (SGL) buffers are supported
>+ * in input, combined with linear buffers (LB), with a
>+ * single segment, in output
>+ */
>+#define RTE_COMP_FF_OOP_LB_IN_SGL_OUT (1ULL << 4)
>+/**< Out-of-place Scatter-gather (SGL) mbufs are supported
>+ * in output, combined with linear buffers (LB) in input
>+ */
>+#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 5)
> /**< Adler-32 Checksum is supported */
>-#define RTE_COMP_FF_CRC32_CHECKSUM (1ULL << 4)
>+#define RTE_COMP_FF_CRC32_CHECKSUM (1ULL << 6)
> /**< CRC32 Checksum is supported */
>-#define RTE_COMP_FF_CRC32_ADLER32_CHECKSUM (1ULL << 5)
>+#define RTE_COMP_FF_CRC32_ADLER32_CHECKSUM (1ULL << 7)
> /**< Adler-32/CRC32 Checksum is supported */
>-#define RTE_COMP_FF_MULTI_PKT_CHECKSUM (1ULL << 6)
>+#define RTE_COMP_FF_MULTI_PKT_CHECKSUM (1ULL << 8)
> /**< Generation of checksum across multiple stateless packets is supported */
>-#define RTE_COMP_FF_SHA1_HASH (1ULL << 7)
>+#define RTE_COMP_FF_SHA1_HASH (1ULL << 9)
> /**< SHA1 Hash is supported */
>-#define RTE_COMP_FF_SHA2_SHA256_HASH (1ULL << 8)
>+#define RTE_COMP_FF_SHA2_SHA256_HASH (1ULL << 10)
> /**< SHA256 Hash of SHA2 family is supported */
>-#define RTE_COMP_FF_NONCOMPRESSED_BLOCKS (1ULL << 9)
>+#define RTE_COMP_FF_NONCOMPRESSED_BLOCKS (1ULL << 11)
> /**< Creation of non-compressed blocks using RTE_COMP_LEVEL_NONE is supported */
>-#define RTE_COMP_FF_SHAREABLE_PRIV_XFORM (1ULL << 10)
>+#define RTE_COMP_FF_SHAREABLE_PRIV_XFORM (1ULL << 12)
> /**< Private xforms created by the PMD can be shared
> * across multiple stateless operations. If not set, then app needs
> * to create as many priv_xforms as it expects to have stateless
>--
>2.14.4
^ permalink raw reply [relevance 0%]
* [dpdk-dev] [PATCH v4 3/4] compressdev: replace mbuf scatter gather flag
@ 2018-07-06 2:54 3% ` Pablo de Lara
2018-07-06 12:33 0% ` Verma, Shally
0 siblings, 1 reply; 200+ results
From: Pablo de Lara @ 2018-07-06 2:54 UTC (permalink / raw)
To: shally.verma, ashish.gupta, fiona.trahe, lee.daly; +Cc: dev, Pablo de Lara
The current mbuf scatter gather feature flag is
too ambiguous, as it is not clear if input and/or output
buffers can be scatter gather mbufs or not.
Therefore, three new flags will replace this flag:
- RTE_COMP_FF_OOP_SGL_IN_SGL_OUT
- RTE_COMP_FF_OOP_SGL_IN_FB_OUT
- RTE_COMP_FF_OOP_LB_IN_SGL_OUT
Note that out-of-place flat buffers is supported by default
and in-place is not supported by the library.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
v4:
- Replaced FB (Flat Buffers) with LB (Linear Buffers) (Shally)
- Add extra explanation on comments about Linear Buffers vs
Scatter-gather lists
v3:
- Replaced Out-of-place with OOP
- Added new feature flags in default.ini
v2:
- Fixed typos
- Rephrased comments
doc/guides/compressdevs/features/default.ini | 34 +++++++++++++++-------------
doc/guides/compressdevs/overview.rst | 14 ++++++++++++
doc/guides/rel_notes/release_18_08.rst | 6 +++++
lib/librte_compressdev/rte_comp.c | 8 +++++--
lib/librte_compressdev/rte_comp.h | 31 +++++++++++++++++--------
5 files changed, 65 insertions(+), 28 deletions(-)
diff --git a/doc/guides/compressdevs/features/default.ini b/doc/guides/compressdevs/features/default.ini
index a88414d23..829e4df61 100644
--- a/doc/guides/compressdevs/features/default.ini
+++ b/doc/guides/compressdevs/features/default.ini
@@ -6,19 +6,21 @@
; the features table in the documentation.
;
[Features]
-HW Accelerated =
-CPU SSE =
-CPU AVX =
-CPU AVX2 =
-CPU AVX512 =
-CPU NEON =
-Stateful =
-Pass-through =
-Chained mbufs =
-Deflate =
-LZS =
-Adler32 =
-Crc32 =
-Adler32&Crc32 =
-Fixed =
-Dynamic =
+HW Accelerated =
+CPU SSE =
+CPU AVX =
+CPU AVX2 =
+CPU AVX512 =
+CPU NEON =
+Stateful =
+Pass-through =
+OOP SGL In SGL Out =
+OOP SGL In LB Out =
+OOP LB In SGL Out =
+Deflate =
+LZS =
+Adler32 =
+Crc32 =
+Adler32&Crc32 =
+Fixed =
+Dynamic =
diff --git a/doc/guides/compressdevs/overview.rst b/doc/guides/compressdevs/overview.rst
index d01c1a966..6d12c3bd6 100644
--- a/doc/guides/compressdevs/overview.rst
+++ b/doc/guides/compressdevs/overview.rst
@@ -16,3 +16,17 @@ Supported Feature Flags
- "Pass-through" feature flag refers to the ability of the PMD
to let input buffers pass-through it, copying the input to the output,
without making any modifications to it (no compression done).
+
+ - "OOP SGL In SGL Out" feature flag stands for
+ "Out-of-place Scatter-gather list Input, Scatter-gater list Output",
+ which means that the input and output buffers can consist of multiple segments.
+
+ - "OOP SGL In LB Out" feature flag stands for
+ "Out-of-place Scatter-gather list Input, Flat Buffers Output",
+ which means that the input buffer can consist of multiple segments combined
+ with a single segment buffer in the output.
+
+ - "OOP LB In SGL Out" feature flag stands for
+ "Out-of-place Flat Buffers Input, Scatter-gather list Output",
+ which means that the output buffer can consist of multiple segments combined
+ with a single segment buffer in the input.
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index bc0124295..3487e3fb9 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -60,6 +60,12 @@ API Changes
Also, make sure to start the actual text at the margin.
=========================================================
+* compressdev: Feature flag ``RTE_COMP_FF_MBUF_SCATTER_GATHER`` is
+ replaced with the following more explicit flags:
+ - ``RTE_COMP_FF_OOP_SGL_IN_SGL_OUT``
+ - ``RTE_COMP_FF_OOP_SGL_IN_LB_OUT``
+ - ``RTE_COMP_FF_OOP_LB_IN_SGL_OUT``
+
ABI Changes
-----------
diff --git a/lib/librte_compressdev/rte_comp.c b/lib/librte_compressdev/rte_comp.c
index d596ba872..97ea0d922 100644
--- a/lib/librte_compressdev/rte_comp.c
+++ b/lib/librte_compressdev/rte_comp.c
@@ -14,8 +14,12 @@ rte_comp_get_feature_name(uint64_t flag)
return "STATEFUL_COMPRESSION";
case RTE_COMP_FF_STATEFUL_DECOMPRESSION:
return "STATEFUL_DECOMPRESSION";
- case RTE_COMP_FF_MBUF_SCATTER_GATHER:
- return "MBUF_SCATTER_GATHER";
+ case RTE_COMP_FF_OOP_SGL_IN_SGL_OUT:
+ return "OOP_SGL_IN_SGL_OUT";
+ case RTE_COMP_FF_OOP_SGL_IN_LB_OUT:
+ return "OOP_SGL_IN_LB_OUT";
+ case RTE_COMP_FF_OOP_LB_IN_SGL_OUT:
+ return "OOP_LB_IN_SGL_OUT";
case RTE_COMP_FF_MULTI_PKT_CHECKSUM:
return "MULTI_PKT_CHECKSUM";
case RTE_COMP_FF_ADLER32_CHECKSUM:
diff --git a/lib/librte_compressdev/rte_comp.h b/lib/librte_compressdev/rte_comp.h
index 5b513c77e..274b5eadf 100644
--- a/lib/librte_compressdev/rte_comp.h
+++ b/lib/librte_compressdev/rte_comp.h
@@ -30,23 +30,34 @@ extern "C" {
/**< Stateful compression is supported */
#define RTE_COMP_FF_STATEFUL_DECOMPRESSION (1ULL << 1)
/**< Stateful decompression is supported */
-#define RTE_COMP_FF_MBUF_SCATTER_GATHER (1ULL << 2)
-/**< Scatter-gather mbufs are supported */
-#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 3)
+#define RTE_COMP_FF_OOP_SGL_IN_SGL_OUT (1ULL << 2)
+/**< Out-of-place Scatter-gather (SGL) buffers,
+ * with multiple segments, are supported in input and output
+ */
+#define RTE_COMP_FF_OOP_SGL_IN_LB_OUT (1ULL << 3)
+/**< Out-of-place Scatter-gather (SGL) buffers are supported
+ * in input, combined with linear buffers (LB), with a
+ * single segment, in output
+ */
+#define RTE_COMP_FF_OOP_LB_IN_SGL_OUT (1ULL << 4)
+/**< Out-of-place Scatter-gather (SGL) mbufs are supported
+ * in output, combined with linear buffers (LB) in input
+ */
+#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 5)
/**< Adler-32 Checksum is supported */
-#define RTE_COMP_FF_CRC32_CHECKSUM (1ULL << 4)
+#define RTE_COMP_FF_CRC32_CHECKSUM (1ULL << 6)
/**< CRC32 Checksum is supported */
-#define RTE_COMP_FF_CRC32_ADLER32_CHECKSUM (1ULL << 5)
+#define RTE_COMP_FF_CRC32_ADLER32_CHECKSUM (1ULL << 7)
/**< Adler-32/CRC32 Checksum is supported */
-#define RTE_COMP_FF_MULTI_PKT_CHECKSUM (1ULL << 6)
+#define RTE_COMP_FF_MULTI_PKT_CHECKSUM (1ULL << 8)
/**< Generation of checksum across multiple stateless packets is supported */
-#define RTE_COMP_FF_SHA1_HASH (1ULL << 7)
+#define RTE_COMP_FF_SHA1_HASH (1ULL << 9)
/**< SHA1 Hash is supported */
-#define RTE_COMP_FF_SHA2_SHA256_HASH (1ULL << 8)
+#define RTE_COMP_FF_SHA2_SHA256_HASH (1ULL << 10)
/**< SHA256 Hash of SHA2 family is supported */
-#define RTE_COMP_FF_NONCOMPRESSED_BLOCKS (1ULL << 9)
+#define RTE_COMP_FF_NONCOMPRESSED_BLOCKS (1ULL << 11)
/**< Creation of non-compressed blocks using RTE_COMP_LEVEL_NONE is supported */
-#define RTE_COMP_FF_SHAREABLE_PRIV_XFORM (1ULL << 10)
+#define RTE_COMP_FF_SHAREABLE_PRIV_XFORM (1ULL << 12)
/**< Private xforms created by the PMD can be shared
* across multiple stateless operations. If not set, then app needs
* to create as many priv_xforms as it expects to have stateless
--
2.14.4
^ permalink raw reply [relevance 3%]
* [dpdk-dev] [PATCH v5 13/16] cryptodev: replace mbuf scatter gather flag
` (3 preceding siblings ...)
2018-07-05 2:08 4% ` [dpdk-dev] [PATCH v5 12/16] cryptodev: remove old get session size functions Pablo de Lara
@ 2018-07-05 2:08 2% ` Pablo de Lara
4 siblings, 0 replies; 200+ results
From: Pablo de Lara @ 2018-07-05 2:08 UTC (permalink / raw)
To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
Cc: dev, Pablo de Lara
The current mbuf scatter gatter feature flag is
too ambiguous, as it is not clear if input and/or output
buffers can be scatter gather mbufs or not, plus
if in-place and/or out-of-place is supported.
Therefore, five new flags will replace this flag:
- RTE_CRYPTODEV_FF_IN_PLACE_SGL
- RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT
- RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT
- RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT
- RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
doc/guides/cryptodevs/features/aesni_gcm.ini | 3 +-
doc/guides/cryptodevs/features/default.ini | 6 +++-
doc/guides/cryptodevs/features/dpaa2_sec.ini | 6 +++-
doc/guides/cryptodevs/features/dpaa_sec.ini | 6 +++-
doc/guides/cryptodevs/features/null.ini | 2 +-
doc/guides/cryptodevs/features/openssl.ini | 3 +-
doc/guides/cryptodevs/features/qat.ini | 6 +++-
doc/guides/cryptodevs/overview.rst | 32 ++++++++++++++-----
doc/guides/rel_notes/deprecation.rst | 2 --
doc/guides/rel_notes/release_18_08.rst | 8 +++++
drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 3 +-
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 6 +++-
drivers/crypto/dpaa_sec/dpaa_sec.c | 6 +++-
drivers/crypto/null/null_crypto_pmd.c | 2 +-
drivers/crypto/openssl/rte_openssl_pmd.c | 3 +-
drivers/crypto/qat/qat_sym_pmd.c | 6 +++-
lib/librte_cryptodev/rte_cryptodev.c | 12 ++++++--
lib/librte_cryptodev/rte_cryptodev.h | 46 +++++++++++++++++++---------
test/test/test_cryptodev.c | 31 +++++++++++++------
test/test/test_cryptodev_blockcipher.c | 21 ++++++++++---
20 files changed, 157 insertions(+), 53 deletions(-)
diff --git a/doc/guides/cryptodevs/features/aesni_gcm.ini b/doc/guides/cryptodevs/features/aesni_gcm.ini
index 920b6b6ac..65811e2fe 100644
--- a/doc/guides/cryptodevs/features/aesni_gcm.ini
+++ b/doc/guides/cryptodevs/features/aesni_gcm.ini
@@ -10,7 +10,8 @@ CPU AESNI = Y
CPU SSE = Y
CPU AVX = Y
CPU AVX2 = Y
-Mbuf scatter gather = Y
+OOP SGL In FB Out = Y
+OOP FB In FB Out = Y
;
; Supported crypto algorithms of the 'aesni_gcm' crypto driver.
;
diff --git a/doc/guides/cryptodevs/features/default.ini b/doc/guides/cryptodevs/features/default.ini
index 42783887a..82efe3e31 100644
--- a/doc/guides/cryptodevs/features/default.ini
+++ b/doc/guides/cryptodevs/features/default.ini
@@ -18,7 +18,11 @@ CPU AVX512 =
CPU AESNI =
CPU NEON =
CPU ARM CE =
-Mbuf scatter gather =
+In Place SGL =
+OOP SGL In SGL Out =
+OOP SGL In FB Out =
+OOP FB In SGL Out =
+OOP FB In FB Out =
;
; Supported crypto algorithms of a default crypto driver.
diff --git a/doc/guides/cryptodevs/features/dpaa2_sec.ini b/doc/guides/cryptodevs/features/dpaa2_sec.ini
index 68c9960d8..5f23fde51 100644
--- a/doc/guides/cryptodevs/features/dpaa2_sec.ini
+++ b/doc/guides/cryptodevs/features/dpaa2_sec.ini
@@ -8,7 +8,11 @@ Symmetric crypto = Y
Sym operation chaining = Y
HW Accelerated = Y
Protocol offload = Y
-Mbuf scatter gather = Y
+In Place SGL = Y
+OOP SGL In SGL Out = Y
+OOP SGL In FB Out = Y
+OOP FB In SGL Out = Y
+OOP FB In FB Out = Y
;
; Supported crypto algorithms of the 'dpaa2_sec' crypto driver.
diff --git a/doc/guides/cryptodevs/features/dpaa_sec.ini b/doc/guides/cryptodevs/features/dpaa_sec.ini
index 260fae728..521faeab6 100644
--- a/doc/guides/cryptodevs/features/dpaa_sec.ini
+++ b/doc/guides/cryptodevs/features/dpaa_sec.ini
@@ -8,7 +8,11 @@ Symmetric crypto = Y
Sym operation chaining = Y
HW Accelerated = Y
Protocol offload = Y
-Mbuf scatter gather = Y
+In Place SGL = Y
+OOP SGL In SGL Out = Y
+OOP SGL In FB Out = Y
+OOP FB In SGL Out = Y
+OOP FB In FB Out = Y
;
; Supported crypto algorithms of the 'dpaa_sec' crypto driver.
diff --git a/doc/guides/cryptodevs/features/null.ini b/doc/guides/cryptodevs/features/null.ini
index a9e172da8..ecf5779ac 100644
--- a/doc/guides/cryptodevs/features/null.ini
+++ b/doc/guides/cryptodevs/features/null.ini
@@ -6,7 +6,7 @@
[Features]
Symmetric crypto = Y
Sym operation chaining = Y
-Mbuf scatter gather = Y
+In Place SGL = Y
;
; Supported crypto algorithms of the 'null' crypto driver.
diff --git a/doc/guides/cryptodevs/features/openssl.ini b/doc/guides/cryptodevs/features/openssl.ini
index 691565865..5f03166b9 100644
--- a/doc/guides/cryptodevs/features/openssl.ini
+++ b/doc/guides/cryptodevs/features/openssl.ini
@@ -6,7 +6,8 @@
[Features]
Symmetric crypto = Y
Sym operation chaining = Y
-Mbuf scatter gather = Y
+OOP SGL In FB Out = Y
+OOP FB In FB Out = Y
;
; Supported crypto algorithms of the 'openssl' crypto driver.
diff --git a/doc/guides/cryptodevs/features/qat.ini b/doc/guides/cryptodevs/features/qat.ini
index 51ed5967f..ccfc042c6 100644
--- a/doc/guides/cryptodevs/features/qat.ini
+++ b/doc/guides/cryptodevs/features/qat.ini
@@ -7,7 +7,11 @@
Symmetric crypto = Y
Sym operation chaining = Y
HW Accelerated = Y
-Mbuf scatter gather = Y
+In Place SGL = Y
+OOP SGL In SGL Out = Y
+OOP SGL In FB Out = Y
+OOP FB In SGL Out = Y
+OOP FB In FB Out = Y
;
; Supported crypto algorithms of the 'qat' crypto driver.
diff --git a/doc/guides/cryptodevs/overview.rst b/doc/guides/cryptodevs/overview.rst
index 493cd5f55..cc9c0f5a6 100644
--- a/doc/guides/cryptodevs/overview.rst
+++ b/doc/guides/cryptodevs/overview.rst
@@ -11,14 +11,30 @@ Supported Feature Flags
.. include:: overview_feature_table.txt
-Note, the mbuf scatter gather feature (aka chained mbufs, scatter-gather-lists
-or SGLs) indicate all following combinations are supported unless otherwise called
-out in the Limitations section of each PMD.
-
-* In place operation, input buffer as multiple segments, same buffer used for output
-* Out of place operation, input buffer as single segment and output as multiple segments
-* Out of place operation, input buffer as multiple segments and output as single segment
-* Out of place operation, input buffer as multiple segments and output as multiple segments
+.. Note::
+
+ - "In Place SGL" feature flag stands for "In place Scatter-gather list",
+ which means that an input mbuf can consist of multiple segments,
+ being the operation in-place (input = output).
+
+ - "OOP SGL In SGL Out" feature flag stands for
+ "Out-of-place Scatter-gather list Input, Scatter-gater list Output",
+ which means that the input and output mbufs can consist of multiple segments.
+
+ - "OOP SGL In FB Out" feature flag stands for
+ "Out-of-place Scatter-gather list Input, Flat Buffers Output",
+ which means that the input mbuf can consist of multiple segments combined
+ with a single segment mbuf in the output.
+
+ - "OOP FB In SGL Out" feature flag stands for
+ "Out-of-place Flat Buffers Input, Scatter-gather list Output",
+ which means that the output mbuf can consist of multiple segments combined
+ with a single segment mbuf in the input.
+
+ - "OOP FB In FB Out" feature flag stands for
+ "Out-of-place Flat Buffers Input, Scatter-gather list Output",
+ which means that Out-of-place operation is supported,
+ with single segment input and output mbufs.
Supported Cipher Algorithms
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 9a73b1d8e..62d635b74 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -105,5 +105,3 @@ Deprecation Notices
``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
18.05 and removed in 18.08, as there are no drivers doing anything useful
with them.
- - Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
- so some will be replaced by more explicit flags.
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index e482d3d5f..9cf3ea3df 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -78,6 +78,14 @@ API Changes
- ``rte_cryptodev_get_private_session_size`` is replaced with
``rte_cryptodev_sym_get_private_session_size``
+* cryptodev: Feature flag ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` is
+ replaced with the following more explicit flags:
+ - ``RTE_CRYPTODEV_FF_IN_PLACE_SGL``
+ - ``RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT``
+ - ``RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT``
+ - ``RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT``
+ - ``RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT``
+
ABI Changes
-----------
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index 88307e0e7..ce740e97a 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -492,7 +492,8 @@ aesni_gcm_create(const char *name,
dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
RTE_CRYPTODEV_FF_CPU_AESNI |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT |
+ RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT;
switch (vector_mode) {
case RTE_AESNI_GCM_SSE:
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 1b1c30d85..1dd8dab83 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -2762,7 +2762,11 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev)
RTE_CRYPTODEV_FF_HW_ACCELERATED |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
RTE_CRYPTODEV_FF_SECURITY |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_IN_PLACE_SGL |
+ RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT |
+ RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT |
+ RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT |
+ RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT;
internals = cryptodev->data->dev_private;
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index b96552c57..49ff7584e 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -2271,7 +2271,11 @@ dpaa_sec_dev_init(struct rte_cryptodev *cryptodev)
RTE_CRYPTODEV_FF_HW_ACCELERATED |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
RTE_CRYPTODEV_FF_SECURITY |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_IN_PLACE_SGL |
+ RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT |
+ RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT |
+ RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT |
+ RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT;
internals = cryptodev->data->dev_private;
internals->max_nb_queue_pairs = RTE_DPAA_MAX_NB_SEC_QPS;
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index 07276833b..3d7caf1f1 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -176,7 +176,7 @@ cryptodev_null_create(const char *name,
dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_IN_PLACE_SGL;
internals = dev->data->dev_private;
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 1ccab4ab5..865f8a75e 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -1660,7 +1660,8 @@ cryptodev_openssl_create(const char *name,
dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
RTE_CRYPTODEV_FF_CPU_AESNI |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT |
+ RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT;
/* Set vector instructions mode supported */
internals = dev->data->dev_private;
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index ee8633b85..33ac831fe 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -274,7 +274,11 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev)
cryptodev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
RTE_CRYPTODEV_FF_HW_ACCELERATED |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_IN_PLACE_SGL |
+ RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT |
+ RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT |
+ RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT |
+ RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT;
internals = cryptodev->data->dev_private;
internals->qat_dev = qat_pci_dev;
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 381330f3d..608db36c7 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -361,8 +361,16 @@ rte_cryptodev_get_feature_name(uint64_t flag)
return "CPU_AESNI";
case RTE_CRYPTODEV_FF_HW_ACCELERATED:
return "HW_ACCELERATED";
- case RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER:
- return "MBUF_SCATTER_GATHER";
+ case RTE_CRYPTODEV_FF_IN_PLACE_SGL:
+ return "IN_PLACE_SGL";
+ case RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT:
+ return "OOP_SGL_IN_SGL_OUT";
+ case RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT:
+ return "OOP_SGL_IN_FB_OUT";
+ case RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT:
+ return "OOP_FB_IN_SGL_OUT";
+ case RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT:
+ return "OOP_FB_IN_FB_OUT";
case RTE_CRYPTODEV_FF_CPU_NEON:
return "CPU_NEON";
case RTE_CRYPTODEV_FF_CPU_ARM_CE:
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index cc219c722..7942527e8 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -292,31 +292,47 @@ rte_cryptodev_get_aead_algo_enum(enum rte_crypto_aead_algorithm *algo_enum,
*
* Keep these flags synchronised with rte_cryptodev_get_feature_name()
*/
-#define RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO (1ULL << 0)
+#define RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO (1ULL << 0)
/**< Symmetric crypto operations are supported */
-#define RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO (1ULL << 1)
+#define RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO (1ULL << 1)
/**< Asymmetric crypto operations are supported */
-#define RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING (1ULL << 2)
+#define RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING (1ULL << 2)
/**< Chaining symmetric crypto operations are supported */
-#define RTE_CRYPTODEV_FF_CPU_SSE (1ULL << 3)
+#define RTE_CRYPTODEV_FF_CPU_SSE (1ULL << 3)
/**< Utilises CPU SIMD SSE instructions */
-#define RTE_CRYPTODEV_FF_CPU_AVX (1ULL << 4)
+#define RTE_CRYPTODEV_FF_CPU_AVX (1ULL << 4)
/**< Utilises CPU SIMD AVX instructions */
-#define RTE_CRYPTODEV_FF_CPU_AVX2 (1ULL << 5)
+#define RTE_CRYPTODEV_FF_CPU_AVX2 (1ULL << 5)
/**< Utilises CPU SIMD AVX2 instructions */
-#define RTE_CRYPTODEV_FF_CPU_AESNI (1ULL << 6)
+#define RTE_CRYPTODEV_FF_CPU_AESNI (1ULL << 6)
/**< Utilises CPU AES-NI instructions */
-#define RTE_CRYPTODEV_FF_HW_ACCELERATED (1ULL << 7)
-/**< Operations are off-loaded to an external hardware accelerator */
-#define RTE_CRYPTODEV_FF_CPU_AVX512 (1ULL << 8)
+#define RTE_CRYPTODEV_FF_HW_ACCELERATED (1ULL << 7)
+/**< Operations are off-loaded to an
+ * external hardware accelerator
+ */
+#define RTE_CRYPTODEV_FF_CPU_AVX512 (1ULL << 8)
/**< Utilises CPU SIMD AVX512 instructions */
-#define RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER (1ULL << 9)
-/**< Scatter-gather mbufs are supported */
-#define RTE_CRYPTODEV_FF_CPU_NEON (1ULL << 10)
+#define RTE_CRYPTODEV_FF_IN_PLACE_SGL (1ULL << 9)
+/**< In-place Scatter-gather (SGL) mbufs are supported */
+#define RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT (1ULL << 10)
+/**< Out-of-place Scatter-gather (SGL) mbufs are
+ * supported in input and output
+ */
+#define RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT (1ULL << 11)
+/**< Out-of-place Scatter-gather (SGL) mbufs are supported
+ * in input, combined with flat buffers (FB) in output
+ */
+#define RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT (1ULL << 12)
+/**< Out-of-place Scatter-gather (SGL) mbufs are supported
+ * in output, combined with flat buffers (FB) in input
+ */
+#define RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT (1ULL << 13)
+/**< Out-of-place flat buffers (FB) are supported in input and output */
+#define RTE_CRYPTODEV_FF_CPU_NEON (1ULL << 14)
/**< Utilises CPU NEON instructions */
-#define RTE_CRYPTODEV_FF_CPU_ARM_CE (1ULL << 11)
+#define RTE_CRYPTODEV_FF_CPU_ARM_CE (1ULL << 15)
/**< Utilises ARM CPU Cryptographic Extensions */
-#define RTE_CRYPTODEV_FF_SECURITY (1ULL << 12)
+#define RTE_CRYPTODEV_FF_SECURITY (1ULL << 16)
/**< Support Security Protocol Processing */
diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 73aadaced..e23eecb66 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -3160,8 +3160,11 @@ test_kasumi_encryption_sgl(const struct kasumi_test_data *tdata)
struct rte_cryptodev_info dev_info;
rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
- if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
- printf("Device doesn't support scatter-gather. "
+
+ uint64_t feat_flags = dev_info.feature_flags;
+
+ if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {
+ printf("Device doesn't support in-place scatter-gather. "
"Test Skipped.\n");
return 0;
}
@@ -3308,8 +3311,11 @@ test_kasumi_encryption_oop_sgl(const struct kasumi_test_data *tdata)
struct rte_cryptodev_info dev_info;
rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
- if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
- printf("Device doesn't support scatter-gather. "
+
+ uint64_t feat_flags = dev_info.feature_flags;
+ if (!(feat_flags & RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT)) {
+ printf("Device doesn't support out-of-place scatter-gather "
+ "in both input and output mbufs. "
"Test Skipped.\n");
return 0;
}
@@ -3659,8 +3665,12 @@ test_snow3g_encryption_oop_sgl(const struct snow3g_test_data *tdata)
struct rte_cryptodev_info dev_info;
rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
- if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
- printf("Device doesn't support scatter-gather. "
+
+ uint64_t feat_flags = dev_info.feature_flags;
+
+ if (!(feat_flags & RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT)) {
+ printf("Device doesn't support out-of-place scatter-gather "
+ "in both input and output mbufs. "
"Test Skipped.\n");
return 0;
}
@@ -4493,10 +4503,13 @@ test_zuc_encryption_sgl(const struct wireless_test_data *tdata)
return -ENOTSUP;
rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
- if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
- printf("Device doesn't support scatter-gather. "
+
+ uint64_t feat_flags = dev_info.feature_flags;
+
+ if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {
+ printf("Device doesn't support in-place scatter-gather. "
"Test Skipped.\n");
- return -ENOTSUP;
+ return 0;
}
plaintext_len = ceil_byte_length(tdata->plaintext.len);
diff --git a/test/test/test_cryptodev_blockcipher.c b/test/test/test_cryptodev_blockcipher.c
index 256a7daa2..712771605 100644
--- a/test/test/test_cryptodev_blockcipher.c
+++ b/test/test/test_cryptodev_blockcipher.c
@@ -77,12 +77,25 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
if (t->feature_mask & BLOCKCIPHER_TEST_FEATURE_SG) {
rte_cryptodev_info_get(dev_id, &dev_info);
- if (!(dev_info.feature_flags &
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
- printf("Device doesn't support scatter-gather. "
+ uint64_t feat_flags = dev_info.feature_flags;
+ uint64_t oop_flag = RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT;
+
+ if (t->feature_mask && BLOCKCIPHER_TEST_FEATURE_OOP) {
+ if (!(feat_flags & oop_flag)) {
+ printf("Device doesn't support out-of-place "
+ "scatter-gather in input mbuf. "
+ "Test Skipped.\n");
+ return 0;
+ }
+ } else {
+ if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {
+ printf("Device doesn't support in-place "
+ "scatter-gather mbufs. "
"Test Skipped.\n");
- return 0;
+ return 0;
+ }
}
+
nb_segs = 3;
}
--
2.14.4
^ permalink raw reply [relevance 2%]
* [dpdk-dev] [PATCH v5 12/16] cryptodev: remove old get session size functions
` (2 preceding siblings ...)
2018-07-05 2:08 2% ` [dpdk-dev] [PATCH v5 11/16] cryptodev: remove queue start/stop functions Pablo de Lara
@ 2018-07-05 2:08 4% ` Pablo de Lara
2018-07-05 2:08 2% ` [dpdk-dev] [PATCH v5 13/16] cryptodev: replace mbuf scatter gather flag Pablo de Lara
4 siblings, 0 replies; 200+ results
From: Pablo de Lara @ 2018-07-05 2:08 UTC (permalink / raw)
To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
Cc: dev, Pablo de Lara
Removed rte_cryptodev_get_header_session_size
and rte_cryptodev_get_private_session_size functions,
as they have been substituted with functions
specific for symmetric operations, with _sym_ word
after "rte_cryptodev_".
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
doc/guides/rel_notes/deprecation.rst | 6 ------
doc/guides/rel_notes/release_18_08.rst | 8 ++++++++
lib/librte_cryptodev/rte_cryptodev.c | 12 ------------
lib/librte_cryptodev/rte_cryptodev.h | 25 -------------------------
lib/librte_cryptodev/rte_cryptodev_version.map | 2 --
5 files changed, 8 insertions(+), 45 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 91592534e..9a73b1d8e 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -107,9 +107,3 @@ Deprecation Notices
with them.
- Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
so some will be replaced by more explicit flags.
- - Function ``rte_cryptodev_get_header_session_size()`` will be deprecated
- in 18.05, and it gets replaced with ``rte_cryptodev_sym_get_header_session_size()``.
- It will be removed in 18.08.
- - Function ``rte_cryptodev_get_private_session_size()`` will be deprecated
- in 18.05, and it gets replaced with ``rte_cryptodev_sym_get_private_session_size()``.
- It will be removed in 18.08.
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index cfb2885a1..e482d3d5f 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -70,6 +70,14 @@ API Changes
- ``rte_cryptodev_queue_pair_start``
- ``rte_cryptodev_queue_pair_stop``
+* cryptodev: Following functions were deprecated and are replaced by
+ other functions in 18.08:
+
+ - ``rte_cryptodev_get_header_session_size`` is replaced with
+ ``rte_cryptodev_sym_get_header_session_size``
+ - ``rte_cryptodev_get_private_session_size`` is replaced with
+ ``rte_cryptodev_sym_get_private_session_size``
+
ABI Changes
-----------
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index a07904fb9..381330f3d 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -1181,12 +1181,6 @@ rte_cryptodev_sym_session_free(struct rte_cryptodev_sym_session *sess)
return 0;
}
-unsigned int
-rte_cryptodev_get_header_session_size(void)
-{
- return rte_cryptodev_sym_get_header_session_size();
-}
-
unsigned int
rte_cryptodev_sym_get_header_session_size(void)
{
@@ -1198,12 +1192,6 @@ rte_cryptodev_sym_get_header_session_size(void)
return ((sizeof(void *) * nb_drivers) + sizeof(uint8_t));
}
-unsigned int
-rte_cryptodev_get_private_session_size(uint8_t dev_id)
-{
- return rte_cryptodev_sym_get_private_session_size(dev_id);
-}
-
unsigned int
rte_cryptodev_sym_get_private_session_size(uint8_t dev_id)
{
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index b5d208917..cc219c722 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -898,31 +898,6 @@ int
rte_cryptodev_sym_session_clear(uint8_t dev_id,
struct rte_cryptodev_sym_session *sess);
-/**
- * @deprecated
- * Get the size of the header session, for all registered drivers.
- *
- * @return
- * Size of the header session.
- */
-__rte_deprecated
-unsigned int
-rte_cryptodev_get_header_session_size(void);
-
-/**
- * @deprecated
- * Get the size of the private session data for a device.
- *
- * @param dev_id The device identifier.
- *
- * @return
- * - Size of the private data, if successful
- * - 0 if device is invalid or does not have private session
- */
-__rte_deprecated
-unsigned int
-rte_cryptodev_get_private_session_size(uint8_t dev_id);
-
/**
* Get the size of the header session, for all registered drivers.
*
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index 020b45754..0ab6d5195 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -63,8 +63,6 @@ DPDK_17.08 {
rte_cryptodev_driver_id_get;
rte_cryptodev_driver_name_get;
rte_cryptodev_get_aead_algo_enum;
- rte_cryptodev_get_header_session_size;
- rte_cryptodev_get_private_session_size;
rte_cryptodev_sym_capability_check_aead;
rte_cryptodev_sym_session_init;
rte_cryptodev_sym_session_clear;
--
2.14.4
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH v5 11/16] cryptodev: remove queue start/stop functions
2018-07-05 2:07 4% ` [dpdk-dev] [PATCH v5 01/16] cryptodev: replace bus specific struct with generic dev Pablo de Lara
2018-07-05 2:07 4% ` [dpdk-dev] [PATCH v5 08/16] cryptodev: define value for unlimited sessions Pablo de Lara
@ 2018-07-05 2:08 2% ` Pablo de Lara
2018-07-05 2:08 4% ` [dpdk-dev] [PATCH v5 12/16] cryptodev: remove old get session size functions Pablo de Lara
2018-07-05 2:08 2% ` [dpdk-dev] [PATCH v5 13/16] cryptodev: replace mbuf scatter gather flag Pablo de Lara
4 siblings, 0 replies; 200+ results
From: Pablo de Lara @ 2018-07-05 2:08 UTC (permalink / raw)
To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
Cc: dev, Pablo de Lara
Removed cryptodev queue start/stop functions,
as they were marked deprecated in 18.05, since they
were not implemented by any driver.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
doc/guides/rel_notes/deprecation.rst | 4 ---
doc/guides/rel_notes/release_18_08.rst | 5 +++
drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c | 18 -----------
drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 18 -----------
drivers/crypto/armv8/rte_armv8_pmd_ops.c | 18 -----------
drivers/crypto/ccp/ccp_pmd_ops.c | 16 ----------
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 22 -------------
drivers/crypto/dpaa_sec/dpaa_sec.c | 22 -------------
drivers/crypto/kasumi/rte_kasumi_pmd_ops.c | 18 -----------
drivers/crypto/mvsam/rte_mrvl_pmd_ops.c | 28 ----------------
drivers/crypto/null/null_crypto_pmd_ops.c | 18 -----------
drivers/crypto/openssl/rte_openssl_pmd_ops.c | 18 -----------
drivers/crypto/qat/qat_sym_pmd.c | 2 --
drivers/crypto/scheduler/scheduler_pmd_ops.c | 18 -----------
drivers/crypto/snow3g/rte_snow3g_pmd_ops.c | 18 -----------
drivers/crypto/virtio/virtio_cryptodev.c | 2 --
drivers/crypto/zuc/rte_zuc_pmd_ops.c | 18 -----------
lib/librte_cryptodev/rte_cryptodev.c | 44 --------------------------
lib/librte_cryptodev/rte_cryptodev.h | 37 ----------------------
lib/librte_cryptodev/rte_cryptodev_pmd.h | 26 ---------------
lib/librte_cryptodev/rte_cryptodev_version.map | 2 --
21 files changed, 5 insertions(+), 367 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index dc014da21..91592534e 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -105,10 +105,6 @@ Deprecation Notices
``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
18.05 and removed in 18.08, as there are no drivers doing anything useful
with them.
- - Functions ``rte_cryptodev_queue_pair_start()`` and
- ``rte_cryptodev_queue_pair_stop()`` will be deprecated from 18.05
- and removed in 18.08, as there are no drivers doing anything useful
- with them.
- Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
so some will be replaced by more explicit flags.
- Function ``rte_cryptodev_get_header_session_size()`` will be deprecated
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 2b994ee78..cfb2885a1 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -65,6 +65,11 @@ API Changes
Value 0 is accepted in ``sym.max_nb_sessions``, meaning that a device
supports an unlimited number of sessions.
+* cryptodev: Following functions were deprecated and are removed in 18.08:
+
+ - ``rte_cryptodev_queue_pair_start``
+ - ``rte_cryptodev_queue_pair_stop``
+
ABI Changes
-----------
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
index 1f4edc0f2..489d2e08f 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
@@ -242,22 +242,6 @@ aesni_gcm_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-aesni_gcm_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-aesni_gcm_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
aesni_gcm_pmd_qp_count(struct rte_cryptodev *dev)
@@ -339,8 +323,6 @@ struct rte_cryptodev_ops aesni_gcm_pmd_ops = {
.queue_pair_setup = aesni_gcm_pmd_qp_setup,
.queue_pair_release = aesni_gcm_pmd_qp_release,
- .queue_pair_start = aesni_gcm_pmd_qp_start,
- .queue_pair_stop = aesni_gcm_pmd_qp_stop,
.queue_pair_count = aesni_gcm_pmd_qp_count,
.session_get_size = aesni_gcm_pmd_session_get_size,
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
index 6cd4134af..b806c4d52 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -509,22 +509,6 @@ aesni_mb_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-aesni_mb_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-aesni_mb_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
aesni_mb_pmd_qp_count(struct rte_cryptodev *dev)
@@ -607,8 +591,6 @@ struct rte_cryptodev_ops aesni_mb_pmd_ops = {
.queue_pair_setup = aesni_mb_pmd_qp_setup,
.queue_pair_release = aesni_mb_pmd_qp_release,
- .queue_pair_start = aesni_mb_pmd_qp_start,
- .queue_pair_stop = aesni_mb_pmd_qp_stop,
.queue_pair_count = aesni_mb_pmd_qp_count,
.session_get_size = aesni_mb_pmd_session_get_size,
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
index b654f7528..5e8a5a292 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
@@ -258,22 +258,6 @@ armv8_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-armv8_crypto_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-armv8_crypto_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
armv8_crypto_pmd_qp_count(struct rte_cryptodev *dev)
@@ -354,8 +338,6 @@ struct rte_cryptodev_ops armv8_crypto_pmd_ops = {
.queue_pair_setup = armv8_crypto_pmd_qp_setup,
.queue_pair_release = armv8_crypto_pmd_qp_release,
- .queue_pair_start = armv8_crypto_pmd_qp_start,
- .queue_pair_stop = armv8_crypto_pmd_qp_stop,
.queue_pair_count = armv8_crypto_pmd_qp_count,
.session_get_size = armv8_crypto_pmd_session_get_size,
diff --git a/drivers/crypto/ccp/ccp_pmd_ops.c b/drivers/crypto/ccp/ccp_pmd_ops.c
index dbe545c10..1cb944406 100644
--- a/drivers/crypto/ccp/ccp_pmd_ops.c
+++ b/drivers/crypto/ccp/ccp_pmd_ops.c
@@ -748,20 +748,6 @@ ccp_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-static int
-ccp_pmd_qp_start(struct rte_cryptodev *dev __rte_unused,
- uint16_t queue_pair_id __rte_unused)
-{
- return -ENOTSUP;
-}
-
-static int
-ccp_pmd_qp_stop(struct rte_cryptodev *dev __rte_unused,
- uint16_t queue_pair_id __rte_unused)
-{
- return -ENOTSUP;
-}
-
static uint32_t
ccp_pmd_qp_count(struct rte_cryptodev *dev)
{
@@ -837,8 +823,6 @@ struct rte_cryptodev_ops ccp_ops = {
.queue_pair_setup = ccp_pmd_qp_setup,
.queue_pair_release = ccp_pmd_qp_release,
- .queue_pair_start = ccp_pmd_qp_start,
- .queue_pair_stop = ccp_pmd_qp_stop,
.queue_pair_count = ccp_pmd_qp_count,
.session_get_size = ccp_pmd_session_get_size,
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index bc091c560..1b1c30d85 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -1470,26 +1470,6 @@ dpaa2_sec_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return retcode;
}
-/** Start queue pair */
-static int
-dpaa2_sec_queue_pair_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- PMD_INIT_FUNC_TRACE();
-
- return 0;
-}
-
-/** Stop queue pair */
-static int
-dpaa2_sec_queue_pair_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- PMD_INIT_FUNC_TRACE();
-
- return 0;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
dpaa2_sec_queue_pair_count(struct rte_cryptodev *dev)
@@ -2716,8 +2696,6 @@ static struct rte_cryptodev_ops crypto_ops = {
.stats_reset = dpaa2_sec_stats_reset,
.queue_pair_setup = dpaa2_sec_queue_pair_setup,
.queue_pair_release = dpaa2_sec_queue_pair_release,
- .queue_pair_start = dpaa2_sec_queue_pair_start,
- .queue_pair_stop = dpaa2_sec_queue_pair_stop,
.queue_pair_count = dpaa2_sec_queue_pair_count,
.session_get_size = dpaa2_sec_session_get_size,
.session_configure = dpaa2_sec_session_configure,
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 73cae483b..b96552c57 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -1585,26 +1585,6 @@ dpaa_sec_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return 0;
}
-/** Start queue pair */
-static int
-dpaa_sec_queue_pair_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- PMD_INIT_FUNC_TRACE();
-
- return 0;
-}
-
-/** Stop queue pair */
-static int
-dpaa_sec_queue_pair_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- PMD_INIT_FUNC_TRACE();
-
- return 0;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
dpaa_sec_queue_pair_count(struct rte_cryptodev *dev)
@@ -2227,8 +2207,6 @@ static struct rte_cryptodev_ops crypto_ops = {
.dev_infos_get = dpaa_sec_dev_infos_get,
.queue_pair_setup = dpaa_sec_queue_pair_setup,
.queue_pair_release = dpaa_sec_queue_pair_release,
- .queue_pair_start = dpaa_sec_queue_pair_start,
- .queue_pair_stop = dpaa_sec_queue_pair_stop,
.queue_pair_count = dpaa_sec_queue_pair_count,
.session_get_size = dpaa_sec_session_get_size,
.session_configure = dpaa_sec_session_configure,
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
index 5593238f2..c7556d478 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
@@ -229,22 +229,6 @@ kasumi_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-kasumi_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-kasumi_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
kasumi_pmd_qp_count(struct rte_cryptodev *dev)
@@ -325,8 +309,6 @@ struct rte_cryptodev_ops kasumi_pmd_ops = {
.queue_pair_setup = kasumi_pmd_qp_setup,
.queue_pair_release = kasumi_pmd_qp_release,
- .queue_pair_start = kasumi_pmd_qp_start,
- .queue_pair_stop = kasumi_pmd_qp_stop,
.queue_pair_count = kasumi_pmd_qp_count,
.session_get_size = kasumi_pmd_session_get_size,
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
index 3f8de37b7..f83a6115f 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
@@ -595,32 +595,6 @@ mrvl_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair (PMD ops callback) - not supported.
- *
- * @param dev Pointer to the device structure.
- * @param qp_id ID of the Queue Pair.
- * @returns -ENOTSUP. Always.
- */
-static int
-mrvl_crypto_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair (PMD ops callback) - not supported.
- *
- * @param dev Pointer to the device structure.
- * @param qp_id ID of the Queue Pair.
- * @returns -ENOTSUP. Always.
- */
-static int
-mrvl_crypto_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs (PMD ops callback).
*
* @param dev Pointer to the device structure.
@@ -738,8 +712,6 @@ static struct rte_cryptodev_ops mrvl_crypto_pmd_ops = {
.queue_pair_setup = mrvl_crypto_pmd_qp_setup,
.queue_pair_release = mrvl_crypto_pmd_qp_release,
- .queue_pair_start = mrvl_crypto_pmd_qp_start,
- .queue_pair_stop = mrvl_crypto_pmd_qp_stop,
.queue_pair_count = mrvl_crypto_pmd_qp_count,
.session_get_size = mrvl_crypto_pmd_session_get_size,
diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
index 55778a255..66bd62bd3 100644
--- a/drivers/crypto/null/null_crypto_pmd_ops.c
+++ b/drivers/crypto/null/null_crypto_pmd_ops.c
@@ -241,22 +241,6 @@ null_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-null_crypto_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-null_crypto_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
null_crypto_pmd_qp_count(struct rte_cryptodev *dev)
@@ -337,8 +321,6 @@ struct rte_cryptodev_ops pmd_ops = {
.queue_pair_setup = null_crypto_pmd_qp_setup,
.queue_pair_release = null_crypto_pmd_qp_release,
- .queue_pair_start = null_crypto_pmd_qp_start,
- .queue_pair_stop = null_crypto_pmd_qp_stop,
.queue_pair_count = null_crypto_pmd_qp_count,
.session_get_size = null_crypto_pmd_session_get_size,
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index a1a2d9900..20d4e26de 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -648,22 +648,6 @@ openssl_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-openssl_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-openssl_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
openssl_pmd_qp_count(struct rte_cryptodev *dev)
@@ -746,8 +730,6 @@ struct rte_cryptodev_ops openssl_pmd_ops = {
.queue_pair_setup = openssl_pmd_qp_setup,
.queue_pair_release = openssl_pmd_qp_release,
- .queue_pair_start = openssl_pmd_qp_start,
- .queue_pair_stop = openssl_pmd_qp_stop,
.queue_pair_count = openssl_pmd_qp_count,
.session_get_size = openssl_pmd_session_get_size,
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index 84dd5bec8..ee8633b85 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -202,8 +202,6 @@ static struct rte_cryptodev_ops crypto_qat_ops = {
.stats_reset = qat_sym_stats_reset,
.queue_pair_setup = qat_sym_qp_setup,
.queue_pair_release = qat_sym_qp_release,
- .queue_pair_start = NULL,
- .queue_pair_stop = NULL,
.queue_pair_count = NULL,
/* Crypto related operations */
diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index 802585f4c..9b2f99eb2 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -439,22 +439,6 @@ scheduler_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return 0;
}
-/** Start queue pair */
-static int
-scheduler_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-scheduler_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
scheduler_pmd_qp_count(struct rte_cryptodev *dev)
@@ -535,8 +519,6 @@ struct rte_cryptodev_ops scheduler_pmd_ops = {
.queue_pair_setup = scheduler_pmd_qp_setup,
.queue_pair_release = scheduler_pmd_qp_release,
- .queue_pair_start = scheduler_pmd_qp_start,
- .queue_pair_stop = scheduler_pmd_qp_stop,
.queue_pair_count = scheduler_pmd_qp_count,
.session_get_size = scheduler_pmd_session_get_size,
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
index 6f8b9e2c6..fe882c366 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
@@ -231,22 +231,6 @@ snow3g_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-snow3g_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-snow3g_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
snow3g_pmd_qp_count(struct rte_cryptodev *dev)
@@ -327,8 +311,6 @@ struct rte_cryptodev_ops snow3g_pmd_ops = {
.queue_pair_setup = snow3g_pmd_qp_setup,
.queue_pair_release = snow3g_pmd_qp_release,
- .queue_pair_start = snow3g_pmd_qp_start,
- .queue_pair_stop = snow3g_pmd_qp_stop,
.queue_pair_count = snow3g_pmd_qp_count,
.session_get_size = snow3g_pmd_session_get_size,
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 1da4ae871..0be435c8c 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -515,8 +515,6 @@ static struct rte_cryptodev_ops virtio_crypto_dev_ops = {
.queue_pair_setup = virtio_crypto_qp_setup,
.queue_pair_release = virtio_crypto_qp_release,
- .queue_pair_start = NULL,
- .queue_pair_stop = NULL,
.queue_pair_count = NULL,
/* Crypto related operations */
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
index e151750fb..1d72a0757 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
@@ -231,22 +231,6 @@ zuc_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-zuc_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-zuc_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
zuc_pmd_qp_count(struct rte_cryptodev *dev)
@@ -328,8 +312,6 @@ struct rte_cryptodev_ops zuc_pmd_ops = {
.queue_pair_setup = zuc_pmd_qp_setup,
.queue_pair_release = zuc_pmd_qp_release,
- .queue_pair_start = zuc_pmd_qp_start,
- .queue_pair_stop = zuc_pmd_qp_stop,
.queue_pair_count = zuc_pmd_qp_count,
.session_get_size = zuc_pmd_session_get_size,
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 457ac5670..a07904fb9 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -702,50 +702,6 @@ rte_cryptodev_queue_pairs_config(struct rte_cryptodev *dev, uint16_t nb_qpairs,
return 0;
}
-int
-rte_cryptodev_queue_pair_start(uint8_t dev_id, uint16_t queue_pair_id)
-{
- struct rte_cryptodev *dev;
-
- if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
- CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
- return -EINVAL;
- }
-
- dev = &rte_crypto_devices[dev_id];
- if (queue_pair_id >= dev->data->nb_queue_pairs) {
- CDEV_LOG_ERR("Invalid queue_pair_id=%d", queue_pair_id);
- return -EINVAL;
- }
-
- RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_pair_start, -ENOTSUP);
-
- return dev->dev_ops->queue_pair_start(dev, queue_pair_id);
-
-}
-
-int
-rte_cryptodev_queue_pair_stop(uint8_t dev_id, uint16_t queue_pair_id)
-{
- struct rte_cryptodev *dev;
-
- if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
- CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
- return -EINVAL;
- }
-
- dev = &rte_crypto_devices[dev_id];
- if (queue_pair_id >= dev->data->nb_queue_pairs) {
- CDEV_LOG_ERR("Invalid queue_pair_id=%d", queue_pair_id);
- return -EINVAL;
- }
-
- RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_pair_stop, -ENOTSUP);
-
- return dev->dev_ops->queue_pair_stop(dev, queue_pair_id);
-
-}
-
int
rte_cryptodev_configure(uint8_t dev_id, struct rte_cryptodev_config *config)
{
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 7989eb876..b5d208917 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -566,43 +566,6 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
const struct rte_cryptodev_qp_conf *qp_conf, int socket_id,
struct rte_mempool *session_pool);
-/**
- * @deprecated
- * Start a specified queue pair of a device. It is used
- * when deferred_start flag of the specified queue is true.
- *
- * @param dev_id The identifier of the device
- * @param queue_pair_id The index of the queue pair to start. The value
- * must be in the range [0, nb_queue_pair - 1]
- * previously supplied to
- * rte_crypto_dev_configure().
- * @return
- * - 0: Success, the transmit queue is correctly set up.
- * - -EINVAL: The dev_id or the queue_id out of range.
- * - -ENOTSUP: The function not supported in PMD driver.
- */
-__rte_deprecated
-extern int
-rte_cryptodev_queue_pair_start(uint8_t dev_id, uint16_t queue_pair_id);
-
-/**
- * @deprecated
- * Stop specified queue pair of a device
- *
- * @param dev_id The identifier of the device
- * @param queue_pair_id The index of the queue pair to stop. The value
- * must be in the range [0, nb_queue_pair - 1]
- * previously supplied to
- * rte_cryptodev_configure().
- * @return
- * - 0: Success, the transmit queue is correctly set up.
- * - -EINVAL: The dev_id or the queue_id out of range.
- * - -ENOTSUP: The function not supported in PMD driver.
- */
-__rte_deprecated
-extern int
-rte_cryptodev_queue_pair_stop(uint8_t dev_id, uint16_t queue_pair_id);
-
/**
* Get the number of queue pairs on a specific crypto device
*
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index 1fb7e7d5e..641dd1369 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -184,28 +184,6 @@ typedef void (*cryptodev_stats_reset_t)(struct rte_cryptodev *dev);
typedef void (*cryptodev_info_get_t)(struct rte_cryptodev *dev,
struct rte_cryptodev_info *dev_info);
-/**
- * Start queue pair of a device.
- *
- * @param dev Crypto device pointer
- * @param qp_id Queue Pair Index
- *
- * @return Returns 0 on success.
- */
-typedef int (*cryptodev_queue_pair_start_t)(struct rte_cryptodev *dev,
- uint16_t qp_id);
-
-/**
- * Stop queue pair of a device.
- *
- * @param dev Crypto device pointer
- * @param qp_id Queue Pair Index
- *
- * @return Returns 0 on success.
- */
-typedef int (*cryptodev_queue_pair_stop_t)(struct rte_cryptodev *dev,
- uint16_t qp_id);
-
/**
* Setup a queue pair for a device.
*
@@ -344,10 +322,6 @@ struct rte_cryptodev_ops {
/**< Set up a device queue pair. */
cryptodev_queue_pair_release_t queue_pair_release;
/**< Release a queue pair. */
- cryptodev_queue_pair_start_t queue_pair_start;
- /**< Start a queue pair. */
- cryptodev_queue_pair_stop_t queue_pair_stop;
- /**< Stop a queue pair. */
cryptodev_queue_pair_count_t queue_pair_count;
/**< Get count of the queue pairs. */
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index be8f4c1a7..020b45754 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -22,8 +22,6 @@ DPDK_16.04 {
rte_cryptodev_stop;
rte_cryptodev_queue_pair_count;
rte_cryptodev_queue_pair_setup;
- rte_cryptodev_queue_pair_start;
- rte_cryptodev_queue_pair_stop;
rte_crypto_op_pool_create;
local: *;
--
2.14.4
^ permalink raw reply [relevance 2%]
* [dpdk-dev] [PATCH v5 08/16] cryptodev: define value for unlimited sessions
2018-07-05 2:07 4% ` [dpdk-dev] [PATCH v5 01/16] cryptodev: replace bus specific struct with generic dev Pablo de Lara
@ 2018-07-05 2:07 4% ` Pablo de Lara
2018-07-05 2:08 2% ` [dpdk-dev] [PATCH v5 11/16] cryptodev: remove queue start/stop functions Pablo de Lara
` (2 subsequent siblings)
4 siblings, 0 replies; 200+ results
From: Pablo de Lara @ 2018-07-05 2:07 UTC (permalink / raw)
To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
Cc: dev, Pablo de Lara
Currently, the info structure contains the maximum number
of sessions that a device can manage.
This field was useful when the session mempool was created inside
each device, but now it is created at the application level.
Most PMDs do not have a limitation on the sessions managed,
but a few do, therefore this field must remain in the structure.
However, a new value, 0, can be used to indicate that
a device does not have an actual maximum of sessions.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
app/test-crypto-perf/main.c | 2 +-
doc/guides/rel_notes/release_18_08.rst | 2 ++
examples/ipsec-secgw/ipsec-secgw.c | 2 +-
lib/librte_cryptodev/rte_cryptodev.h | 5 ++++-
test/test/test_cryptodev.c | 6 ++++--
5 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index 74e2165a4..2181d0193 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -172,7 +172,7 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs,
* A single session is required per queue pair
* in each device
*/
- if (dev_max_nb_sess < opts->nb_qps) {
+ if (dev_max_nb_sess != 0 && dev_max_nb_sess < opts->nb_qps) {
RTE_LOG(ERR, USER1,
"Device does not support at least "
"%u sessions\n", opts->nb_qps);
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 6bf53dc31..2b994ee78 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -62,6 +62,8 @@ API Changes
* cryptodev: In struct ``struct rte_cryptodev_info``, field ``rte_pci_device *pci_dev``
has been replaced with field ``struct rte_device *device``.
+ Value 0 is accepted in ``sym.max_nb_sessions``, meaning that a device
+ supports an unlimited number of sessions.
ABI Changes
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 2582dcb6e..dacf323c9 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -1441,7 +1441,7 @@ cryptodevs_init(void)
dev_conf.nb_queue_pairs = qp;
uint32_t dev_max_sess = cdev_info.sym.max_nb_sessions;
- if (dev_max_sess < (CDEV_MP_NB_OBJS / 2))
+ if (dev_max_sess != 0 && dev_max_sess < (CDEV_MP_NB_OBJS / 2))
rte_exit(EXIT_FAILURE,
"Device does not support at least %u "
"sessions", CDEV_MP_NB_OBJS / 2);
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 114c9fd6e..7989eb876 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -349,7 +349,10 @@ struct rte_cryptodev_info {
struct {
unsigned max_nb_sessions;
- /**< Maximum number of sessions supported by device. */
+ /**< Maximum number of sessions supported by device.
+ * If 0, the device does not have any limitation in
+ * number of sessions that can be used.
+ */
} sym;
};
diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 5c906cfae..73aadaced 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -436,7 +436,8 @@ testsuite_setup(void)
* Create mempool with maximum number of sessions * 2,
* to include the session headers
*/
- if (info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
+ if (info.sym.max_nb_sessions != 0 &&
+ info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
RTE_LOG(ERR, USER1, "Device does not support "
"at least %u sessions\n",
MAX_NB_SESSIONS);
@@ -8546,7 +8547,8 @@ test_scheduler_attach_slave_op(void)
unsigned int session_size =
rte_cryptodev_sym_get_private_session_size(i);
- if (info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
+ if (info.sym.max_nb_sessions != 0 &&
+ info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
RTE_LOG(ERR, USER1,
"Device does not support "
"at least %u sessions\n",
--
2.14.4
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH v5 01/16] cryptodev: replace bus specific struct with generic dev
@ 2018-07-05 2:07 4% ` Pablo de Lara
2018-07-05 2:07 4% ` [dpdk-dev] [PATCH v5 08/16] cryptodev: define value for unlimited sessions Pablo de Lara
` (3 subsequent siblings)
4 siblings, 0 replies; 200+ results
From: Pablo de Lara @ 2018-07-05 2:07 UTC (permalink / raw)
To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
Cc: dev, Pablo de Lara
Structure rte_cryptodev_info has currently PCI device
information ("struct rte_pci_device") in it.
This information is not generic to all devices,
so this gets replaced with the generic "rte_device" structure,
compatible with all crypto devices.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
doc/guides/prog_guide/cryptodev_lib.rst | 2 +-
doc/guides/rel_notes/deprecation.rst | 2 --
doc/guides/rel_notes/release_18_08.rst | 5 ++++-
drivers/crypto/qat/qat_sym_pmd.c | 1 -
drivers/crypto/virtio/virtio_cryptodev.c | 1 -
lib/librte_cryptodev/rte_cryptodev.c | 1 +
lib/librte_cryptodev/rte_cryptodev.h | 6 +++---
7 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst
index 30f0bcf7a..d02bb7514 100644
--- a/doc/guides/prog_guide/cryptodev_lib.rst
+++ b/doc/guides/prog_guide/cryptodev_lib.rst
@@ -269,7 +269,7 @@ relevant information for the device.
struct rte_cryptodev_info {
const char *driver_name;
uint8_t driver_id;
- struct rte_pci_device *pci_dev;
+ struct rte_device *device;
uint64_t feature_flags;
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 1ce692eac..b71080bb8 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -104,8 +104,6 @@ Deprecation Notices
- Removal of ``sym`` structure in ``rte_cryptodev_info`` structure,
containing fields not relevant anymore since the session mempool
is not internal in the crypto device anymore.
- - Replacement of ``pci_dev`` field with the more generic ``rte_device``
- structure.
- Functions ``rte_cryptodev_queue_pair_attach_sym_session()`` and
``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
18.05 and removed in 18.08, as there are no drivers doing anything useful
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index bc0124295..6bf53dc31 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -60,6 +60,9 @@ API Changes
Also, make sure to start the actual text at the margin.
=========================================================
+* cryptodev: In struct ``struct rte_cryptodev_info``, field ``rte_pci_device *pci_dev``
+ has been replaced with field ``struct rte_device *device``.
+
ABI Changes
-----------
@@ -118,7 +121,7 @@ The libraries prepended with a plus sign were incremented in this version.
librte_cmdline.so.2
librte_common_octeontx.so.1
librte_compressdev.so.1
- librte_cryptodev.so.4
+ + librte_cryptodev.so.5
librte_distributor.so.1
librte_eal.so.7
librte_ethdev.so.9
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index 115639089..0bc042a75 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -74,7 +74,6 @@ static void qat_sym_dev_info_get(struct rte_cryptodev *dev,
info->capabilities = internals->qat_dev_capabilities;
info->sym.max_nb_sessions = QAT_SYM_PMD_MAX_NB_SESSIONS;
info->driver_id = cryptodev_qat_driver_id;
- info->pci_dev = RTE_DEV_TO_PCI(dev->device);
}
}
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index df88953f6..482edea1a 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -1409,7 +1409,6 @@ virtio_crypto_dev_info_get(struct rte_cryptodev *dev,
if (info != NULL) {
info->driver_id = cryptodev_virtio_driver_id;
- info->pci_dev = RTE_DEV_TO_PCI(dev->device);
info->feature_flags = dev->feature_flags;
info->max_nb_queue_pairs = hw->max_dataqueues;
info->sym.max_nb_sessions =
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 7e5821246..457ac5670 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -966,6 +966,7 @@ rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info)
(*dev->dev_ops->dev_infos_get)(dev, dev_info);
dev_info->driver_name = dev->device->driver->name;
+ dev_info->device = dev->device;
}
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index ccc0f73fd..6b5f32bda 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -334,9 +334,9 @@ rte_cryptodev_get_feature_name(uint64_t flag);
/** Crypto device information */
struct rte_cryptodev_info {
- const char *driver_name; /**< Driver name. */
- uint8_t driver_id; /**< Driver identifier */
- struct rte_pci_device *pci_dev; /**< PCI information. */
+ const char *driver_name; /**< Driver name. */
+ uint8_t driver_id; /**< Driver identifier */
+ struct rte_device *device; /**< Generic device information. */
uint64_t feature_flags;
/**< Feature flags exposes HW/SW features for the given device */
--
2.14.4
^ permalink raw reply [relevance 4%]
* Re: [dpdk-dev] [PATCH v3 3/4] compressdev: replace mbuf scatter gather flag
2018-07-04 14:10 3% ` [dpdk-dev] [PATCH v3 3/4] compressdev: replace mbuf scatter gather flag Pablo de Lara
@ 2018-07-05 8:38 0% ` Verma, Shally
0 siblings, 0 replies; 200+ results
From: Verma, Shally @ 2018-07-05 8:38 UTC (permalink / raw)
To: Pablo de Lara, Gupta, Ashish, fiona.trahe, lee.daly, Sahu, Sunila; +Cc: dev
>-----Original Message-----
>From: Pablo de Lara [mailto:pablo.de.lara.guarch@intel.com]
>Sent: 04 July 2018 19:41
>To: Verma, Shally <Shally.Verma@cavium.com>; Gupta, Ashish <Ashish.Gupta@cavium.com>; fiona.trahe@intel.com;
>lee.daly@intel.com
>Cc: dev@dpdk.org; Pablo de Lara <pablo.de.lara.guarch@intel.com>
>Subject: [PATCH v3 3/4] compressdev: replace mbuf scatter gather flag
>
>External Email
>
>The current mbuf scatter gather feature flag is
>too ambiguous, as it is not clear if input and/or output
>buffers can be scatter gather mbufs or not.
>
>Therefore, three new flags will replace this flag:
>- RTE_COMP_FF_OOP_SGL_IN_SGL_OUT
>- RTE_COMP_FF_OOP_SGL_IN_FB_OUT
>- RTE_COMP_FF_OOP_FB_IN_SGL_OUT
>
[Shally] Believe Out of place is default support on current compression API, so why do we need _OOP_ here?
Thanks
Shally
>Note that out-of-place flat buffers is supported by default
>and in-place is not supported by the library.
>
>Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
>Acked-by: Fiona Trahe <fiona.trahe@intel.com>
>---
>
>Changes in v3:
>- Replaced Out-of-place with OOP
>- Added new feature flags in default.ini
>
>Changes in v2:
>- Fixed typos
>- Rephrased comments
>
> doc/guides/compressdevs/features/default.ini | 34 +++++++++++++++-------------
> doc/guides/compressdevs/overview.rst | 14 ++++++++++++
> doc/guides/rel_notes/release_18_08.rst | 6 +++++
> lib/librte_compressdev/rte_comp.c | 8 +++++--
> lib/librte_compressdev/rte_comp.h | 30 ++++++++++++++++--------
> 5 files changed, 64 insertions(+), 28 deletions(-)
>
>diff --git a/doc/guides/compressdevs/features/default.ini b/doc/guides/compressdevs/features/default.ini
>index a88414d23..003f3f3a5 100644
>--- a/doc/guides/compressdevs/features/default.ini
>+++ b/doc/guides/compressdevs/features/default.ini
>@@ -6,19 +6,21 @@
> ; the features table in the documentation.
> ;
> [Features]
>-HW Accelerated =
>-CPU SSE =
>-CPU AVX =
>-CPU AVX2 =
>-CPU AVX512 =
>-CPU NEON =
>-Stateful =
>-Pass-through =
>-Chained mbufs =
>-Deflate =
>-LZS =
>-Adler32 =
>-Crc32 =
>-Adler32&Crc32 =
>-Fixed =
>-Dynamic =
>+HW Accelerated =
>+CPU SSE =
>+CPU AVX =
>+CPU AVX2 =
>+CPU AVX512 =
>+CPU NEON =
>+Stateful =
>+Pass-through =
>+OOP SGL In SGL Out =
>+OOP SGL In FB Out =
>+OOP FB In SGL Out =
>+Deflate =
>+LZS =
>+Adler32 =
>+Crc32 =
>+Adler32&Crc32 =
>+Fixed =
>+Dynamic =
>diff --git a/doc/guides/compressdevs/overview.rst b/doc/guides/compressdevs/overview.rst
>index b16c36fd6..68205c77d 100644
>--- a/doc/guides/compressdevs/overview.rst
>+++ b/doc/guides/compressdevs/overview.rst
>@@ -15,3 +15,17 @@ Supported Feature Flags
>
> - "Pass-through" feature flag refers to the ability of the PMD
> to let mbufs pass-through it, without making any modifications to it.
>+
>+ - "OOP SGL In SGL Out" feature flag stands for
>+ "Out-of-place Scatter-gather list Input, Scatter-gater list Output",
>+ which means that the input and output mbufs can consist of multiple segments.
>+
>+ - "OOP SGL In FB Out" feature flag stands for
>+ "Out-of-place Scatter-gather list Input, Flat Buffers Output",
>+ which means that the input mbuf can consist of multiple segments combined
>+ with a single segment mbuf in the output.
>+
>+ - "OOP FB In SGL Out" feature flag stands for
>+ "Out-of-place Flat Buffers Input, Scatter-gather list Output",
>+ which means that the output mbuf can consist of multiple segments combined
>+ with a single segment mbuf in the input.
>diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
>index bc0124295..4ae37cb3b 100644
>--- a/doc/guides/rel_notes/release_18_08.rst
>+++ b/doc/guides/rel_notes/release_18_08.rst
>@@ -60,6 +60,12 @@ API Changes
> Also, make sure to start the actual text at the margin.
> =========================================================
>
>+* compressdev: Feature flag ``RTE_COMP_FF_MBUF_SCATTER_GATHER`` is
>+ replaced with the following more explicit flags:
>+ - ``RTE_COMP_FF_OOP_SGL_IN_SGL_OUT``
>+ - ``RTE_COMP_FF_OOP_SGL_IN_FB_OUT``
>+ - ``RTE_COMP_FF_OOP_FB_IN_SGL_OUT``
>+
>
> ABI Changes
> -----------
>diff --git a/lib/librte_compressdev/rte_comp.c b/lib/librte_compressdev/rte_comp.c
>index d596ba872..f5bd3a6c0 100644
>--- a/lib/librte_compressdev/rte_comp.c
>+++ b/lib/librte_compressdev/rte_comp.c
>@@ -14,8 +14,12 @@ rte_comp_get_feature_name(uint64_t flag)
> return "STATEFUL_COMPRESSION";
> case RTE_COMP_FF_STATEFUL_DECOMPRESSION:
> return "STATEFUL_DECOMPRESSION";
>- case RTE_COMP_FF_MBUF_SCATTER_GATHER:
>- return "MBUF_SCATTER_GATHER";
>+ case RTE_COMP_FF_OOP_SGL_IN_SGL_OUT:
>+ return "OOP_SGL_IN_SGL_OUT";
>+ case RTE_COMP_FF_OOP_SGL_IN_FB_OUT:
>+ return "OOP_SGL_IN_FB_OUT";
>+ case RTE_COMP_FF_OOP_FB_IN_SGL_OUT:
>+ return "OOP_FB_IN_SGL_OUT";
> case RTE_COMP_FF_MULTI_PKT_CHECKSUM:
> return "MULTI_PKT_CHECKSUM";
> case RTE_COMP_FF_ADLER32_CHECKSUM:
>diff --git a/lib/librte_compressdev/rte_comp.h b/lib/librte_compressdev/rte_comp.h
>index 5b513c77e..6660cee82 100644
>--- a/lib/librte_compressdev/rte_comp.h
>+++ b/lib/librte_compressdev/rte_comp.h
>@@ -30,23 +30,33 @@ extern "C" {
> /**< Stateful compression is supported */
> #define RTE_COMP_FF_STATEFUL_DECOMPRESSION (1ULL << 1)
> /**< Stateful decompression is supported */
>-#define RTE_COMP_FF_MBUF_SCATTER_GATHER (1ULL << 2)
>-/**< Scatter-gather mbufs are supported */
>-#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 3)
>+#define RTE_COMP_FF_OOP_SGL_IN_SGL_OUT (1ULL << 2)
>+/**< Out-of-place Scatter-gather (SGL) mbufs are
>+ * supported in input and output
>+ */
>+#define RTE_COMP_FF_OOP_SGL_IN_FB_OUT (1ULL << 3)
>+/**< Out-of-place Scatter-gather (SGL) mbufs are supported
>+ * in input, combined with flat buffers (FB) in output
>+ */
>+#define RTE_COMP_FF_OOP_FB_IN_SGL_OUT (1ULL << 4)
>+/**< Out-of-place Scatter-gather (SGL) mbufs are supported
>+ * in output, combined with flat buffers (FB) in input
>+ */
>+#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 5)
> /**< Adler-32 Checksum is supported */
>-#define RTE_COMP_FF_CRC32_CHECKSUM (1ULL << 4)
>+#define RTE_COMP_FF_CRC32_CHECKSUM (1ULL << 6)
> /**< CRC32 Checksum is supported */
>-#define RTE_COMP_FF_CRC32_ADLER32_CHECKSUM (1ULL << 5)
>+#define RTE_COMP_FF_CRC32_ADLER32_CHECKSUM (1ULL << 7)
> /**< Adler-32/CRC32 Checksum is supported */
>-#define RTE_COMP_FF_MULTI_PKT_CHECKSUM (1ULL << 6)
>+#define RTE_COMP_FF_MULTI_PKT_CHECKSUM (1ULL << 8)
> /**< Generation of checksum across multiple stateless packets is supported */
>-#define RTE_COMP_FF_SHA1_HASH (1ULL << 7)
>+#define RTE_COMP_FF_SHA1_HASH (1ULL << 9)
> /**< SHA1 Hash is supported */
>-#define RTE_COMP_FF_SHA2_SHA256_HASH (1ULL << 8)
>+#define RTE_COMP_FF_SHA2_SHA256_HASH (1ULL << 10)
> /**< SHA256 Hash of SHA2 family is supported */
>-#define RTE_COMP_FF_NONCOMPRESSED_BLOCKS (1ULL << 9)
>+#define RTE_COMP_FF_NONCOMPRESSED_BLOCKS (1ULL << 11)
> /**< Creation of non-compressed blocks using RTE_COMP_LEVEL_NONE is supported */
>-#define RTE_COMP_FF_SHAREABLE_PRIV_XFORM (1ULL << 10)
>+#define RTE_COMP_FF_SHAREABLE_PRIV_XFORM (1ULL << 12)
> /**< Private xforms created by the PMD can be shared
> * across multiple stateless operations. If not set, then app needs
> * to create as many priv_xforms as it expects to have stateless
>--
>2.14.4
^ permalink raw reply [relevance 0%]
* [dpdk-dev] [PATCH v3 3/4] compressdev: replace mbuf scatter gather flag
@ 2018-07-04 14:10 3% ` Pablo de Lara
2018-07-05 8:38 0% ` Verma, Shally
0 siblings, 1 reply; 200+ results
From: Pablo de Lara @ 2018-07-04 14:10 UTC (permalink / raw)
To: shally.verma, ashish.gupta, fiona.trahe, lee.daly; +Cc: dev, Pablo de Lara
The current mbuf scatter gather feature flag is
too ambiguous, as it is not clear if input and/or output
buffers can be scatter gather mbufs or not.
Therefore, three new flags will replace this flag:
- RTE_COMP_FF_OOP_SGL_IN_SGL_OUT
- RTE_COMP_FF_OOP_SGL_IN_FB_OUT
- RTE_COMP_FF_OOP_FB_IN_SGL_OUT
Note that out-of-place flat buffers is supported by default
and in-place is not supported by the library.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
Changes in v3:
- Replaced Out-of-place with OOP
- Added new feature flags in default.ini
Changes in v2:
- Fixed typos
- Rephrased comments
doc/guides/compressdevs/features/default.ini | 34 +++++++++++++++-------------
doc/guides/compressdevs/overview.rst | 14 ++++++++++++
doc/guides/rel_notes/release_18_08.rst | 6 +++++
lib/librte_compressdev/rte_comp.c | 8 +++++--
lib/librte_compressdev/rte_comp.h | 30 ++++++++++++++++--------
5 files changed, 64 insertions(+), 28 deletions(-)
diff --git a/doc/guides/compressdevs/features/default.ini b/doc/guides/compressdevs/features/default.ini
index a88414d23..003f3f3a5 100644
--- a/doc/guides/compressdevs/features/default.ini
+++ b/doc/guides/compressdevs/features/default.ini
@@ -6,19 +6,21 @@
; the features table in the documentation.
;
[Features]
-HW Accelerated =
-CPU SSE =
-CPU AVX =
-CPU AVX2 =
-CPU AVX512 =
-CPU NEON =
-Stateful =
-Pass-through =
-Chained mbufs =
-Deflate =
-LZS =
-Adler32 =
-Crc32 =
-Adler32&Crc32 =
-Fixed =
-Dynamic =
+HW Accelerated =
+CPU SSE =
+CPU AVX =
+CPU AVX2 =
+CPU AVX512 =
+CPU NEON =
+Stateful =
+Pass-through =
+OOP SGL In SGL Out =
+OOP SGL In FB Out =
+OOP FB In SGL Out =
+Deflate =
+LZS =
+Adler32 =
+Crc32 =
+Adler32&Crc32 =
+Fixed =
+Dynamic =
diff --git a/doc/guides/compressdevs/overview.rst b/doc/guides/compressdevs/overview.rst
index b16c36fd6..68205c77d 100644
--- a/doc/guides/compressdevs/overview.rst
+++ b/doc/guides/compressdevs/overview.rst
@@ -15,3 +15,17 @@ Supported Feature Flags
- "Pass-through" feature flag refers to the ability of the PMD
to let mbufs pass-through it, without making any modifications to it.
+
+ - "OOP SGL In SGL Out" feature flag stands for
+ "Out-of-place Scatter-gather list Input, Scatter-gater list Output",
+ which means that the input and output mbufs can consist of multiple segments.
+
+ - "OOP SGL In FB Out" feature flag stands for
+ "Out-of-place Scatter-gather list Input, Flat Buffers Output",
+ which means that the input mbuf can consist of multiple segments combined
+ with a single segment mbuf in the output.
+
+ - "OOP FB In SGL Out" feature flag stands for
+ "Out-of-place Flat Buffers Input, Scatter-gather list Output",
+ which means that the output mbuf can consist of multiple segments combined
+ with a single segment mbuf in the input.
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index bc0124295..4ae37cb3b 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -60,6 +60,12 @@ API Changes
Also, make sure to start the actual text at the margin.
=========================================================
+* compressdev: Feature flag ``RTE_COMP_FF_MBUF_SCATTER_GATHER`` is
+ replaced with the following more explicit flags:
+ - ``RTE_COMP_FF_OOP_SGL_IN_SGL_OUT``
+ - ``RTE_COMP_FF_OOP_SGL_IN_FB_OUT``
+ - ``RTE_COMP_FF_OOP_FB_IN_SGL_OUT``
+
ABI Changes
-----------
diff --git a/lib/librte_compressdev/rte_comp.c b/lib/librte_compressdev/rte_comp.c
index d596ba872..f5bd3a6c0 100644
--- a/lib/librte_compressdev/rte_comp.c
+++ b/lib/librte_compressdev/rte_comp.c
@@ -14,8 +14,12 @@ rte_comp_get_feature_name(uint64_t flag)
return "STATEFUL_COMPRESSION";
case RTE_COMP_FF_STATEFUL_DECOMPRESSION:
return "STATEFUL_DECOMPRESSION";
- case RTE_COMP_FF_MBUF_SCATTER_GATHER:
- return "MBUF_SCATTER_GATHER";
+ case RTE_COMP_FF_OOP_SGL_IN_SGL_OUT:
+ return "OOP_SGL_IN_SGL_OUT";
+ case RTE_COMP_FF_OOP_SGL_IN_FB_OUT:
+ return "OOP_SGL_IN_FB_OUT";
+ case RTE_COMP_FF_OOP_FB_IN_SGL_OUT:
+ return "OOP_FB_IN_SGL_OUT";
case RTE_COMP_FF_MULTI_PKT_CHECKSUM:
return "MULTI_PKT_CHECKSUM";
case RTE_COMP_FF_ADLER32_CHECKSUM:
diff --git a/lib/librte_compressdev/rte_comp.h b/lib/librte_compressdev/rte_comp.h
index 5b513c77e..6660cee82 100644
--- a/lib/librte_compressdev/rte_comp.h
+++ b/lib/librte_compressdev/rte_comp.h
@@ -30,23 +30,33 @@ extern "C" {
/**< Stateful compression is supported */
#define RTE_COMP_FF_STATEFUL_DECOMPRESSION (1ULL << 1)
/**< Stateful decompression is supported */
-#define RTE_COMP_FF_MBUF_SCATTER_GATHER (1ULL << 2)
-/**< Scatter-gather mbufs are supported */
-#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 3)
+#define RTE_COMP_FF_OOP_SGL_IN_SGL_OUT (1ULL << 2)
+/**< Out-of-place Scatter-gather (SGL) mbufs are
+ * supported in input and output
+ */
+#define RTE_COMP_FF_OOP_SGL_IN_FB_OUT (1ULL << 3)
+/**< Out-of-place Scatter-gather (SGL) mbufs are supported
+ * in input, combined with flat buffers (FB) in output
+ */
+#define RTE_COMP_FF_OOP_FB_IN_SGL_OUT (1ULL << 4)
+/**< Out-of-place Scatter-gather (SGL) mbufs are supported
+ * in output, combined with flat buffers (FB) in input
+ */
+#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 5)
/**< Adler-32 Checksum is supported */
-#define RTE_COMP_FF_CRC32_CHECKSUM (1ULL << 4)
+#define RTE_COMP_FF_CRC32_CHECKSUM (1ULL << 6)
/**< CRC32 Checksum is supported */
-#define RTE_COMP_FF_CRC32_ADLER32_CHECKSUM (1ULL << 5)
+#define RTE_COMP_FF_CRC32_ADLER32_CHECKSUM (1ULL << 7)
/**< Adler-32/CRC32 Checksum is supported */
-#define RTE_COMP_FF_MULTI_PKT_CHECKSUM (1ULL << 6)
+#define RTE_COMP_FF_MULTI_PKT_CHECKSUM (1ULL << 8)
/**< Generation of checksum across multiple stateless packets is supported */
-#define RTE_COMP_FF_SHA1_HASH (1ULL << 7)
+#define RTE_COMP_FF_SHA1_HASH (1ULL << 9)
/**< SHA1 Hash is supported */
-#define RTE_COMP_FF_SHA2_SHA256_HASH (1ULL << 8)
+#define RTE_COMP_FF_SHA2_SHA256_HASH (1ULL << 10)
/**< SHA256 Hash of SHA2 family is supported */
-#define RTE_COMP_FF_NONCOMPRESSED_BLOCKS (1ULL << 9)
+#define RTE_COMP_FF_NONCOMPRESSED_BLOCKS (1ULL << 11)
/**< Creation of non-compressed blocks using RTE_COMP_LEVEL_NONE is supported */
-#define RTE_COMP_FF_SHAREABLE_PRIV_XFORM (1ULL << 10)
+#define RTE_COMP_FF_SHAREABLE_PRIV_XFORM (1ULL << 12)
/**< Private xforms created by the PMD can be shared
* across multiple stateless operations. If not set, then app needs
* to create as many priv_xforms as it expects to have stateless
--
2.14.4
^ permalink raw reply [relevance 3%]
* [dpdk-dev] [PATCH v4 13/16] cryptodev: replace mbuf scatter gather flag
` (3 preceding siblings ...)
2018-07-04 8:51 4% ` [dpdk-dev] [PATCH v4 12/16] cryptodev: remove old get session size functions Pablo de Lara
@ 2018-07-04 8:51 3% ` Pablo de Lara
4 siblings, 0 replies; 200+ results
From: Pablo de Lara @ 2018-07-04 8:51 UTC (permalink / raw)
To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
Cc: dev, Pablo de Lara
The current mbuf scatter gatter feature flag is
too ambiguous, as it is not clear if input and/or output
buffers can be scatter gather mbufs or not, plus
if in-place and/or out-of-place is supported.
Therefore, five new flags will replace this flag:
- RTE_CRYPTODEV_FF_IN_PLACE_SGL
- RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT
- RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT
- RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT
- RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
doc/guides/rel_notes/deprecation.rst | 2 --
doc/guides/rel_notes/release_18_08.rst | 8 +++++
drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 2 +-
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 6 +++-
drivers/crypto/dpaa_sec/dpaa_sec.c | 6 +++-
drivers/crypto/null/null_crypto_pmd.c | 2 +-
drivers/crypto/openssl/rte_openssl_pmd.c | 2 +-
drivers/crypto/qat/qat_sym_pmd.c | 6 +++-
lib/librte_cryptodev/rte_cryptodev.c | 12 ++++++--
lib/librte_cryptodev/rte_cryptodev.h | 46 +++++++++++++++++++----------
test/test/test_cryptodev.c | 31 +++++++++++++------
test/test/test_cryptodev_blockcipher.c | 21 ++++++++++---
12 files changed, 106 insertions(+), 38 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 9a73b1d8e..62d635b74 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -105,5 +105,3 @@ Deprecation Notices
``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
18.05 and removed in 18.08, as there are no drivers doing anything useful
with them.
- - Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
- so some will be replaced by more explicit flags.
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index e482d3d5f..9cf3ea3df 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -78,6 +78,14 @@ API Changes
- ``rte_cryptodev_get_private_session_size`` is replaced with
``rte_cryptodev_sym_get_private_session_size``
+* cryptodev: Feature flag ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` is
+ replaced with the following more explicit flags:
+ - ``RTE_CRYPTODEV_FF_IN_PLACE_SGL``
+ - ``RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT``
+ - ``RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT``
+ - ``RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT``
+ - ``RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT``
+
ABI Changes
-----------
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index 88307e0e7..937173094 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -492,7 +492,7 @@ aesni_gcm_create(const char *name,
dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
RTE_CRYPTODEV_FF_CPU_AESNI |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT;
switch (vector_mode) {
case RTE_AESNI_GCM_SSE:
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 1b1c30d85..1dd8dab83 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -2762,7 +2762,11 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev)
RTE_CRYPTODEV_FF_HW_ACCELERATED |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
RTE_CRYPTODEV_FF_SECURITY |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_IN_PLACE_SGL |
+ RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT |
+ RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT |
+ RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT |
+ RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT;
internals = cryptodev->data->dev_private;
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index b96552c57..49ff7584e 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -2271,7 +2271,11 @@ dpaa_sec_dev_init(struct rte_cryptodev *cryptodev)
RTE_CRYPTODEV_FF_HW_ACCELERATED |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
RTE_CRYPTODEV_FF_SECURITY |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_IN_PLACE_SGL |
+ RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT |
+ RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT |
+ RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT |
+ RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT;
internals = cryptodev->data->dev_private;
internals->max_nb_queue_pairs = RTE_DPAA_MAX_NB_SEC_QPS;
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index 07276833b..3d7caf1f1 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -176,7 +176,7 @@ cryptodev_null_create(const char *name,
dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_IN_PLACE_SGL;
internals = dev->data->dev_private;
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 1ccab4ab5..b4686a7da 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -1660,7 +1660,7 @@ cryptodev_openssl_create(const char *name,
dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
RTE_CRYPTODEV_FF_CPU_AESNI |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT;
/* Set vector instructions mode supported */
internals = dev->data->dev_private;
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index ee8633b85..33ac831fe 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -274,7 +274,11 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev)
cryptodev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
RTE_CRYPTODEV_FF_HW_ACCELERATED |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_IN_PLACE_SGL |
+ RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT |
+ RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT |
+ RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT |
+ RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT;
internals = cryptodev->data->dev_private;
internals->qat_dev = qat_pci_dev;
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 381330f3d..608db36c7 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -361,8 +361,16 @@ rte_cryptodev_get_feature_name(uint64_t flag)
return "CPU_AESNI";
case RTE_CRYPTODEV_FF_HW_ACCELERATED:
return "HW_ACCELERATED";
- case RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER:
- return "MBUF_SCATTER_GATHER";
+ case RTE_CRYPTODEV_FF_IN_PLACE_SGL:
+ return "IN_PLACE_SGL";
+ case RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT:
+ return "OOP_SGL_IN_SGL_OUT";
+ case RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT:
+ return "OOP_SGL_IN_FB_OUT";
+ case RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT:
+ return "OOP_FB_IN_SGL_OUT";
+ case RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT:
+ return "OOP_FB_IN_FB_OUT";
case RTE_CRYPTODEV_FF_CPU_NEON:
return "CPU_NEON";
case RTE_CRYPTODEV_FF_CPU_ARM_CE:
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index cc219c722..7942527e8 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -292,31 +292,47 @@ rte_cryptodev_get_aead_algo_enum(enum rte_crypto_aead_algorithm *algo_enum,
*
* Keep these flags synchronised with rte_cryptodev_get_feature_name()
*/
-#define RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO (1ULL << 0)
+#define RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO (1ULL << 0)
/**< Symmetric crypto operations are supported */
-#define RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO (1ULL << 1)
+#define RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO (1ULL << 1)
/**< Asymmetric crypto operations are supported */
-#define RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING (1ULL << 2)
+#define RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING (1ULL << 2)
/**< Chaining symmetric crypto operations are supported */
-#define RTE_CRYPTODEV_FF_CPU_SSE (1ULL << 3)
+#define RTE_CRYPTODEV_FF_CPU_SSE (1ULL << 3)
/**< Utilises CPU SIMD SSE instructions */
-#define RTE_CRYPTODEV_FF_CPU_AVX (1ULL << 4)
+#define RTE_CRYPTODEV_FF_CPU_AVX (1ULL << 4)
/**< Utilises CPU SIMD AVX instructions */
-#define RTE_CRYPTODEV_FF_CPU_AVX2 (1ULL << 5)
+#define RTE_CRYPTODEV_FF_CPU_AVX2 (1ULL << 5)
/**< Utilises CPU SIMD AVX2 instructions */
-#define RTE_CRYPTODEV_FF_CPU_AESNI (1ULL << 6)
+#define RTE_CRYPTODEV_FF_CPU_AESNI (1ULL << 6)
/**< Utilises CPU AES-NI instructions */
-#define RTE_CRYPTODEV_FF_HW_ACCELERATED (1ULL << 7)
-/**< Operations are off-loaded to an external hardware accelerator */
-#define RTE_CRYPTODEV_FF_CPU_AVX512 (1ULL << 8)
+#define RTE_CRYPTODEV_FF_HW_ACCELERATED (1ULL << 7)
+/**< Operations are off-loaded to an
+ * external hardware accelerator
+ */
+#define RTE_CRYPTODEV_FF_CPU_AVX512 (1ULL << 8)
/**< Utilises CPU SIMD AVX512 instructions */
-#define RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER (1ULL << 9)
-/**< Scatter-gather mbufs are supported */
-#define RTE_CRYPTODEV_FF_CPU_NEON (1ULL << 10)
+#define RTE_CRYPTODEV_FF_IN_PLACE_SGL (1ULL << 9)
+/**< In-place Scatter-gather (SGL) mbufs are supported */
+#define RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT (1ULL << 10)
+/**< Out-of-place Scatter-gather (SGL) mbufs are
+ * supported in input and output
+ */
+#define RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT (1ULL << 11)
+/**< Out-of-place Scatter-gather (SGL) mbufs are supported
+ * in input, combined with flat buffers (FB) in output
+ */
+#define RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT (1ULL << 12)
+/**< Out-of-place Scatter-gather (SGL) mbufs are supported
+ * in output, combined with flat buffers (FB) in input
+ */
+#define RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT (1ULL << 13)
+/**< Out-of-place flat buffers (FB) are supported in input and output */
+#define RTE_CRYPTODEV_FF_CPU_NEON (1ULL << 14)
/**< Utilises CPU NEON instructions */
-#define RTE_CRYPTODEV_FF_CPU_ARM_CE (1ULL << 11)
+#define RTE_CRYPTODEV_FF_CPU_ARM_CE (1ULL << 15)
/**< Utilises ARM CPU Cryptographic Extensions */
-#define RTE_CRYPTODEV_FF_SECURITY (1ULL << 12)
+#define RTE_CRYPTODEV_FF_SECURITY (1ULL << 16)
/**< Support Security Protocol Processing */
diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 73aadaced..e23eecb66 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -3160,8 +3160,11 @@ test_kasumi_encryption_sgl(const struct kasumi_test_data *tdata)
struct rte_cryptodev_info dev_info;
rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
- if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
- printf("Device doesn't support scatter-gather. "
+
+ uint64_t feat_flags = dev_info.feature_flags;
+
+ if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {
+ printf("Device doesn't support in-place scatter-gather. "
"Test Skipped.\n");
return 0;
}
@@ -3308,8 +3311,11 @@ test_kasumi_encryption_oop_sgl(const struct kasumi_test_data *tdata)
struct rte_cryptodev_info dev_info;
rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
- if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
- printf("Device doesn't support scatter-gather. "
+
+ uint64_t feat_flags = dev_info.feature_flags;
+ if (!(feat_flags & RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT)) {
+ printf("Device doesn't support out-of-place scatter-gather "
+ "in both input and output mbufs. "
"Test Skipped.\n");
return 0;
}
@@ -3659,8 +3665,12 @@ test_snow3g_encryption_oop_sgl(const struct snow3g_test_data *tdata)
struct rte_cryptodev_info dev_info;
rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
- if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
- printf("Device doesn't support scatter-gather. "
+
+ uint64_t feat_flags = dev_info.feature_flags;
+
+ if (!(feat_flags & RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT)) {
+ printf("Device doesn't support out-of-place scatter-gather "
+ "in both input and output mbufs. "
"Test Skipped.\n");
return 0;
}
@@ -4493,10 +4503,13 @@ test_zuc_encryption_sgl(const struct wireless_test_data *tdata)
return -ENOTSUP;
rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
- if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
- printf("Device doesn't support scatter-gather. "
+
+ uint64_t feat_flags = dev_info.feature_flags;
+
+ if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {
+ printf("Device doesn't support in-place scatter-gather. "
"Test Skipped.\n");
- return -ENOTSUP;
+ return 0;
}
plaintext_len = ceil_byte_length(tdata->plaintext.len);
diff --git a/test/test/test_cryptodev_blockcipher.c b/test/test/test_cryptodev_blockcipher.c
index 256a7daa2..712771605 100644
--- a/test/test/test_cryptodev_blockcipher.c
+++ b/test/test/test_cryptodev_blockcipher.c
@@ -77,12 +77,25 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
if (t->feature_mask & BLOCKCIPHER_TEST_FEATURE_SG) {
rte_cryptodev_info_get(dev_id, &dev_info);
- if (!(dev_info.feature_flags &
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
- printf("Device doesn't support scatter-gather. "
+ uint64_t feat_flags = dev_info.feature_flags;
+ uint64_t oop_flag = RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT;
+
+ if (t->feature_mask && BLOCKCIPHER_TEST_FEATURE_OOP) {
+ if (!(feat_flags & oop_flag)) {
+ printf("Device doesn't support out-of-place "
+ "scatter-gather in input mbuf. "
+ "Test Skipped.\n");
+ return 0;
+ }
+ } else {
+ if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {
+ printf("Device doesn't support in-place "
+ "scatter-gather mbufs. "
"Test Skipped.\n");
- return 0;
+ return 0;
+ }
}
+
nb_segs = 3;
}
--
2.14.4
^ permalink raw reply [relevance 3%]
* [dpdk-dev] [PATCH v4 11/16] cryptodev: remove queue start/stop functions
2018-07-04 8:51 4% ` [dpdk-dev] [PATCH v4 01/16] cryptodev: replace bus specific struct with generic dev Pablo de Lara
2018-07-04 8:51 4% ` [dpdk-dev] [PATCH v4 08/16] cryptodev: define value for unlimited sessions Pablo de Lara
@ 2018-07-04 8:51 2% ` Pablo de Lara
2018-07-04 8:51 4% ` [dpdk-dev] [PATCH v4 12/16] cryptodev: remove old get session size functions Pablo de Lara
2018-07-04 8:51 3% ` [dpdk-dev] [PATCH v4 13/16] cryptodev: replace mbuf scatter gather flag Pablo de Lara
4 siblings, 0 replies; 200+ results
From: Pablo de Lara @ 2018-07-04 8:51 UTC (permalink / raw)
To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
Cc: dev, Pablo de Lara
Removed cryptodev queue start/stop functions,
as they were marked deprecated in 18.05, since they
were not implemented by any driver.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
doc/guides/rel_notes/deprecation.rst | 4 ---
doc/guides/rel_notes/release_18_08.rst | 5 +++
drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c | 18 -----------
drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 18 -----------
drivers/crypto/armv8/rte_armv8_pmd_ops.c | 18 -----------
drivers/crypto/ccp/ccp_pmd_ops.c | 16 ----------
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 22 -------------
drivers/crypto/dpaa_sec/dpaa_sec.c | 22 -------------
drivers/crypto/kasumi/rte_kasumi_pmd_ops.c | 18 -----------
drivers/crypto/mvsam/rte_mrvl_pmd_ops.c | 28 ----------------
drivers/crypto/null/null_crypto_pmd_ops.c | 18 -----------
drivers/crypto/openssl/rte_openssl_pmd_ops.c | 18 -----------
drivers/crypto/qat/qat_sym_pmd.c | 2 --
drivers/crypto/scheduler/scheduler_pmd_ops.c | 18 -----------
drivers/crypto/snow3g/rte_snow3g_pmd_ops.c | 18 -----------
drivers/crypto/virtio/virtio_cryptodev.c | 2 --
drivers/crypto/zuc/rte_zuc_pmd_ops.c | 18 -----------
lib/librte_cryptodev/rte_cryptodev.c | 44 --------------------------
lib/librte_cryptodev/rte_cryptodev.h | 37 ----------------------
lib/librte_cryptodev/rte_cryptodev_pmd.h | 26 ---------------
lib/librte_cryptodev/rte_cryptodev_version.map | 2 --
21 files changed, 5 insertions(+), 367 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index dc014da21..91592534e 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -105,10 +105,6 @@ Deprecation Notices
``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
18.05 and removed in 18.08, as there are no drivers doing anything useful
with them.
- - Functions ``rte_cryptodev_queue_pair_start()`` and
- ``rte_cryptodev_queue_pair_stop()`` will be deprecated from 18.05
- and removed in 18.08, as there are no drivers doing anything useful
- with them.
- Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
so some will be replaced by more explicit flags.
- Function ``rte_cryptodev_get_header_session_size()`` will be deprecated
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 2b994ee78..cfb2885a1 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -65,6 +65,11 @@ API Changes
Value 0 is accepted in ``sym.max_nb_sessions``, meaning that a device
supports an unlimited number of sessions.
+* cryptodev: Following functions were deprecated and are removed in 18.08:
+
+ - ``rte_cryptodev_queue_pair_start``
+ - ``rte_cryptodev_queue_pair_stop``
+
ABI Changes
-----------
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
index 1f4edc0f2..489d2e08f 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
@@ -242,22 +242,6 @@ aesni_gcm_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-aesni_gcm_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-aesni_gcm_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
aesni_gcm_pmd_qp_count(struct rte_cryptodev *dev)
@@ -339,8 +323,6 @@ struct rte_cryptodev_ops aesni_gcm_pmd_ops = {
.queue_pair_setup = aesni_gcm_pmd_qp_setup,
.queue_pair_release = aesni_gcm_pmd_qp_release,
- .queue_pair_start = aesni_gcm_pmd_qp_start,
- .queue_pair_stop = aesni_gcm_pmd_qp_stop,
.queue_pair_count = aesni_gcm_pmd_qp_count,
.session_get_size = aesni_gcm_pmd_session_get_size,
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
index 6cd4134af..b806c4d52 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -509,22 +509,6 @@ aesni_mb_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-aesni_mb_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-aesni_mb_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
aesni_mb_pmd_qp_count(struct rte_cryptodev *dev)
@@ -607,8 +591,6 @@ struct rte_cryptodev_ops aesni_mb_pmd_ops = {
.queue_pair_setup = aesni_mb_pmd_qp_setup,
.queue_pair_release = aesni_mb_pmd_qp_release,
- .queue_pair_start = aesni_mb_pmd_qp_start,
- .queue_pair_stop = aesni_mb_pmd_qp_stop,
.queue_pair_count = aesni_mb_pmd_qp_count,
.session_get_size = aesni_mb_pmd_session_get_size,
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
index b654f7528..5e8a5a292 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
@@ -258,22 +258,6 @@ armv8_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-armv8_crypto_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-armv8_crypto_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
armv8_crypto_pmd_qp_count(struct rte_cryptodev *dev)
@@ -354,8 +338,6 @@ struct rte_cryptodev_ops armv8_crypto_pmd_ops = {
.queue_pair_setup = armv8_crypto_pmd_qp_setup,
.queue_pair_release = armv8_crypto_pmd_qp_release,
- .queue_pair_start = armv8_crypto_pmd_qp_start,
- .queue_pair_stop = armv8_crypto_pmd_qp_stop,
.queue_pair_count = armv8_crypto_pmd_qp_count,
.session_get_size = armv8_crypto_pmd_session_get_size,
diff --git a/drivers/crypto/ccp/ccp_pmd_ops.c b/drivers/crypto/ccp/ccp_pmd_ops.c
index dbe545c10..1cb944406 100644
--- a/drivers/crypto/ccp/ccp_pmd_ops.c
+++ b/drivers/crypto/ccp/ccp_pmd_ops.c
@@ -748,20 +748,6 @@ ccp_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-static int
-ccp_pmd_qp_start(struct rte_cryptodev *dev __rte_unused,
- uint16_t queue_pair_id __rte_unused)
-{
- return -ENOTSUP;
-}
-
-static int
-ccp_pmd_qp_stop(struct rte_cryptodev *dev __rte_unused,
- uint16_t queue_pair_id __rte_unused)
-{
- return -ENOTSUP;
-}
-
static uint32_t
ccp_pmd_qp_count(struct rte_cryptodev *dev)
{
@@ -837,8 +823,6 @@ struct rte_cryptodev_ops ccp_ops = {
.queue_pair_setup = ccp_pmd_qp_setup,
.queue_pair_release = ccp_pmd_qp_release,
- .queue_pair_start = ccp_pmd_qp_start,
- .queue_pair_stop = ccp_pmd_qp_stop,
.queue_pair_count = ccp_pmd_qp_count,
.session_get_size = ccp_pmd_session_get_size,
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index bc091c560..1b1c30d85 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -1470,26 +1470,6 @@ dpaa2_sec_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return retcode;
}
-/** Start queue pair */
-static int
-dpaa2_sec_queue_pair_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- PMD_INIT_FUNC_TRACE();
-
- return 0;
-}
-
-/** Stop queue pair */
-static int
-dpaa2_sec_queue_pair_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- PMD_INIT_FUNC_TRACE();
-
- return 0;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
dpaa2_sec_queue_pair_count(struct rte_cryptodev *dev)
@@ -2716,8 +2696,6 @@ static struct rte_cryptodev_ops crypto_ops = {
.stats_reset = dpaa2_sec_stats_reset,
.queue_pair_setup = dpaa2_sec_queue_pair_setup,
.queue_pair_release = dpaa2_sec_queue_pair_release,
- .queue_pair_start = dpaa2_sec_queue_pair_start,
- .queue_pair_stop = dpaa2_sec_queue_pair_stop,
.queue_pair_count = dpaa2_sec_queue_pair_count,
.session_get_size = dpaa2_sec_session_get_size,
.session_configure = dpaa2_sec_session_configure,
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 73cae483b..b96552c57 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -1585,26 +1585,6 @@ dpaa_sec_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return 0;
}
-/** Start queue pair */
-static int
-dpaa_sec_queue_pair_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- PMD_INIT_FUNC_TRACE();
-
- return 0;
-}
-
-/** Stop queue pair */
-static int
-dpaa_sec_queue_pair_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- PMD_INIT_FUNC_TRACE();
-
- return 0;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
dpaa_sec_queue_pair_count(struct rte_cryptodev *dev)
@@ -2227,8 +2207,6 @@ static struct rte_cryptodev_ops crypto_ops = {
.dev_infos_get = dpaa_sec_dev_infos_get,
.queue_pair_setup = dpaa_sec_queue_pair_setup,
.queue_pair_release = dpaa_sec_queue_pair_release,
- .queue_pair_start = dpaa_sec_queue_pair_start,
- .queue_pair_stop = dpaa_sec_queue_pair_stop,
.queue_pair_count = dpaa_sec_queue_pair_count,
.session_get_size = dpaa_sec_session_get_size,
.session_configure = dpaa_sec_session_configure,
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
index 5593238f2..c7556d478 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
@@ -229,22 +229,6 @@ kasumi_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-kasumi_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-kasumi_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
kasumi_pmd_qp_count(struct rte_cryptodev *dev)
@@ -325,8 +309,6 @@ struct rte_cryptodev_ops kasumi_pmd_ops = {
.queue_pair_setup = kasumi_pmd_qp_setup,
.queue_pair_release = kasumi_pmd_qp_release,
- .queue_pair_start = kasumi_pmd_qp_start,
- .queue_pair_stop = kasumi_pmd_qp_stop,
.queue_pair_count = kasumi_pmd_qp_count,
.session_get_size = kasumi_pmd_session_get_size,
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
index 3f8de37b7..f83a6115f 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
@@ -595,32 +595,6 @@ mrvl_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair (PMD ops callback) - not supported.
- *
- * @param dev Pointer to the device structure.
- * @param qp_id ID of the Queue Pair.
- * @returns -ENOTSUP. Always.
- */
-static int
-mrvl_crypto_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair (PMD ops callback) - not supported.
- *
- * @param dev Pointer to the device structure.
- * @param qp_id ID of the Queue Pair.
- * @returns -ENOTSUP. Always.
- */
-static int
-mrvl_crypto_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs (PMD ops callback).
*
* @param dev Pointer to the device structure.
@@ -738,8 +712,6 @@ static struct rte_cryptodev_ops mrvl_crypto_pmd_ops = {
.queue_pair_setup = mrvl_crypto_pmd_qp_setup,
.queue_pair_release = mrvl_crypto_pmd_qp_release,
- .queue_pair_start = mrvl_crypto_pmd_qp_start,
- .queue_pair_stop = mrvl_crypto_pmd_qp_stop,
.queue_pair_count = mrvl_crypto_pmd_qp_count,
.session_get_size = mrvl_crypto_pmd_session_get_size,
diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
index 55778a255..66bd62bd3 100644
--- a/drivers/crypto/null/null_crypto_pmd_ops.c
+++ b/drivers/crypto/null/null_crypto_pmd_ops.c
@@ -241,22 +241,6 @@ null_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-null_crypto_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-null_crypto_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
null_crypto_pmd_qp_count(struct rte_cryptodev *dev)
@@ -337,8 +321,6 @@ struct rte_cryptodev_ops pmd_ops = {
.queue_pair_setup = null_crypto_pmd_qp_setup,
.queue_pair_release = null_crypto_pmd_qp_release,
- .queue_pair_start = null_crypto_pmd_qp_start,
- .queue_pair_stop = null_crypto_pmd_qp_stop,
.queue_pair_count = null_crypto_pmd_qp_count,
.session_get_size = null_crypto_pmd_session_get_size,
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index a1a2d9900..20d4e26de 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -648,22 +648,6 @@ openssl_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-openssl_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-openssl_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
openssl_pmd_qp_count(struct rte_cryptodev *dev)
@@ -746,8 +730,6 @@ struct rte_cryptodev_ops openssl_pmd_ops = {
.queue_pair_setup = openssl_pmd_qp_setup,
.queue_pair_release = openssl_pmd_qp_release,
- .queue_pair_start = openssl_pmd_qp_start,
- .queue_pair_stop = openssl_pmd_qp_stop,
.queue_pair_count = openssl_pmd_qp_count,
.session_get_size = openssl_pmd_session_get_size,
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index 84dd5bec8..ee8633b85 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -202,8 +202,6 @@ static struct rte_cryptodev_ops crypto_qat_ops = {
.stats_reset = qat_sym_stats_reset,
.queue_pair_setup = qat_sym_qp_setup,
.queue_pair_release = qat_sym_qp_release,
- .queue_pair_start = NULL,
- .queue_pair_stop = NULL,
.queue_pair_count = NULL,
/* Crypto related operations */
diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index 802585f4c..9b2f99eb2 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -439,22 +439,6 @@ scheduler_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return 0;
}
-/** Start queue pair */
-static int
-scheduler_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-scheduler_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
scheduler_pmd_qp_count(struct rte_cryptodev *dev)
@@ -535,8 +519,6 @@ struct rte_cryptodev_ops scheduler_pmd_ops = {
.queue_pair_setup = scheduler_pmd_qp_setup,
.queue_pair_release = scheduler_pmd_qp_release,
- .queue_pair_start = scheduler_pmd_qp_start,
- .queue_pair_stop = scheduler_pmd_qp_stop,
.queue_pair_count = scheduler_pmd_qp_count,
.session_get_size = scheduler_pmd_session_get_size,
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
index 6f8b9e2c6..fe882c366 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
@@ -231,22 +231,6 @@ snow3g_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-snow3g_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-snow3g_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
snow3g_pmd_qp_count(struct rte_cryptodev *dev)
@@ -327,8 +311,6 @@ struct rte_cryptodev_ops snow3g_pmd_ops = {
.queue_pair_setup = snow3g_pmd_qp_setup,
.queue_pair_release = snow3g_pmd_qp_release,
- .queue_pair_start = snow3g_pmd_qp_start,
- .queue_pair_stop = snow3g_pmd_qp_stop,
.queue_pair_count = snow3g_pmd_qp_count,
.session_get_size = snow3g_pmd_session_get_size,
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 1da4ae871..0be435c8c 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -515,8 +515,6 @@ static struct rte_cryptodev_ops virtio_crypto_dev_ops = {
.queue_pair_setup = virtio_crypto_qp_setup,
.queue_pair_release = virtio_crypto_qp_release,
- .queue_pair_start = NULL,
- .queue_pair_stop = NULL,
.queue_pair_count = NULL,
/* Crypto related operations */
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
index e151750fb..1d72a0757 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
@@ -231,22 +231,6 @@ zuc_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-zuc_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-zuc_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
zuc_pmd_qp_count(struct rte_cryptodev *dev)
@@ -328,8 +312,6 @@ struct rte_cryptodev_ops zuc_pmd_ops = {
.queue_pair_setup = zuc_pmd_qp_setup,
.queue_pair_release = zuc_pmd_qp_release,
- .queue_pair_start = zuc_pmd_qp_start,
- .queue_pair_stop = zuc_pmd_qp_stop,
.queue_pair_count = zuc_pmd_qp_count,
.session_get_size = zuc_pmd_session_get_size,
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 457ac5670..a07904fb9 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -702,50 +702,6 @@ rte_cryptodev_queue_pairs_config(struct rte_cryptodev *dev, uint16_t nb_qpairs,
return 0;
}
-int
-rte_cryptodev_queue_pair_start(uint8_t dev_id, uint16_t queue_pair_id)
-{
- struct rte_cryptodev *dev;
-
- if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
- CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
- return -EINVAL;
- }
-
- dev = &rte_crypto_devices[dev_id];
- if (queue_pair_id >= dev->data->nb_queue_pairs) {
- CDEV_LOG_ERR("Invalid queue_pair_id=%d", queue_pair_id);
- return -EINVAL;
- }
-
- RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_pair_start, -ENOTSUP);
-
- return dev->dev_ops->queue_pair_start(dev, queue_pair_id);
-
-}
-
-int
-rte_cryptodev_queue_pair_stop(uint8_t dev_id, uint16_t queue_pair_id)
-{
- struct rte_cryptodev *dev;
-
- if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
- CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
- return -EINVAL;
- }
-
- dev = &rte_crypto_devices[dev_id];
- if (queue_pair_id >= dev->data->nb_queue_pairs) {
- CDEV_LOG_ERR("Invalid queue_pair_id=%d", queue_pair_id);
- return -EINVAL;
- }
-
- RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_pair_stop, -ENOTSUP);
-
- return dev->dev_ops->queue_pair_stop(dev, queue_pair_id);
-
-}
-
int
rte_cryptodev_configure(uint8_t dev_id, struct rte_cryptodev_config *config)
{
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 7989eb876..b5d208917 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -566,43 +566,6 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
const struct rte_cryptodev_qp_conf *qp_conf, int socket_id,
struct rte_mempool *session_pool);
-/**
- * @deprecated
- * Start a specified queue pair of a device. It is used
- * when deferred_start flag of the specified queue is true.
- *
- * @param dev_id The identifier of the device
- * @param queue_pair_id The index of the queue pair to start. The value
- * must be in the range [0, nb_queue_pair - 1]
- * previously supplied to
- * rte_crypto_dev_configure().
- * @return
- * - 0: Success, the transmit queue is correctly set up.
- * - -EINVAL: The dev_id or the queue_id out of range.
- * - -ENOTSUP: The function not supported in PMD driver.
- */
-__rte_deprecated
-extern int
-rte_cryptodev_queue_pair_start(uint8_t dev_id, uint16_t queue_pair_id);
-
-/**
- * @deprecated
- * Stop specified queue pair of a device
- *
- * @param dev_id The identifier of the device
- * @param queue_pair_id The index of the queue pair to stop. The value
- * must be in the range [0, nb_queue_pair - 1]
- * previously supplied to
- * rte_cryptodev_configure().
- * @return
- * - 0: Success, the transmit queue is correctly set up.
- * - -EINVAL: The dev_id or the queue_id out of range.
- * - -ENOTSUP: The function not supported in PMD driver.
- */
-__rte_deprecated
-extern int
-rte_cryptodev_queue_pair_stop(uint8_t dev_id, uint16_t queue_pair_id);
-
/**
* Get the number of queue pairs on a specific crypto device
*
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index 1fb7e7d5e..641dd1369 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -184,28 +184,6 @@ typedef void (*cryptodev_stats_reset_t)(struct rte_cryptodev *dev);
typedef void (*cryptodev_info_get_t)(struct rte_cryptodev *dev,
struct rte_cryptodev_info *dev_info);
-/**
- * Start queue pair of a device.
- *
- * @param dev Crypto device pointer
- * @param qp_id Queue Pair Index
- *
- * @return Returns 0 on success.
- */
-typedef int (*cryptodev_queue_pair_start_t)(struct rte_cryptodev *dev,
- uint16_t qp_id);
-
-/**
- * Stop queue pair of a device.
- *
- * @param dev Crypto device pointer
- * @param qp_id Queue Pair Index
- *
- * @return Returns 0 on success.
- */
-typedef int (*cryptodev_queue_pair_stop_t)(struct rte_cryptodev *dev,
- uint16_t qp_id);
-
/**
* Setup a queue pair for a device.
*
@@ -344,10 +322,6 @@ struct rte_cryptodev_ops {
/**< Set up a device queue pair. */
cryptodev_queue_pair_release_t queue_pair_release;
/**< Release a queue pair. */
- cryptodev_queue_pair_start_t queue_pair_start;
- /**< Start a queue pair. */
- cryptodev_queue_pair_stop_t queue_pair_stop;
- /**< Stop a queue pair. */
cryptodev_queue_pair_count_t queue_pair_count;
/**< Get count of the queue pairs. */
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index be8f4c1a7..020b45754 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -22,8 +22,6 @@ DPDK_16.04 {
rte_cryptodev_stop;
rte_cryptodev_queue_pair_count;
rte_cryptodev_queue_pair_setup;
- rte_cryptodev_queue_pair_start;
- rte_cryptodev_queue_pair_stop;
rte_crypto_op_pool_create;
local: *;
--
2.14.4
^ permalink raw reply [relevance 2%]
* [dpdk-dev] [PATCH v4 12/16] cryptodev: remove old get session size functions
` (2 preceding siblings ...)
2018-07-04 8:51 2% ` [dpdk-dev] [PATCH v4 11/16] cryptodev: remove queue start/stop functions Pablo de Lara
@ 2018-07-04 8:51 4% ` Pablo de Lara
2018-07-04 8:51 3% ` [dpdk-dev] [PATCH v4 13/16] cryptodev: replace mbuf scatter gather flag Pablo de Lara
4 siblings, 0 replies; 200+ results
From: Pablo de Lara @ 2018-07-04 8:51 UTC (permalink / raw)
To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
Cc: dev, Pablo de Lara
Removed rte_cryptodev_get_header_session_size
and rte_cryptodev_get_private_session_size functions,
as they have been substituted with functions
specific for symmetric operations, with _sym_ word
after "rte_cryptodev_".
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
doc/guides/rel_notes/deprecation.rst | 6 ------
doc/guides/rel_notes/release_18_08.rst | 8 ++++++++
lib/librte_cryptodev/rte_cryptodev.c | 12 ------------
lib/librte_cryptodev/rte_cryptodev.h | 25 -------------------------
lib/librte_cryptodev/rte_cryptodev_version.map | 2 --
5 files changed, 8 insertions(+), 45 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 91592534e..9a73b1d8e 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -107,9 +107,3 @@ Deprecation Notices
with them.
- Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
so some will be replaced by more explicit flags.
- - Function ``rte_cryptodev_get_header_session_size()`` will be deprecated
- in 18.05, and it gets replaced with ``rte_cryptodev_sym_get_header_session_size()``.
- It will be removed in 18.08.
- - Function ``rte_cryptodev_get_private_session_size()`` will be deprecated
- in 18.05, and it gets replaced with ``rte_cryptodev_sym_get_private_session_size()``.
- It will be removed in 18.08.
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index cfb2885a1..e482d3d5f 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -70,6 +70,14 @@ API Changes
- ``rte_cryptodev_queue_pair_start``
- ``rte_cryptodev_queue_pair_stop``
+* cryptodev: Following functions were deprecated and are replaced by
+ other functions in 18.08:
+
+ - ``rte_cryptodev_get_header_session_size`` is replaced with
+ ``rte_cryptodev_sym_get_header_session_size``
+ - ``rte_cryptodev_get_private_session_size`` is replaced with
+ ``rte_cryptodev_sym_get_private_session_size``
+
ABI Changes
-----------
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index a07904fb9..381330f3d 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -1181,12 +1181,6 @@ rte_cryptodev_sym_session_free(struct rte_cryptodev_sym_session *sess)
return 0;
}
-unsigned int
-rte_cryptodev_get_header_session_size(void)
-{
- return rte_cryptodev_sym_get_header_session_size();
-}
-
unsigned int
rte_cryptodev_sym_get_header_session_size(void)
{
@@ -1198,12 +1192,6 @@ rte_cryptodev_sym_get_header_session_size(void)
return ((sizeof(void *) * nb_drivers) + sizeof(uint8_t));
}
-unsigned int
-rte_cryptodev_get_private_session_size(uint8_t dev_id)
-{
- return rte_cryptodev_sym_get_private_session_size(dev_id);
-}
-
unsigned int
rte_cryptodev_sym_get_private_session_size(uint8_t dev_id)
{
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index b5d208917..cc219c722 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -898,31 +898,6 @@ int
rte_cryptodev_sym_session_clear(uint8_t dev_id,
struct rte_cryptodev_sym_session *sess);
-/**
- * @deprecated
- * Get the size of the header session, for all registered drivers.
- *
- * @return
- * Size of the header session.
- */
-__rte_deprecated
-unsigned int
-rte_cryptodev_get_header_session_size(void);
-
-/**
- * @deprecated
- * Get the size of the private session data for a device.
- *
- * @param dev_id The device identifier.
- *
- * @return
- * - Size of the private data, if successful
- * - 0 if device is invalid or does not have private session
- */
-__rte_deprecated
-unsigned int
-rte_cryptodev_get_private_session_size(uint8_t dev_id);
-
/**
* Get the size of the header session, for all registered drivers.
*
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index 020b45754..0ab6d5195 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -63,8 +63,6 @@ DPDK_17.08 {
rte_cryptodev_driver_id_get;
rte_cryptodev_driver_name_get;
rte_cryptodev_get_aead_algo_enum;
- rte_cryptodev_get_header_session_size;
- rte_cryptodev_get_private_session_size;
rte_cryptodev_sym_capability_check_aead;
rte_cryptodev_sym_session_init;
rte_cryptodev_sym_session_clear;
--
2.14.4
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH v4 08/16] cryptodev: define value for unlimited sessions
2018-07-04 8:51 4% ` [dpdk-dev] [PATCH v4 01/16] cryptodev: replace bus specific struct with generic dev Pablo de Lara
@ 2018-07-04 8:51 4% ` Pablo de Lara
2018-07-04 8:51 2% ` [dpdk-dev] [PATCH v4 11/16] cryptodev: remove queue start/stop functions Pablo de Lara
` (2 subsequent siblings)
4 siblings, 0 replies; 200+ results
From: Pablo de Lara @ 2018-07-04 8:51 UTC (permalink / raw)
To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
Cc: dev, Pablo de Lara
Currently, the info structure contains the maximum number
of sessions that a device can manage.
This field was useful when the session mempool was created inside
each device, but now it is created at the application level.
Most PMDs do not have a limitation on the sessions managed,
but a few do, therefore this field must remain in the structure.
However, a new value, 0, can be used to indicate that
a device does not have an actual maximum of sessions.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
app/test-crypto-perf/main.c | 2 +-
doc/guides/rel_notes/release_18_08.rst | 2 ++
examples/ipsec-secgw/ipsec-secgw.c | 2 +-
lib/librte_cryptodev/rte_cryptodev.h | 5 ++++-
test/test/test_cryptodev.c | 6 ++++--
5 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index 74e2165a4..2181d0193 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -172,7 +172,7 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs,
* A single session is required per queue pair
* in each device
*/
- if (dev_max_nb_sess < opts->nb_qps) {
+ if (dev_max_nb_sess != 0 && dev_max_nb_sess < opts->nb_qps) {
RTE_LOG(ERR, USER1,
"Device does not support at least "
"%u sessions\n", opts->nb_qps);
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 6bf53dc31..2b994ee78 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -62,6 +62,8 @@ API Changes
* cryptodev: In struct ``struct rte_cryptodev_info``, field ``rte_pci_device *pci_dev``
has been replaced with field ``struct rte_device *device``.
+ Value 0 is accepted in ``sym.max_nb_sessions``, meaning that a device
+ supports an unlimited number of sessions.
ABI Changes
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 2582dcb6e..dacf323c9 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -1441,7 +1441,7 @@ cryptodevs_init(void)
dev_conf.nb_queue_pairs = qp;
uint32_t dev_max_sess = cdev_info.sym.max_nb_sessions;
- if (dev_max_sess < (CDEV_MP_NB_OBJS / 2))
+ if (dev_max_sess != 0 && dev_max_sess < (CDEV_MP_NB_OBJS / 2))
rte_exit(EXIT_FAILURE,
"Device does not support at least %u "
"sessions", CDEV_MP_NB_OBJS / 2);
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 114c9fd6e..7989eb876 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -349,7 +349,10 @@ struct rte_cryptodev_info {
struct {
unsigned max_nb_sessions;
- /**< Maximum number of sessions supported by device. */
+ /**< Maximum number of sessions supported by device.
+ * If 0, the device does not have any limitation in
+ * number of sessions that can be used.
+ */
} sym;
};
diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 5c906cfae..73aadaced 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -436,7 +436,8 @@ testsuite_setup(void)
* Create mempool with maximum number of sessions * 2,
* to include the session headers
*/
- if (info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
+ if (info.sym.max_nb_sessions != 0 &&
+ info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
RTE_LOG(ERR, USER1, "Device does not support "
"at least %u sessions\n",
MAX_NB_SESSIONS);
@@ -8546,7 +8547,8 @@ test_scheduler_attach_slave_op(void)
unsigned int session_size =
rte_cryptodev_sym_get_private_session_size(i);
- if (info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
+ if (info.sym.max_nb_sessions != 0 &&
+ info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
RTE_LOG(ERR, USER1,
"Device does not support "
"at least %u sessions\n",
--
2.14.4
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH v4 01/16] cryptodev: replace bus specific struct with generic dev
@ 2018-07-04 8:51 4% ` Pablo de Lara
2018-07-04 8:51 4% ` [dpdk-dev] [PATCH v4 08/16] cryptodev: define value for unlimited sessions Pablo de Lara
` (3 subsequent siblings)
4 siblings, 0 replies; 200+ results
From: Pablo de Lara @ 2018-07-04 8:51 UTC (permalink / raw)
To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
Cc: dev, Pablo de Lara
Structure rte_cryptodev_info has currently PCI device
information ("struct rte_pci_device") in it.
This information is not generic to all devices,
so this gets replaced with the generic "rte_device" structure,
compatible with all crypto devices.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
doc/guides/prog_guide/cryptodev_lib.rst | 2 +-
doc/guides/rel_notes/deprecation.rst | 2 --
doc/guides/rel_notes/release_18_08.rst | 5 ++++-
drivers/crypto/qat/qat_sym_pmd.c | 1 -
drivers/crypto/virtio/virtio_cryptodev.c | 1 -
lib/librte_cryptodev/rte_cryptodev.c | 1 +
lib/librte_cryptodev/rte_cryptodev.h | 6 +++---
7 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst
index 30f0bcf7a..d02bb7514 100644
--- a/doc/guides/prog_guide/cryptodev_lib.rst
+++ b/doc/guides/prog_guide/cryptodev_lib.rst
@@ -269,7 +269,7 @@ relevant information for the device.
struct rte_cryptodev_info {
const char *driver_name;
uint8_t driver_id;
- struct rte_pci_device *pci_dev;
+ struct rte_device *device;
uint64_t feature_flags;
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 1ce692eac..b71080bb8 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -104,8 +104,6 @@ Deprecation Notices
- Removal of ``sym`` structure in ``rte_cryptodev_info`` structure,
containing fields not relevant anymore since the session mempool
is not internal in the crypto device anymore.
- - Replacement of ``pci_dev`` field with the more generic ``rte_device``
- structure.
- Functions ``rte_cryptodev_queue_pair_attach_sym_session()`` and
``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
18.05 and removed in 18.08, as there are no drivers doing anything useful
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index bc0124295..6bf53dc31 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -60,6 +60,9 @@ API Changes
Also, make sure to start the actual text at the margin.
=========================================================
+* cryptodev: In struct ``struct rte_cryptodev_info``, field ``rte_pci_device *pci_dev``
+ has been replaced with field ``struct rte_device *device``.
+
ABI Changes
-----------
@@ -118,7 +121,7 @@ The libraries prepended with a plus sign were incremented in this version.
librte_cmdline.so.2
librte_common_octeontx.so.1
librte_compressdev.so.1
- librte_cryptodev.so.4
+ + librte_cryptodev.so.5
librte_distributor.so.1
librte_eal.so.7
librte_ethdev.so.9
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index 115639089..0bc042a75 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -74,7 +74,6 @@ static void qat_sym_dev_info_get(struct rte_cryptodev *dev,
info->capabilities = internals->qat_dev_capabilities;
info->sym.max_nb_sessions = QAT_SYM_PMD_MAX_NB_SESSIONS;
info->driver_id = cryptodev_qat_driver_id;
- info->pci_dev = RTE_DEV_TO_PCI(dev->device);
}
}
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index df88953f6..482edea1a 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -1409,7 +1409,6 @@ virtio_crypto_dev_info_get(struct rte_cryptodev *dev,
if (info != NULL) {
info->driver_id = cryptodev_virtio_driver_id;
- info->pci_dev = RTE_DEV_TO_PCI(dev->device);
info->feature_flags = dev->feature_flags;
info->max_nb_queue_pairs = hw->max_dataqueues;
info->sym.max_nb_sessions =
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 7e5821246..457ac5670 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -966,6 +966,7 @@ rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info)
(*dev->dev_ops->dev_infos_get)(dev, dev_info);
dev_info->driver_name = dev->device->driver->name;
+ dev_info->device = dev->device;
}
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index ccc0f73fd..6b5f32bda 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -334,9 +334,9 @@ rte_cryptodev_get_feature_name(uint64_t flag);
/** Crypto device information */
struct rte_cryptodev_info {
- const char *driver_name; /**< Driver name. */
- uint8_t driver_id; /**< Driver identifier */
- struct rte_pci_device *pci_dev; /**< PCI information. */
+ const char *driver_name; /**< Driver name. */
+ uint8_t driver_id; /**< Driver identifier */
+ struct rte_device *device; /**< Generic device information. */
uint64_t feature_flags;
/**< Feature flags exposes HW/SW features for the given device */
--
2.14.4
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH v1 1/3] cryptodev: add min headroom and tailroom requirement
@ 2018-07-04 13:55 5% ` Anoob Joseph
2018-07-10 10:26 0% ` De Lara Guarch, Pablo
1 sibling, 1 reply; 200+ results
From: Anoob Joseph @ 2018-07-04 13:55 UTC (permalink / raw)
To: Declan Doherty, Pablo de Lara
Cc: Anoob Joseph, Akhil Goyal, Ankur Dwivedi, Jerin Jacob,
Narayana Prasad, dev
Enabling crypto devs to specify the minimum headroom and tailroom it
expects in the mbuf. For net PMDs, standard headroom has to be honoured
by applications, which is not strictly followed for crypto devs. This
prevents crypto devs from using free space in mbuf (available as
head/tailroom) for internal requirements in crypto operations. Addition
of head/tailroom requirement will help PMDs to communicate such
requirements to the application.
The availability and use of head/tailroom is an optimization if the
hardware supports use of head/tailroom for crypto-op info. For devices
that do not support using the head/tailroom, they can continue to operate
without any performance-drop.
Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
---
v1:
* Removed deprecation notice
* Updated release note
* Renamed new fields to have 'mbuf' in the name
* Changed the type of new fields to uint16_t (instead of uint32_t)
doc/guides/rel_notes/release_18_08.rst | 6 ++++++
lib/librte_cryptodev/rte_cryptodev.h | 6 ++++++
2 files changed, 12 insertions(+)
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 5bc23c5..fae0d26 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -70,6 +70,12 @@ ABI Changes
Also, make sure to start the actual text at the margin.
=========================================================
+* cryptodev: Additional fields in rte_cryptodev_info.
+
+ Two new fields of type ``uint16_t`` added in ``rte_cryptodev_info``
+ structure: ``min_mbuf_headroom_req`` and ``min_mbuf_tailroom_req``. These
+ parameters specify the recommended headroom and tailroom for mbufs to be
+ processed by the PMD.
Removed Items
-------------
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 92ce6d4..4e5b5b4 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -382,6 +382,12 @@ struct rte_cryptodev_info {
unsigned max_nb_queue_pairs;
/**< Maximum number of queues pairs supported by device. */
+ uint16_t min_mbuf_headroom_req;
+ /**< Minimum mbuf headroom required by device */
+
+ uint16_t min_mbuf_tailroom_req;
+ /**< Minimum mbuf tailroom required by device */
+
struct {
unsigned max_nb_sessions;
/**< Maximum number of sessions supported by device. */
--
2.7.4
^ permalink raw reply [relevance 5%]
* Re: [dpdk-dev] [PATCH v3 13/16] cryptodev: replace mbuf scatter gather flag
2018-06-28 0:53 3% ` [dpdk-dev] [PATCH v3 13/16] cryptodev: replace mbuf scatter gather flag Pablo de Lara
@ 2018-07-04 12:57 0% ` Akhil Goyal
0 siblings, 0 replies; 200+ results
From: Akhil Goyal @ 2018-07-04 12:57 UTC (permalink / raw)
To: Pablo de Lara, declan.doherty, shally.verma, ravi1.kumar,
jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
Cc: dev
Hi Pablo,
On 6/28/2018 6:23 AM, Pablo de Lara wrote:
> The current mbuf scatter gatter feature flag is
> too ambiguous, as it is not clear if input and/or output
> buffers can be scatter gather mbufs or not, plus
> if in-place and/or out-of-place is supported.
>
> Therefore, five new flags will replace this flag:
> - RTE_CRYPTODEV_FF_IN_PLACE_SGL
> - RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT
> - RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT
> - RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT
> - RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT
It is better to have OOP instead of OUT_OF_PLACE and IP for INPLACE?
I guess RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT is supported in most
of the drivers which support OOP, I can see some of them are missing.
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
> doc/guides/rel_notes/deprecation.rst | 2 --
> doc/guides/rel_notes/release_18_08.rst | 8 +++++
> drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 2 +-
> drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 6 +++-
> drivers/crypto/dpaa_sec/dpaa_sec.c | 6 +++-
> drivers/crypto/null/null_crypto_pmd.c | 2 +-
> drivers/crypto/openssl/rte_openssl_pmd.c | 2 +-
> drivers/crypto/qat/qat_sym_pmd.c | 6 +++-
> lib/librte_cryptodev/rte_cryptodev.c | 12 ++++++--
> lib/librte_cryptodev/rte_cryptodev.h | 46 +++++++++++++++++++----------
> test/test/test_cryptodev.c | 31 +++++++++++++------
> test/test/test_cryptodev_blockcipher.c | 21 ++++++++++---
> 12 files changed, 106 insertions(+), 38 deletions(-)
>
> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> index 9a73b1d8e..62d635b74 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -105,5 +105,3 @@ Deprecation Notices
> ``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
> 18.05 and removed in 18.08, as there are no drivers doing anything useful
> with them.
> - - Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
> - so some will be replaced by more explicit flags.
> diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
> index e482d3d5f..2a136d88c 100644
> --- a/doc/guides/rel_notes/release_18_08.rst
> +++ b/doc/guides/rel_notes/release_18_08.rst
> @@ -78,6 +78,14 @@ API Changes
> - ``rte_cryptodev_get_private_session_size`` is replaced with
> ``rte_cryptodev_sym_get_private_session_size``
>
> +* cryptodev: Feature flag ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` is
> + replaced with the following more explicit flags:
> + - ``RTE_CRYPTODEV_FF_IN_PLACE_SGL``
> + - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT``
> + - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT``
> + - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT``
> + - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT``
> +
>
> ABI Changes
> -----------
> diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
> index cd5b1952b..03917f220 100644
> --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
> +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
> @@ -492,7 +492,7 @@ aesni_gcm_create(const char *name,
> dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
> RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
> RTE_CRYPTODEV_FF_CPU_AESNI |
> - RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
> + RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT;
RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT ??
>
> switch (vector_mode) {
> case RTE_AESNI_GCM_SSE:
> diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
> index 1b1c30d85..4daee5f59 100644
> --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
> +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
> @@ -2762,7 +2762,11 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev)
> RTE_CRYPTODEV_FF_HW_ACCELERATED |
> RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
> RTE_CRYPTODEV_FF_SECURITY |
> - RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
> + RTE_CRYPTODEV_FF_IN_PLACE_SGL |
> + RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT |
> + RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT |
> + RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT |
> + RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT;
>
> internals = cryptodev->data->dev_private;
>
> diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
> index b96552c57..8ad25f2be 100644
> --- a/drivers/crypto/dpaa_sec/dpaa_sec.c
> +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
> @@ -2271,7 +2271,11 @@ dpaa_sec_dev_init(struct rte_cryptodev *cryptodev)
> RTE_CRYPTODEV_FF_HW_ACCELERATED |
> RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
> RTE_CRYPTODEV_FF_SECURITY |
> - RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
> + RTE_CRYPTODEV_FF_IN_PLACE_SGL |
> + RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT |
> + RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT |
> + RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT |
> + RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT;
>
> internals = cryptodev->data->dev_private;
> internals->max_nb_queue_pairs = RTE_DPAA_MAX_NB_SEC_QPS;
> diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
> index 478ac0b62..224ba7233 100644
> --- a/drivers/crypto/null/null_crypto_pmd.c
> +++ b/drivers/crypto/null/null_crypto_pmd.c
> @@ -177,7 +177,7 @@ cryptodev_null_create(const char *name,
>
> dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
> RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
> - RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
> + RTE_CRYPTODEV_FF_IN_PLACE_SGL;
>
> internals = dev->data->dev_private;
>
> diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
> index 972e2adfe..94b6e2de9 100644
> --- a/drivers/crypto/openssl/rte_openssl_pmd.c
> +++ b/drivers/crypto/openssl/rte_openssl_pmd.c
> @@ -1660,7 +1660,7 @@ cryptodev_openssl_create(const char *name,
> dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
> RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
> RTE_CRYPTODEV_FF_CPU_AESNI |
> - RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
> + RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT;
RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT is supported here.
^ permalink raw reply [relevance 0%]
* [dpdk-dev] [PATCH v2] security: remove experimental tag from security APIs
2018-07-04 7:54 11% [dpdk-dev] [PATCH] security: remove experimental tag from security APIs Hemant Agrawal
@ 2018-07-04 9:05 11% ` Hemant Agrawal
0 siblings, 0 replies; 200+ results
From: Hemant Agrawal @ 2018-07-04 9:05 UTC (permalink / raw)
To: radu.nicolau, akhil.goyal, declan.doherty, pablo.de.lara.guarch, borisp
Cc: dev
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
v2: fix the release version
doc/guides/rel_notes/release_18_08.rst | 7 +++++++
lib/librte_security/rte_security.c | 18 +++++++++---------
lib/librte_security/rte_security.h | 28 +++++++++++++---------------
lib/librte_security/rte_security_driver.h | 2 --
lib/librte_security/rte_security_version.map | 2 +-
5 files changed, 30 insertions(+), 27 deletions(-)
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index bc01242..355e8e2 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -60,6 +60,13 @@ API Changes
Also, make sure to start the actual text at the margin.
=========================================================
+* security : No longer marked as experimental.
+
+ The security functions are no longer marked as experimental, and have
+ become part of the normal DPDK API and ABI. Any future ABI changes will be
+ announced at least one release before the ABI change is made. There are no
+ ABI breaking changes planned.
+
ABI Changes
-----------
diff --git a/lib/librte_security/rte_security.c b/lib/librte_security/rte_security.c
index f36a8a0..9f848a2 100644
--- a/lib/librte_security/rte_security.c
+++ b/lib/librte_security/rte_security.c
@@ -10,7 +10,7 @@
#include "rte_security_driver.h"
struct rte_security_session *
-__rte_experimental rte_security_session_create(struct rte_security_ctx *instance,
+rte_security_session_create(struct rte_security_ctx *instance,
struct rte_security_session_conf *conf,
struct rte_mempool *mp)
{
@@ -33,7 +33,7 @@ __rte_experimental rte_security_session_create(struct rte_security_ctx *instance
return sess;
}
-int __rte_experimental
+int
rte_security_session_update(struct rte_security_ctx *instance,
struct rte_security_session *sess,
struct rte_security_session_conf *conf)
@@ -42,14 +42,14 @@ rte_security_session_update(struct rte_security_ctx *instance,
return instance->ops->session_update(instance->device, sess, conf);
}
-unsigned int __rte_experimental
+unsigned int
rte_security_session_get_size(struct rte_security_ctx *instance)
{
RTE_FUNC_PTR_OR_ERR_RET(*instance->ops->session_get_size, 0);
return instance->ops->session_get_size(instance->device);
}
-int __rte_experimental
+int
rte_security_session_stats_get(struct rte_security_ctx *instance,
struct rte_security_session *sess,
struct rte_security_stats *stats)
@@ -58,7 +58,7 @@ rte_security_session_stats_get(struct rte_security_ctx *instance,
return instance->ops->session_stats_get(instance->device, sess, stats);
}
-int __rte_experimental
+int
rte_security_session_destroy(struct rte_security_ctx *instance,
struct rte_security_session *sess)
{
@@ -77,7 +77,7 @@ rte_security_session_destroy(struct rte_security_ctx *instance,
return ret;
}
-int __rte_experimental
+int
rte_security_set_pkt_metadata(struct rte_security_ctx *instance,
struct rte_security_session *sess,
struct rte_mbuf *m, void *params)
@@ -87,7 +87,7 @@ rte_security_set_pkt_metadata(struct rte_security_ctx *instance,
sess, m, params);
}
-void * __rte_experimental
+void *
rte_security_get_userdata(struct rte_security_ctx *instance, uint64_t md)
{
void *userdata = NULL;
@@ -99,14 +99,14 @@ rte_security_get_userdata(struct rte_security_ctx *instance, uint64_t md)
return userdata;
}
-const struct rte_security_capability * __rte_experimental
+const struct rte_security_capability *
rte_security_capabilities_get(struct rte_security_ctx *instance)
{
RTE_FUNC_PTR_OR_ERR_RET(*instance->ops->capabilities_get, NULL);
return instance->ops->capabilities_get(instance->device);
}
-const struct rte_security_capability * __rte_experimental
+const struct rte_security_capability *
rte_security_capability_get(struct rte_security_ctx *instance,
struct rte_security_capability_idx *idx)
{
diff --git a/lib/librte_security/rte_security.h b/lib/librte_security/rte_security.h
index b0d1b97..89dd073 100644
--- a/lib/librte_security/rte_security.h
+++ b/lib/librte_security/rte_security.h
@@ -8,8 +8,6 @@
/**
* @file rte_security.h
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* RTE Security Common Definitions
*
*/
@@ -269,7 +267,7 @@ struct rte_security_session {
* - On success, pointer to session
* - On failure, NULL
*/
-struct rte_security_session * __rte_experimental
+struct rte_security_session *
rte_security_session_create(struct rte_security_ctx *instance,
struct rte_security_session_conf *conf,
struct rte_mempool *mp);
@@ -284,7 +282,7 @@ rte_security_session_create(struct rte_security_ctx *instance,
* - On success returns 0
* - On failure return errno
*/
-int __rte_experimental
+int
rte_security_session_update(struct rte_security_ctx *instance,
struct rte_security_session *sess,
struct rte_security_session_conf *conf);
@@ -298,7 +296,7 @@ rte_security_session_update(struct rte_security_ctx *instance,
* - Size of the private data, if successful
* - 0 if device is invalid or does not support the operation.
*/
-unsigned int __rte_experimental
+unsigned int
rte_security_session_get_size(struct rte_security_ctx *instance);
/**
@@ -313,7 +311,7 @@ rte_security_session_get_size(struct rte_security_ctx *instance);
* - -EINVAL if session is NULL.
* - -EBUSY if not all device private data has been freed.
*/
-int __rte_experimental
+int
rte_security_session_destroy(struct rte_security_ctx *instance,
struct rte_security_session *sess);
@@ -330,7 +328,7 @@ rte_security_session_destroy(struct rte_security_ctx *instance,
* - On success, zero.
* - On failure, a negative value.
*/
-int __rte_experimental
+int
rte_security_set_pkt_metadata(struct rte_security_ctx *instance,
struct rte_security_session *sess,
struct rte_mbuf *mb, void *params);
@@ -352,7 +350,7 @@ rte_security_set_pkt_metadata(struct rte_security_ctx *instance,
* - On success, userdata
* - On failure, NULL
*/
-void * __rte_experimental
+void *
rte_security_get_userdata(struct rte_security_ctx *instance, uint64_t md);
/**
@@ -361,7 +359,7 @@ rte_security_get_userdata(struct rte_security_ctx *instance, uint64_t md);
* @param sym_op crypto operation
* @param sess security session
*/
-static inline int __rte_experimental
+static inline int
__rte_security_attach_session(struct rte_crypto_sym_op *sym_op,
struct rte_security_session *sess)
{
@@ -370,13 +368,13 @@ __rte_security_attach_session(struct rte_crypto_sym_op *sym_op,
return 0;
}
-static inline void * __rte_experimental
+static inline void *
get_sec_session_private_data(const struct rte_security_session *sess)
{
return sess->sess_private_data;
}
-static inline void __rte_experimental
+static inline void
set_sec_session_private_data(struct rte_security_session *sess,
void *private_data)
{
@@ -392,7 +390,7 @@ set_sec_session_private_data(struct rte_security_session *sess,
* @param op crypto operation
* @param sess security session
*/
-static inline int __rte_experimental
+static inline int
rte_security_attach_session(struct rte_crypto_op *op,
struct rte_security_session *sess)
{
@@ -434,7 +432,7 @@ struct rte_security_stats {
* - On success return 0
* - On failure errno
*/
-int __rte_experimental
+int
rte_security_session_stats_get(struct rte_security_ctx *instance,
struct rte_security_session *sess,
struct rte_security_stats *stats);
@@ -518,7 +516,7 @@ struct rte_security_capability_idx {
* - Returns array of security capabilities.
* - Return NULL if no capabilities available.
*/
-const struct rte_security_capability * __rte_experimental
+const struct rte_security_capability *
rte_security_capabilities_get(struct rte_security_ctx *instance);
/**
@@ -532,7 +530,7 @@ rte_security_capabilities_get(struct rte_security_ctx *instance);
* index criteria.
* - Return NULL if the capability not matched on security instance.
*/
-const struct rte_security_capability * __rte_experimental
+const struct rte_security_capability *
rte_security_capability_get(struct rte_security_ctx *instance,
struct rte_security_capability_idx *idx);
diff --git a/lib/librte_security/rte_security_driver.h b/lib/librte_security/rte_security_driver.h
index 42f42ff..b627b0c 100644
--- a/lib/librte_security/rte_security_driver.h
+++ b/lib/librte_security/rte_security_driver.h
@@ -8,8 +8,6 @@
/**
* @file rte_security_driver.h
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* RTE Security Common Definitions
*
*/
diff --git a/lib/librte_security/rte_security_version.map b/lib/librte_security/rte_security_version.map
index 5a1c8ae..6aaabe4 100644
--- a/lib/librte_security/rte_security_version.map
+++ b/lib/librte_security/rte_security_version.map
@@ -1,4 +1,4 @@
-EXPERIMENTAL {
+DPDK_18.08 {
global:
rte_security_attach_session;
--
2.7.4
^ permalink raw reply [relevance 11%]
* [dpdk-dev] [PATCH] security: remove experimental tag from security APIs
@ 2018-07-04 7:54 11% Hemant Agrawal
2018-07-04 9:05 11% ` [dpdk-dev] [PATCH v2] " Hemant Agrawal
0 siblings, 1 reply; 200+ results
From: Hemant Agrawal @ 2018-07-04 7:54 UTC (permalink / raw)
To: radu.nicolau, akhil.goyal, declan.doherty, borisp; +Cc: dev
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
doc/guides/rel_notes/release_18_08.rst | 7 +++++++
lib/librte_security/rte_security.c | 18 +++++++++---------
lib/librte_security/rte_security.h | 28 +++++++++++++---------------
lib/librte_security/rte_security_driver.h | 2 --
lib/librte_security/rte_security_version.map | 2 +-
5 files changed, 30 insertions(+), 27 deletions(-)
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index bc01242..355e8e2 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -60,6 +60,13 @@ API Changes
Also, make sure to start the actual text at the margin.
=========================================================
+* security : No longer marked as experimental.
+
+ The security functions are no longer marked as experimental, and have
+ become part of the normal DPDK API and ABI. Any future ABI changes will be
+ announced at least one release before the ABI change is made. There are no
+ ABI breaking changes planned.
+
ABI Changes
-----------
diff --git a/lib/librte_security/rte_security.c b/lib/librte_security/rte_security.c
index f36a8a0..9f848a2 100644
--- a/lib/librte_security/rte_security.c
+++ b/lib/librte_security/rte_security.c
@@ -10,7 +10,7 @@
#include "rte_security_driver.h"
struct rte_security_session *
-__rte_experimental rte_security_session_create(struct rte_security_ctx *instance,
+rte_security_session_create(struct rte_security_ctx *instance,
struct rte_security_session_conf *conf,
struct rte_mempool *mp)
{
@@ -33,7 +33,7 @@ __rte_experimental rte_security_session_create(struct rte_security_ctx *instance
return sess;
}
-int __rte_experimental
+int
rte_security_session_update(struct rte_security_ctx *instance,
struct rte_security_session *sess,
struct rte_security_session_conf *conf)
@@ -42,14 +42,14 @@ rte_security_session_update(struct rte_security_ctx *instance,
return instance->ops->session_update(instance->device, sess, conf);
}
-unsigned int __rte_experimental
+unsigned int
rte_security_session_get_size(struct rte_security_ctx *instance)
{
RTE_FUNC_PTR_OR_ERR_RET(*instance->ops->session_get_size, 0);
return instance->ops->session_get_size(instance->device);
}
-int __rte_experimental
+int
rte_security_session_stats_get(struct rte_security_ctx *instance,
struct rte_security_session *sess,
struct rte_security_stats *stats)
@@ -58,7 +58,7 @@ rte_security_session_stats_get(struct rte_security_ctx *instance,
return instance->ops->session_stats_get(instance->device, sess, stats);
}
-int __rte_experimental
+int
rte_security_session_destroy(struct rte_security_ctx *instance,
struct rte_security_session *sess)
{
@@ -77,7 +77,7 @@ rte_security_session_destroy(struct rte_security_ctx *instance,
return ret;
}
-int __rte_experimental
+int
rte_security_set_pkt_metadata(struct rte_security_ctx *instance,
struct rte_security_session *sess,
struct rte_mbuf *m, void *params)
@@ -87,7 +87,7 @@ rte_security_set_pkt_metadata(struct rte_security_ctx *instance,
sess, m, params);
}
-void * __rte_experimental
+void *
rte_security_get_userdata(struct rte_security_ctx *instance, uint64_t md)
{
void *userdata = NULL;
@@ -99,14 +99,14 @@ rte_security_get_userdata(struct rte_security_ctx *instance, uint64_t md)
return userdata;
}
-const struct rte_security_capability * __rte_experimental
+const struct rte_security_capability *
rte_security_capabilities_get(struct rte_security_ctx *instance)
{
RTE_FUNC_PTR_OR_ERR_RET(*instance->ops->capabilities_get, NULL);
return instance->ops->capabilities_get(instance->device);
}
-const struct rte_security_capability * __rte_experimental
+const struct rte_security_capability *
rte_security_capability_get(struct rte_security_ctx *instance,
struct rte_security_capability_idx *idx)
{
diff --git a/lib/librte_security/rte_security.h b/lib/librte_security/rte_security.h
index b0d1b97..89dd073 100644
--- a/lib/librte_security/rte_security.h
+++ b/lib/librte_security/rte_security.h
@@ -8,8 +8,6 @@
/**
* @file rte_security.h
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* RTE Security Common Definitions
*
*/
@@ -269,7 +267,7 @@ struct rte_security_session {
* - On success, pointer to session
* - On failure, NULL
*/
-struct rte_security_session * __rte_experimental
+struct rte_security_session *
rte_security_session_create(struct rte_security_ctx *instance,
struct rte_security_session_conf *conf,
struct rte_mempool *mp);
@@ -284,7 +282,7 @@ rte_security_session_create(struct rte_security_ctx *instance,
* - On success returns 0
* - On failure return errno
*/
-int __rte_experimental
+int
rte_security_session_update(struct rte_security_ctx *instance,
struct rte_security_session *sess,
struct rte_security_session_conf *conf);
@@ -298,7 +296,7 @@ rte_security_session_update(struct rte_security_ctx *instance,
* - Size of the private data, if successful
* - 0 if device is invalid or does not support the operation.
*/
-unsigned int __rte_experimental
+unsigned int
rte_security_session_get_size(struct rte_security_ctx *instance);
/**
@@ -313,7 +311,7 @@ rte_security_session_get_size(struct rte_security_ctx *instance);
* - -EINVAL if session is NULL.
* - -EBUSY if not all device private data has been freed.
*/
-int __rte_experimental
+int
rte_security_session_destroy(struct rte_security_ctx *instance,
struct rte_security_session *sess);
@@ -330,7 +328,7 @@ rte_security_session_destroy(struct rte_security_ctx *instance,
* - On success, zero.
* - On failure, a negative value.
*/
-int __rte_experimental
+int
rte_security_set_pkt_metadata(struct rte_security_ctx *instance,
struct rte_security_session *sess,
struct rte_mbuf *mb, void *params);
@@ -352,7 +350,7 @@ rte_security_set_pkt_metadata(struct rte_security_ctx *instance,
* - On success, userdata
* - On failure, NULL
*/
-void * __rte_experimental
+void *
rte_security_get_userdata(struct rte_security_ctx *instance, uint64_t md);
/**
@@ -361,7 +359,7 @@ rte_security_get_userdata(struct rte_security_ctx *instance, uint64_t md);
* @param sym_op crypto operation
* @param sess security session
*/
-static inline int __rte_experimental
+static inline int
__rte_security_attach_session(struct rte_crypto_sym_op *sym_op,
struct rte_security_session *sess)
{
@@ -370,13 +368,13 @@ __rte_security_attach_session(struct rte_crypto_sym_op *sym_op,
return 0;
}
-static inline void * __rte_experimental
+static inline void *
get_sec_session_private_data(const struct rte_security_session *sess)
{
return sess->sess_private_data;
}
-static inline void __rte_experimental
+static inline void
set_sec_session_private_data(struct rte_security_session *sess,
void *private_data)
{
@@ -392,7 +390,7 @@ set_sec_session_private_data(struct rte_security_session *sess,
* @param op crypto operation
* @param sess security session
*/
-static inline int __rte_experimental
+static inline int
rte_security_attach_session(struct rte_crypto_op *op,
struct rte_security_session *sess)
{
@@ -434,7 +432,7 @@ struct rte_security_stats {
* - On success return 0
* - On failure errno
*/
-int __rte_experimental
+int
rte_security_session_stats_get(struct rte_security_ctx *instance,
struct rte_security_session *sess,
struct rte_security_stats *stats);
@@ -518,7 +516,7 @@ struct rte_security_capability_idx {
* - Returns array of security capabilities.
* - Return NULL if no capabilities available.
*/
-const struct rte_security_capability * __rte_experimental
+const struct rte_security_capability *
rte_security_capabilities_get(struct rte_security_ctx *instance);
/**
@@ -532,7 +530,7 @@ rte_security_capabilities_get(struct rte_security_ctx *instance);
* index criteria.
* - Return NULL if the capability not matched on security instance.
*/
-const struct rte_security_capability * __rte_experimental
+const struct rte_security_capability *
rte_security_capability_get(struct rte_security_ctx *instance,
struct rte_security_capability_idx *idx);
diff --git a/lib/librte_security/rte_security_driver.h b/lib/librte_security/rte_security_driver.h
index 42f42ff..b627b0c 100644
--- a/lib/librte_security/rte_security_driver.h
+++ b/lib/librte_security/rte_security_driver.h
@@ -8,8 +8,6 @@
/**
* @file rte_security_driver.h
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* RTE Security Common Definitions
*
*/
diff --git a/lib/librte_security/rte_security_version.map b/lib/librte_security/rte_security_version.map
index 5a1c8ae..6aaabe4 100644
--- a/lib/librte_security/rte_security_version.map
+++ b/lib/librte_security/rte_security_version.map
@@ -1,4 +1,4 @@
-EXPERIMENTAL {
+DPDK_18.06 {
global:
rte_security_attach_session;
--
2.7.4
^ permalink raw reply [relevance 11%]
* Re: [dpdk-dev] Compilation of MLX5 driver
2018-07-03 7:00 0% ` Asaf Sinai
@ 2018-07-03 11:15 0% ` Shahaf Shuler
2018-07-08 4:57 0% ` Asaf Sinai
0 siblings, 1 reply; 200+ results
From: Shahaf Shuler @ 2018-07-03 11:15 UTC (permalink / raw)
To: Asaf Sinai; +Cc: dev, Nitin Katiyar, Nélio Laranjeiro
Tuesday, July 3, 2018 10:01 AM, Asaf Sinai:
> Subject: Re: [dpdk-dev] Compilation of MLX5 driver
>
> Additional questions:
> Is it possible to use MLNX_OFED-4.3 on Ubuntu 12.04?
I am not sure if there is such build, the oldest OFED build I see is for ubuntu14.10. ubuntu12.04 is really old.
> Why is the driver related to OS version?
Because once you install MLNX_OFED it needs to backport patches, so the base version is important.
>
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Asaf Sinai
> Sent: Monday, July 2, 2018 05:22 PM
> To: Shahaf Shuler <shahafs@mellanox.com>
> Cc: dev@dpdk.org; Nitin Katiyar <nitin.katiyar@ericsson.com>; Nélio
> Laranjeiro <nelio.laranjeiro@6wind.com>
> Subject: Re: [dpdk-dev] Compilation of MLX5 driver
>
> Hi Shahaf,
>
> 1. Can you please explain what is the meaning of upstream-libs?
Upstream-libs means the DPDK works w/ rdma-core library instead of legacy verbs which exists only on Mellanox OFED.
> 2. We use Ubuntu 12.04. so if we would like to stay with it, and use
> MLNX_OFED-4.0, which latest DPDK version should be used?
That will be v17.05
>
> Thanks,
> Asaf
>
> -----Original Message-----
> From: Shahaf Shuler [mailto:shahafs@mellanox.com]
> Sent: Monday, July 2, 2018 05:11 PM
> To: Asaf Sinai <AsafSi@Radware.com>
> Cc: dev@dpdk.org; Nitin Katiyar <nitin.katiyar@ericsson.com>; Nélio
> Laranjeiro <nelio.laranjeiro@6wind.com>
> Subject: RE: [dpdk-dev] Compilation of MLX5 driver
>
> Hi Asaf,
>
> Monday, July 2, 2018 3:46 PM, Asaf Sinai:
> > Subject: RE: [dpdk-dev] Compilation of MLX5 driver
> >
> > Additional details:
> >
> > Ubuntu: 12.04.3
> > Linux: 3.2.0-53-virtual
> > GCC: 4.7.2 (Ubuntu/Linaro 4.7.2-11precise2)
> >
> > I tried to build DPDK 18.05 after installing the Mellanox OFED driver
>
> DPDK version 18.05 supports only upstream-libs (rdma-core).
>
> > (MLNX_OFED_LINUX-4.0-2.0.0.1-ubuntu12.04-x86_64), but it failed with
> > the mentioned error.
> > So I removed the OFED driver and installed the EN driver (mlnx-en-4.0-
> > 2.0.0.1-ubuntu12.04-x86_64), but it also failed with the same error.
> > Both drivers were compiled with "--dpdk" argument ("--upstream-libs"
> > is not supported).
>
> Yes MLNX_OFED-4.0 is too old for upstream libs. You should use
> MLNX_OFED-4.2 and above.
> Or alternatively use an older DPDK version (not recommended).
>
> >
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Asaf Sinai
> > Sent: Monday, July 2, 2018 03:20 PM
> > To: Shahaf Shuler <shahafs@mellanox.com>
> > Cc: dev@dpdk.org; Nitin Katiyar <nitin.katiyar@ericsson.com>; Nélio
> > Laranjeiro <nelio.laranjeiro@6wind.com>
> > Subject: Re: [dpdk-dev] Compilation of MLX5 driver
> >
> > Hi Shahaf,
> >
> > I face similar problem with DPDK 18.05, where missing file is "mlx5dv.h":
> >
> > == Build drivers/net/mlx5
> > CC mlx5.o
> > In file included from
> > /net/emcradware/CM_Users/asafsi/work/drivers/dpdk/dpdk-
> > 18.05/drivers/net/mlx5/mlx5.h:35:0,
> > from
> > /net/emcradware/CM_Users/asafsi/work/drivers/dpdk/dpdk-
> > 18.05/drivers/net/mlx5/mlx5.c:40:
> > /net/emcradware/CM_Users/asafsi/work/drivers/dpdk/dpdk-
> > 18.05/drivers/net/mlx5/mlx5_mr.h:19:31: fatal error: infiniband/mlx5dv.h:
> > No such file or directory
> > #include <infiniband/mlx5dv.h>
> > ^
> > compilation terminated.
> >
> > Can you please advise?
> >
> > Thanks,
> > Asaf
> >
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Nitin Katiyar
> > Sent: Thursday, May 31, 2018 02:44 PM
> > To: Nélio Laranjeiro <nelio.laranjeiro@6wind.com>
> > Cc: Shahaf Shuler <shahafs@mellanox.com>; dev@dpdk.org
> > Subject: Re: [dpdk-dev] Compilation of MLX5 driver
> >
> > Thanks Shahaf, it worked after removing the options you specified.
> >
> > Regards,
> > Nitin
> >
> > -----Original Message-----
> > From: Nélio Laranjeiro [mailto:nelio.laranjeiro@6wind.com]
> > Sent: Thursday, May 31, 2018 3:23 PM
> > To: Nitin Katiyar <nitin.katiyar@ericsson.com>
> > Cc: Shahaf Shuler <shahafs@mellanox.com>; dev@dpdk.org
> > Subject: Re: [dpdk-dev] Compilation of MLX5 driver
> >
> > On Thu, May 31, 2018 at 09:14:03AM +0000, Nitin Katiyar wrote:
> > > Yes,I installed it using --dpdk --upstream-libs. What is the way
> > > forward now?
> >
> > In v17.05 MLX5 PMD is still relying on libibverbs and libmlx5, the way
> > Those options you used are necessary to select in their package the
> > installation of
> > libverbs,libmlx5 or rdma-core.
> > Doing this you have selected rdma-core which is not supported in
> > v17.05 DPDK version.
> >
> > You need to install Mellanox OFED without those two options to select
> > libibverbs, libmlx5 to make it work.
> >
> > Regards,
> >
> > > Regards,
> > > Nitin
> > >
> > > -----Original Message-----
> > > From: Nélio Laranjeiro [mailto:nelio.laranjeiro@6wind.com]
> > > Sent: Thursday, May 31, 2018 1:36 PM
> > > To: Nitin Katiyar <nitin.katiyar@ericsson.com>
> > > Cc: Shahaf Shuler <shahafs@mellanox.com>; dev@dpdk.org
> > > Subject: Re: [dpdk-dev] Compilation of MLX5 driver
> > >
> > > On Thu, May 31, 2018 at 07:01:17AM +0000, Nitin Katiyar wrote:
> > > > Hi,
> > > > It has following files:
> > > >
> > > > arch.h ib.h kern-abi.h mlx4dv.h mlx5dv.h opcode.h sa.h
> > > > sa-kern-abi.h verbs.h
> > > >
> > > > I tried with both MLNX_OFED_LINUX-4.2-1.0.0.0 and
> > > > MLNX_OFED_LINUX-4.2-1.2.0.0-ubuntu14.04-x86_64
> > >
> > > Did you installed Mellanox OFED with the --dpdk --upstream-libs
> > arguments for the installation script?
> > >
> > > If it is the case, you should not add them for this version, those
> > > options are
> > for DPDK v17.11 and higher.
> > >
> > > Regards,
> > >
> > > > Regards,
> > > > Nitin
> > > >
> > > > -----Original Message-----
> > > > From: Shahaf Shuler [mailto:shahafs@mellanox.com]
> > > > Sent: Thursday, May 31, 2018 10:51 AM
> > > > To: Nitin Katiyar <nitin.katiyar@ericsson.com>; Nélio Laranjeiro
> > > > <nelio.laranjeiro@6wind.com>
> > > > Cc: dev@dpdk.org
> > > > Subject: RE: [dpdk-dev] Compilation of MLX5 driver
> > > >
> > > > Wednesday, May 30, 2018 7:45 PM, Nitin Katiyar:
> > > > >
> > > > > Hi,
> > > > > I was compiling 17.05.02.
> > > > > Regards,
> > > > > Nitin
> > > > >
> > > > > -----Original Message-----
> > > > > From: Nélio Laranjeiro [mailto:nelio.laranjeiro@6wind.com]
> > > > > Sent: Wednesday, May 30, 2018 6:42 PM
> > > > > To: Nitin Katiyar <nitin.katiyar@ericsson.com>
> > > > > Cc: dev@dpdk.org
> > > > > Subject: Re: [dpdk-dev] Compilation of MLX5 driver
> > > > >
> > > > > Hi,
> > > > >
> > > > > On Wed, May 30, 2018 at 11:54:31AM +0000, Nitin Katiyar wrote:
> > > > > > Hi,
> > > > > > I am trying to compile MLX5 PMD driver by setting
> > > > > "CONFIG_RTE_LIBRTE_MLX5_PMD=y" and hitting following
> compilation
> > > > > error.
> > > > > >
> > > > > > fatal error: infiniband/mlx5_hw.h: No such file or directory
> > > >
> > > > Can you list the files you have under /usr/include/infiniband ?
> > > >
> > > > > >
> > > > > > I have installed MLNX_OFED _LINUX-4.2-1.2.0 on my Ubuntu 14.04
> > > > > > machine
> > > > > but still hitting the same error. Am I missing some other package?
> > > > >
> > > > > Which version of DPDK are you using (it is important to help)?
> > > > >
> > > > > Regards,
> > > > >
> > > > > --
> > > > > Nélio Laranjeiro
> > > > > 6WIND
> > >
> > > --
> > > Nélio Laranjeiro
> > > 6WIND
> >
> > --
> > Nélio Laranjeiro
> > 6WIND
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] Compilation of MLX5 driver
2018-07-02 14:21 0% ` Asaf Sinai
@ 2018-07-03 7:00 0% ` Asaf Sinai
2018-07-03 11:15 0% ` Shahaf Shuler
0 siblings, 1 reply; 200+ results
From: Asaf Sinai @ 2018-07-03 7:00 UTC (permalink / raw)
To: Shahaf Shuler; +Cc: dev, Nitin Katiyar, Nélio Laranjeiro
Additional questions:
Is it possible to use MLNX_OFED-4.3 on Ubuntu 12.04?
Why is the driver related to OS version?
-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Asaf Sinai
Sent: Monday, July 2, 2018 05:22 PM
To: Shahaf Shuler <shahafs@mellanox.com>
Cc: dev@dpdk.org; Nitin Katiyar <nitin.katiyar@ericsson.com>; Nélio Laranjeiro <nelio.laranjeiro@6wind.com>
Subject: Re: [dpdk-dev] Compilation of MLX5 driver
Hi Shahaf,
1. Can you please explain what is the meaning of upstream-libs?
2. We use Ubuntu 12.04. so if we would like to stay with it, and use MLNX_OFED-4.0, which latest DPDK version should be used?
Thanks,
Asaf
-----Original Message-----
From: Shahaf Shuler [mailto:shahafs@mellanox.com]
Sent: Monday, July 2, 2018 05:11 PM
To: Asaf Sinai <AsafSi@Radware.com>
Cc: dev@dpdk.org; Nitin Katiyar <nitin.katiyar@ericsson.com>; Nélio Laranjeiro <nelio.laranjeiro@6wind.com>
Subject: RE: [dpdk-dev] Compilation of MLX5 driver
Hi Asaf,
Monday, July 2, 2018 3:46 PM, Asaf Sinai:
> Subject: RE: [dpdk-dev] Compilation of MLX5 driver
>
> Additional details:
>
> Ubuntu: 12.04.3
> Linux: 3.2.0-53-virtual
> GCC: 4.7.2 (Ubuntu/Linaro 4.7.2-11precise2)
>
> I tried to build DPDK 18.05 after installing the Mellanox OFED driver
DPDK version 18.05 supports only upstream-libs (rdma-core).
> (MLNX_OFED_LINUX-4.0-2.0.0.1-ubuntu12.04-x86_64), but it failed with
> the mentioned error.
> So I removed the OFED driver and installed the EN driver (mlnx-en-4.0-
> 2.0.0.1-ubuntu12.04-x86_64), but it also failed with the same error.
> Both drivers were compiled with "--dpdk" argument ("--upstream-libs"
> is not supported).
Yes MLNX_OFED-4.0 is too old for upstream libs. You should use MLNX_OFED-4.2 and above.
Or alternatively use an older DPDK version (not recommended).
>
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Asaf Sinai
> Sent: Monday, July 2, 2018 03:20 PM
> To: Shahaf Shuler <shahafs@mellanox.com>
> Cc: dev@dpdk.org; Nitin Katiyar <nitin.katiyar@ericsson.com>; Nélio
> Laranjeiro <nelio.laranjeiro@6wind.com>
> Subject: Re: [dpdk-dev] Compilation of MLX5 driver
>
> Hi Shahaf,
>
> I face similar problem with DPDK 18.05, where missing file is "mlx5dv.h":
>
> == Build drivers/net/mlx5
> CC mlx5.o
> In file included from
> /net/emcradware/CM_Users/asafsi/work/drivers/dpdk/dpdk-
> 18.05/drivers/net/mlx5/mlx5.h:35:0,
> from
> /net/emcradware/CM_Users/asafsi/work/drivers/dpdk/dpdk-
> 18.05/drivers/net/mlx5/mlx5.c:40:
> /net/emcradware/CM_Users/asafsi/work/drivers/dpdk/dpdk-
> 18.05/drivers/net/mlx5/mlx5_mr.h:19:31: fatal error: infiniband/mlx5dv.h:
> No such file or directory
> #include <infiniband/mlx5dv.h>
> ^
> compilation terminated.
>
> Can you please advise?
>
> Thanks,
> Asaf
>
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Nitin Katiyar
> Sent: Thursday, May 31, 2018 02:44 PM
> To: Nélio Laranjeiro <nelio.laranjeiro@6wind.com>
> Cc: Shahaf Shuler <shahafs@mellanox.com>; dev@dpdk.org
> Subject: Re: [dpdk-dev] Compilation of MLX5 driver
>
> Thanks Shahaf, it worked after removing the options you specified.
>
> Regards,
> Nitin
>
> -----Original Message-----
> From: Nélio Laranjeiro [mailto:nelio.laranjeiro@6wind.com]
> Sent: Thursday, May 31, 2018 3:23 PM
> To: Nitin Katiyar <nitin.katiyar@ericsson.com>
> Cc: Shahaf Shuler <shahafs@mellanox.com>; dev@dpdk.org
> Subject: Re: [dpdk-dev] Compilation of MLX5 driver
>
> On Thu, May 31, 2018 at 09:14:03AM +0000, Nitin Katiyar wrote:
> > Yes,I installed it using --dpdk --upstream-libs. What is the way
> > forward now?
>
> In v17.05 MLX5 PMD is still relying on libibverbs and libmlx5, the way
> Those options you used are necessary to select in their package the
> installation of
> libverbs,libmlx5 or rdma-core.
> Doing this you have selected rdma-core which is not supported in
> v17.05 DPDK version.
>
> You need to install Mellanox OFED without those two options to select
> libibverbs, libmlx5 to make it work.
>
> Regards,
>
> > Regards,
> > Nitin
> >
> > -----Original Message-----
> > From: Nélio Laranjeiro [mailto:nelio.laranjeiro@6wind.com]
> > Sent: Thursday, May 31, 2018 1:36 PM
> > To: Nitin Katiyar <nitin.katiyar@ericsson.com>
> > Cc: Shahaf Shuler <shahafs@mellanox.com>; dev@dpdk.org
> > Subject: Re: [dpdk-dev] Compilation of MLX5 driver
> >
> > On Thu, May 31, 2018 at 07:01:17AM +0000, Nitin Katiyar wrote:
> > > Hi,
> > > It has following files:
> > >
> > > arch.h ib.h kern-abi.h mlx4dv.h mlx5dv.h opcode.h sa.h
> > > sa-kern-abi.h verbs.h
> > >
> > > I tried with both MLNX_OFED_LINUX-4.2-1.0.0.0 and
> > > MLNX_OFED_LINUX-4.2-1.2.0.0-ubuntu14.04-x86_64
> >
> > Did you installed Mellanox OFED with the --dpdk --upstream-libs
> arguments for the installation script?
> >
> > If it is the case, you should not add them for this version, those
> > options are
> for DPDK v17.11 and higher.
> >
> > Regards,
> >
> > > Regards,
> > > Nitin
> > >
> > > -----Original Message-----
> > > From: Shahaf Shuler [mailto:shahafs@mellanox.com]
> > > Sent: Thursday, May 31, 2018 10:51 AM
> > > To: Nitin Katiyar <nitin.katiyar@ericsson.com>; Nélio Laranjeiro
> > > <nelio.laranjeiro@6wind.com>
> > > Cc: dev@dpdk.org
> > > Subject: RE: [dpdk-dev] Compilation of MLX5 driver
> > >
> > > Wednesday, May 30, 2018 7:45 PM, Nitin Katiyar:
> > > >
> > > > Hi,
> > > > I was compiling 17.05.02.
> > > > Regards,
> > > > Nitin
> > > >
> > > > -----Original Message-----
> > > > From: Nélio Laranjeiro [mailto:nelio.laranjeiro@6wind.com]
> > > > Sent: Wednesday, May 30, 2018 6:42 PM
> > > > To: Nitin Katiyar <nitin.katiyar@ericsson.com>
> > > > Cc: dev@dpdk.org
> > > > Subject: Re: [dpdk-dev] Compilation of MLX5 driver
> > > >
> > > > Hi,
> > > >
> > > > On Wed, May 30, 2018 at 11:54:31AM +0000, Nitin Katiyar wrote:
> > > > > Hi,
> > > > > I am trying to compile MLX5 PMD driver by setting
> > > > "CONFIG_RTE_LIBRTE_MLX5_PMD=y" and hitting following compilation
> > > > error.
> > > > >
> > > > > fatal error: infiniband/mlx5_hw.h: No such file or directory
> > >
> > > Can you list the files you have under /usr/include/infiniband ?
> > >
> > > > >
> > > > > I have installed MLNX_OFED _LINUX-4.2-1.2.0 on my Ubuntu 14.04
> > > > > machine
> > > > but still hitting the same error. Am I missing some other package?
> > > >
> > > > Which version of DPDK are you using (it is important to help)?
> > > >
> > > > Regards,
> > > >
> > > > --
> > > > Nélio Laranjeiro
> > > > 6WIND
> >
> > --
> > Nélio Laranjeiro
> > 6WIND
>
> --
> Nélio Laranjeiro
> 6WIND
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] Compilation of MLX5 driver
2018-07-02 14:10 0% ` Shahaf Shuler
@ 2018-07-02 14:21 0% ` Asaf Sinai
2018-07-03 7:00 0% ` Asaf Sinai
0 siblings, 1 reply; 200+ results
From: Asaf Sinai @ 2018-07-02 14:21 UTC (permalink / raw)
To: Shahaf Shuler; +Cc: dev, Nitin Katiyar, Nélio Laranjeiro
Hi Shahaf,
1. Can you please explain what is the meaning of upstream-libs?
2. We use Ubuntu 12.04. so if we would like to stay with it, and use MLNX_OFED-4.0, which latest DPDK version should be used?
Thanks,
Asaf
-----Original Message-----
From: Shahaf Shuler [mailto:shahafs@mellanox.com]
Sent: Monday, July 2, 2018 05:11 PM
To: Asaf Sinai <AsafSi@Radware.com>
Cc: dev@dpdk.org; Nitin Katiyar <nitin.katiyar@ericsson.com>; Nélio Laranjeiro <nelio.laranjeiro@6wind.com>
Subject: RE: [dpdk-dev] Compilation of MLX5 driver
Hi Asaf,
Monday, July 2, 2018 3:46 PM, Asaf Sinai:
> Subject: RE: [dpdk-dev] Compilation of MLX5 driver
>
> Additional details:
>
> Ubuntu: 12.04.3
> Linux: 3.2.0-53-virtual
> GCC: 4.7.2 (Ubuntu/Linaro 4.7.2-11precise2)
>
> I tried to build DPDK 18.05 after installing the Mellanox OFED driver
DPDK version 18.05 supports only upstream-libs (rdma-core).
> (MLNX_OFED_LINUX-4.0-2.0.0.1-ubuntu12.04-x86_64), but it failed with
> the mentioned error.
> So I removed the OFED driver and installed the EN driver (mlnx-en-4.0-
> 2.0.0.1-ubuntu12.04-x86_64), but it also failed with the same error.
> Both drivers were compiled with "--dpdk" argument ("--upstream-libs"
> is not supported).
Yes MLNX_OFED-4.0 is too old for upstream libs. You should use MLNX_OFED-4.2 and above.
Or alternatively use an older DPDK version (not recommended).
>
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Asaf Sinai
> Sent: Monday, July 2, 2018 03:20 PM
> To: Shahaf Shuler <shahafs@mellanox.com>
> Cc: dev@dpdk.org; Nitin Katiyar <nitin.katiyar@ericsson.com>; Nélio
> Laranjeiro <nelio.laranjeiro@6wind.com>
> Subject: Re: [dpdk-dev] Compilation of MLX5 driver
>
> Hi Shahaf,
>
> I face similar problem with DPDK 18.05, where missing file is "mlx5dv.h":
>
> == Build drivers/net/mlx5
> CC mlx5.o
> In file included from
> /net/emcradware/CM_Users/asafsi/work/drivers/dpdk/dpdk-
> 18.05/drivers/net/mlx5/mlx5.h:35:0,
> from
> /net/emcradware/CM_Users/asafsi/work/drivers/dpdk/dpdk-
> 18.05/drivers/net/mlx5/mlx5.c:40:
> /net/emcradware/CM_Users/asafsi/work/drivers/dpdk/dpdk-
> 18.05/drivers/net/mlx5/mlx5_mr.h:19:31: fatal error: infiniband/mlx5dv.h:
> No such file or directory
> #include <infiniband/mlx5dv.h>
> ^
> compilation terminated.
>
> Can you please advise?
>
> Thanks,
> Asaf
>
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Nitin Katiyar
> Sent: Thursday, May 31, 2018 02:44 PM
> To: Nélio Laranjeiro <nelio.laranjeiro@6wind.com>
> Cc: Shahaf Shuler <shahafs@mellanox.com>; dev@dpdk.org
> Subject: Re: [dpdk-dev] Compilation of MLX5 driver
>
> Thanks Shahaf, it worked after removing the options you specified.
>
> Regards,
> Nitin
>
> -----Original Message-----
> From: Nélio Laranjeiro [mailto:nelio.laranjeiro@6wind.com]
> Sent: Thursday, May 31, 2018 3:23 PM
> To: Nitin Katiyar <nitin.katiyar@ericsson.com>
> Cc: Shahaf Shuler <shahafs@mellanox.com>; dev@dpdk.org
> Subject: Re: [dpdk-dev] Compilation of MLX5 driver
>
> On Thu, May 31, 2018 at 09:14:03AM +0000, Nitin Katiyar wrote:
> > Yes,I installed it using --dpdk --upstream-libs. What is the way
> > forward now?
>
> In v17.05 MLX5 PMD is still relying on libibverbs and libmlx5, the way
> Those options you used are necessary to select in their package the
> installation of
> libverbs,libmlx5 or rdma-core.
> Doing this you have selected rdma-core which is not supported in
> v17.05 DPDK version.
>
> You need to install Mellanox OFED without those two options to select
> libibverbs, libmlx5 to make it work.
>
> Regards,
>
> > Regards,
> > Nitin
> >
> > -----Original Message-----
> > From: Nélio Laranjeiro [mailto:nelio.laranjeiro@6wind.com]
> > Sent: Thursday, May 31, 2018 1:36 PM
> > To: Nitin Katiyar <nitin.katiyar@ericsson.com>
> > Cc: Shahaf Shuler <shahafs@mellanox.com>; dev@dpdk.org
> > Subject: Re: [dpdk-dev] Compilation of MLX5 driver
> >
> > On Thu, May 31, 2018 at 07:01:17AM +0000, Nitin Katiyar wrote:
> > > Hi,
> > > It has following files:
> > >
> > > arch.h ib.h kern-abi.h mlx4dv.h mlx5dv.h opcode.h sa.h
> > > sa-kern-abi.h verbs.h
> > >
> > > I tried with both MLNX_OFED_LINUX-4.2-1.0.0.0 and
> > > MLNX_OFED_LINUX-4.2-1.2.0.0-ubuntu14.04-x86_64
> >
> > Did you installed Mellanox OFED with the --dpdk --upstream-libs
> arguments for the installation script?
> >
> > If it is the case, you should not add them for this version, those
> > options are
> for DPDK v17.11 and higher.
> >
> > Regards,
> >
> > > Regards,
> > > Nitin
> > >
> > > -----Original Message-----
> > > From: Shahaf Shuler [mailto:shahafs@mellanox.com]
> > > Sent: Thursday, May 31, 2018 10:51 AM
> > > To: Nitin Katiyar <nitin.katiyar@ericsson.com>; Nélio Laranjeiro
> > > <nelio.laranjeiro@6wind.com>
> > > Cc: dev@dpdk.org
> > > Subject: RE: [dpdk-dev] Compilation of MLX5 driver
> > >
> > > Wednesday, May 30, 2018 7:45 PM, Nitin Katiyar:
> > > >
> > > > Hi,
> > > > I was compiling 17.05.02.
> > > > Regards,
> > > > Nitin
> > > >
> > > > -----Original Message-----
> > > > From: Nélio Laranjeiro [mailto:nelio.laranjeiro@6wind.com]
> > > > Sent: Wednesday, May 30, 2018 6:42 PM
> > > > To: Nitin Katiyar <nitin.katiyar@ericsson.com>
> > > > Cc: dev@dpdk.org
> > > > Subject: Re: [dpdk-dev] Compilation of MLX5 driver
> > > >
> > > > Hi,
> > > >
> > > > On Wed, May 30, 2018 at 11:54:31AM +0000, Nitin Katiyar wrote:
> > > > > Hi,
> > > > > I am trying to compile MLX5 PMD driver by setting
> > > > "CONFIG_RTE_LIBRTE_MLX5_PMD=y" and hitting following compilation
> > > > error.
> > > > >
> > > > > fatal error: infiniband/mlx5_hw.h: No such file or directory
> > >
> > > Can you list the files you have under /usr/include/infiniband ?
> > >
> > > > >
> > > > > I have installed MLNX_OFED _LINUX-4.2-1.2.0 on my Ubuntu 14.04
> > > > > machine
> > > > but still hitting the same error. Am I missing some other package?
> > > >
> > > > Which version of DPDK are you using (it is important to help)?
> > > >
> > > > Regards,
> > > >
> > > > --
> > > > Nélio Laranjeiro
> > > > 6WIND
> >
> > --
> > Nélio Laranjeiro
> > 6WIND
>
> --
> Nélio Laranjeiro
> 6WIND
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] Compilation of MLX5 driver
2018-07-02 12:46 0% ` Asaf Sinai
@ 2018-07-02 14:10 0% ` Shahaf Shuler
2018-07-02 14:21 0% ` Asaf Sinai
0 siblings, 1 reply; 200+ results
From: Shahaf Shuler @ 2018-07-02 14:10 UTC (permalink / raw)
To: Asaf Sinai; +Cc: dev, Nitin Katiyar, Nélio Laranjeiro
Hi Asaf,
Monday, July 2, 2018 3:46 PM, Asaf Sinai:
> Subject: RE: [dpdk-dev] Compilation of MLX5 driver
>
> Additional details:
>
> Ubuntu: 12.04.3
> Linux: 3.2.0-53-virtual
> GCC: 4.7.2 (Ubuntu/Linaro 4.7.2-11precise2)
>
> I tried to build DPDK 18.05 after installing the Mellanox OFED driver
DPDK version 18.05 supports only upstream-libs (rdma-core).
> (MLNX_OFED_LINUX-4.0-2.0.0.1-ubuntu12.04-x86_64), but it failed with the
> mentioned error.
> So I removed the OFED driver and installed the EN driver (mlnx-en-4.0-
> 2.0.0.1-ubuntu12.04-x86_64), but it also failed with the same error.
> Both drivers were compiled with "--dpdk" argument ("--upstream-libs" is not
> supported).
Yes MLNX_OFED-4.0 is too old for upstream libs. You should use MLNX_OFED-4.2 and above.
Or alternatively use an older DPDK version (not recommended).
>
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Asaf Sinai
> Sent: Monday, July 2, 2018 03:20 PM
> To: Shahaf Shuler <shahafs@mellanox.com>
> Cc: dev@dpdk.org; Nitin Katiyar <nitin.katiyar@ericsson.com>; Nélio
> Laranjeiro <nelio.laranjeiro@6wind.com>
> Subject: Re: [dpdk-dev] Compilation of MLX5 driver
>
> Hi Shahaf,
>
> I face similar problem with DPDK 18.05, where missing file is "mlx5dv.h":
>
> == Build drivers/net/mlx5
> CC mlx5.o
> In file included from
> /net/emcradware/CM_Users/asafsi/work/drivers/dpdk/dpdk-
> 18.05/drivers/net/mlx5/mlx5.h:35:0,
> from
> /net/emcradware/CM_Users/asafsi/work/drivers/dpdk/dpdk-
> 18.05/drivers/net/mlx5/mlx5.c:40:
> /net/emcradware/CM_Users/asafsi/work/drivers/dpdk/dpdk-
> 18.05/drivers/net/mlx5/mlx5_mr.h:19:31: fatal error: infiniband/mlx5dv.h:
> No such file or directory
> #include <infiniband/mlx5dv.h>
> ^
> compilation terminated.
>
> Can you please advise?
>
> Thanks,
> Asaf
>
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Nitin Katiyar
> Sent: Thursday, May 31, 2018 02:44 PM
> To: Nélio Laranjeiro <nelio.laranjeiro@6wind.com>
> Cc: Shahaf Shuler <shahafs@mellanox.com>; dev@dpdk.org
> Subject: Re: [dpdk-dev] Compilation of MLX5 driver
>
> Thanks Shahaf, it worked after removing the options you specified.
>
> Regards,
> Nitin
>
> -----Original Message-----
> From: Nélio Laranjeiro [mailto:nelio.laranjeiro@6wind.com]
> Sent: Thursday, May 31, 2018 3:23 PM
> To: Nitin Katiyar <nitin.katiyar@ericsson.com>
> Cc: Shahaf Shuler <shahafs@mellanox.com>; dev@dpdk.org
> Subject: Re: [dpdk-dev] Compilation of MLX5 driver
>
> On Thu, May 31, 2018 at 09:14:03AM +0000, Nitin Katiyar wrote:
> > Yes,I installed it using --dpdk --upstream-libs. What is the way
> > forward now?
>
> In v17.05 MLX5 PMD is still relying on libibverbs and libmlx5, the way Those
> options you used are necessary to select in their package the installation of
> libverbs,libmlx5 or rdma-core.
> Doing this you have selected rdma-core which is not supported in v17.05
> DPDK version.
>
> You need to install Mellanox OFED without those two options to select
> libibverbs, libmlx5 to make it work.
>
> Regards,
>
> > Regards,
> > Nitin
> >
> > -----Original Message-----
> > From: Nélio Laranjeiro [mailto:nelio.laranjeiro@6wind.com]
> > Sent: Thursday, May 31, 2018 1:36 PM
> > To: Nitin Katiyar <nitin.katiyar@ericsson.com>
> > Cc: Shahaf Shuler <shahafs@mellanox.com>; dev@dpdk.org
> > Subject: Re: [dpdk-dev] Compilation of MLX5 driver
> >
> > On Thu, May 31, 2018 at 07:01:17AM +0000, Nitin Katiyar wrote:
> > > Hi,
> > > It has following files:
> > >
> > > arch.h ib.h kern-abi.h mlx4dv.h mlx5dv.h opcode.h sa.h
> > > sa-kern-abi.h verbs.h
> > >
> > > I tried with both MLNX_OFED_LINUX-4.2-1.0.0.0 and
> > > MLNX_OFED_LINUX-4.2-1.2.0.0-ubuntu14.04-x86_64
> >
> > Did you installed Mellanox OFED with the --dpdk --upstream-libs
> arguments for the installation script?
> >
> > If it is the case, you should not add them for this version, those options are
> for DPDK v17.11 and higher.
> >
> > Regards,
> >
> > > Regards,
> > > Nitin
> > >
> > > -----Original Message-----
> > > From: Shahaf Shuler [mailto:shahafs@mellanox.com]
> > > Sent: Thursday, May 31, 2018 10:51 AM
> > > To: Nitin Katiyar <nitin.katiyar@ericsson.com>; Nélio Laranjeiro
> > > <nelio.laranjeiro@6wind.com>
> > > Cc: dev@dpdk.org
> > > Subject: RE: [dpdk-dev] Compilation of MLX5 driver
> > >
> > > Wednesday, May 30, 2018 7:45 PM, Nitin Katiyar:
> > > >
> > > > Hi,
> > > > I was compiling 17.05.02.
> > > > Regards,
> > > > Nitin
> > > >
> > > > -----Original Message-----
> > > > From: Nélio Laranjeiro [mailto:nelio.laranjeiro@6wind.com]
> > > > Sent: Wednesday, May 30, 2018 6:42 PM
> > > > To: Nitin Katiyar <nitin.katiyar@ericsson.com>
> > > > Cc: dev@dpdk.org
> > > > Subject: Re: [dpdk-dev] Compilation of MLX5 driver
> > > >
> > > > Hi,
> > > >
> > > > On Wed, May 30, 2018 at 11:54:31AM +0000, Nitin Katiyar wrote:
> > > > > Hi,
> > > > > I am trying to compile MLX5 PMD driver by setting
> > > > "CONFIG_RTE_LIBRTE_MLX5_PMD=y" and hitting following compilation
> > > > error.
> > > > >
> > > > > fatal error: infiniband/mlx5_hw.h: No such file or directory
> > >
> > > Can you list the files you have under /usr/include/infiniband ?
> > >
> > > > >
> > > > > I have installed MLNX_OFED _LINUX-4.2-1.2.0 on my Ubuntu 14.04
> > > > > machine
> > > > but still hitting the same error. Am I missing some other package?
> > > >
> > > > Which version of DPDK are you using (it is important to help)?
> > > >
> > > > Regards,
> > > >
> > > > --
> > > > Nélio Laranjeiro
> > > > 6WIND
> >
> > --
> > Nélio Laranjeiro
> > 6WIND
>
> --
> Nélio Laranjeiro
> 6WIND
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] Compilation of MLX5 driver
2018-07-02 12:19 0% ` Asaf Sinai
@ 2018-07-02 12:46 0% ` Asaf Sinai
2018-07-02 14:10 0% ` Shahaf Shuler
0 siblings, 1 reply; 200+ results
From: Asaf Sinai @ 2018-07-02 12:46 UTC (permalink / raw)
To: Shahaf Shuler; +Cc: dev, Nitin Katiyar, Nélio Laranjeiro
Additional details:
Ubuntu: 12.04.3
Linux: 3.2.0-53-virtual
GCC: 4.7.2 (Ubuntu/Linaro 4.7.2-11precise2)
I tried to build DPDK 18.05 after installing the Mellanox OFED driver (MLNX_OFED_LINUX-4.0-2.0.0.1-ubuntu12.04-x86_64), but it failed with the mentioned error.
So I removed the OFED driver and installed the EN driver (mlnx-en-4.0-2.0.0.1-ubuntu12.04-x86_64), but it also failed with the same error.
Both drivers were compiled with "--dpdk" argument ("--upstream-libs" is not supported).
-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Asaf Sinai
Sent: Monday, July 2, 2018 03:20 PM
To: Shahaf Shuler <shahafs@mellanox.com>
Cc: dev@dpdk.org; Nitin Katiyar <nitin.katiyar@ericsson.com>; Nélio Laranjeiro <nelio.laranjeiro@6wind.com>
Subject: Re: [dpdk-dev] Compilation of MLX5 driver
Hi Shahaf,
I face similar problem with DPDK 18.05, where missing file is "mlx5dv.h":
== Build drivers/net/mlx5
CC mlx5.o
In file included from /net/emcradware/CM_Users/asafsi/work/drivers/dpdk/dpdk-18.05/drivers/net/mlx5/mlx5.h:35:0,
from /net/emcradware/CM_Users/asafsi/work/drivers/dpdk/dpdk-18.05/drivers/net/mlx5/mlx5.c:40:
/net/emcradware/CM_Users/asafsi/work/drivers/dpdk/dpdk-18.05/drivers/net/mlx5/mlx5_mr.h:19:31: fatal error: infiniband/mlx5dv.h: No such file or directory
#include <infiniband/mlx5dv.h>
^
compilation terminated.
Can you please advise?
Thanks,
Asaf
-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Nitin Katiyar
Sent: Thursday, May 31, 2018 02:44 PM
To: Nélio Laranjeiro <nelio.laranjeiro@6wind.com>
Cc: Shahaf Shuler <shahafs@mellanox.com>; dev@dpdk.org
Subject: Re: [dpdk-dev] Compilation of MLX5 driver
Thanks Shahaf, it worked after removing the options you specified.
Regards,
Nitin
-----Original Message-----
From: Nélio Laranjeiro [mailto:nelio.laranjeiro@6wind.com]
Sent: Thursday, May 31, 2018 3:23 PM
To: Nitin Katiyar <nitin.katiyar@ericsson.com>
Cc: Shahaf Shuler <shahafs@mellanox.com>; dev@dpdk.org
Subject: Re: [dpdk-dev] Compilation of MLX5 driver
On Thu, May 31, 2018 at 09:14:03AM +0000, Nitin Katiyar wrote:
> Yes,I installed it using --dpdk --upstream-libs. What is the way
> forward now?
In v17.05 MLX5 PMD is still relying on libibverbs and libmlx5, the way Those options you used are necessary to select in their package the installation of libverbs,libmlx5 or rdma-core.
Doing this you have selected rdma-core which is not supported in v17.05 DPDK version.
You need to install Mellanox OFED without those two options to select libibverbs, libmlx5 to make it work.
Regards,
> Regards,
> Nitin
>
> -----Original Message-----
> From: Nélio Laranjeiro [mailto:nelio.laranjeiro@6wind.com]
> Sent: Thursday, May 31, 2018 1:36 PM
> To: Nitin Katiyar <nitin.katiyar@ericsson.com>
> Cc: Shahaf Shuler <shahafs@mellanox.com>; dev@dpdk.org
> Subject: Re: [dpdk-dev] Compilation of MLX5 driver
>
> On Thu, May 31, 2018 at 07:01:17AM +0000, Nitin Katiyar wrote:
> > Hi,
> > It has following files:
> >
> > arch.h ib.h kern-abi.h mlx4dv.h mlx5dv.h opcode.h sa.h
> > sa-kern-abi.h verbs.h
> >
> > I tried with both MLNX_OFED_LINUX-4.2-1.0.0.0 and
> > MLNX_OFED_LINUX-4.2-1.2.0.0-ubuntu14.04-x86_64
>
> Did you installed Mellanox OFED with the --dpdk --upstream-libs arguments for the installation script?
>
> If it is the case, you should not add them for this version, those options are for DPDK v17.11 and higher.
>
> Regards,
>
> > Regards,
> > Nitin
> >
> > -----Original Message-----
> > From: Shahaf Shuler [mailto:shahafs@mellanox.com]
> > Sent: Thursday, May 31, 2018 10:51 AM
> > To: Nitin Katiyar <nitin.katiyar@ericsson.com>; Nélio Laranjeiro
> > <nelio.laranjeiro@6wind.com>
> > Cc: dev@dpdk.org
> > Subject: RE: [dpdk-dev] Compilation of MLX5 driver
> >
> > Wednesday, May 30, 2018 7:45 PM, Nitin Katiyar:
> > >
> > > Hi,
> > > I was compiling 17.05.02.
> > > Regards,
> > > Nitin
> > >
> > > -----Original Message-----
> > > From: Nélio Laranjeiro [mailto:nelio.laranjeiro@6wind.com]
> > > Sent: Wednesday, May 30, 2018 6:42 PM
> > > To: Nitin Katiyar <nitin.katiyar@ericsson.com>
> > > Cc: dev@dpdk.org
> > > Subject: Re: [dpdk-dev] Compilation of MLX5 driver
> > >
> > > Hi,
> > >
> > > On Wed, May 30, 2018 at 11:54:31AM +0000, Nitin Katiyar wrote:
> > > > Hi,
> > > > I am trying to compile MLX5 PMD driver by setting
> > > "CONFIG_RTE_LIBRTE_MLX5_PMD=y" and hitting following compilation
> > > error.
> > > >
> > > > fatal error: infiniband/mlx5_hw.h: No such file or directory
> >
> > Can you list the files you have under /usr/include/infiniband ?
> >
> > > >
> > > > I have installed MLNX_OFED _LINUX-4.2-1.2.0 on my Ubuntu 14.04
> > > > machine
> > > but still hitting the same error. Am I missing some other package?
> > >
> > > Which version of DPDK are you using (it is important to help)?
> > >
> > > Regards,
> > >
> > > --
> > > Nélio Laranjeiro
> > > 6WIND
>
> --
> Nélio Laranjeiro
> 6WIND
--
Nélio Laranjeiro
6WIND
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] Compilation of MLX5 driver
2018-05-31 11:44 0% ` Nitin Katiyar
@ 2018-07-02 12:19 0% ` Asaf Sinai
2018-07-02 12:46 0% ` Asaf Sinai
0 siblings, 1 reply; 200+ results
From: Asaf Sinai @ 2018-07-02 12:19 UTC (permalink / raw)
To: Shahaf Shuler; +Cc: dev, Nitin Katiyar, Nélio Laranjeiro
Hi Shahaf,
I face similar problem with DPDK 18.05, where missing file is "mlx5dv.h":
== Build drivers/net/mlx5
CC mlx5.o
In file included from /net/emcradware/CM_Users/asafsi/work/drivers/dpdk/dpdk-18.05/drivers/net/mlx5/mlx5.h:35:0,
from /net/emcradware/CM_Users/asafsi/work/drivers/dpdk/dpdk-18.05/drivers/net/mlx5/mlx5.c:40:
/net/emcradware/CM_Users/asafsi/work/drivers/dpdk/dpdk-18.05/drivers/net/mlx5/mlx5_mr.h:19:31: fatal error: infiniband/mlx5dv.h: No such file or directory
#include <infiniband/mlx5dv.h>
^
compilation terminated.
Can you please advise?
Thanks,
Asaf
-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Nitin Katiyar
Sent: Thursday, May 31, 2018 02:44 PM
To: Nélio Laranjeiro <nelio.laranjeiro@6wind.com>
Cc: Shahaf Shuler <shahafs@mellanox.com>; dev@dpdk.org
Subject: Re: [dpdk-dev] Compilation of MLX5 driver
Thanks Shahaf, it worked after removing the options you specified.
Regards,
Nitin
-----Original Message-----
From: Nélio Laranjeiro [mailto:nelio.laranjeiro@6wind.com]
Sent: Thursday, May 31, 2018 3:23 PM
To: Nitin Katiyar <nitin.katiyar@ericsson.com>
Cc: Shahaf Shuler <shahafs@mellanox.com>; dev@dpdk.org
Subject: Re: [dpdk-dev] Compilation of MLX5 driver
On Thu, May 31, 2018 at 09:14:03AM +0000, Nitin Katiyar wrote:
> Yes,I installed it using --dpdk --upstream-libs. What is the way
> forward now?
In v17.05 MLX5 PMD is still relying on libibverbs and libmlx5, the way Those options you used are necessary to select in their package the installation of libverbs,libmlx5 or rdma-core.
Doing this you have selected rdma-core which is not supported in v17.05 DPDK version.
You need to install Mellanox OFED without those two options to select libibverbs, libmlx5 to make it work.
Regards,
> Regards,
> Nitin
>
> -----Original Message-----
> From: Nélio Laranjeiro [mailto:nelio.laranjeiro@6wind.com]
> Sent: Thursday, May 31, 2018 1:36 PM
> To: Nitin Katiyar <nitin.katiyar@ericsson.com>
> Cc: Shahaf Shuler <shahafs@mellanox.com>; dev@dpdk.org
> Subject: Re: [dpdk-dev] Compilation of MLX5 driver
>
> On Thu, May 31, 2018 at 07:01:17AM +0000, Nitin Katiyar wrote:
> > Hi,
> > It has following files:
> >
> > arch.h ib.h kern-abi.h mlx4dv.h mlx5dv.h opcode.h sa.h
> > sa-kern-abi.h verbs.h
> >
> > I tried with both MLNX_OFED_LINUX-4.2-1.0.0.0 and
> > MLNX_OFED_LINUX-4.2-1.2.0.0-ubuntu14.04-x86_64
>
> Did you installed Mellanox OFED with the --dpdk --upstream-libs arguments for the installation script?
>
> If it is the case, you should not add them for this version, those options are for DPDK v17.11 and higher.
>
> Regards,
>
> > Regards,
> > Nitin
> >
> > -----Original Message-----
> > From: Shahaf Shuler [mailto:shahafs@mellanox.com]
> > Sent: Thursday, May 31, 2018 10:51 AM
> > To: Nitin Katiyar <nitin.katiyar@ericsson.com>; Nélio Laranjeiro
> > <nelio.laranjeiro@6wind.com>
> > Cc: dev@dpdk.org
> > Subject: RE: [dpdk-dev] Compilation of MLX5 driver
> >
> > Wednesday, May 30, 2018 7:45 PM, Nitin Katiyar:
> > >
> > > Hi,
> > > I was compiling 17.05.02.
> > > Regards,
> > > Nitin
> > >
> > > -----Original Message-----
> > > From: Nélio Laranjeiro [mailto:nelio.laranjeiro@6wind.com]
> > > Sent: Wednesday, May 30, 2018 6:42 PM
> > > To: Nitin Katiyar <nitin.katiyar@ericsson.com>
> > > Cc: dev@dpdk.org
> > > Subject: Re: [dpdk-dev] Compilation of MLX5 driver
> > >
> > > Hi,
> > >
> > > On Wed, May 30, 2018 at 11:54:31AM +0000, Nitin Katiyar wrote:
> > > > Hi,
> > > > I am trying to compile MLX5 PMD driver by setting
> > > "CONFIG_RTE_LIBRTE_MLX5_PMD=y" and hitting following compilation
> > > error.
> > > >
> > > > fatal error: infiniband/mlx5_hw.h: No such file or directory
> >
> > Can you list the files you have under /usr/include/infiniband ?
> >
> > > >
> > > > I have installed MLNX_OFED _LINUX-4.2-1.2.0 on my Ubuntu 14.04
> > > > machine
> > > but still hitting the same error. Am I missing some other package?
> > >
> > > Which version of DPDK are you using (it is important to help)?
> > >
> > > Regards,
> > >
> > > --
> > > Nélio Laranjeiro
> > > 6WIND
>
> --
> Nélio Laranjeiro
> 6WIND
--
Nélio Laranjeiro
6WIND
^ permalink raw reply [relevance 0%]
* [dpdk-dev] [PATCH v8 19/19] doc: update release notes for multi process hotplug
2018-07-02 5:44 1% ` [dpdk-dev] [PATCH v8 00/19] enable hotplug on multi-process Qi Zhang
@ 2018-07-02 5:44 4% ` Qi Zhang
0 siblings, 0 replies; 200+ results
From: Qi Zhang @ 2018-07-02 5:44 UTC (permalink / raw)
To: thomas, anatoly.burakov
Cc: konstantin.ananyev, dev, bruce.richardson, ferruh.yigit,
benjamin.h.shelton, narender.vangati, Qi Zhang
Update release notes for the new multi process hotplug feature.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
doc/guides/rel_notes/release_18_08.rst | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index bc0124295..93a813340 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -46,6 +46,21 @@ New Features
Flow API support has been added to CXGBE Poll Mode Driver to offload
flows to Chelsio T5/T6 NICs.
+* **Support etherdev multi-process hotplug.**
+
+ Hotplug and hot-unplug for ethdev devices will now be supported in
+ multiprocessing scenario. Any ethdev devices created in the primary
+ process will be regarded as shared and will be available for all DPDK
+ processes, while secondary processes will have a choice between adding
+ a private (non-shared) or a shared device. Synchronization between
+ processes will be done using DPDK IPC.
+
+* **Support etherdev locking.**
+
+ Application can now lock an ethernet device to prevent unexpected device
+ removal. Devices can either be locked unconditionally, or an application
+ can register for a callback before unplug for the purposes of performing
+ cleanup before releasing the device (or have a chance to deny unplug)
API Changes
-----------
@@ -60,6 +75,11 @@ API Changes
Also, make sure to start the actual text at the margin.
=========================================================
+* ethdev: scope of rte_eth_dev_attach and rte_eth_dev_detach is extended.
+
+ In primary-secondary process model, ``rte_eth_dev_attach`` will guarantee
+ that device be attached on all processes, while ``rte_eth_dev_detach``
+ will guarantee device be detached on all processes.
ABI Changes
-----------
--
2.13.6
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH v8 00/19] enable hotplug on multi-process
` (4 preceding siblings ...)
2018-06-28 12:56 1% ` [dpdk-dev] [PATCH v7 00/19] enable hotplug on multi-process Qi Zhang
@ 2018-07-02 5:44 1% ` Qi Zhang
2018-07-02 5:44 4% ` [dpdk-dev] [PATCH v8 19/19] doc: update release notes for multi process hotplug Qi Zhang
2018-07-06 14:18 2% ` [dpdk-dev] [PATCH v9 00/19] enable hotplug on multi-process Qi Zhang
` (6 subsequent siblings)
12 siblings, 1 reply; 200+ results
From: Qi Zhang @ 2018-07-02 5:44 UTC (permalink / raw)
To: thomas, anatoly.burakov
Cc: konstantin.ananyev, dev, bruce.richardson, ferruh.yigit,
benjamin.h.shelton, narender.vangati, Qi Zhang
v8:
- update rte_eal_version.map due to new API added.
- minor reword on release note.
- minor fix on commit log and code style.
NOTE:
Some issues which is not related with this patchset is expected when
play with hotplug_mp sample as belows.
- Attach a PCI device twice may cause device can't be detached
below fix is required:
https://patches.dpdk.org/patch/42030/
- ixgbe device can't detached, below fix is required
https://patches.dpdk.org/patch/42031/
v7:
- update rte_ethdev_version.map for new APIs.
- improve code readability in __handle_secondary_request by use goto.
- add comments to explain why need to call rte_eal_alarm_set.
- add error log when process_mp_init_callbacks failed.
- reword release notes base on Anatoly's suggestion.
- add back previous "Acked-by" and "Reviewed-by" in commit log.
NOTE: current patchset depends on below IPC fix, or it may not be able
to attach a shared vdev.
https://patches.dpdk.org/patch/41647/
v6:
- remove bus->scan_one, since ABI break is not necessary.
- remove patch for failsafe PMD since it will not support secondary.
- fix wrong implemenation on ixgbe.
- add rte_eth_dev_release_port_private into rte_eth_dev_pci_generic_remove for
secondary process, so we don't need to patch on PMD if PMD use the
default remove function.
- add release notes update.
- agreed to use strdup(peer) as workaround for repling a sync request in seperate
thread.
v5:
- since we will keep mp thread separate from interrupt thread,
it is not necessary to use temporary thread, we use rte_eal_alarm_set.
- remove the change in rte_eth_dev_release_port, since there is a better
way to prevent rte_eth_dev_release_port be called after
rte_eth_dev_release_port_private.
- fix the issue that lock does not take effect on secondary due to
previous re-work
- fix the issue when the first attached device is a private device from
secondary. (patch 8/24)
- work around for reply a sync request in separate thread, this is still
an open and in discussion as below.
https://mails.dpdk.org/archives/dev/2018-June/105359.html
v4:
- since mp thread will be merged to interrupt thread, the fix on v3
for sync IPC deadlock will not work. the new version enable the
machanism to invoke a mp action callback in a temporary thread to
avoid the IPC deadlock, with this, secondary to primary request
impelemtation also be simplified, since we can use sync request
directly in a separate thread.
v3:
- enable mp init callback register to help non-eal module to initialize
mp channel during rte_eal_init
- fix when attach share device from secondary.
1) dead lock due to sync IPC be invoked in rte_malloc in primary
process when handle secondary request to attach device, the
solution is primary process to issue share device attach/detach
in interrupt thread.
2) return port_id not correct.
- check nb_sent and nb_received in sync IPC.
- fix memory leak duirng error handling at attach_on_secondary.
- improve clean_lock_callback to only lock/unlock spinlock once
- improve error code return in check-reply during async IPC.
- remove rte_ prefix of internal function in ethdev_mp.c
- sample code improvement.
1) rename sample to "hotplug_mp", and move to example/multi-process.
2) cleanup header include.
3) call rte_eal_cleanup before exit.
v2:
- rename rte_ethdev_mp.* to ethdev_mp.*
- rename rte_ethdev_lock.* to ethdev_lock.*
- move internal funciton to ethdev_private.h
- separate rte_eth_dev_[un]lock into rte_eth_dev_[un]lock and
rte_eth_dev_[un]lock_with_callback
- lock callbacks will be removed automatically after device is detached.
- add experimental tag for all new APIs.
- fix coding style issue.
- fix wrong lisence header in sample code.
- fix spelling
- fix meson.build.
- improve comments.
Background:
===========
Currently secondary process will only sync ethdev from primary
process at init stage, but it will not be aware if device
is attached/detached on primary process at runtime.
While there is the requirement from application that take
primary-secondary process model. The primary process work as a
resource management process, it will create/destroy virtual device
at runtime, while the secondary process deal with the network stuff
with these devices.
Solution:
=========
So the orignial intention is to fix this gap, but beyond that
the patch set provide a more comprehesive solution to handle
different hotplug cases in multi-process situation, it cover below
scenario:
1. Attach a share device from primary
2. Detach a share device from primary
3. Attach a share device from secondary
4. Detach a share device from secondary
5. Attach a private device from secondary
6. Detach a private device from secondary
7. Detach a share device from secondary privately
8. Attach a share device from secondary privately
In primary-secondary process model, we assume ethernet devices are
shared by default. that means attach or detach a device on any process
will broadcast to all other processes through mp channel then device
information will be synchronized on all processes.
Any failure during attaching process will cause inconsistent status
between processes, so proper rollback action should be considered.
Also, it is not safe to detach a share device when other process still
use it, so a handshake mechanism is introduced.
Scenario for Case 1, 2:
attach device from primary
a) primary attach the new device if failed goto h).
b) primary send attach sync request to all secondary.
c) secondary receive request and attach device and send reply.
d) primary check the reply if all success go to i).
e) primary send attach rollback sync request to all secondary.
f) secondary receive the request and detach device and send reply.
g) primary receive the reply and detach device as rollback action.
h) attach fail
i) attach success
detach device from primary
a) primary perform pre-detach check, if device is locked, goto i).
b) primary send pre-detach sync request to all secondary.
c) secondary perform pre-detach check and send reply.
d) primary check the reply if any fail goto i).
e) primary send detach sync request to all secondary
f) secondary detach the device and send reply (assume no fail)
g) primary detach the device.
h) detach success
i) detach failed
Scenario for case 3, 4:
attach device from secondary:
a) seconary send asycn request to primary and wait on a condition
which will be released by matched response from primary.
b) primary receive the request and attach the new device if failed
goto i).
c) primary forward attach request to all secondary as async request
(because this in mp thread context, use sync request will deadlock,
same reason for all following async request.)
d) secondary receive request and attach device and send reply.
e) primary check the reply if all success go to j).
f) primary send attach rollback async request to all secondary.
g) secondary receive the request and detach device and send reply.
h) primary receive the reply and detach device as rollback action.
i) send fail response to secondary, goto k).
j) send success response to secondary.
k) secondary process receive response and return.
detach device from secondary:
a) secondary send async request to primary and wait on a condition
which will be released by matched response from primary.
b) primary receive the request and perform pre-detach check, if device
is locked, goto j).
c) primary send pre-detach async request to all secondary.
d) secondary perform pre-detach check and send reply.
e) primary check the reply if any fail goto j).
f) primary send detach async request to all secondary
g) secondary detach the device and send reply
h) primary detach the device.
i) send success response to secondary, goto k).
j) send fail response to secondary.
k) secondary process receive response and return.
Case 5, 6:
Secondary process can attach private device which only visible to
itself, in this case no IPC is involved, primary process is not allowed
to have private device so far.
Case 7, 8:
Secondary process can also temporally to detach a share device
"privately" then attach it back later, this action also not impact other
processes.
APIs chenages:
==============
rte_eth_dev_attach and rte_eth_dev_attach are extended to support
share device attach/detach in primary-secondary process model, it will
be called in case 1,2,3,4.
New API rte_eth_dev_attach_private and rte_eth_dev_detach_private are
introduced to cover case 5,6,7,8, this API can only be invoked in
secondary process.
New API rte_eth_dev_lock and rte_eth_dev_unlock are introduced to let
application lock or unlock on specific ethdev, a locked device
can't be detached. This help applicaiton to prevent unexpected
device detaching, especially in multi-process envrionment.
Aslo the new API let application to register a callback function
which will be invoked before a device is going to be detached,
the return value of the function will decide if device will continue
be detached or not, this support application to do condition check
at runtime.
PMD Impact:
===========
Currently device removing is not handled well in secondary process on
most pmd drivers, rte_eth_dev_relase_port will be invoked and will mess up
primary process since it reset all shared data. So we introduced new API
rte_eth_dev_release_port_local which only reset ethdev's state to unsued
but not touch shared data so other process will not be impacted.
Since not all device driver is target to support primary-secondary
process model, so the patch set only fix this on all Intel devices and
vdev, it can be refereneced by other driver when equevalent fix is
required
Limitation:
===========
1. The solution does not cover the case that primary process exit while
secondary processes still be active. Though this is not a typial use
case, but if this happens:
a. secondary process can't attach / detach any shared device since no
primary exist.
b. secondary process still can attach / detach private device.
c. secondary process still can detach a share device privately but may
not attach it back, that ethdev slot will become zombie slot.
2. So for, for PCI bus, case 5,6 is not supported. PCI bus scan/probe
mechanism can be improved to support attach private device on secondary
process, but this is not the scope of this patchset.
Example:
========
The patchset also contains a example to demonstrate device hotplug
in multi-process model, below are detail instructions.
/* start sample code as primary then secondary */
./hotplug_mp --proc-type=auto
Command Line Example:
>help
>list
/* attach a af_packet vdev */
>attach net_af_packet,iface=eth0
/* detach port 0 */
>detach 0
/* attach a private af_packet vdev (secondary process only)*/
>attachp net_af_packet,iface=eth0
/* detach a private device (secondary process only) */
>detachp 0
/* lock port 0 */
>lock 0
/* unlock port 0 */
>unlock 0
Qi Zhang (19):
ethdev: add function to release port in local process
eal: enable multi process init callback
ethdev: enable hotplug on multi-process
ethdev: introduce device lock
ethdev: support attach or detach share device from secondary
ethdev: support attach private device as first
net/i40e: enable port detach on secondary process
net/ixgbe: enable port detach on secondary process
net/af_packet: enable port detach on secondary process
net/bonding: enable port detach on secondary process
net/kni: enable port detach on secondary process
net/null: enable port detach on secondary process
net/octeontx: enable port detach on secondary process
net/pcap: enable port detach on secondary process
net/softnic: enable port detach on secondary process
net/tap: enable port detach on secondary process
net/vhost: enable port detach on secondary process
examples/multi_process: add hotplug sample
doc: update release notes for multi process hotplug
doc/guides/rel_notes/release_18_08.rst | 20 ++
drivers/net/af_packet/rte_eth_af_packet.c | 11 +
drivers/net/bonding/rte_eth_bond_pmd.c | 11 +
drivers/net/i40e/i40e_ethdev.c | 2 +
drivers/net/ixgbe/ixgbe_ethdev.c | 3 +
drivers/net/kni/rte_eth_kni.c | 11 +
drivers/net/null/rte_eth_null.c | 16 +-
drivers/net/octeontx/octeontx_ethdev.c | 16 +
drivers/net/pcap/rte_eth_pcap.c | 15 +-
drivers/net/softnic/rte_eth_softnic.c | 19 +-
drivers/net/tap/rte_eth_tap.c | 17 +-
drivers/net/vhost/rte_eth_vhost.c | 11 +
examples/multi_process/Makefile | 1 +
examples/multi_process/hotplug_mp/Makefile | 23 ++
examples/multi_process/hotplug_mp/commands.c | 356 ++++++++++++++++++++++
examples/multi_process/hotplug_mp/commands.h | 10 +
examples/multi_process/hotplug_mp/main.c | 41 +++
lib/librte_eal/common/eal_common_proc.c | 57 +++-
lib/librte_eal/common/eal_private.h | 5 +
lib/librte_eal/common/include/rte_eal.h | 34 +++
lib/librte_eal/linuxapp/eal/eal.c | 2 +
lib/librte_eal/rte_eal_version.map | 1 +
lib/librte_ethdev/Makefile | 2 +
lib/librte_ethdev/ethdev_lock.c | 140 +++++++++
lib/librte_ethdev/ethdev_lock.h | 31 ++
lib/librte_ethdev/ethdev_mp.c | 431 +++++++++++++++++++++++++++
lib/librte_ethdev/ethdev_mp.h | 42 +++
lib/librte_ethdev/ethdev_private.h | 42 +++
lib/librte_ethdev/meson.build | 2 +
lib/librte_ethdev/rte_ethdev.c | 311 +++++++++++++++++--
lib/librte_ethdev/rte_ethdev.h | 169 +++++++++++
lib/librte_ethdev/rte_ethdev_core.h | 5 +
lib/librte_ethdev/rte_ethdev_driver.h | 13 +
lib/librte_ethdev/rte_ethdev_pci.h | 3 +
lib/librte_ethdev/rte_ethdev_version.map | 4 +
35 files changed, 1840 insertions(+), 37 deletions(-)
create mode 100644 examples/multi_process/hotplug_mp/Makefile
create mode 100644 examples/multi_process/hotplug_mp/commands.c
create mode 100644 examples/multi_process/hotplug_mp/commands.h
create mode 100644 examples/multi_process/hotplug_mp/main.c
create mode 100644 lib/librte_ethdev/ethdev_lock.c
create mode 100644 lib/librte_ethdev/ethdev_lock.h
create mode 100644 lib/librte_ethdev/ethdev_mp.c
create mode 100644 lib/librte_ethdev/ethdev_mp.h
create mode 100644 lib/librte_ethdev/ethdev_private.h
--
2.13.6
^ permalink raw reply [relevance 1%]
* Re: [dpdk-dev] [PATCH v2 1/2] compressdev: replace mbuf scatter gather flag
2018-06-27 12:16 4% ` [dpdk-dev] [PATCH v2 " Pablo de Lara
@ 2018-06-29 10:08 0% ` Trahe, Fiona
0 siblings, 0 replies; 200+ results
From: Trahe, Fiona @ 2018-06-29 10:08 UTC (permalink / raw)
To: De Lara Guarch, Pablo, ashish.gupta, Daly, Lee; +Cc: dev, Trahe, Fiona
Hi Pablo,
The Chained mbufs feature in doc/guides/compressdevs/features/default.ini needs updating with this change.
Also while you're updating it I think we wanted to rename By-Pass? To Pass-thru?
Fiona
> -----Original Message-----
> From: De Lara Guarch, Pablo
> Sent: Wednesday, June 27, 2018 1:16 PM
> To: Trahe, Fiona <fiona.trahe@intel.com>; ashish.gupta@caviumnetworks.com; Daly, Lee
> <lee.daly@intel.com>
> Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Subject: [PATCH v2 1/2] compressdev: replace mbuf scatter gather flag
>
> The current mbuf scatter gather feature flag is
> too ambiguous, as it is not clear if input and/or output
> buffers can be scatter gather mbufs or not.
>
> Therefore, three new flags will replace this flag:
> - RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT
> - RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_FB_OUT
> - RTE_COMP_FF_OUT_OF_PLACE_FB_IN_SGL_OUT
>
> Note that out-of-place flat buffers is supported by default
> and in-place is not supported by the library.
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
>
> Changes in v2:
> - Fixed typos
> - Rephrased comments
>
> doc/guides/rel_notes/release_18_08.rst | 6 ++++++
> lib/librte_compressdev/rte_comp.c | 8 ++++++--
> lib/librte_compressdev/rte_comp.h | 30 ++++++++++++++++++++----------
> 3 files changed, 32 insertions(+), 12 deletions(-)
>
> diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
> index bc0124295..18c8b4bd1 100644
> --- a/doc/guides/rel_notes/release_18_08.rst
> +++ b/doc/guides/rel_notes/release_18_08.rst
> @@ -60,6 +60,12 @@ API Changes
> Also, make sure to start the actual text at the margin.
> =========================================================
>
> +* compressdev: Feature flag ``RTE_COMP_FF_MBUF_SCATTER_GATHER`` is
> + replaced with the following more explicit flags:
> + - ``RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT``
> + - ``RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_FB_OUT``
> + - ``RTE_COMP_FF_OUT_OF_PLACE_FB_IN_SGL_OUT``
> +
>
> ABI Changes
> -----------
> diff --git a/lib/librte_compressdev/rte_comp.c b/lib/librte_compressdev/rte_comp.c
> index d596ba872..ea7692ae7 100644
> --- a/lib/librte_compressdev/rte_comp.c
> +++ b/lib/librte_compressdev/rte_comp.c
> @@ -14,8 +14,12 @@ rte_comp_get_feature_name(uint64_t flag)
> return "STATEFUL_COMPRESSION";
> case RTE_COMP_FF_STATEFUL_DECOMPRESSION:
> return "STATEFUL_DECOMPRESSION";
> - case RTE_COMP_FF_MBUF_SCATTER_GATHER:
> - return "MBUF_SCATTER_GATHER";
> + case RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT:
> + return "OUT_OF_PLACE_SGL_IN_SGL_OUT";
> + case RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_FB_OUT:
> + return "OUT_OF_PLACE_SGL_IN_FB_OUT";
> + case RTE_COMP_FF_OUT_OF_PLACE_FB_IN_SGL_OUT:
> + return "OUT_OF_PLACE_FB_IN_SGL_OUT";
> case RTE_COMP_FF_MULTI_PKT_CHECKSUM:
> return "MULTI_PKT_CHECKSUM";
> case RTE_COMP_FF_ADLER32_CHECKSUM:
> diff --git a/lib/librte_compressdev/rte_comp.h b/lib/librte_compressdev/rte_comp.h
> index 5b513c77e..f3742dafb 100644
> --- a/lib/librte_compressdev/rte_comp.h
> +++ b/lib/librte_compressdev/rte_comp.h
> @@ -30,23 +30,33 @@ extern "C" {
> /**< Stateful compression is supported */
> #define RTE_COMP_FF_STATEFUL_DECOMPRESSION (1ULL << 1)
> /**< Stateful decompression is supported */
> -#define RTE_COMP_FF_MBUF_SCATTER_GATHER (1ULL << 2)
> -/**< Scatter-gather mbufs are supported */
> -#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 3)
> +#define RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT (1ULL << 2)
> +/**< Out-of-place Scatter-gather (SGL) mbufs are
> + * supported in input and output
> + */
> +#define RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_FB_OUT (1ULL << 3)
> +/**< Out-of-place Scatter-gather (SGL) mbufs are supported
> + * in input, combined with flat buffers (FB) in output
> + */
> +#define RTE_COMP_FF_OUT_OF_PLACE_FB_IN_SGL_OUT (1ULL << 4)
> +/**< Out-of-place Scatter-gather (SGL) mbufs are supported
> + * in output, combined with flat buffers (FB) in input
> + */
> +#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 5)
> /**< Adler-32 Checksum is supported */
> -#define RTE_COMP_FF_CRC32_CHECKSUM (1ULL << 4)
> +#define RTE_COMP_FF_CRC32_CHECKSUM (1ULL << 6)
> /**< CRC32 Checksum is supported */
> -#define RTE_COMP_FF_CRC32_ADLER32_CHECKSUM (1ULL << 5)
> +#define RTE_COMP_FF_CRC32_ADLER32_CHECKSUM (1ULL << 7)
> /**< Adler-32/CRC32 Checksum is supported */
> -#define RTE_COMP_FF_MULTI_PKT_CHECKSUM (1ULL << 6)
> +#define RTE_COMP_FF_MULTI_PKT_CHECKSUM (1ULL << 8)
> /**< Generation of checksum across multiple stateless packets is supported */
> -#define RTE_COMP_FF_SHA1_HASH (1ULL << 7)
> +#define RTE_COMP_FF_SHA1_HASH (1ULL << 9)
> /**< SHA1 Hash is supported */
> -#define RTE_COMP_FF_SHA2_SHA256_HASH (1ULL << 8)
> +#define RTE_COMP_FF_SHA2_SHA256_HASH (1ULL << 10)
> /**< SHA256 Hash of SHA2 family is supported */
> -#define RTE_COMP_FF_NONCOMPRESSED_BLOCKS (1ULL << 9)
> +#define RTE_COMP_FF_NONCOMPRESSED_BLOCKS (1ULL << 11)
> /**< Creation of non-compressed blocks using RTE_COMP_LEVEL_NONE is supported */
> -#define RTE_COMP_FF_SHAREABLE_PRIV_XFORM (1ULL << 10)
> +#define RTE_COMP_FF_SHAREABLE_PRIV_XFORM (1ULL << 12)
> /**< Private xforms created by the PMD can be shared
> * across multiple stateless operations. If not set, then app needs
> * to create as many priv_xforms as it expects to have stateless
> --
> 2.14.4
^ permalink raw reply [relevance 0%]
* [dpdk-dev] [PATCH v7 19/19] doc: update release notes for multi process hotplug
2018-06-28 12:56 1% ` [dpdk-dev] [PATCH v7 00/19] enable hotplug on multi-process Qi Zhang
@ 2018-06-28 12:57 4% ` Qi Zhang
0 siblings, 0 replies; 200+ results
From: Qi Zhang @ 2018-06-28 12:57 UTC (permalink / raw)
To: thomas, anatoly.burakov
Cc: konstantin.ananyev, dev, bruce.richardson, ferruh.yigit,
benjamin.h.shelton, narender.vangati, Qi Zhang
Update release notes for the new multi process hotplug feature.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
doc/guides/rel_notes/release_18_08.rst | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index bc0124295..650f7aadb 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -46,6 +46,21 @@ New Features
Flow API support has been added to CXGBE Poll Mode Driver to offload
flows to Chelsio T5/T6 NICs.
+* **Support ethernet device hotplug for primary-secondary model.**
+
+ Hotplug and hot-unplug for ethdev devices will now be supported in
+ multiprocessing scenario. Any ethdev devices created in the primary
+ process will be regarded as shared and will be available for all DPDK
+ processes, while secondary processes will have a choice between adding
+ a private (non-shared) or a shared device. Synchronization between
+ processes will be done using DPDK IPC.
+
+* **Support ethernet device lock.**
+
+ Application can now lock an ethernet device to prevent unexpected device
+ removal. Devices can either be locked unconditionally, or an application
+ can register for a callback before unplug for the purposes of performing
+ cleanup before releasing the device (or have a chance to deny unplug)
API Changes
-----------
@@ -60,6 +75,11 @@ API Changes
Also, make sure to start the actual text at the margin.
=========================================================
+* ethdev: scope of rte_eth_dev_attach and rte_eth_dev_detach is extended.
+
+ In primary-secondary process model, ``rte_eth_dev_attach`` will guarantee
+ that device be attached on all processes, while ``rte_eth_dev_detach``
+ will guarantee device be detached on all processes.
ABI Changes
-----------
--
2.13.6
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH v7 00/19] enable hotplug on multi-process
` (3 preceding siblings ...)
2018-06-28 1:52 2% ` [dpdk-dev] [PATCH v6 00/19] enable hotplug on multi-process Qi Zhang
@ 2018-06-28 12:56 1% ` Qi Zhang
2018-06-28 12:57 4% ` [dpdk-dev] [PATCH v7 19/19] doc: update release notes for multi process hotplug Qi Zhang
2018-07-02 5:44 1% ` [dpdk-dev] [PATCH v8 00/19] enable hotplug on multi-process Qi Zhang
` (7 subsequent siblings)
12 siblings, 1 reply; 200+ results
From: Qi Zhang @ 2018-06-28 12:56 UTC (permalink / raw)
To: thomas, anatoly.burakov
Cc: konstantin.ananyev, dev, bruce.richardson, ferruh.yigit,
benjamin.h.shelton, narender.vangati, Qi Zhang
v7:
- update rte_ethdev_version.map for new APIs.
- improve code readability in __handle_secondary_request by use goto.
- add comments to explain why need to call rte_eal_alarm_set.
- add error log when process_mp_init_callbacks failed.
- reword release notes base on Anatoly's suggestion.
- add back previous "Acked-by" and "Reviewed-by" in commit log.
NOTE: current patchset depends on below IPC fix, or it may not be able
to attach a shared vdev.
https://patches.dpdk.org/patch/41647/
v6:
- remove bus->scan_one, since ABI break is not necessary.
- remove patch for failsafe PMD since it will not support secondary.
- fix wrong implemenation on ixgbe.
- add rte_eth_dev_release_port_private into rte_eth_dev_pci_generic_remove for
secondary process, so we don't need to patch on PMD if PMD use the
default remove function.
- add release notes update.
- agreed to use strdup(peer) as workaround for repling a sync request in seperate
thread.
v5:
- since we will keep mp thread separate from interrupt thread,
it is not necessary to use temporary thread, we use rte_eal_alarm_set.
- remove the change in rte_eth_dev_release_port, since there is a better
way to prevent rte_eth_dev_release_port be called after
rte_eth_dev_release_port_private.
- fix the issue that lock does not take effect on secondary due to
previous re-work
- fix the issue when the first attached device is a private device from
secondary. (patch 8/24)
- work around for reply a sync request in separate thread, this is still
an open and in discussion as below.
https://mails.dpdk.org/archives/dev/2018-June/105359.html
v4:
- since mp thread will be merged to interrupt thread, the fix on v3
for sync IPC deadlock will not work. the new version enable the
machanism to invoke a mp action callback in a temporary thread to
avoid the IPC deadlock, with this, secondary to primary request
impelemtation also be simplified, since we can use sync request
directly in a separate thread.
v3:
- enable mp init callback register to help non-eal module to initialize
mp channel during rte_eal_init
- fix when attach share device from secondary.
1) dead lock due to sync IPC be invoked in rte_malloc in primary
process when handle secondary request to attach device, the
solution is primary process to issue share device attach/detach
in interrupt thread.
2) return port_id not correct.
- check nb_sent and nb_received in sync IPC.
- fix memory leak duirng error handling at attach_on_secondary.
- improve clean_lock_callback to only lock/unlock spinlock once
- improve error code return in check-reply during async IPC.
- remove rte_ prefix of internal function in ethdev_mp.c
- sample code improvement.
1) rename sample to "hotplug_mp", and move to example/multi-process.
2) cleanup header include.
3) call rte_eal_cleanup before exit.
v2:
- rename rte_ethdev_mp.* to ethdev_mp.*
- rename rte_ethdev_lock.* to ethdev_lock.*
- move internal funciton to ethdev_private.h
- separate rte_eth_dev_[un]lock into rte_eth_dev_[un]lock and
rte_eth_dev_[un]lock_with_callback
- lock callbacks will be removed automatically after device is detached.
- add experimental tag for all new APIs.
- fix coding style issue.
- fix wrong lisence header in sample code.
- fix spelling
- fix meson.build.
- improve comments.
Background:
===========
Currently secondary process will only sync ethdev from primary
process at init stage, but it will not be aware if device
is attached/detached on primary process at runtime.
While there is the requirement from application that take
primary-secondary process model. The primary process work as a
resource management process, it will create/destroy virtual device
at runtime, while the secondary process deal with the network stuff
with these devices.
Solution:
=========
So the orignial intention is to fix this gap, but beyond that
the patch set provide a more comprehesive solution to handle
different hotplug cases in multi-process situation, it cover below
scenario:
1. Attach a share device from primary
2. Detach a share device from primary
3. Attach a share device from secondary
4. Detach a share device from secondary
5. Attach a private device from secondary
6. Detach a private device from secondary
7. Detach a share device from secondary privately
8. Attach a share device from secondary privately
In primary-secondary process model, we assume ethernet devices are
shared by default. that means attach or detach a device on any process
will broadcast to all other processes through mp channel then device
information will be synchronized on all processes.
Any failure during attaching process will cause inconsistent status
between processes, so proper rollback action should be considered.
Also, it is not safe to detach a share device when other process still
use it, so a handshake mechanism is introduced.
Scenario for Case 1, 2:
attach device from primary
a) primary attach the new device if failed goto h).
b) primary send attach sync request to all secondary.
c) secondary receive request and attach device and send reply.
d) primary check the reply if all success go to i).
e) primary send attach rollback sync request to all secondary.
f) secondary receive the request and detach device and send reply.
g) primary receive the reply and detach device as rollback action.
h) attach fail
i) attach success
detach device from primary
a) primary perform pre-detach check, if device is locked, goto i).
b) primary send pre-detach sync request to all secondary.
c) secondary perform pre-detach check and send reply.
d) primary check the reply if any fail goto i).
e) primary send detach sync request to all secondary
f) secondary detach the device and send reply (assume no fail)
g) primary detach the device.
h) detach success
i) detach failed
Scenario for case 3, 4:
attach device from secondary:
a) seconary send asycn request to primary and wait on a condition
which will be released by matched response from primary.
b) primary receive the request and attach the new device if failed
goto i).
c) primary forward attach request to all secondary as async request
(because this in mp thread context, use sync request will deadlock,
same reason for all following async request.)
d) secondary receive request and attach device and send reply.
e) primary check the reply if all success go to j).
f) primary send attach rollback async request to all secondary.
g) secondary receive the request and detach device and send reply.
h) primary receive the reply and detach device as rollback action.
i) send fail response to secondary, goto k).
j) send success response to secondary.
k) secondary process receive response and return.
detach device from secondary:
a) secondary send async request to primary and wait on a condition
which will be released by matched response from primary.
b) primary receive the request and perform pre-detach check, if device
is locked, goto j).
c) primary send pre-detach async request to all secondary.
d) secondary perform pre-detach check and send reply.
e) primary check the reply if any fail goto j).
f) primary send detach async request to all secondary
g) secondary detach the device and send reply
h) primary detach the device.
i) send success response to secondary, goto k).
j) send fail response to secondary.
k) secondary process receive response and return.
Case 5, 6:
Secondary process can attach private device which only visible to
itself, in this case no IPC is involved, primary process is not allowed
to have private device so far.
Case 7, 8:
Secondary process can also temporally to detach a share device
"privately" then attach it back later, this action also not impact other
processes.
APIs chenages:
==============
rte_eth_dev_attach and rte_eth_dev_attach are extended to support
share device attach/detach in primary-secondary process model, it will
be called in case 1,2,3,4.
New API rte_eth_dev_attach_private and rte_eth_dev_detach_private are
introduced to cover case 5,6,7,8, this API can only be invoked in
secondary process.
New API rte_eth_dev_lock and rte_eth_dev_unlock are introduced to let
application lock or unlock on specific ethdev, a locked device
can't be detached. This help applicaiton to prevent unexpected
device detaching, especially in multi-process envrionment.
Aslo the new API let application to register a callback function
which will be invoked before a device is going to be detached,
the return value of the function will decide if device will continue
be detached or not, this support application to do condition check
at runtime.
PMD Impact:
===========
Currently device removing is not handled well in secondary process on
most pmd drivers, rte_eth_dev_relase_port will be invoked and will mess up
primary process since it reset all shared data. So we introduced new API
rte_eth_dev_release_port_local which only reset ethdev's state to unsued
but not touch shared data so other process will not be impacted.
Since not all device driver is target to support primary-secondary
process model, so the patch set only fix this on all Intel devices and
vdev, it can be refereneced by other driver when equevalent fix is
required
Limitation:
===========
1. The solution does not cover the case that primary process exit while
secondary processes still be active. Though this is not a typial use
case, but if this happens:
a. secondary process can't attach / detach any shared device since no
primary exist.
b. secondary process still can attach / detach private device.
c. secondary process still can detach a share device privately but may
not attach it back, that ethdev slot will become zombie slot.
2. So for, for PCI bus, case 5,6 is not supported. PCI bus scan/probe
mechanism can be improved to support attach private device on secondary
process, but this is not the scope of this patchset.
Example:
========
The patchset also contains a example to demonstrate device hotplug
in multi-process model, below are detail instructions.
/* start sample code as primary then secondary */
./hotplug_mp --proc-type=auto
Command Line Example:
>help
>list
/* attach a af_packet vdev */
>attach net_af_packet,iface=eth0
/* detach port 0 */
>detach 0
/* attach a private af_packet vdev (secondary process only)*/
>attachp net_af_packet,iface=eth0
/* detach a private device (secondary process only) */
>detachp 0
/* lock port 0 */
>lock 0
/* unlock port 0 */
>unlock 0
Qi Zhang (19):
ethdev: add function to release port in local process
eal: enable multi process init callback
ethdev: enable hotplug on multi-process
ethdev: introduce device lock
ethdev: support attach or detach share device from secondary
ethdev: support attach private device as first
net/i40e: enable port detach on secondary process
net/ixgbe: enable port detach on secondary process
net/af_packet: enable port detach on secondary process
net/bonding: enable port detach on secondary process
net/kni: enable port detach on secondary process
net/null: enable port detach on secondary process
net/octeontx: enable port detach on secondary process
net/pcap: enable port detach on secondary process
net/softnic: enable port detach on secondary process
net/tap: enable port detach on secondary process
net/vhost: enable port detach on secondary process
examples/multi_process: add hotplug sample
doc: update release notes for multi process hotplug
doc/guides/rel_notes/release_18_08.rst | 20 ++
drivers/net/af_packet/rte_eth_af_packet.c | 11 +
drivers/net/bonding/rte_eth_bond_pmd.c | 11 +
drivers/net/i40e/i40e_ethdev.c | 2 +
drivers/net/ixgbe/ixgbe_ethdev.c | 3 +
drivers/net/kni/rte_eth_kni.c | 11 +
drivers/net/null/rte_eth_null.c | 16 +-
drivers/net/octeontx/octeontx_ethdev.c | 16 +
drivers/net/pcap/rte_eth_pcap.c | 15 +-
drivers/net/softnic/rte_eth_softnic.c | 19 +-
drivers/net/tap/rte_eth_tap.c | 17 +-
drivers/net/vhost/rte_eth_vhost.c | 11 +
examples/multi_process/Makefile | 1 +
examples/multi_process/hotplug_mp/Makefile | 23 ++
examples/multi_process/hotplug_mp/commands.c | 356 ++++++++++++++++++++++
examples/multi_process/hotplug_mp/commands.h | 10 +
examples/multi_process/hotplug_mp/main.c | 41 +++
lib/librte_eal/common/eal_common_proc.c | 51 +++-
lib/librte_eal/common/eal_private.h | 5 +
lib/librte_eal/common/include/rte_eal.h | 34 +++
lib/librte_eal/linuxapp/eal/eal.c | 2 +
lib/librte_ethdev/Makefile | 2 +
lib/librte_ethdev/ethdev_lock.c | 140 +++++++++
lib/librte_ethdev/ethdev_lock.h | 31 ++
lib/librte_ethdev/ethdev_mp.c | 430 +++++++++++++++++++++++++++
lib/librte_ethdev/ethdev_mp.h | 42 +++
lib/librte_ethdev/ethdev_private.h | 42 +++
lib/librte_ethdev/meson.build | 2 +
lib/librte_ethdev/rte_ethdev.c | 312 +++++++++++++++++--
lib/librte_ethdev/rte_ethdev.h | 169 +++++++++++
lib/librte_ethdev/rte_ethdev_core.h | 5 +
lib/librte_ethdev/rte_ethdev_driver.h | 13 +
lib/librte_ethdev/rte_ethdev_pci.h | 3 +
lib/librte_ethdev/rte_ethdev_version.map | 4 +
34 files changed, 1833 insertions(+), 37 deletions(-)
create mode 100644 examples/multi_process/hotplug_mp/Makefile
create mode 100644 examples/multi_process/hotplug_mp/commands.c
create mode 100644 examples/multi_process/hotplug_mp/commands.h
create mode 100644 examples/multi_process/hotplug_mp/main.c
create mode 100644 lib/librte_ethdev/ethdev_lock.c
create mode 100644 lib/librte_ethdev/ethdev_lock.h
create mode 100644 lib/librte_ethdev/ethdev_mp.c
create mode 100644 lib/librte_ethdev/ethdev_mp.h
create mode 100644 lib/librte_ethdev/ethdev_private.h
--
2.13.6
^ permalink raw reply [relevance 1%]
* Re: [dpdk-dev] [PATCH v6 19/19] doc: update release notes for multi process hotplug
2018-06-28 9:39 0% ` Burakov, Anatoly
@ 2018-06-28 12:21 0% ` Zhang, Qi Z
0 siblings, 0 replies; 200+ results
From: Zhang, Qi Z @ 2018-06-28 12:21 UTC (permalink / raw)
To: Burakov, Anatoly, thomas
Cc: Ananyev, Konstantin, dev, Richardson, Bruce, Yigit, Ferruh,
Shelton, Benjamin H, Vangati, Narender, Mcnamara, John
Hi Anatoly:
Your comments looks good to me.
Thanks!
Qi
> -----Original Message-----
> From: Burakov, Anatoly
> Sent: Thursday, June 28, 2018 5:39 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; thomas@monjalon.net
> Cc: Ananyev, Konstantin <konstantin.ananyev@intel.com>; dev@dpdk.org;
> Richardson, Bruce <bruce.richardson@intel.com>; Yigit, Ferruh
> <ferruh.yigit@intel.com>; Shelton, Benjamin H
> <benjamin.h.shelton@intel.com>; Vangati, Narender
> <narender.vangati@intel.com>; Mcnamara, John <john.mcnamara@intel.com>
> Subject: Re: [PATCH v6 19/19] doc: update release notes for multi process
> hotplug
>
> On 28-Jun-18 2:52 AM, Qi Zhang wrote:
> > Update release notes for the new multi process hotplug feature.
> >
> > Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> > ---
>
> +CC John Mc as our resident native English speaker :)
>
> > doc/guides/rel_notes/release_18_08.rst | 21 +++++++++++++++++++++
> > 1 file changed, 21 insertions(+)
> >
> > diff --git a/doc/guides/rel_notes/release_18_08.rst
> > b/doc/guides/rel_notes/release_18_08.rst
> > index bc0124295..fc4736814 100644
> > --- a/doc/guides/rel_notes/release_18_08.rst
> > +++ b/doc/guides/rel_notes/release_18_08.rst
> > @@ -46,6 +46,20 @@ New Features
> > Flow API support has been added to CXGBE Poll Mode Driver to offload
> > flows to Chelsio T5/T6 NICs.
> >
> > +* **Support ethernet device hotplug for primary-secondary model.**
> > +
> > + In primary-secondary process model, ethernet devices are regarded
> > + as shared by default, attach or detach a device on any process will
> > + broadcast to other processes through mp channel then device
> > + information will be synchronzied on all processes. While secondary
> > + process can still attach or detach a private device (vdev only) with specific
> API.
>
> Suggested rewording:
>
> **Support ethdev multiprocess hotplug.**
>
> Hotplug and hot-unplug for ethdev devices will now be supported in
> multiprocessing scenario. Any ethdev devices created in the primary process
> will be regarded as shared and will be available for all DPDK processes, while
> secondary processes will have a choice between adding a private (non-shared)
> or a shared device. Synchronization between processes will be done using
> DPDK IPC.
>
> ------
>
> I hope this is accurate enough, but please correct me if my interpretation of
> the changes is wrong!
>
> > +
> > +* **Support ethernet device lock.**
> > +
> > + An ethernet device can be directly or conditionally locked. A
> > + directly locked device can't be detached, while when try to detach
> > + a conditionally locked device a pre-registered callback will be
> > + invoked to perform condition check and decide if it can be detached or
> not.
>
> Suggested rewording:
>
> **Support ethernet device locking.**
>
> Application can now lock an ethernet device to prevent unexpected device
> removal. Devices can either be locked unconditionally, or an application can
> register for a callback before unplug for the purposes of performing cleanup
> before releasing the device (or have a chance to deny unplug).
>
> >
> > API Changes
> > -----------
> > @@ -60,6 +74,13 @@ API Changes
> > Also, make sure to start the actual text at the margin.
> > =========================================================
> >
> > +* ethdev: scope of rte_eth_dev_attach and rte_eth_dev_detach is
> extended.
> > +
> > + In primary-secondary process model, ``rte_eth_dev_attach`` will
> > + guarantee that device be attached on all processes, if any process
> > + failed to attach, it will rollback to orignal status.
>
> IMO no need to mention rollback - these are internal implementation details.
> The main thing is, the device is either attached everywhere, or attached
> nowhere.
>
> ``rte_eth_dev_detach`` also guarantee device be
> > + detached on all processes, if device is locked by any process, it
> > + will roll back to original status.
>
> Again, no need to mention internal implementation details - it would be
> sufficient to mention that rte_eth_dev_detach will only succeed if the device is
> not locked by any of the participating processes.
>
> >
> > ABI Changes
> > -----------
> >
>
>
> --
> Thanks,
> Anatoly
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [PATCH v6 19/19] doc: update release notes for multi process hotplug
2018-06-28 1:52 4% ` [dpdk-dev] [PATCH v6 19/19] doc: update release notes for multi process hotplug Qi Zhang
@ 2018-06-28 9:39 0% ` Burakov, Anatoly
2018-06-28 12:21 0% ` Zhang, Qi Z
0 siblings, 1 reply; 200+ results
From: Burakov, Anatoly @ 2018-06-28 9:39 UTC (permalink / raw)
To: Qi Zhang, thomas
Cc: konstantin.ananyev, dev, bruce.richardson, ferruh.yigit,
benjamin.h.shelton, narender.vangati, John McNamara
On 28-Jun-18 2:52 AM, Qi Zhang wrote:
> Update release notes for the new multi process hotplug feature.
>
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> ---
+CC John Mc as our resident native English speaker :)
> doc/guides/rel_notes/release_18_08.rst | 21 +++++++++++++++++++++
> 1 file changed, 21 insertions(+)
>
> diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
> index bc0124295..fc4736814 100644
> --- a/doc/guides/rel_notes/release_18_08.rst
> +++ b/doc/guides/rel_notes/release_18_08.rst
> @@ -46,6 +46,20 @@ New Features
> Flow API support has been added to CXGBE Poll Mode Driver to offload
> flows to Chelsio T5/T6 NICs.
>
> +* **Support ethernet device hotplug for primary-secondary model.**
> +
> + In primary-secondary process model, ethernet devices are regarded as shared
> + by default, attach or detach a device on any process will broadcast to
> + other processes through mp channel then device information will be
> + synchronzied on all processes. While secondary process can still attach
> + or detach a private device (vdev only) with specific API.
Suggested rewording:
**Support ethdev multiprocess hotplug.**
Hotplug and hot-unplug for ethdev devices will now be supported in
multiprocessing scenario. Any ethdev devices created in the primary
process will be regarded as shared and will be available for all DPDK
processes, while secondary processes will have a choice between adding a
private (non-shared) or a shared device. Synchronization between
processes will be done using DPDK IPC.
------
I hope this is accurate enough, but please correct me if my
interpretation of the changes is wrong!
> +
> +* **Support ethernet device lock.**
> +
> + An ethernet device can be directly or conditionally locked. A directly
> + locked device can't be detached, while when try to detach a conditionally
> + locked device a pre-registered callback will be invoked to perform condition
> + check and decide if it can be detached or not.
Suggested rewording:
**Support ethernet device locking.**
Application can now lock an ethernet device to prevent unexpected device
removal. Devices can either be locked unconditionally, or an application
can register for a callback before unplug for the purposes of performing
cleanup before releasing the device (or have a chance to deny unplug).
>
> API Changes
> -----------
> @@ -60,6 +74,13 @@ API Changes
> Also, make sure to start the actual text at the margin.
> =========================================================
>
> +* ethdev: scope of rte_eth_dev_attach and rte_eth_dev_detach is extended.
> +
> + In primary-secondary process model, ``rte_eth_dev_attach`` will guarantee that
> + device be attached on all processes, if any process failed to attach, it will
> + rollback to orignal status.
IMO no need to mention rollback - these are internal implementation
details. The main thing is, the device is either attached everywhere, or
attached nowhere.
``rte_eth_dev_detach`` also guarantee device be
> + detached on all processes, if device is locked by any process, it will roll
> + back to original status.
Again, no need to mention internal implementation details - it would be
sufficient to mention that rte_eth_dev_detach will only succeed if the
device is not locked by any of the participating processes.
>
> ABI Changes
> -----------
>
--
Thanks,
Anatoly
^ permalink raw reply [relevance 0%]
* [dpdk-dev] [PATCH v3 13/16] cryptodev: replace mbuf scatter gather flag
` (3 preceding siblings ...)
2018-06-28 0:53 4% ` [dpdk-dev] [PATCH v3 12/16] cryptodev: remove old get session size functions Pablo de Lara
@ 2018-06-28 0:53 3% ` Pablo de Lara
2018-07-04 12:57 0% ` Akhil Goyal
4 siblings, 1 reply; 200+ results
From: Pablo de Lara @ 2018-06-28 0:53 UTC (permalink / raw)
To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
Cc: dev, Pablo de Lara
The current mbuf scatter gatter feature flag is
too ambiguous, as it is not clear if input and/or output
buffers can be scatter gather mbufs or not, plus
if in-place and/or out-of-place is supported.
Therefore, five new flags will replace this flag:
- RTE_CRYPTODEV_FF_IN_PLACE_SGL
- RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT
- RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT
- RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT
- RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
doc/guides/rel_notes/deprecation.rst | 2 --
doc/guides/rel_notes/release_18_08.rst | 8 +++++
drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 2 +-
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 6 +++-
drivers/crypto/dpaa_sec/dpaa_sec.c | 6 +++-
drivers/crypto/null/null_crypto_pmd.c | 2 +-
drivers/crypto/openssl/rte_openssl_pmd.c | 2 +-
drivers/crypto/qat/qat_sym_pmd.c | 6 +++-
lib/librte_cryptodev/rte_cryptodev.c | 12 ++++++--
lib/librte_cryptodev/rte_cryptodev.h | 46 +++++++++++++++++++----------
test/test/test_cryptodev.c | 31 +++++++++++++------
test/test/test_cryptodev_blockcipher.c | 21 ++++++++++---
12 files changed, 106 insertions(+), 38 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 9a73b1d8e..62d635b74 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -105,5 +105,3 @@ Deprecation Notices
``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
18.05 and removed in 18.08, as there are no drivers doing anything useful
with them.
- - Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
- so some will be replaced by more explicit flags.
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index e482d3d5f..2a136d88c 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -78,6 +78,14 @@ API Changes
- ``rte_cryptodev_get_private_session_size`` is replaced with
``rte_cryptodev_sym_get_private_session_size``
+* cryptodev: Feature flag ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` is
+ replaced with the following more explicit flags:
+ - ``RTE_CRYPTODEV_FF_IN_PLACE_SGL``
+ - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT``
+ - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT``
+ - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT``
+ - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT``
+
ABI Changes
-----------
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index cd5b1952b..03917f220 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -492,7 +492,7 @@ aesni_gcm_create(const char *name,
dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
RTE_CRYPTODEV_FF_CPU_AESNI |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT;
switch (vector_mode) {
case RTE_AESNI_GCM_SSE:
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 1b1c30d85..4daee5f59 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -2762,7 +2762,11 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev)
RTE_CRYPTODEV_FF_HW_ACCELERATED |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
RTE_CRYPTODEV_FF_SECURITY |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_IN_PLACE_SGL |
+ RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT |
+ RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT |
+ RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT |
+ RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT;
internals = cryptodev->data->dev_private;
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index b96552c57..8ad25f2be 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -2271,7 +2271,11 @@ dpaa_sec_dev_init(struct rte_cryptodev *cryptodev)
RTE_CRYPTODEV_FF_HW_ACCELERATED |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
RTE_CRYPTODEV_FF_SECURITY |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_IN_PLACE_SGL |
+ RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT |
+ RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT |
+ RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT |
+ RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT;
internals = cryptodev->data->dev_private;
internals->max_nb_queue_pairs = RTE_DPAA_MAX_NB_SEC_QPS;
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index 478ac0b62..224ba7233 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -177,7 +177,7 @@ cryptodev_null_create(const char *name,
dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_IN_PLACE_SGL;
internals = dev->data->dev_private;
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 972e2adfe..94b6e2de9 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -1660,7 +1660,7 @@ cryptodev_openssl_create(const char *name,
dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
RTE_CRYPTODEV_FF_CPU_AESNI |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT;
/* Set vector instructions mode supported */
internals = dev->data->dev_private;
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index ee8633b85..629904e2f 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -274,7 +274,11 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev)
cryptodev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
RTE_CRYPTODEV_FF_HW_ACCELERATED |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_IN_PLACE_SGL |
+ RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT |
+ RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT |
+ RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT |
+ RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT;
internals = cryptodev->data->dev_private;
internals->qat_dev = qat_pci_dev;
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 381330f3d..15110661b 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -361,8 +361,16 @@ rte_cryptodev_get_feature_name(uint64_t flag)
return "CPU_AESNI";
case RTE_CRYPTODEV_FF_HW_ACCELERATED:
return "HW_ACCELERATED";
- case RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER:
- return "MBUF_SCATTER_GATHER";
+ case RTE_CRYPTODEV_FF_IN_PLACE_SGL:
+ return "IN_PLACE_SGL";
+ case RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT:
+ return "OUT_OF_PLACE_SGL_IN_SGL_OUT";
+ case RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT:
+ return "OUT_OF_PLACE_SGL_IN_FB_OUT";
+ case RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT:
+ return "OUT_OF_PLACE_FB_IN_SGL_OUT";
+ case RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT:
+ return "OUT_OF_PLACE_FB_IN_FB_OUT";
case RTE_CRYPTODEV_FF_CPU_NEON:
return "CPU_NEON";
case RTE_CRYPTODEV_FF_CPU_ARM_CE:
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index fc491a83b..6dc7107bb 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -300,31 +300,47 @@ rte_cryptodev_get_aead_algo_enum(enum rte_crypto_aead_algorithm *algo_enum,
*
* Keep these flags synchronised with rte_cryptodev_get_feature_name()
*/
-#define RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO (1ULL << 0)
+#define RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO (1ULL << 0)
/**< Symmetric crypto operations are supported */
-#define RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO (1ULL << 1)
+#define RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO (1ULL << 1)
/**< Asymmetric crypto operations are supported */
-#define RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING (1ULL << 2)
+#define RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING (1ULL << 2)
/**< Chaining symmetric crypto operations are supported */
-#define RTE_CRYPTODEV_FF_CPU_SSE (1ULL << 3)
+#define RTE_CRYPTODEV_FF_CPU_SSE (1ULL << 3)
/**< Utilises CPU SIMD SSE instructions */
-#define RTE_CRYPTODEV_FF_CPU_AVX (1ULL << 4)
+#define RTE_CRYPTODEV_FF_CPU_AVX (1ULL << 4)
/**< Utilises CPU SIMD AVX instructions */
-#define RTE_CRYPTODEV_FF_CPU_AVX2 (1ULL << 5)
+#define RTE_CRYPTODEV_FF_CPU_AVX2 (1ULL << 5)
/**< Utilises CPU SIMD AVX2 instructions */
-#define RTE_CRYPTODEV_FF_CPU_AESNI (1ULL << 6)
+#define RTE_CRYPTODEV_FF_CPU_AESNI (1ULL << 6)
/**< Utilises CPU AES-NI instructions */
-#define RTE_CRYPTODEV_FF_HW_ACCELERATED (1ULL << 7)
-/**< Operations are off-loaded to an external hardware accelerator */
-#define RTE_CRYPTODEV_FF_CPU_AVX512 (1ULL << 8)
+#define RTE_CRYPTODEV_FF_HW_ACCELERATED (1ULL << 7)
+/**< Operations are off-loaded to an
+ * external hardware accelerator
+ */
+#define RTE_CRYPTODEV_FF_CPU_AVX512 (1ULL << 8)
/**< Utilises CPU SIMD AVX512 instructions */
-#define RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER (1ULL << 9)
-/**< Scatter-gather mbufs are supported */
-#define RTE_CRYPTODEV_FF_CPU_NEON (1ULL << 10)
+#define RTE_CRYPTODEV_FF_IN_PLACE_SGL (1ULL << 9)
+/**< In-place Scatter-gather (SGL) mbufs are supported */
+#define RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT (1ULL << 10)
+/**< Out-of-place Scatter-gather (SGL) mbufs are
+ * supported in input and output
+ */
+#define RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT (1ULL << 11)
+/**< Out-of-place Scatter-gather (SGL) mbufs are supported
+ * in input, combined with flat buffers (FB) in output
+ */
+#define RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT (1ULL << 12)
+/**< Out-of-place Scatter-gather (SGL) mbufs are supported
+ * in output, combined with flat buffers (FB) in input
+ */
+#define RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT (1ULL << 13)
+/**< Out-of-place flat buffers (FB) are supported in input and output */
+#define RTE_CRYPTODEV_FF_CPU_NEON (1ULL << 14)
/**< Utilises CPU NEON instructions */
-#define RTE_CRYPTODEV_FF_CPU_ARM_CE (1ULL << 11)
+#define RTE_CRYPTODEV_FF_CPU_ARM_CE (1ULL << 15)
/**< Utilises ARM CPU Cryptographic Extensions */
-#define RTE_CRYPTODEV_FF_SECURITY (1ULL << 12)
+#define RTE_CRYPTODEV_FF_SECURITY (1ULL << 16)
/**< Support Security Protocol Processing */
diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 73aadaced..84fcf0651 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -3160,8 +3160,11 @@ test_kasumi_encryption_sgl(const struct kasumi_test_data *tdata)
struct rte_cryptodev_info dev_info;
rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
- if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
- printf("Device doesn't support scatter-gather. "
+
+ uint64_t feat_flags = dev_info.feature_flags;
+
+ if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {
+ printf("Device doesn't support in-place scatter-gather. "
"Test Skipped.\n");
return 0;
}
@@ -3308,8 +3311,11 @@ test_kasumi_encryption_oop_sgl(const struct kasumi_test_data *tdata)
struct rte_cryptodev_info dev_info;
rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
- if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
- printf("Device doesn't support scatter-gather. "
+
+ uint64_t feat_flags = dev_info.feature_flags;
+ if (!(feat_flags & RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT)) {
+ printf("Device doesn't support out-of-place scatter-gather "
+ "in both input and output mbufs. "
"Test Skipped.\n");
return 0;
}
@@ -3659,8 +3665,12 @@ test_snow3g_encryption_oop_sgl(const struct snow3g_test_data *tdata)
struct rte_cryptodev_info dev_info;
rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
- if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
- printf("Device doesn't support scatter-gather. "
+
+ uint64_t feat_flags = dev_info.feature_flags;
+
+ if (!(feat_flags & RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT)) {
+ printf("Device doesn't support out-of-place scatter-gather "
+ "in both input and output mbufs. "
"Test Skipped.\n");
return 0;
}
@@ -4493,10 +4503,13 @@ test_zuc_encryption_sgl(const struct wireless_test_data *tdata)
return -ENOTSUP;
rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
- if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
- printf("Device doesn't support scatter-gather. "
+
+ uint64_t feat_flags = dev_info.feature_flags;
+
+ if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {
+ printf("Device doesn't support in-place scatter-gather. "
"Test Skipped.\n");
- return -ENOTSUP;
+ return 0;
}
plaintext_len = ceil_byte_length(tdata->plaintext.len);
diff --git a/test/test/test_cryptodev_blockcipher.c b/test/test/test_cryptodev_blockcipher.c
index 256a7daa2..7a11b3af8 100644
--- a/test/test/test_cryptodev_blockcipher.c
+++ b/test/test/test_cryptodev_blockcipher.c
@@ -77,12 +77,25 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
if (t->feature_mask & BLOCKCIPHER_TEST_FEATURE_SG) {
rte_cryptodev_info_get(dev_id, &dev_info);
- if (!(dev_info.feature_flags &
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
- printf("Device doesn't support scatter-gather. "
+ uint64_t feat_flags = dev_info.feature_flags;
+ uint64_t oop_flag = RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT;
+
+ if (t->feature_mask && BLOCKCIPHER_TEST_FEATURE_OOP) {
+ if (!(feat_flags & oop_flag)) {
+ printf("Device doesn't support out-of-place "
+ "scatter-gather in input mbuf. "
+ "Test Skipped.\n");
+ return 0;
+ }
+ } else {
+ if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {
+ printf("Device doesn't support in-place "
+ "scatter-gather mbufs. "
"Test Skipped.\n");
- return 0;
+ return 0;
+ }
}
+
nb_segs = 3;
}
--
2.14.4
^ permalink raw reply [relevance 3%]
* [dpdk-dev] [PATCH v3 11/16] cryptodev: remove queue start/stop functions
2018-06-28 0:52 4% ` [dpdk-dev] [PATCH v3 01/16] cryptodev: replace bus specific struct with generic dev Pablo de Lara
2018-06-28 0:52 4% ` [dpdk-dev] [PATCH v3 08/16] cryptodev: define value for unlimited sessions Pablo de Lara
@ 2018-06-28 0:52 2% ` Pablo de Lara
2018-06-28 0:53 4% ` [dpdk-dev] [PATCH v3 12/16] cryptodev: remove old get session size functions Pablo de Lara
2018-06-28 0:53 3% ` [dpdk-dev] [PATCH v3 13/16] cryptodev: replace mbuf scatter gather flag Pablo de Lara
4 siblings, 0 replies; 200+ results
From: Pablo de Lara @ 2018-06-28 0:52 UTC (permalink / raw)
To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
Cc: dev, Pablo de Lara
Removed cryptodev queue start/stop functions,
as they were marked deprecated in 18.05, since they
were not implemented by any driver.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
doc/guides/rel_notes/deprecation.rst | 4 ---
doc/guides/rel_notes/release_18_08.rst | 5 +++
drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c | 18 -----------
drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 18 -----------
drivers/crypto/armv8/rte_armv8_pmd_ops.c | 18 -----------
drivers/crypto/ccp/ccp_pmd_ops.c | 16 ----------
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 22 -------------
drivers/crypto/dpaa_sec/dpaa_sec.c | 22 -------------
drivers/crypto/kasumi/rte_kasumi_pmd_ops.c | 18 -----------
drivers/crypto/mvsam/rte_mrvl_pmd_ops.c | 28 ----------------
drivers/crypto/null/null_crypto_pmd_ops.c | 18 -----------
drivers/crypto/openssl/rte_openssl_pmd_ops.c | 18 -----------
drivers/crypto/qat/qat_sym_pmd.c | 2 --
drivers/crypto/scheduler/scheduler_pmd_ops.c | 18 -----------
drivers/crypto/snow3g/rte_snow3g_pmd_ops.c | 18 -----------
drivers/crypto/virtio/virtio_cryptodev.c | 2 --
drivers/crypto/zuc/rte_zuc_pmd_ops.c | 18 -----------
lib/librte_cryptodev/rte_cryptodev.c | 44 --------------------------
lib/librte_cryptodev/rte_cryptodev.h | 37 ----------------------
lib/librte_cryptodev/rte_cryptodev_pmd.h | 26 ---------------
lib/librte_cryptodev/rte_cryptodev_version.map | 2 --
21 files changed, 5 insertions(+), 367 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index dc014da21..91592534e 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -105,10 +105,6 @@ Deprecation Notices
``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
18.05 and removed in 18.08, as there are no drivers doing anything useful
with them.
- - Functions ``rte_cryptodev_queue_pair_start()`` and
- ``rte_cryptodev_queue_pair_stop()`` will be deprecated from 18.05
- and removed in 18.08, as there are no drivers doing anything useful
- with them.
- Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
so some will be replaced by more explicit flags.
- Function ``rte_cryptodev_get_header_session_size()`` will be deprecated
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 2b994ee78..cfb2885a1 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -65,6 +65,11 @@ API Changes
Value 0 is accepted in ``sym.max_nb_sessions``, meaning that a device
supports an unlimited number of sessions.
+* cryptodev: Following functions were deprecated and are removed in 18.08:
+
+ - ``rte_cryptodev_queue_pair_start``
+ - ``rte_cryptodev_queue_pair_stop``
+
ABI Changes
-----------
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
index 796ccdbd8..e24453a7e 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
@@ -243,22 +243,6 @@ aesni_gcm_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-aesni_gcm_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-aesni_gcm_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
aesni_gcm_pmd_qp_count(struct rte_cryptodev *dev)
@@ -340,8 +324,6 @@ struct rte_cryptodev_ops aesni_gcm_pmd_ops = {
.queue_pair_setup = aesni_gcm_pmd_qp_setup,
.queue_pair_release = aesni_gcm_pmd_qp_release,
- .queue_pair_start = aesni_gcm_pmd_qp_start,
- .queue_pair_stop = aesni_gcm_pmd_qp_stop,
.queue_pair_count = aesni_gcm_pmd_qp_count,
.session_get_size = aesni_gcm_pmd_session_get_size,
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
index 101fdc5c6..6eb37a5bf 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -509,22 +509,6 @@ aesni_mb_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-aesni_mb_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-aesni_mb_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
aesni_mb_pmd_qp_count(struct rte_cryptodev *dev)
@@ -607,8 +591,6 @@ struct rte_cryptodev_ops aesni_mb_pmd_ops = {
.queue_pair_setup = aesni_mb_pmd_qp_setup,
.queue_pair_release = aesni_mb_pmd_qp_release,
- .queue_pair_start = aesni_mb_pmd_qp_start,
- .queue_pair_stop = aesni_mb_pmd_qp_stop,
.queue_pair_count = aesni_mb_pmd_qp_count,
.session_get_size = aesni_mb_pmd_session_get_size,
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
index b654f7528..5e8a5a292 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
@@ -258,22 +258,6 @@ armv8_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-armv8_crypto_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-armv8_crypto_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
armv8_crypto_pmd_qp_count(struct rte_cryptodev *dev)
@@ -354,8 +338,6 @@ struct rte_cryptodev_ops armv8_crypto_pmd_ops = {
.queue_pair_setup = armv8_crypto_pmd_qp_setup,
.queue_pair_release = armv8_crypto_pmd_qp_release,
- .queue_pair_start = armv8_crypto_pmd_qp_start,
- .queue_pair_stop = armv8_crypto_pmd_qp_stop,
.queue_pair_count = armv8_crypto_pmd_qp_count,
.session_get_size = armv8_crypto_pmd_session_get_size,
diff --git a/drivers/crypto/ccp/ccp_pmd_ops.c b/drivers/crypto/ccp/ccp_pmd_ops.c
index dbe545c10..1cb944406 100644
--- a/drivers/crypto/ccp/ccp_pmd_ops.c
+++ b/drivers/crypto/ccp/ccp_pmd_ops.c
@@ -748,20 +748,6 @@ ccp_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-static int
-ccp_pmd_qp_start(struct rte_cryptodev *dev __rte_unused,
- uint16_t queue_pair_id __rte_unused)
-{
- return -ENOTSUP;
-}
-
-static int
-ccp_pmd_qp_stop(struct rte_cryptodev *dev __rte_unused,
- uint16_t queue_pair_id __rte_unused)
-{
- return -ENOTSUP;
-}
-
static uint32_t
ccp_pmd_qp_count(struct rte_cryptodev *dev)
{
@@ -837,8 +823,6 @@ struct rte_cryptodev_ops ccp_ops = {
.queue_pair_setup = ccp_pmd_qp_setup,
.queue_pair_release = ccp_pmd_qp_release,
- .queue_pair_start = ccp_pmd_qp_start,
- .queue_pair_stop = ccp_pmd_qp_stop,
.queue_pair_count = ccp_pmd_qp_count,
.session_get_size = ccp_pmd_session_get_size,
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index bc091c560..1b1c30d85 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -1470,26 +1470,6 @@ dpaa2_sec_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return retcode;
}
-/** Start queue pair */
-static int
-dpaa2_sec_queue_pair_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- PMD_INIT_FUNC_TRACE();
-
- return 0;
-}
-
-/** Stop queue pair */
-static int
-dpaa2_sec_queue_pair_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- PMD_INIT_FUNC_TRACE();
-
- return 0;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
dpaa2_sec_queue_pair_count(struct rte_cryptodev *dev)
@@ -2716,8 +2696,6 @@ static struct rte_cryptodev_ops crypto_ops = {
.stats_reset = dpaa2_sec_stats_reset,
.queue_pair_setup = dpaa2_sec_queue_pair_setup,
.queue_pair_release = dpaa2_sec_queue_pair_release,
- .queue_pair_start = dpaa2_sec_queue_pair_start,
- .queue_pair_stop = dpaa2_sec_queue_pair_stop,
.queue_pair_count = dpaa2_sec_queue_pair_count,
.session_get_size = dpaa2_sec_session_get_size,
.session_configure = dpaa2_sec_session_configure,
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 73cae483b..b96552c57 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -1585,26 +1585,6 @@ dpaa_sec_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return 0;
}
-/** Start queue pair */
-static int
-dpaa_sec_queue_pair_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- PMD_INIT_FUNC_TRACE();
-
- return 0;
-}
-
-/** Stop queue pair */
-static int
-dpaa_sec_queue_pair_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- PMD_INIT_FUNC_TRACE();
-
- return 0;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
dpaa_sec_queue_pair_count(struct rte_cryptodev *dev)
@@ -2227,8 +2207,6 @@ static struct rte_cryptodev_ops crypto_ops = {
.dev_infos_get = dpaa_sec_dev_infos_get,
.queue_pair_setup = dpaa_sec_queue_pair_setup,
.queue_pair_release = dpaa_sec_queue_pair_release,
- .queue_pair_start = dpaa_sec_queue_pair_start,
- .queue_pair_stop = dpaa_sec_queue_pair_stop,
.queue_pair_count = dpaa_sec_queue_pair_count,
.session_get_size = dpaa_sec_session_get_size,
.session_configure = dpaa_sec_session_configure,
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
index e72f2ae0b..4174f1f80 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
@@ -229,22 +229,6 @@ kasumi_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-kasumi_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-kasumi_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
kasumi_pmd_qp_count(struct rte_cryptodev *dev)
@@ -325,8 +309,6 @@ struct rte_cryptodev_ops kasumi_pmd_ops = {
.queue_pair_setup = kasumi_pmd_qp_setup,
.queue_pair_release = kasumi_pmd_qp_release,
- .queue_pair_start = kasumi_pmd_qp_start,
- .queue_pair_stop = kasumi_pmd_qp_stop,
.queue_pair_count = kasumi_pmd_qp_count,
.session_get_size = kasumi_pmd_session_get_size,
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
index 07850098b..8710ba3b7 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
@@ -596,32 +596,6 @@ mrvl_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair (PMD ops callback) - not supported.
- *
- * @param dev Pointer to the device structure.
- * @param qp_id ID of the Queue Pair.
- * @returns -ENOTSUP. Always.
- */
-static int
-mrvl_crypto_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair (PMD ops callback) - not supported.
- *
- * @param dev Pointer to the device structure.
- * @param qp_id ID of the Queue Pair.
- * @returns -ENOTSUP. Always.
- */
-static int
-mrvl_crypto_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs (PMD ops callback).
*
* @param dev Pointer to the device structure.
@@ -739,8 +713,6 @@ static struct rte_cryptodev_ops mrvl_crypto_pmd_ops = {
.queue_pair_setup = mrvl_crypto_pmd_qp_setup,
.queue_pair_release = mrvl_crypto_pmd_qp_release,
- .queue_pair_start = mrvl_crypto_pmd_qp_start,
- .queue_pair_stop = mrvl_crypto_pmd_qp_stop,
.queue_pair_count = mrvl_crypto_pmd_qp_count,
.session_get_size = mrvl_crypto_pmd_session_get_size,
diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
index 2842498af..e43fba7db 100644
--- a/drivers/crypto/null/null_crypto_pmd_ops.c
+++ b/drivers/crypto/null/null_crypto_pmd_ops.c
@@ -240,22 +240,6 @@ null_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-null_crypto_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-null_crypto_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
null_crypto_pmd_qp_count(struct rte_cryptodev *dev)
@@ -336,8 +320,6 @@ struct rte_cryptodev_ops pmd_ops = {
.queue_pair_setup = null_crypto_pmd_qp_setup,
.queue_pair_release = null_crypto_pmd_qp_release,
- .queue_pair_start = null_crypto_pmd_qp_start,
- .queue_pair_stop = null_crypto_pmd_qp_stop,
.queue_pair_count = null_crypto_pmd_qp_count,
.session_get_size = null_crypto_pmd_session_get_size,
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index d194e3657..554177d20 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -648,22 +648,6 @@ openssl_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-openssl_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-openssl_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
openssl_pmd_qp_count(struct rte_cryptodev *dev)
@@ -746,8 +730,6 @@ struct rte_cryptodev_ops openssl_pmd_ops = {
.queue_pair_setup = openssl_pmd_qp_setup,
.queue_pair_release = openssl_pmd_qp_release,
- .queue_pair_start = openssl_pmd_qp_start,
- .queue_pair_stop = openssl_pmd_qp_stop,
.queue_pair_count = openssl_pmd_qp_count,
.session_get_size = openssl_pmd_session_get_size,
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index 84dd5bec8..ee8633b85 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -202,8 +202,6 @@ static struct rte_cryptodev_ops crypto_qat_ops = {
.stats_reset = qat_sym_stats_reset,
.queue_pair_setup = qat_sym_qp_setup,
.queue_pair_release = qat_sym_qp_release,
- .queue_pair_start = NULL,
- .queue_pair_stop = NULL,
.queue_pair_count = NULL,
/* Crypto related operations */
diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index 16a8021c8..f363e3257 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -439,22 +439,6 @@ scheduler_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return 0;
}
-/** Start queue pair */
-static int
-scheduler_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-scheduler_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
scheduler_pmd_qp_count(struct rte_cryptodev *dev)
@@ -535,8 +519,6 @@ struct rte_cryptodev_ops scheduler_pmd_ops = {
.queue_pair_setup = scheduler_pmd_qp_setup,
.queue_pair_release = scheduler_pmd_qp_release,
- .queue_pair_start = scheduler_pmd_qp_start,
- .queue_pair_stop = scheduler_pmd_qp_stop,
.queue_pair_count = scheduler_pmd_qp_count,
.session_get_size = scheduler_pmd_session_get_size,
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
index 6f8b9e2c6..fe882c366 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
@@ -231,22 +231,6 @@ snow3g_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-snow3g_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-snow3g_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
snow3g_pmd_qp_count(struct rte_cryptodev *dev)
@@ -327,8 +311,6 @@ struct rte_cryptodev_ops snow3g_pmd_ops = {
.queue_pair_setup = snow3g_pmd_qp_setup,
.queue_pair_release = snow3g_pmd_qp_release,
- .queue_pair_start = snow3g_pmd_qp_start,
- .queue_pair_stop = snow3g_pmd_qp_stop,
.queue_pair_count = snow3g_pmd_qp_count,
.session_get_size = snow3g_pmd_session_get_size,
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 1da4ae871..0be435c8c 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -515,8 +515,6 @@ static struct rte_cryptodev_ops virtio_crypto_dev_ops = {
.queue_pair_setup = virtio_crypto_qp_setup,
.queue_pair_release = virtio_crypto_qp_release,
- .queue_pair_start = NULL,
- .queue_pair_stop = NULL,
.queue_pair_count = NULL,
/* Crypto related operations */
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
index b39e35b9f..79326d8f5 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
@@ -231,22 +231,6 @@ zuc_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-zuc_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-zuc_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
zuc_pmd_qp_count(struct rte_cryptodev *dev)
@@ -327,8 +311,6 @@ struct rte_cryptodev_ops zuc_pmd_ops = {
.queue_pair_setup = zuc_pmd_qp_setup,
.queue_pair_release = zuc_pmd_qp_release,
- .queue_pair_start = zuc_pmd_qp_start,
- .queue_pair_stop = zuc_pmd_qp_stop,
.queue_pair_count = zuc_pmd_qp_count,
.session_get_size = zuc_pmd_session_get_size,
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 457ac5670..a07904fb9 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -702,50 +702,6 @@ rte_cryptodev_queue_pairs_config(struct rte_cryptodev *dev, uint16_t nb_qpairs,
return 0;
}
-int
-rte_cryptodev_queue_pair_start(uint8_t dev_id, uint16_t queue_pair_id)
-{
- struct rte_cryptodev *dev;
-
- if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
- CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
- return -EINVAL;
- }
-
- dev = &rte_crypto_devices[dev_id];
- if (queue_pair_id >= dev->data->nb_queue_pairs) {
- CDEV_LOG_ERR("Invalid queue_pair_id=%d", queue_pair_id);
- return -EINVAL;
- }
-
- RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_pair_start, -ENOTSUP);
-
- return dev->dev_ops->queue_pair_start(dev, queue_pair_id);
-
-}
-
-int
-rte_cryptodev_queue_pair_stop(uint8_t dev_id, uint16_t queue_pair_id)
-{
- struct rte_cryptodev *dev;
-
- if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
- CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
- return -EINVAL;
- }
-
- dev = &rte_crypto_devices[dev_id];
- if (queue_pair_id >= dev->data->nb_queue_pairs) {
- CDEV_LOG_ERR("Invalid queue_pair_id=%d", queue_pair_id);
- return -EINVAL;
- }
-
- RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_pair_stop, -ENOTSUP);
-
- return dev->dev_ops->queue_pair_stop(dev, queue_pair_id);
-
-}
-
int
rte_cryptodev_configure(uint8_t dev_id, struct rte_cryptodev_config *config)
{
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 8c1a4ad6f..c94571ac1 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -574,43 +574,6 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
const struct rte_cryptodev_qp_conf *qp_conf, int socket_id,
struct rte_mempool *session_pool);
-/**
- * @deprecated
- * Start a specified queue pair of a device. It is used
- * when deferred_start flag of the specified queue is true.
- *
- * @param dev_id The identifier of the device
- * @param queue_pair_id The index of the queue pair to start. The value
- * must be in the range [0, nb_queue_pair - 1]
- * previously supplied to
- * rte_crypto_dev_configure().
- * @return
- * - 0: Success, the transmit queue is correctly set up.
- * - -EINVAL: The dev_id or the queue_id out of range.
- * - -ENOTSUP: The function not supported in PMD driver.
- */
-__rte_deprecated
-extern int
-rte_cryptodev_queue_pair_start(uint8_t dev_id, uint16_t queue_pair_id);
-
-/**
- * @deprecated
- * Stop specified queue pair of a device
- *
- * @param dev_id The identifier of the device
- * @param queue_pair_id The index of the queue pair to stop. The value
- * must be in the range [0, nb_queue_pair - 1]
- * previously supplied to
- * rte_cryptodev_configure().
- * @return
- * - 0: Success, the transmit queue is correctly set up.
- * - -EINVAL: The dev_id or the queue_id out of range.
- * - -ENOTSUP: The function not supported in PMD driver.
- */
-__rte_deprecated
-extern int
-rte_cryptodev_queue_pair_stop(uint8_t dev_id, uint16_t queue_pair_id);
-
/**
* Get the number of queue pairs on a specific crypto device
*
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index 1fb7e7d5e..641dd1369 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -184,28 +184,6 @@ typedef void (*cryptodev_stats_reset_t)(struct rte_cryptodev *dev);
typedef void (*cryptodev_info_get_t)(struct rte_cryptodev *dev,
struct rte_cryptodev_info *dev_info);
-/**
- * Start queue pair of a device.
- *
- * @param dev Crypto device pointer
- * @param qp_id Queue Pair Index
- *
- * @return Returns 0 on success.
- */
-typedef int (*cryptodev_queue_pair_start_t)(struct rte_cryptodev *dev,
- uint16_t qp_id);
-
-/**
- * Stop queue pair of a device.
- *
- * @param dev Crypto device pointer
- * @param qp_id Queue Pair Index
- *
- * @return Returns 0 on success.
- */
-typedef int (*cryptodev_queue_pair_stop_t)(struct rte_cryptodev *dev,
- uint16_t qp_id);
-
/**
* Setup a queue pair for a device.
*
@@ -344,10 +322,6 @@ struct rte_cryptodev_ops {
/**< Set up a device queue pair. */
cryptodev_queue_pair_release_t queue_pair_release;
/**< Release a queue pair. */
- cryptodev_queue_pair_start_t queue_pair_start;
- /**< Start a queue pair. */
- cryptodev_queue_pair_stop_t queue_pair_stop;
- /**< Stop a queue pair. */
cryptodev_queue_pair_count_t queue_pair_count;
/**< Get count of the queue pairs. */
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index be8f4c1a7..020b45754 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -22,8 +22,6 @@ DPDK_16.04 {
rte_cryptodev_stop;
rte_cryptodev_queue_pair_count;
rte_cryptodev_queue_pair_setup;
- rte_cryptodev_queue_pair_start;
- rte_cryptodev_queue_pair_stop;
rte_crypto_op_pool_create;
local: *;
--
2.14.4
^ permalink raw reply [relevance 2%]
* [dpdk-dev] [PATCH v3 12/16] cryptodev: remove old get session size functions
` (2 preceding siblings ...)
2018-06-28 0:52 2% ` [dpdk-dev] [PATCH v3 11/16] cryptodev: remove queue start/stop functions Pablo de Lara
@ 2018-06-28 0:53 4% ` Pablo de Lara
2018-06-28 0:53 3% ` [dpdk-dev] [PATCH v3 13/16] cryptodev: replace mbuf scatter gather flag Pablo de Lara
4 siblings, 0 replies; 200+ results
From: Pablo de Lara @ 2018-06-28 0:53 UTC (permalink / raw)
To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
Cc: dev, Pablo de Lara
Removed rte_cryptodev_get_header_session_size
and rte_cryptodev_get_private_session_size functions,
as they have been substituted with functions
specific for symmetric operations, with _sym_ word
after "rte_cryptodev_".
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
doc/guides/rel_notes/deprecation.rst | 6 ------
doc/guides/rel_notes/release_18_08.rst | 8 ++++++++
lib/librte_cryptodev/rte_cryptodev.c | 12 ------------
lib/librte_cryptodev/rte_cryptodev.h | 25 -------------------------
lib/librte_cryptodev/rte_cryptodev_version.map | 2 --
5 files changed, 8 insertions(+), 45 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 91592534e..9a73b1d8e 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -107,9 +107,3 @@ Deprecation Notices
with them.
- Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
so some will be replaced by more explicit flags.
- - Function ``rte_cryptodev_get_header_session_size()`` will be deprecated
- in 18.05, and it gets replaced with ``rte_cryptodev_sym_get_header_session_size()``.
- It will be removed in 18.08.
- - Function ``rte_cryptodev_get_private_session_size()`` will be deprecated
- in 18.05, and it gets replaced with ``rte_cryptodev_sym_get_private_session_size()``.
- It will be removed in 18.08.
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index cfb2885a1..e482d3d5f 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -70,6 +70,14 @@ API Changes
- ``rte_cryptodev_queue_pair_start``
- ``rte_cryptodev_queue_pair_stop``
+* cryptodev: Following functions were deprecated and are replaced by
+ other functions in 18.08:
+
+ - ``rte_cryptodev_get_header_session_size`` is replaced with
+ ``rte_cryptodev_sym_get_header_session_size``
+ - ``rte_cryptodev_get_private_session_size`` is replaced with
+ ``rte_cryptodev_sym_get_private_session_size``
+
ABI Changes
-----------
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index a07904fb9..381330f3d 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -1181,12 +1181,6 @@ rte_cryptodev_sym_session_free(struct rte_cryptodev_sym_session *sess)
return 0;
}
-unsigned int
-rte_cryptodev_get_header_session_size(void)
-{
- return rte_cryptodev_sym_get_header_session_size();
-}
-
unsigned int
rte_cryptodev_sym_get_header_session_size(void)
{
@@ -1198,12 +1192,6 @@ rte_cryptodev_sym_get_header_session_size(void)
return ((sizeof(void *) * nb_drivers) + sizeof(uint8_t));
}
-unsigned int
-rte_cryptodev_get_private_session_size(uint8_t dev_id)
-{
- return rte_cryptodev_sym_get_private_session_size(dev_id);
-}
-
unsigned int
rte_cryptodev_sym_get_private_session_size(uint8_t dev_id)
{
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index c94571ac1..fc491a83b 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -906,31 +906,6 @@ int
rte_cryptodev_sym_session_clear(uint8_t dev_id,
struct rte_cryptodev_sym_session *sess);
-/**
- * @deprecated
- * Get the size of the header session, for all registered drivers.
- *
- * @return
- * Size of the header session.
- */
-__rte_deprecated
-unsigned int
-rte_cryptodev_get_header_session_size(void);
-
-/**
- * @deprecated
- * Get the size of the private session data for a device.
- *
- * @param dev_id The device identifier.
- *
- * @return
- * - Size of the private data, if successful
- * - 0 if device is invalid or does not have private session
- */
-__rte_deprecated
-unsigned int
-rte_cryptodev_get_private_session_size(uint8_t dev_id);
-
/**
* Get the size of the header session, for all registered drivers.
*
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index 020b45754..0ab6d5195 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -63,8 +63,6 @@ DPDK_17.08 {
rte_cryptodev_driver_id_get;
rte_cryptodev_driver_name_get;
rte_cryptodev_get_aead_algo_enum;
- rte_cryptodev_get_header_session_size;
- rte_cryptodev_get_private_session_size;
rte_cryptodev_sym_capability_check_aead;
rte_cryptodev_sym_session_init;
rte_cryptodev_sym_session_clear;
--
2.14.4
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH v3 08/16] cryptodev: define value for unlimited sessions
2018-06-28 0:52 4% ` [dpdk-dev] [PATCH v3 01/16] cryptodev: replace bus specific struct with generic dev Pablo de Lara
@ 2018-06-28 0:52 4% ` Pablo de Lara
2018-06-28 0:52 2% ` [dpdk-dev] [PATCH v3 11/16] cryptodev: remove queue start/stop functions Pablo de Lara
` (2 subsequent siblings)
4 siblings, 0 replies; 200+ results
From: Pablo de Lara @ 2018-06-28 0:52 UTC (permalink / raw)
To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
Cc: dev, Pablo de Lara
Currently, the info structure contains the maximum number
of sessions that a device can manage.
This field was useful when the session mempool was created inside
each device, but now it is created at the application level.
Most PMDs do not have a limitation on the sessions managed,
but a few do, therefore this field must remain in the structure.
However, a new value, 0, can be used to indicate that
a device does not have an actual maximum of sessions.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
app/test-crypto-perf/main.c | 2 +-
doc/guides/rel_notes/release_18_08.rst | 2 ++
examples/ipsec-secgw/ipsec-secgw.c | 2 +-
lib/librte_cryptodev/rte_cryptodev.h | 5 ++++-
test/test/test_cryptodev.c | 6 ++++--
5 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index b02d3f597..87aaba0ce 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -169,7 +169,7 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs,
* A single session is required per queue pair
* in each device
*/
- if (dev_max_nb_sess < opts->nb_qps) {
+ if (dev_max_nb_sess != 0 && dev_max_nb_sess < opts->nb_qps) {
RTE_LOG(ERR, USER1,
"Device does not support at least "
"%u sessions\n", opts->nb_qps);
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 6bf53dc31..2b994ee78 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -62,6 +62,8 @@ API Changes
* cryptodev: In struct ``struct rte_cryptodev_info``, field ``rte_pci_device *pci_dev``
has been replaced with field ``struct rte_device *device``.
+ Value 0 is accepted in ``sym.max_nb_sessions``, meaning that a device
+ supports an unlimited number of sessions.
ABI Changes
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 2582dcb6e..dacf323c9 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -1441,7 +1441,7 @@ cryptodevs_init(void)
dev_conf.nb_queue_pairs = qp;
uint32_t dev_max_sess = cdev_info.sym.max_nb_sessions;
- if (dev_max_sess < (CDEV_MP_NB_OBJS / 2))
+ if (dev_max_sess != 0 && dev_max_sess < (CDEV_MP_NB_OBJS / 2))
rte_exit(EXIT_FAILURE,
"Device does not support at least %u "
"sessions", CDEV_MP_NB_OBJS / 2);
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index a30790b84..8c1a4ad6f 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -357,7 +357,10 @@ struct rte_cryptodev_info {
struct {
unsigned max_nb_sessions;
- /**< Maximum number of sessions supported by device. */
+ /**< Maximum number of sessions supported by device.
+ * If 0, the device does not have any limitation in
+ * number of sessions that can be used.
+ */
} sym;
};
diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 5c906cfae..73aadaced 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -436,7 +436,8 @@ testsuite_setup(void)
* Create mempool with maximum number of sessions * 2,
* to include the session headers
*/
- if (info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
+ if (info.sym.max_nb_sessions != 0 &&
+ info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
RTE_LOG(ERR, USER1, "Device does not support "
"at least %u sessions\n",
MAX_NB_SESSIONS);
@@ -8546,7 +8547,8 @@ test_scheduler_attach_slave_op(void)
unsigned int session_size =
rte_cryptodev_sym_get_private_session_size(i);
- if (info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
+ if (info.sym.max_nb_sessions != 0 &&
+ info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
RTE_LOG(ERR, USER1,
"Device does not support "
"at least %u sessions\n",
--
2.14.4
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH v3 01/16] cryptodev: replace bus specific struct with generic dev
@ 2018-06-28 0:52 4% ` Pablo de Lara
2018-06-28 0:52 4% ` [dpdk-dev] [PATCH v3 08/16] cryptodev: define value for unlimited sessions Pablo de Lara
` (3 subsequent siblings)
4 siblings, 0 replies; 200+ results
From: Pablo de Lara @ 2018-06-28 0:52 UTC (permalink / raw)
To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
Cc: dev, Pablo de Lara
Structure rte_cryptodev_info has currently PCI device
information ("struct rte_pci_device") in it.
This information is not generic to all devices,
so this gets replaced with the generic "rte_device" structure,
compatible with all crypto devices.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
doc/guides/prog_guide/cryptodev_lib.rst | 2 +-
doc/guides/rel_notes/deprecation.rst | 2 --
doc/guides/rel_notes/release_18_08.rst | 5 ++++-
drivers/crypto/qat/qat_sym_pmd.c | 1 -
drivers/crypto/virtio/virtio_cryptodev.c | 1 -
lib/librte_cryptodev/rte_cryptodev.c | 1 +
lib/librte_cryptodev/rte_cryptodev.h | 6 +++---
7 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst
index 30f0bcf7a..d02bb7514 100644
--- a/doc/guides/prog_guide/cryptodev_lib.rst
+++ b/doc/guides/prog_guide/cryptodev_lib.rst
@@ -269,7 +269,7 @@ relevant information for the device.
struct rte_cryptodev_info {
const char *driver_name;
uint8_t driver_id;
- struct rte_pci_device *pci_dev;
+ struct rte_device *device;
uint64_t feature_flags;
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 1ce692eac..b71080bb8 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -104,8 +104,6 @@ Deprecation Notices
- Removal of ``sym`` structure in ``rte_cryptodev_info`` structure,
containing fields not relevant anymore since the session mempool
is not internal in the crypto device anymore.
- - Replacement of ``pci_dev`` field with the more generic ``rte_device``
- structure.
- Functions ``rte_cryptodev_queue_pair_attach_sym_session()`` and
``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
18.05 and removed in 18.08, as there are no drivers doing anything useful
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index bc0124295..6bf53dc31 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -60,6 +60,9 @@ API Changes
Also, make sure to start the actual text at the margin.
=========================================================
+* cryptodev: In struct ``struct rte_cryptodev_info``, field ``rte_pci_device *pci_dev``
+ has been replaced with field ``struct rte_device *device``.
+
ABI Changes
-----------
@@ -118,7 +121,7 @@ The libraries prepended with a plus sign were incremented in this version.
librte_cmdline.so.2
librte_common_octeontx.so.1
librte_compressdev.so.1
- librte_cryptodev.so.4
+ + librte_cryptodev.so.5
librte_distributor.so.1
librte_eal.so.7
librte_ethdev.so.9
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index 115639089..0bc042a75 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -74,7 +74,6 @@ static void qat_sym_dev_info_get(struct rte_cryptodev *dev,
info->capabilities = internals->qat_dev_capabilities;
info->sym.max_nb_sessions = QAT_SYM_PMD_MAX_NB_SESSIONS;
info->driver_id = cryptodev_qat_driver_id;
- info->pci_dev = RTE_DEV_TO_PCI(dev->device);
}
}
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index df88953f6..482edea1a 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -1409,7 +1409,6 @@ virtio_crypto_dev_info_get(struct rte_cryptodev *dev,
if (info != NULL) {
info->driver_id = cryptodev_virtio_driver_id;
- info->pci_dev = RTE_DEV_TO_PCI(dev->device);
info->feature_flags = dev->feature_flags;
info->max_nb_queue_pairs = hw->max_dataqueues;
info->sym.max_nb_sessions =
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 7e5821246..457ac5670 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -966,6 +966,7 @@ rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info)
(*dev->dev_ops->dev_infos_get)(dev, dev_info);
dev_info->driver_name = dev->device->driver->name;
+ dev_info->device = dev->device;
}
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index b7a4cf0a2..62a5566ba 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -342,9 +342,9 @@ rte_cryptodev_get_feature_name(uint64_t flag);
/** Crypto device information */
struct rte_cryptodev_info {
- const char *driver_name; /**< Driver name. */
- uint8_t driver_id; /**< Driver identifier */
- struct rte_pci_device *pci_dev; /**< PCI information. */
+ const char *driver_name; /**< Driver name. */
+ uint8_t driver_id; /**< Driver identifier */
+ struct rte_device *device; /**< Generic device information. */
uint64_t feature_flags;
/**< Feature flags exposes HW/SW features for the given device */
--
2.14.4
^ permalink raw reply [relevance 4%]
* Re: [dpdk-dev] DPDK 18.05 only works with up to 4 NUMAs systems
@ 2018-06-28 8:42 3% ` Burakov, Anatoly
2018-07-14 9:44 0% ` Kumar, Ravi1
0 siblings, 1 reply; 200+ results
From: Burakov, Anatoly @ 2018-06-28 8:42 UTC (permalink / raw)
To: Kumar, Ravi1, dev
On 28-Jun-18 8:03 AM, Kumar, Ravi1 wrote:
>> On 22-Jun-18 5:37 PM, Kumar, Ravi1 wrote:
>>> Hi,
>>>
>>> As the memory subsystem in DPDK 18.05 is reworked, it has introduced a problem for AMD EPYC 2P platforms.
>>> The issue is that DPDK 18.05 only works with up to 4 NUMAs. For AMD EPYC 2P platforms, DPDK now only works with P0 (NUMA 0-3) and does not work with P1 (NUMA 4-7).
>>>
>>> The problem can be fixed by reducing some of the default settings of the memory subsystem.
>>>
>>> To solve this issue:
>>> - We can create our own config file for our integrated 10G NIC, that is for amd_xgbe PMD. This will make amd_xgbe immune to this problem.
>>> - However, when any other NIC (Intel, Mellanox, Cavium or Broadcom etc.) is plugged into NUMA 4-7, the problem will still be exposed.
>>> - If we only fix it in "config/common_base", it will cover all cases.
>>>
>>> Our current workaround is:
>>> Edit config file "./config/common_base" and change the following line
>>> CONFIG_RTE_MAX_MEM_MB_PER_TYPE=131072
>>> TO
>>> CONFIG_RTE_MAX_MEM_MB_PER_TYPE=65536
>>>
>>> Any better solution for this issue is welcome.
>>>
>>> We would appreciate if this issue can be fixed in the next release (18.08) so the STOCK version of DPDK works on AMD EPYC 2P platforms.
>>>
>>> Regards,
>>> Ravi
>>>
>>
>> Hi Ravi,
>>
>> What is the reason behind this limitation? Is it too much virtual memory being preallocated?
>>
>> --
>> Thanks,
>> Anatoly
>>
> Hi Anatoly,
>
> We believe this is true. By default, too much virtual memory is being preallocated. The result is it can only support up to 4 NUMAs.
>
> Our workaround is to reduce the amount of preallocated virtual memory by half, so to support up to 8 NUMAs.
>
> Regards,
> Ravi
>
I assume you see a bunch of failed mmap() calls with ENOMEM?
In general, changing base config that way is an OK change, and it won't
even be an ABI break since this memory is allocated at runtime. I just
want to make sure that we fix the underlying problem, rather than the
symptom.
--
Thanks,
Anatoly
^ permalink raw reply [relevance 3%]
* [dpdk-dev] [PATCH v6 19/19] doc: update release notes for multi process hotplug
2018-06-28 1:52 2% ` [dpdk-dev] [PATCH v6 00/19] enable hotplug on multi-process Qi Zhang
@ 2018-06-28 1:52 4% ` Qi Zhang
2018-06-28 9:39 0% ` Burakov, Anatoly
0 siblings, 1 reply; 200+ results
From: Qi Zhang @ 2018-06-28 1:52 UTC (permalink / raw)
To: thomas, anatoly.burakov
Cc: konstantin.ananyev, dev, bruce.richardson, ferruh.yigit,
benjamin.h.shelton, narender.vangati, Qi Zhang
Update release notes for the new multi process hotplug feature.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
doc/guides/rel_notes/release_18_08.rst | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index bc0124295..fc4736814 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -46,6 +46,20 @@ New Features
Flow API support has been added to CXGBE Poll Mode Driver to offload
flows to Chelsio T5/T6 NICs.
+* **Support ethernet device hotplug for primary-secondary model.**
+
+ In primary-secondary process model, ethernet devices are regarded as shared
+ by default, attach or detach a device on any process will broadcast to
+ other processes through mp channel then device information will be
+ synchronzied on all processes. While secondary process can still attach
+ or detach a private device (vdev only) with specific API.
+
+* **Support ethernet device lock.**
+
+ An ethernet device can be directly or conditionally locked. A directly
+ locked device can't be detached, while when try to detach a conditionally
+ locked device a pre-registered callback will be invoked to perform condition
+ check and decide if it can be detached or not.
API Changes
-----------
@@ -60,6 +74,13 @@ API Changes
Also, make sure to start the actual text at the margin.
=========================================================
+* ethdev: scope of rte_eth_dev_attach and rte_eth_dev_detach is extended.
+
+ In primary-secondary process model, ``rte_eth_dev_attach`` will guarantee that
+ device be attached on all processes, if any process failed to attach, it will
+ rollback to orignal status. ``rte_eth_dev_detach`` also guarantee device be
+ detached on all processes, if device is locked by any process, it will roll
+ back to original status.
ABI Changes
-----------
--
2.13.6
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH v6 00/19] enable hotplug on multi-process
` (2 preceding siblings ...)
2018-06-28 1:49 2% ` [dpdk-dev] [PATCH v5 00/24] enable hotplug on multi-process Qi Zhang
@ 2018-06-28 1:52 2% ` Qi Zhang
2018-06-28 1:52 4% ` [dpdk-dev] [PATCH v6 19/19] doc: update release notes for multi process hotplug Qi Zhang
2018-06-28 12:56 1% ` [dpdk-dev] [PATCH v7 00/19] enable hotplug on multi-process Qi Zhang
` (8 subsequent siblings)
12 siblings, 1 reply; 200+ results
From: Qi Zhang @ 2018-06-28 1:52 UTC (permalink / raw)
To: thomas, anatoly.burakov
Cc: konstantin.ananyev, dev, bruce.richardson, ferruh.yigit,
benjamin.h.shelton, narender.vangati, Qi Zhang
v6:
- remove bus->scan_one, since ABI break is not necessary.
- remove patch for failsafe PMD since it will not support secondary.
- fix wrong implemenation on ixgbe.
- add rte_eth_dev_release_port_private into rte_eth_dev_pci_generic_remove for
secondary process, so we don't need to patch on PMD if PMD use the
default remove function.
- add release notes update.
v5:
- since we will keep mp thread separate from interrupt thread,
it is not necessary to use temporary thread, we use rte_eal_alarm_set.
- remove the change in rte_eth_dev_release_port, since there is a better
way to prevent rte_eth_dev_release_port be called after
rte_eth_dev_release_port_private.
- fix the issue that lock does not take effect on secondary due to
previous re-work
- fix the issue when the first attached device is a private device from
secondary. (patch 8/24)
- work around for reply a sync request in separate thread, this is still
an open and in discussion as below.
https://mails.dpdk.org/archives/dev/2018-June/105359.html
v4:
- since mp thread will be merged to interrupt thread, the fix on v3
for sync IPC deadlock will not work. the new version enable the
machanism to invoke a mp action callback in a temporary thread to
avoid the IPC deadlock, with this, secondary to primary request
impelemtation also be simplified, since we can use sync request
directly in a separate thread.
v3:
- enable mp init callback register to help non-eal module to initialize
mp channel during rte_eal_init
- fix when attach share device from secondary.
1) dead lock due to sync IPC be invoked in rte_malloc in primary
process when handle secondary request to attach device, the
solution is primary process to issue share device attach/detach
in interrupt thread.
2) return port_id not correct.
- check nb_sent and nb_received in sync IPC.
- fix memory leak duirng error handling at attach_on_secondary.
- improve clean_lock_callback to only lock/unlock spinlock once
- improve error code return in check-reply during async IPC.
- remove rte_ prefix of internal function in ethdev_mp.c
- sample code improvement.
1) rename sample to "hotplug_mp", and move to example/multi-process.
2) cleanup header include.
3) call rte_eal_cleanup before exit.
v2:
- rename rte_ethdev_mp.* to ethdev_mp.*
- rename rte_ethdev_lock.* to ethdev_lock.*
- move internal funciton to ethdev_private.h
- separate rte_eth_dev_[un]lock into rte_eth_dev_[un]lock and
rte_eth_dev_[un]lock_with_callback
- lock callbacks will be removed automatically after device is detached.
- add experimental tag for all new APIs.
- fix coding style issue.
- fix wrong lisence header in sample code.
- fix spelling
- fix meson.build.
- improve comments.
Background:
===========
Currently secondary process will only sync ethdev from primary
process at init stage, but it will not be aware if device
is attached/detached on primary process at runtime.
While there is the requirement from application that take
primary-secondary process model. The primary process work as a
resource management process, it will create/destroy virtual device
at runtime, while the secondary process deal with the network stuff
with these devices.
Solution:
=========
So the orignial intention is to fix this gap, but beyond that
the patch set provide a more comprehesive solution to handle
different hotplug cases in multi-process situation, it cover below
scenario:
1. Attach a share device from primary
2. Detach a share device from primary
3. Attach a share device from secondary
4. Detach a share device from secondary
5. Attach a private device from secondary
6. Detach a private device from secondary
7. Detach a share device from secondary privately
8. Attach a share device from secondary privately
In primary-secondary process model, we assume ethernet devices are
shared by default. that means attach or detach a device on any process
will broadcast to all other processes through mp channel then device
information will be synchronized on all processes.
Any failure during attaching process will cause inconsistent status
between processes, so proper rollback action should be considered.
Also, it is not safe to detach a share device when other process still
use it, so a handshake mechanism is introduced.
Scenario for Case 1, 2:
attach device from primary
a) primary attach the new device if failed goto h).
b) primary send attach sync request to all secondary.
c) secondary receive request and attach device and send reply.
d) primary check the reply if all success go to i).
e) primary send attach rollback sync request to all secondary.
f) secondary receive the request and detach device and send reply.
g) primary receive the reply and detach device as rollback action.
h) attach fail
i) attach success
detach device from primary
a) primary perform pre-detach check, if device is locked, goto i).
b) primary send pre-detach sync request to all secondary.
c) secondary perform pre-detach check and send reply.
d) primary check the reply if any fail goto i).
e) primary send detach sync request to all secondary
f) secondary detach the device and send reply (assume no fail)
g) primary detach the device.
h) detach success
i) detach failed
Scenario for case 3, 4:
attach device from secondary:
a) seconary send asycn request to primary and wait on a condition
which will be released by matched response from primary.
b) primary receive the request and attach the new device if failed
goto i).
c) primary forward attach request to all secondary as async request
(because this in mp thread context, use sync request will deadlock,
same reason for all following async request.)
d) secondary receive request and attach device and send reply.
e) primary check the reply if all success go to j).
f) primary send attach rollback async request to all secondary.
g) secondary receive the request and detach device and send reply.
h) primary receive the reply and detach device as rollback action.
i) send fail response to secondary, goto k).
j) send success response to secondary.
k) secondary process receive response and return.
detach device from secondary:
a) secondary send async request to primary and wait on a condition
which will be released by matched response from primary.
b) primary receive the request and perform pre-detach check, if device
is locked, goto j).
c) primary send pre-detach async request to all secondary.
d) secondary perform pre-detach check and send reply.
e) primary check the reply if any fail goto j).
f) primary send detach async request to all secondary
g) secondary detach the device and send reply
h) primary detach the device.
i) send success response to secondary, goto k).
j) send fail response to secondary.
k) secondary process receive response and return.
Case 5, 6:
Secondary process can attach private device which only visible to
itself, in this case no IPC is involved, primary process is not allowed
to have private device so far.
Case 7, 8:
Secondary process can also temporally to detach a share device
"privately" then attach it back later, this action also not impact other
processes.
APIs chenages:
==============
rte_eth_dev_attach and rte_eth_dev_attach are extended to support
share device attach/detach in primary-secondary process model, it will
be called in case 1,2,3,4.
New API rte_eth_dev_attach_private and rte_eth_dev_detach_private are
introduced to cover case 5,6,7,8, this API can only be invoked in
secondary process.
New API rte_eth_dev_lock and rte_eth_dev_unlock are introduced to let
application lock or unlock on specific ethdev, a locked device
can't be detached. This help applicaiton to prevent unexpected
device detaching, especially in multi-process envrionment.
Aslo the new API let application to register a callback function
which will be invoked before a device is going to be detached,
the return value of the function will decide if device will continue
be detached or not, this support application to do condition check
at runtime.
PMD Impact:
===========
Currently device removing is not handled well in secondary process on
most pmd drivers, rte_eth_dev_relase_port will be invoked and will mess up
primary process since it reset all shared data. So we introduced new API
rte_eth_dev_release_port_local which only reset ethdev's state to unsued
but not touch shared data so other process will not be impacted.
Since not all device driver is target to support primary-secondary
process model, so the patch set only fix this on all Intel devices and
vdev, it can be refereneced by other driver when equevalent fix is
required
Limitation:
===========
1. The solution does not cover the case that primary process exit while
secondary processes still be active. Though this is not a typial use
case, but if this happens:
a. secondary process can't attach / detach any shared device since no
primary exist.
b. secondary process still can attach / detach private device.
c. secondary process still can detach a share device privately but may
not attach it back, that ethdev slot will become zombie slot.
2. So for, for PCI bus, case 5,6 is not supported. PCI bus scan/probe
mechanism can be improved to support attach private device on secondary
process, but this is not the scope of this patchset.
Example:
========
The patchset also contains a example to demonstrate device hotplug
in multi-process model, below are detail instructions.
/* start sample code as primary then secondary */
./hotplug_mp --proc-type=auto
Command Line Example:
>help
>list
/* attach a af_packet vdev */
>attach net_af_packet,iface=eth0
/* detach port 0 */
>detach 0
/* attach a private af_packet vdev (secondary process only)*/
>attachp net_af_packet,iface=eth0
/* detach a private device (secondary process only) */
>detachp 0
/* lock port 0 */
>lock 0
/* unlock port 0 */
>unlock 0
Qi Zhang (19):
ethdev: add function to release port in local process
eal: enable multi process init callback
ethdev: enable hotplug on multi-process
ethdev: introduce device lock
ethdev: support attach or detach share device from secondary
ethdev: support attach private device as first
net/i40e: enable port detach on secondary process
net/ixgbe: enable port detach on secondary process
net/af_packet: enable port detach on secondary process
net/bonding: enable port detach on secondary process
net/kni: enable port detach on secondary process
net/null: enable port detach on secondary process
net/octeontx: enable port detach on secondary process
net/pcap: enable port detach on secondary process
net/softnic: enable port detach on secondary process
net/tap: enable port detach on secondary process
net/vhost: enable port detach on secondary process
examples/multi_process: add hotplug sample
doc: update release notes for multi process hotplug
doc/guides/rel_notes/release_18_08.rst | 21 ++
drivers/net/af_packet/rte_eth_af_packet.c | 11 +
drivers/net/bonding/rte_eth_bond_pmd.c | 11 +
drivers/net/i40e/i40e_ethdev.c | 2 +
drivers/net/ixgbe/ixgbe_ethdev.c | 3 +
drivers/net/kni/rte_eth_kni.c | 11 +
drivers/net/null/rte_eth_null.c | 16 +-
drivers/net/octeontx/octeontx_ethdev.c | 16 ++
drivers/net/pcap/rte_eth_pcap.c | 15 +-
drivers/net/softnic/rte_eth_softnic.c | 19 +-
drivers/net/tap/rte_eth_tap.c | 17 +-
drivers/net/vhost/rte_eth_vhost.c | 11 +
examples/multi_process/Makefile | 1 +
examples/multi_process/hotplug_mp/Makefile | 23 ++
examples/multi_process/hotplug_mp/commands.c | 356 +++++++++++++++++++++++
examples/multi_process/hotplug_mp/commands.h | 10 +
examples/multi_process/hotplug_mp/main.c | 41 +++
lib/librte_eal/common/eal_common_proc.c | 51 +++-
lib/librte_eal/common/eal_private.h | 5 +
lib/librte_eal/common/include/rte_eal.h | 34 +++
lib/librte_eal/linuxapp/eal/eal.c | 2 +
lib/librte_ethdev/Makefile | 2 +
lib/librte_ethdev/ethdev_lock.c | 140 +++++++++
lib/librte_ethdev/ethdev_lock.h | 31 ++
lib/librte_ethdev/ethdev_mp.c | 415 +++++++++++++++++++++++++++
lib/librte_ethdev/ethdev_mp.h | 42 +++
lib/librte_ethdev/ethdev_private.h | 42 +++
lib/librte_ethdev/meson.build | 2 +
lib/librte_ethdev/rte_ethdev.c | 312 ++++++++++++++++++--
lib/librte_ethdev/rte_ethdev.h | 169 +++++++++++
lib/librte_ethdev/rte_ethdev_core.h | 5 +
lib/librte_ethdev/rte_ethdev_driver.h | 13 +
lib/librte_ethdev/rte_ethdev_pci.h | 3 +
33 files changed, 1815 insertions(+), 37 deletions(-)
create mode 100644 examples/multi_process/hotplug_mp/Makefile
create mode 100644 examples/multi_process/hotplug_mp/commands.c
create mode 100644 examples/multi_process/hotplug_mp/commands.h
create mode 100644 examples/multi_process/hotplug_mp/main.c
create mode 100644 lib/librte_ethdev/ethdev_lock.c
create mode 100644 lib/librte_ethdev/ethdev_lock.h
create mode 100644 lib/librte_ethdev/ethdev_mp.c
create mode 100644 lib/librte_ethdev/ethdev_mp.h
create mode 100644 lib/librte_ethdev/ethdev_private.h
--
2.13.6
^ permalink raw reply [relevance 2%]
* [dpdk-dev] [PATCH v6 19/19] doc: update release notes for multi process hotplug
2018-06-28 1:49 2% ` [dpdk-dev] [PATCH v5 00/24] enable hotplug on multi-process Qi Zhang
@ 2018-06-28 1:50 4% ` Qi Zhang
0 siblings, 0 replies; 200+ results
From: Qi Zhang @ 2018-06-28 1:50 UTC (permalink / raw)
To: thomas, anatoly.burakov
Cc: konstantin.ananyev, dev, bruce.richardson, ferruh.yigit,
benjamin.h.shelton, narender.vangati, Qi Zhang
Update release notes for the new multi process hotplug feature.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
doc/guides/rel_notes/release_18_08.rst | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index bc0124295..fc4736814 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -46,6 +46,20 @@ New Features
Flow API support has been added to CXGBE Poll Mode Driver to offload
flows to Chelsio T5/T6 NICs.
+* **Support ethernet device hotplug for primary-secondary model.**
+
+ In primary-secondary process model, ethernet devices are regarded as shared
+ by default, attach or detach a device on any process will broadcast to
+ other processes through mp channel then device information will be
+ synchronzied on all processes. While secondary process can still attach
+ or detach a private device (vdev only) with specific API.
+
+* **Support ethernet device lock.**
+
+ An ethernet device can be directly or conditionally locked. A directly
+ locked device can't be detached, while when try to detach a conditionally
+ locked device a pre-registered callback will be invoked to perform condition
+ check and decide if it can be detached or not.
API Changes
-----------
@@ -60,6 +74,13 @@ API Changes
Also, make sure to start the actual text at the margin.
=========================================================
+* ethdev: scope of rte_eth_dev_attach and rte_eth_dev_detach is extended.
+
+ In primary-secondary process model, ``rte_eth_dev_attach`` will guarantee that
+ device be attached on all processes, if any process failed to attach, it will
+ rollback to orignal status. ``rte_eth_dev_detach`` also guarantee device be
+ detached on all processes, if device is locked by any process, it will roll
+ back to original status.
ABI Changes
-----------
--
2.13.6
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH v5 00/24] enable hotplug on multi-process
@ 2018-06-28 1:49 2% ` Qi Zhang
2018-06-28 1:50 4% ` [dpdk-dev] [PATCH v6 19/19] doc: update release notes for multi process hotplug Qi Zhang
2018-06-28 1:52 2% ` [dpdk-dev] [PATCH v6 00/19] enable hotplug on multi-process Qi Zhang
` (9 subsequent siblings)
12 siblings, 1 reply; 200+ results
From: Qi Zhang @ 2018-06-28 1:49 UTC (permalink / raw)
To: thomas, anatoly.burakov
Cc: konstantin.ananyev, dev, bruce.richardson, ferruh.yigit,
benjamin.h.shelton, narender.vangati, Qi Zhang
v6:
- remove bus->scan_one, since ABI break is not necessary.
- remove patch for failsafe PMD since it will not support secondary.
- fix wrong implemenation on ixgbe.
- add rte_eth_dev_release_port_private into rte_eth_dev_pci_generic_remove for
secondary process, so we don't need to patch on PMD if PMD use the
default remove function.
- add release notes update.
v5:
- since we will keep mp thread separate from interrupt thread,
it is not necessary to use temporary thread, we use rte_eal_alarm_set.
- remove the change in rte_eth_dev_release_port, since there is a better
way to prevent rte_eth_dev_release_port be called after
rte_eth_dev_release_port_private.
- fix the issue that lock does not take effect on secondary due to
previous re-work
- fix the issue when the first attached device is a private device from
secondary. (patch 8/24)
- work around for reply a sync request in separate thread, this is still
an open and in discussion as below.
https://mails.dpdk.org/archives/dev/2018-June/105359.html
v4:
- since mp thread will be merged to interrupt thread, the fix on v3
for sync IPC deadlock will not work. the new version enable the
machanism to invoke a mp action callback in a temporary thread to
avoid the IPC deadlock, with this, secondary to primary request
impelemtation also be simplified, since we can use sync request
directly in a separate thread.
v3:
- enable mp init callback register to help non-eal module to initialize
mp channel during rte_eal_init
- fix when attach share device from secondary.
1) dead lock due to sync IPC be invoked in rte_malloc in primary
process when handle secondary request to attach device, the
solution is primary process to issue share device attach/detach
in interrupt thread.
2) return port_id not correct.
- check nb_sent and nb_received in sync IPC.
- fix memory leak duirng error handling at attach_on_secondary.
- improve clean_lock_callback to only lock/unlock spinlock once
- improve error code return in check-reply during async IPC.
- remove rte_ prefix of internal function in ethdev_mp.c
- sample code improvement.
1) rename sample to "hotplug_mp", and move to example/multi-process.
2) cleanup header include.
3) call rte_eal_cleanup before exit.
v2:
- rename rte_ethdev_mp.* to ethdev_mp.*
- rename rte_ethdev_lock.* to ethdev_lock.*
- move internal funciton to ethdev_private.h
- separate rte_eth_dev_[un]lock into rte_eth_dev_[un]lock and
rte_eth_dev_[un]lock_with_callback
- lock callbacks will be removed automatically after device is detached.
- add experimental tag for all new APIs.
- fix coding style issue.
- fix wrong lisence header in sample code.
- fix spelling
- fix meson.build.
- improve comments.
Background:
===========
Currently secondary process will only sync ethdev from primary
process at init stage, but it will not be aware if device
is attached/detached on primary process at runtime.
While there is the requirement from application that take
primary-secondary process model. The primary process work as a
resource management process, it will create/destroy virtual device
at runtime, while the secondary process deal with the network stuff
with these devices.
Solution:
=========
So the orignial intention is to fix this gap, but beyond that
the patch set provide a more comprehesive solution to handle
different hotplug cases in multi-process situation, it cover below
scenario:
1. Attach a share device from primary
2. Detach a share device from primary
3. Attach a share device from secondary
4. Detach a share device from secondary
5. Attach a private device from secondary
6. Detach a private device from secondary
7. Detach a share device from secondary privately
8. Attach a share device from secondary privately
In primary-secondary process model, we assume ethernet devices are
shared by default. that means attach or detach a device on any process
will broadcast to all other processes through mp channel then device
information will be synchronized on all processes.
Any failure during attaching process will cause inconsistent status
between processes, so proper rollback action should be considered.
Also, it is not safe to detach a share device when other process still
use it, so a handshake mechanism is introduced.
Scenario for Case 1, 2:
attach device from primary
a) primary attach the new device if failed goto h).
b) primary send attach sync request to all secondary.
c) secondary receive request and attach device and send reply.
d) primary check the reply if all success go to i).
e) primary send attach rollback sync request to all secondary.
f) secondary receive the request and detach device and send reply.
g) primary receive the reply and detach device as rollback action.
h) attach fail
i) attach success
detach device from primary
a) primary perform pre-detach check, if device is locked, goto i).
b) primary send pre-detach sync request to all secondary.
c) secondary perform pre-detach check and send reply.
d) primary check the reply if any fail goto i).
e) primary send detach sync request to all secondary
f) secondary detach the device and send reply (assume no fail)
g) primary detach the device.
h) detach success
i) detach failed
Scenario for case 3, 4:
attach device from secondary:
a) seconary send asycn request to primary and wait on a condition
which will be released by matched response from primary.
b) primary receive the request and attach the new device if failed
goto i).
c) primary forward attach request to all secondary as async request
(because this in mp thread context, use sync request will deadlock,
same reason for all following async request.)
d) secondary receive request and attach device and send reply.
e) primary check the reply if all success go to j).
f) primary send attach rollback async request to all secondary.
g) secondary receive the request and detach device and send reply.
h) primary receive the reply and detach device as rollback action.
i) send fail response to secondary, goto k).
j) send success response to secondary.
k) secondary process receive response and return.
detach device from secondary:
a) secondary send async request to primary and wait on a condition
which will be released by matched response from primary.
b) primary receive the request and perform pre-detach check, if device
is locked, goto j).
c) primary send pre-detach async request to all secondary.
d) secondary perform pre-detach check and send reply.
e) primary check the reply if any fail goto j).
f) primary send detach async request to all secondary
g) secondary detach the device and send reply
h) primary detach the device.
i) send success response to secondary, goto k).
j) send fail response to secondary.
k) secondary process receive response and return.
Case 5, 6:
Secondary process can attach private device which only visible to
itself, in this case no IPC is involved, primary process is not allowed
to have private device so far.
Case 7, 8:
Secondary process can also temporally to detach a share device
"privately" then attach it back later, this action also not impact other
processes.
APIs chenages:
==============
rte_eth_dev_attach and rte_eth_dev_attach are extended to support
share device attach/detach in primary-secondary process model, it will
be called in case 1,2,3,4.
New API rte_eth_dev_attach_private and rte_eth_dev_detach_private are
introduced to cover case 5,6,7,8, this API can only be invoked in
secondary process.
New API rte_eth_dev_lock and rte_eth_dev_unlock are introduced to let
application lock or unlock on specific ethdev, a locked device
can't be detached. This help applicaiton to prevent unexpected
device detaching, especially in multi-process envrionment.
Aslo the new API let application to register a callback function
which will be invoked before a device is going to be detached,
the return value of the function will decide if device will continue
be detached or not, this support application to do condition check
at runtime.
PMD Impact:
===========
Currently device removing is not handled well in secondary process on
most pmd drivers, rte_eth_dev_relase_port will be invoked and will mess up
primary process since it reset all shared data. So we introduced new API
rte_eth_dev_release_port_local which only reset ethdev's state to unsued
but not touch shared data so other process will not be impacted.
Since not all device driver is target to support primary-secondary
process model, so the patch set only fix this on all Intel devices and
vdev, it can be refereneced by other driver when equevalent fix is
required
Limitation:
===========
1. The solution does not cover the case that primary process exit while
secondary processes still be active. Though this is not a typial use
case, but if this happens:
a. secondary process can't attach / detach any shared device since no
primary exist.
b. secondary process still can attach / detach private device.
c. secondary process still can detach a share device privately but may
not attach it back, that ethdev slot will become zombie slot.
2. So for, for PCI bus, case 5,6 is not supported. PCI bus scan/probe
mechanism can be improved to support attach private device on secondary
process, but this is not the scope of this patchset.
Example:
========
The patchset also contains a example to demonstrate device hotplug
in multi-process model, below are detail instructions.
/* start sample code as primary then secondary */
./hotplug_mp --proc-type=auto
Command Line Example:
>help
>list
/* attach a af_packet vdev */
>attach net_af_packet,iface=eth0
/* detach port 0 */
>detach 0
/* attach a private af_packet vdev (secondary process only)*/
>attachp net_af_packet,iface=eth0
/* detach a private device (secondary process only) */
>detachp 0
/* lock port 0 */
>lock 0
/* unlock port 0 */
>unlock 0
Qi Zhang (19):
ethdev: add function to release port in local process
eal: enable multi process init callback
ethdev: enable hotplug on multi-process
ethdev: introduce device lock
ethdev: support attach or detach share device from secondary
ethdev: support attach private device as first
net/i40e: enable port detach on secondary process
net/ixgbe: enable port detach on secondary process
net/af_packet: enable port detach on secondary process
net/bonding: enable port detach on secondary process
net/kni: enable port detach on secondary process
net/null: enable port detach on secondary process
net/octeontx: enable port detach on secondary process
net/pcap: enable port detach on secondary process
net/softnic: enable port detach on secondary process
net/tap: enable port detach on secondary process
net/vhost: enable port detach on secondary process
examples/multi_process: add hotplug sample
doc: update release notes for multi process hotplug
doc/guides/rel_notes/release_18_08.rst | 21 ++
drivers/net/af_packet/rte_eth_af_packet.c | 11 +
drivers/net/bonding/rte_eth_bond_pmd.c | 11 +
drivers/net/i40e/i40e_ethdev.c | 2 +
drivers/net/ixgbe/ixgbe_ethdev.c | 3 +
drivers/net/kni/rte_eth_kni.c | 11 +
drivers/net/null/rte_eth_null.c | 16 +-
drivers/net/octeontx/octeontx_ethdev.c | 16 ++
drivers/net/pcap/rte_eth_pcap.c | 15 +-
drivers/net/softnic/rte_eth_softnic.c | 19 +-
drivers/net/tap/rte_eth_tap.c | 17 +-
drivers/net/vhost/rte_eth_vhost.c | 11 +
examples/multi_process/Makefile | 1 +
examples/multi_process/hotplug_mp/Makefile | 23 ++
examples/multi_process/hotplug_mp/commands.c | 356 +++++++++++++++++++++++
examples/multi_process/hotplug_mp/commands.h | 10 +
examples/multi_process/hotplug_mp/main.c | 41 +++
lib/librte_eal/common/eal_common_proc.c | 51 +++-
lib/librte_eal/common/eal_private.h | 5 +
lib/librte_eal/common/include/rte_eal.h | 34 +++
lib/librte_eal/linuxapp/eal/eal.c | 2 +
lib/librte_ethdev/Makefile | 2 +
lib/librte_ethdev/ethdev_lock.c | 140 +++++++++
lib/librte_ethdev/ethdev_lock.h | 31 ++
lib/librte_ethdev/ethdev_mp.c | 415 +++++++++++++++++++++++++++
lib/librte_ethdev/ethdev_mp.h | 42 +++
lib/librte_ethdev/ethdev_private.h | 42 +++
lib/librte_ethdev/meson.build | 2 +
lib/librte_ethdev/rte_ethdev.c | 312 ++++++++++++++++++--
lib/librte_ethdev/rte_ethdev.h | 169 +++++++++++
lib/librte_ethdev/rte_ethdev_core.h | 5 +
lib/librte_ethdev/rte_ethdev_driver.h | 13 +
lib/librte_ethdev/rte_ethdev_pci.h | 3 +
33 files changed, 1815 insertions(+), 37 deletions(-)
create mode 100644 examples/multi_process/hotplug_mp/Makefile
create mode 100644 examples/multi_process/hotplug_mp/commands.c
create mode 100644 examples/multi_process/hotplug_mp/commands.h
create mode 100644 examples/multi_process/hotplug_mp/main.c
create mode 100644 lib/librte_ethdev/ethdev_lock.c
create mode 100644 lib/librte_ethdev/ethdev_lock.h
create mode 100644 lib/librte_ethdev/ethdev_mp.c
create mode 100644 lib/librte_ethdev/ethdev_mp.h
create mode 100644 lib/librte_ethdev/ethdev_private.h
--
2.13.6
^ permalink raw reply [relevance 2%]
* Re: [dpdk-dev] [PATCH] cryptodev: fix ABI breakage
2018-06-13 10:00 4% ` Gujjar, Abhinandan S
@ 2018-06-27 21:14 4% ` De Lara Guarch, Pablo
0 siblings, 0 replies; 200+ results
From: De Lara Guarch, Pablo @ 2018-06-27 21:14 UTC (permalink / raw)
To: Gujjar, Abhinandan S, Doherty, Declan; +Cc: dev, stable
> -----Original Message-----
> From: Gujjar, Abhinandan S
> Sent: Wednesday, June 13, 2018 11:01 AM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Doherty, Declan
> <declan.doherty@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: RE: [PATCH] cryptodev: fix ABI breakage
>
>
>
> > -----Original Message-----
> > From: De Lara Guarch, Pablo
> > Sent: Wednesday, June 13, 2018 3:07 PM
> > To: Doherty, Declan <declan.doherty@intel.com>; Gujjar, Abhinandan S
> > <abhinandan.gujjar@intel.com>
> > Cc: dev@dpdk.org; De Lara Guarch, Pablo
> > <pablo.de.lara.guarch@intel.com>; stable@dpdk.org
> > Subject: [PATCH] cryptodev: fix ABI breakage
> >
> > In 17.08, the crypto operation was restructured, and some reserved
> > bytes (5) were added to have the mempool pointer aligned to 64 bits,
> > since the structure is expected to be aligned to 64 bits, allowing
> > future additions with no ABI breakage needed.
> >
> > In 18.05, a new 2-byte field was added, so the reserved bytes were reduced to
> 3.
> > However, this field was added after the first 3 bytes of the
> > structure, causing it to be placed in an offset of 4 bytes, and
> > therefore, forcing the mempool pointer to be placed after 16 bytes,
> > instead of a 8 bytes, causing unintentionally the ABI breakage.
> >
> > This commit fixes the breakage, by swapping the reserved bytes and the
> > private_data_offset field, so the latter is aligned to 2 bytes and the
> > offset of the mempool pointer returns to its original offset,
> > 8 bytes.
> >
> > Fixes: 54c836846603 ("cryptodev: set private data for session-less
> > mode")
> > Cc: stable@dpdk.org
> >
> > Reported-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
...
> Acked-by: Abhinandan Gujjar <Abhinandan.gujjar@intel.com>
>
> > 2.17.0
Applied to dpdk-next-crypto.
Pablo
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH v2 1/2] compressdev: replace mbuf scatter gather flag
2018-06-27 5:50 4% [dpdk-dev] [PATCH 1/2] compressdev: replace mbuf scatter gather flag Pablo de Lara
@ 2018-06-27 12:16 4% ` Pablo de Lara
2018-06-29 10:08 0% ` Trahe, Fiona
` (2 subsequent siblings)
3 siblings, 1 reply; 200+ results
From: Pablo de Lara @ 2018-06-27 12:16 UTC (permalink / raw)
To: fiona.trahe, ashish.gupta, lee.daly; +Cc: dev, Pablo de Lara
The current mbuf scatter gather feature flag is
too ambiguous, as it is not clear if input and/or output
buffers can be scatter gather mbufs or not.
Therefore, three new flags will replace this flag:
- RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT
- RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_FB_OUT
- RTE_COMP_FF_OUT_OF_PLACE_FB_IN_SGL_OUT
Note that out-of-place flat buffers is supported by default
and in-place is not supported by the library.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
Changes in v2:
- Fixed typos
- Rephrased comments
doc/guides/rel_notes/release_18_08.rst | 6 ++++++
lib/librte_compressdev/rte_comp.c | 8 ++++++--
lib/librte_compressdev/rte_comp.h | 30 ++++++++++++++++++++----------
3 files changed, 32 insertions(+), 12 deletions(-)
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index bc0124295..18c8b4bd1 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -60,6 +60,12 @@ API Changes
Also, make sure to start the actual text at the margin.
=========================================================
+* compressdev: Feature flag ``RTE_COMP_FF_MBUF_SCATTER_GATHER`` is
+ replaced with the following more explicit flags:
+ - ``RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT``
+ - ``RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_FB_OUT``
+ - ``RTE_COMP_FF_OUT_OF_PLACE_FB_IN_SGL_OUT``
+
ABI Changes
-----------
diff --git a/lib/librte_compressdev/rte_comp.c b/lib/librte_compressdev/rte_comp.c
index d596ba872..ea7692ae7 100644
--- a/lib/librte_compressdev/rte_comp.c
+++ b/lib/librte_compressdev/rte_comp.c
@@ -14,8 +14,12 @@ rte_comp_get_feature_name(uint64_t flag)
return "STATEFUL_COMPRESSION";
case RTE_COMP_FF_STATEFUL_DECOMPRESSION:
return "STATEFUL_DECOMPRESSION";
- case RTE_COMP_FF_MBUF_SCATTER_GATHER:
- return "MBUF_SCATTER_GATHER";
+ case RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT:
+ return "OUT_OF_PLACE_SGL_IN_SGL_OUT";
+ case RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_FB_OUT:
+ return "OUT_OF_PLACE_SGL_IN_FB_OUT";
+ case RTE_COMP_FF_OUT_OF_PLACE_FB_IN_SGL_OUT:
+ return "OUT_OF_PLACE_FB_IN_SGL_OUT";
case RTE_COMP_FF_MULTI_PKT_CHECKSUM:
return "MULTI_PKT_CHECKSUM";
case RTE_COMP_FF_ADLER32_CHECKSUM:
diff --git a/lib/librte_compressdev/rte_comp.h b/lib/librte_compressdev/rte_comp.h
index 5b513c77e..f3742dafb 100644
--- a/lib/librte_compressdev/rte_comp.h
+++ b/lib/librte_compressdev/rte_comp.h
@@ -30,23 +30,33 @@ extern "C" {
/**< Stateful compression is supported */
#define RTE_COMP_FF_STATEFUL_DECOMPRESSION (1ULL << 1)
/**< Stateful decompression is supported */
-#define RTE_COMP_FF_MBUF_SCATTER_GATHER (1ULL << 2)
-/**< Scatter-gather mbufs are supported */
-#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 3)
+#define RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT (1ULL << 2)
+/**< Out-of-place Scatter-gather (SGL) mbufs are
+ * supported in input and output
+ */
+#define RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_FB_OUT (1ULL << 3)
+/**< Out-of-place Scatter-gather (SGL) mbufs are supported
+ * in input, combined with flat buffers (FB) in output
+ */
+#define RTE_COMP_FF_OUT_OF_PLACE_FB_IN_SGL_OUT (1ULL << 4)
+/**< Out-of-place Scatter-gather (SGL) mbufs are supported
+ * in output, combined with flat buffers (FB) in input
+ */
+#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 5)
/**< Adler-32 Checksum is supported */
-#define RTE_COMP_FF_CRC32_CHECKSUM (1ULL << 4)
+#define RTE_COMP_FF_CRC32_CHECKSUM (1ULL << 6)
/**< CRC32 Checksum is supported */
-#define RTE_COMP_FF_CRC32_ADLER32_CHECKSUM (1ULL << 5)
+#define RTE_COMP_FF_CRC32_ADLER32_CHECKSUM (1ULL << 7)
/**< Adler-32/CRC32 Checksum is supported */
-#define RTE_COMP_FF_MULTI_PKT_CHECKSUM (1ULL << 6)
+#define RTE_COMP_FF_MULTI_PKT_CHECKSUM (1ULL << 8)
/**< Generation of checksum across multiple stateless packets is supported */
-#define RTE_COMP_FF_SHA1_HASH (1ULL << 7)
+#define RTE_COMP_FF_SHA1_HASH (1ULL << 9)
/**< SHA1 Hash is supported */
-#define RTE_COMP_FF_SHA2_SHA256_HASH (1ULL << 8)
+#define RTE_COMP_FF_SHA2_SHA256_HASH (1ULL << 10)
/**< SHA256 Hash of SHA2 family is supported */
-#define RTE_COMP_FF_NONCOMPRESSED_BLOCKS (1ULL << 9)
+#define RTE_COMP_FF_NONCOMPRESSED_BLOCKS (1ULL << 11)
/**< Creation of non-compressed blocks using RTE_COMP_LEVEL_NONE is supported */
-#define RTE_COMP_FF_SHAREABLE_PRIV_XFORM (1ULL << 10)
+#define RTE_COMP_FF_SHAREABLE_PRIV_XFORM (1ULL << 12)
/**< Private xforms created by the PMD can be shared
* across multiple stateless operations. If not set, then app needs
* to create as many priv_xforms as it expects to have stateless
--
2.14.4
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH v9] checkpatches.sh: Add checks for ABI symbol addition
` (2 preceding siblings ...)
2018-06-14 13:30 6% ` [dpdk-dev] [PATCH v8] " Neil Horman
@ 2018-06-27 18:01 6% ` Neil Horman
2018-07-15 23:12 4% ` Thomas Monjalon
3 siblings, 1 reply; 200+ results
From: Neil Horman @ 2018-06-27 18:01 UTC (permalink / raw)
To: dev
Cc: Neil Horman, thomas, john.mcnamara, bruce.richardson,
Ferruh Yigit, Stephen Hemminger
Recently, some additional patches were added to allow for programmatic
marking of C symbols as experimental. The addition of these markers is
dependent on the manual addition of exported symbols to the EXPERIMENTAL
section of the corresponding libraries version map file. The consensus
on review is that, in addition to mandating the addition of symbols to
the EXPERIMENTAL version in the map, we need a mechanism to enforce our
documented process of mandating that addition when they are introduced.
To that end, I am proposing this change. It is an addition to the
checkpatches script, which scan incoming patches for additions and
removals of symbols to the map file, and warns the user appropriately
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: thomas@monjalon.net
CC: john.mcnamara@intel.com
CC: bruce.richardson@intel.com
CC: Ferruh Yigit <ferruh.yigit@intel.com>
CC: Stephen Hemminger <stephen@networkplumber.org>
---
Change notes
v2)
* Cleaned up and documented awk script (shemminger)
* fixed sort/uniq usage (shemminger)
* moved checking to new script (tmonjalon)
* added maintainer entry (tmonjalon)
* added license (tmonjalon)
v3)
* Changed symbol check script name (tmonjalon)
* Trapped exit to clean temp file (tmonjalon)
* Honored verbose command (tmonjalon)
* Cleaned left over debug bits (tmonjalon)
* Updated location in MAINTAINERS file (tmonjalon)
v4)
* Updated maintainers file (tmonjalon)
v5)
* undo V4 (tmojalon)
v6)
* Cleaning up more nits (tmonjalon)
* Combining some lines (tmonjalon)
* Fixing error print condition (tmonjalon)
* Redirect stdin to a file to allow rewinding for
Multiple passes on tools (nhorman)
v7)
* More nits (tmonjalon)
* consoloidating some common report lines (tmonjalon)
* move SPDX identifier to line 2 (nhorman)
* fix some checkpatch errors
v8)
* spelling fix (nhorman)
* found a way to eliminate the use of filterdiff (new awk rules)
v9)
* various nits
---
MAINTAINERS | 1 +
devtools/check-symbol-change.sh | 159 ++++++++++++++++++++++++++++++++
devtools/checkpatches.sh | 47 ++++++++--
3 files changed, 200 insertions(+), 7 deletions(-)
create mode 100755 devtools/check-symbol-change.sh
diff --git a/MAINTAINERS b/MAINTAINERS
index 4667fa7fb..7b1180fe0 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -122,6 +122,7 @@ M: Neil Horman <nhorman@tuxdriver.com>
F: lib/librte_compat/
F: doc/guides/rel_notes/deprecation.rst
F: devtools/validate-abi.sh
+F: devtools/check-symbol-change.sh
F: buildtools/check-experimental-syms.sh
Driver information
diff --git a/devtools/check-symbol-change.sh b/devtools/check-symbol-change.sh
new file mode 100755
index 000000000..17d123cf4
--- /dev/null
+++ b/devtools/check-symbol-change.sh
@@ -0,0 +1,159 @@
+#!/bin/sh
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2018 Neil Horman <nhorman@tuxdriver.com>
+
+build_map_changes()
+{
+ local fname=$1
+ local mapdb=$2
+
+ cat $fname | awk '
+ # Initialize our variables
+ BEGIN {map="";sym="";ar="";sec=""; in_sec=0; in_map=0}
+
+ # Anything that starts with + or -, followed by an a
+ # and ends in the string .map is the name of our map file
+ # This may appear multiple times in a patch if multiple
+ # map files are altered, and all section/symbol names
+ # appearing between a triggering of this rule and the
+ # next trigger of this rule are associated with this file
+ /[-+] a\/.*\.map/ {map=$2; in_map=1}
+
+ # Same pattern as above, only it matches on anything that
+ # doesnt end in 'map', indicating we have left the map chunk.
+ # When we hit this, turn off the in_map variable, which
+ # supresses the subordonate rules below
+ /[-+] a\/.*\.^(map)/ {in_map=0}
+
+ # Triggering this rule, which starts a line with a + and ends it
+ # with a { identifies a versioned section. The section name is
+ # the rest of the line with the + and { symbols remvoed.
+ # Triggering this rule sets in_sec to 1, which actives the
+ # symbol rule below
+ /+.*{/ {gsub("+","");
+ if (in_map == 1) {
+ sec=$1; in_sec=1;
+ }
+ }
+
+ # This rule idenfies the end of a section, and disables the
+ # symbol rule
+ /.*}/ {in_sec=0}
+
+ # This rule matches on a + followed by any characters except a :
+ # (which denotes a global vs local segment), and ends with a ;.
+ # The semicolon is removed and the symbol is printed with its
+ # association file name and version section, along with an
+ # indicator that the symbol is a new addition. Note this rule
+ # only works if we have found a version section in the rule
+ # above (hence the in_sec check) And found a map file (the
+ # in_map check). If we are not in a map chunk, do nothing. If
+ # we are in a map chunk but not a section chunk, record it as
+ # unknown.
+ /^+[^}].*[^:*];/ {gsub(";","");sym=$2;
+ if (in_map == 1) {
+ if (in_sec == 1) {
+ print map " " sym " " sec " add"
+ } else {
+ print map " " sym " unknown add"
+ }
+ }
+ }
+
+ # This is the same rule as above, but the rule matches on a
+ # leading - rather than a +, denoting that the symbol is being
+ # removed.
+ /^-[^}].*[^:*];/ {gsub(";","");sym=$2;
+ if (in_map == 1) {
+ if (in_sec == 1) {
+ print map " " sym " " sec " del"
+ } else {
+ print map " " sym " unknown del"
+ }
+ }
+ }' > ./$mapdb
+
+ sort -u $mapdb > ./$mapdb.2
+ mv -f $mapdb.2 $mapdb
+
+}
+
+check_for_rule_violations()
+{
+ local mapdb=$1
+ local mname
+ local symname
+ local secname
+ local ar
+ local ret=0
+
+ while read mname symname secname ar
+ do
+ if [ "$ar" == "add" ]
+ then
+
+ if [ "$secname" == "unknown" ]
+ then
+ # Just inform the user of this occurrence, but
+ # don't flag it as an error
+ echo -n "INFO: symbol $syname is added but "
+ echo -n "patch has insuficient context "
+ echo -n "to determine the section name "
+ echo -n "please ensure the version is "
+ echo "EXPERIMENTAL"
+ continue
+ fi
+
+ if [ "$secname" != "EXPERIMENTAL" ]
+ then
+ # Symbols that are getting added in a section
+ # other than the experimental section
+ # to be moving from an already supported
+ # section or its a violation
+ grep -q \
+ "$mname $symname [^EXPERIMENTAL] del" $mapdb
+ if [ $? -ne 0 ]
+ then
+ echo -n "ERROR: symbol $symname "
+ echo -n "is added in a section "
+ echo -n "other than the EXPERIMENTAL "
+ echo "section of the version map"
+ ret=1
+ fi
+ fi
+ else
+
+ if [ "$secname" != "EXPERIMENTAL" ]
+ then
+ # Just inform users that non-experimenal
+ # symbols need to go through a deprecation
+ # process
+ echo -n "INFO: symbol $symname is being "
+ echo -n "removed, ensure that it has "
+ echo "gone through the deprecation process"
+ fi
+ fi
+ done < $mapdb
+
+ return $ret
+}
+
+trap clean_and_exit_on_sig EXIT
+
+mapfile=`mktemp mapdb.XXXXXX`
+patch=$1
+exit_code=1
+
+clean_and_exit_on_sig()
+{
+ rm -f $mapfile
+ exit $exit_code
+}
+
+build_map_changes $patch $mapfile
+check_for_rule_violations $mapfile
+exit_code=$?
+
+rm -f $mapfile
+
+exit $exit_code
diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index 663b7c426..c6c7bfae1 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -7,6 +7,9 @@
# - DPDK_CHECKPATCH_LINE_LENGTH
. $(dirname $(readlink -e $0))/load-devel-config
+
+VALIDATE_NEW_API=$(dirname $(readlink -e $0))/check-symbol-change.sh
+
length=${DPDK_CHECKPATCH_LINE_LENGTH:-80}
# override default Linux options
@@ -21,6 +24,15 @@ SPLIT_STRING,LONG_LINE_STRING,\
LINE_SPACING,PARENTHESIS_ALIGNMENT,NETWORKING_BLOCK_COMMENT_STYLE,\
NEW_TYPEDEFS,COMPARISON_TO_NULL"
+clean_tmp_files() {
+ echo $tmpinput | grep -q '^checkpatches\.'
+ if [ $? -eq 0 ]; then
+ rm -f $tmpinput
+ fi
+}
+
+trap "clean_tmp_files" SIGINT
+
print_usage () {
cat <<- END_OF_HELP
usage: $(basename $0) [-q] [-v] [-nX|patch1 [patch2] ...]]
@@ -58,19 +70,40 @@ total=0
status=0
check () { # <patch> <commit> <title>
+ local ret=0
+
total=$(($total + 1))
! $verbose || printf '\n### %s\n\n' "$3"
if [ -n "$1" ] ; then
- report=$($DPDK_CHECKPATCH_PATH $options "$1" 2>/dev/null)
+ tmpinput=$1
elif [ -n "$2" ] ; then
- report=$(git format-patch --find-renames --no-stat --stdout -1 $commit |
- $DPDK_CHECKPATCH_PATH $options - 2>/dev/null)
+ tmpinput=$(mktemp checkpatches.XXXXXX)
+ git format-patch --find-renames \
+ --no-stat --stdout -1 $commit > ./$tmpinput
else
- report=$($DPDK_CHECKPATCH_PATH $options - 2>/dev/null)
+ tmpinput=$(mktemp checkpatches.XXXXXX)
+ cat > ./$tmpinput
fi
- [ $? -ne 0 ] || return 0
- $verbose || printf '\n### %s\n\n' "$3"
- printf '%s\n' "$report" | sed -n '1,/^total:.*lines checked$/p'
+
+ report=$($DPDK_CHECKPATCH_PATH $options $tmpinput 2>/dev/null)
+ if [ $? -ne 0 ]
+ then
+ $verbose || printf '\n### %s\n\n' "$3"
+ printf '%s\n' "$report" | sed -n '1,/^total:.*lines checked$/p'
+ ret=1
+ fi
+
+ ! $verbose || printf '\nChecking API additions/removals:\n'
+
+ report=$($VALIDATE_NEW_API "$tmpinput")
+ if [ $? -ne 0 ]; then
+ printf '%s\n' "$report"
+ ret=1
+ fi
+
+ clean_tmp_files
+ [ $ret -eq 0 ] && return 0
+
status=$(($status + 1))
}
--
2.17.1
^ permalink raw reply [relevance 6%]
* Re: [dpdk-dev] [PATCH v8] checkpatches.sh: Add checks for ABI symbol addition
2018-06-25 23:04 4% ` Thomas Monjalon
@ 2018-06-27 17:58 4% ` Neil Horman
0 siblings, 0 replies; 200+ results
From: Neil Horman @ 2018-06-27 17:58 UTC (permalink / raw)
To: Thomas Monjalon
Cc: dev, john.mcnamara, bruce.richardson, Ferruh Yigit, Stephen Hemminger
On Tue, Jun 26, 2018 at 01:04:16AM +0200, Thomas Monjalon wrote:
> 14/06/2018 15:30, Neil Horman:
> > * found a way to eliminate the use of filterdiff (new awk rules)
>
> Thanks a lot for not requiring filterdiff dependency.
>
> [...]
> > + # Just inform the user of this occurrence, but
> > + # don't flag it as an error
> > + echo -n "INFO: symbol $syname is added but "
> > + echo -n "patch has insuficient context "
> > + echo -n "to determine the section name "
> > + echo -n "please ensure the version is "
> > + echo "EXPERIMENTAL"
>
> For info, I think nowadays "printf" is preferred over "echo -n"
> But if you prefer "echo -n" for any reason, no problem.
>
I prefer echo, just because its what I've always used. I'm open to changing it
if there is a compelling reason to do so.
> [...]
> > +exit $exit_code
> > +
> > +
>
> Ironically, this patch doesn't pass checkpatch test because of
> the trailing new lines.
>
Patchwork reports only a single error:
https://patches.dpdk.org/patch/41139/
Is the CI checkpatch different from the checkpatch we provide here? If so, why?
> [...]
> > +clean_tmp_files() {
> > + echo $TMPINPUT | grep -q checkpaches
>
> Two comments here.
>
> Since TMPINPUT is not supposed to be overwritten by environment,
> I think it is better to make it lowercase (kind of convention).
>
Sure
> What the grep is supposed to match?
The name of the temp file created. TMPINPUT can take on two classes of values:
1) The name of a passed in patch file
2) The name of a temp file created to hold a patch streamed in on stdin
when we clean up on exit, we want to delete class 2, but never class 1, so we
match on the temp file root name 'checkpatch'
> (side note, there is a typo: checkpaches -> checkpatches)
will fix
> Is it to remove file only in case of mktemp?
yes
> I think it is a risky pattern matching. I suggest '^checkpatches\.'
fine
>
> > + if [ $? -eq 0 ]; then
>
> Could be easier to read if combining "if" and "grep":
> if echo $tmpinput | grep -q '^checkpatches\.' ; then
That seems fairly out of line with the style of the rest of the file
>
> > + rm -f $TMPINPUT
> > + fi
> > +}
>
> [...]
> > + TMPINPUT=$(mktemp checkpatches.XXXXXX)
>
> Open to discussion: do we prefer local dir or /tmp?
> Some tools are using /tmp.
>
I don't think thats our call. If an end user wants to specify the location of
temp files, they can do so by setting $TMPDIR. We don't need to mandate it.
> [...]
> > + report=$($DPDK_CHECKPATCH_PATH $options $TMPINPUT 2>/dev/null)
> > +
>
> Please, no blank line between command and test.
>
very well
> > + if [ $? -ne 0 ]
> > + then
> > + $verbose || printf '\n### %s\n\n' "$3"
> > + printf '%s\n' "$report" | sed -n '1,/^total:.*lines checked$/p'
> > + ret=1
> > + fi
> > +
> > + ! $verbose || printf '\nChecking API additions/removals:\n'
> > +
> > + report=$($VALIDATE_NEW_API "$TMPINPUT")
> > +
>
> Same comments about blank lines.
>
> > + if [ $? -ne 0 ]; then
> > + printf '%s\n' "$report"
> > + ret=1
> > + fi
> > +
> > + clean_tmp_files
> > + if [ $ret -eq 0 ]; then
> > + return 0
> > fi
> > - [ $? -ne 0 ] || return 0
>
> Why replacing this oneliner by a longer "if" block?
>
Because it was in keeping with the style that I was working with. I can revert
it
> After this review, I think I won't have any more comment.
> Thanks Neil
>
>
>
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH 1/2] compressdev: replace mbuf scatter gather flag
@ 2018-06-27 5:50 4% Pablo de Lara
2018-06-27 12:16 4% ` [dpdk-dev] [PATCH v2 " Pablo de Lara
` (3 more replies)
0 siblings, 4 replies; 200+ results
From: Pablo de Lara @ 2018-06-27 5:50 UTC (permalink / raw)
To: fiona.trahe, ashish.gupta, lee.daly; +Cc: dev, Pablo de Lara
The current mbuf scatter gatter feature flag is
too ambiguous, as it is not clear if input and/or output
buffers can be scatter gather mbufs or not.
Therefore, three new flags will replace this flag:
- RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT
- RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT
- RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT
Note that out-of-place flat buffers is supported by default
and in-place is not supported by the library.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
doc/guides/rel_notes/release_18_08.rst | 6 ++++++
lib/librte_compressdev/rte_comp.c | 8 ++++++--
lib/librte_compressdev/rte_comp.h | 30 ++++++++++++++++++++----------
3 files changed, 32 insertions(+), 12 deletions(-)
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index bc0124295..1fc38418a 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -60,6 +60,12 @@ API Changes
Also, make sure to start the actual text at the margin.
=========================================================
+* compressdev: Feature flag ``RTE_COMP_FF_MBUF_SCATTER_GATHER`` is
+ replaced with the following more explicit flags:
+ - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT``
+ - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT``
+ - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT``
+
ABI Changes
-----------
diff --git a/lib/librte_compressdev/rte_comp.c b/lib/librte_compressdev/rte_comp.c
index d596ba872..ea7692ae7 100644
--- a/lib/librte_compressdev/rte_comp.c
+++ b/lib/librte_compressdev/rte_comp.c
@@ -14,8 +14,12 @@ rte_comp_get_feature_name(uint64_t flag)
return "STATEFUL_COMPRESSION";
case RTE_COMP_FF_STATEFUL_DECOMPRESSION:
return "STATEFUL_DECOMPRESSION";
- case RTE_COMP_FF_MBUF_SCATTER_GATHER:
- return "MBUF_SCATTER_GATHER";
+ case RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT:
+ return "OUT_OF_PLACE_SGL_IN_SGL_OUT";
+ case RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_FB_OUT:
+ return "OUT_OF_PLACE_SGL_IN_FB_OUT";
+ case RTE_COMP_FF_OUT_OF_PLACE_FB_IN_SGL_OUT:
+ return "OUT_OF_PLACE_FB_IN_SGL_OUT";
case RTE_COMP_FF_MULTI_PKT_CHECKSUM:
return "MULTI_PKT_CHECKSUM";
case RTE_COMP_FF_ADLER32_CHECKSUM:
diff --git a/lib/librte_compressdev/rte_comp.h b/lib/librte_compressdev/rte_comp.h
index 5b513c77e..3ce6a80e1 100644
--- a/lib/librte_compressdev/rte_comp.h
+++ b/lib/librte_compressdev/rte_comp.h
@@ -30,23 +30,33 @@ extern "C" {
/**< Stateful compression is supported */
#define RTE_COMP_FF_STATEFUL_DECOMPRESSION (1ULL << 1)
/**< Stateful decompression is supported */
-#define RTE_COMP_FF_MBUF_SCATTER_GATHER (1ULL << 2)
-/**< Scatter-gather mbufs are supported */
-#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 3)
+#define RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT (1ULL << 2)
+/**< Out-of-place Scatter-gather (SGL) mbufs are
+ * supported in input and output
+ */
+#define RTE_COMP_FF_OUT_OF_PLACE_SGL_IN_FB_OUT (1ULL << 3)
+/**< Out-of-place Scatter-gather (SGL) mbufs are supported
+ * in input, but only flat buffers (FB) are supported in output
+ */
+#define RTE_COMP_FF_OUT_OF_PLACE_FB_IN_SGL_OUT (1ULL << 4)
+/**< Out-of-place Scatter-gather (SGL) mbufs are supported
+ * in output, but only flat buffers (FB) are supported in input
+ */
+#define RTE_COMP_FF_ADLER32_CHECKSUM (1ULL << 5)
/**< Adler-32 Checksum is supported */
-#define RTE_COMP_FF_CRC32_CHECKSUM (1ULL << 4)
+#define RTE_COMP_FF_CRC32_CHECKSUM (1ULL << 6)
/**< CRC32 Checksum is supported */
-#define RTE_COMP_FF_CRC32_ADLER32_CHECKSUM (1ULL << 5)
+#define RTE_COMP_FF_CRC32_ADLER32_CHECKSUM (1ULL << 7)
/**< Adler-32/CRC32 Checksum is supported */
-#define RTE_COMP_FF_MULTI_PKT_CHECKSUM (1ULL << 6)
+#define RTE_COMP_FF_MULTI_PKT_CHECKSUM (1ULL << 8)
/**< Generation of checksum across multiple stateless packets is supported */
-#define RTE_COMP_FF_SHA1_HASH (1ULL << 7)
+#define RTE_COMP_FF_SHA1_HASH (1ULL << 9)
/**< SHA1 Hash is supported */
-#define RTE_COMP_FF_SHA2_SHA256_HASH (1ULL << 8)
+#define RTE_COMP_FF_SHA2_SHA256_HASH (1ULL << 10)
/**< SHA256 Hash of SHA2 family is supported */
-#define RTE_COMP_FF_NONCOMPRESSED_BLOCKS (1ULL << 9)
+#define RTE_COMP_FF_NONCOMPRESSED_BLOCKS (1ULL << 11)
/**< Creation of non-compressed blocks using RTE_COMP_LEVEL_NONE is supported */
-#define RTE_COMP_FF_SHAREABLE_PRIV_XFORM (1ULL << 10)
+#define RTE_COMP_FF_SHAREABLE_PRIV_XFORM (1ULL << 12)
/**< Private xforms created by the PMD can be shared
* across multiple stateless operations. If not set, then app needs
* to create as many priv_xforms as it expects to have stateless
--
2.14.4
^ permalink raw reply [relevance 4%]
* Re: [dpdk-dev] [PATCH v4 01/24] eal: introduce one device scan
2018-06-26 16:33 4% ` Gaëtan Rivet
@ 2018-06-27 12:32 3% ` Zhang, Qi Z
0 siblings, 0 replies; 200+ results
From: Zhang, Qi Z @ 2018-06-27 12:32 UTC (permalink / raw)
To: Gaëtan Rivet
Cc: Burakov, Anatoly, thomas, Ananyev, Konstantin, dev, Richardson,
Bruce, Yigit, Ferruh, Shelton, Benjamin H, Vangati, Narender
> -----Original Message-----
> From: Gaëtan Rivet [mailto:gaetan.rivet@6wind.com]
> Sent: Wednesday, June 27, 2018 12:34 AM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: Burakov, Anatoly <anatoly.burakov@intel.com>; thomas@monjalon.net;
> Ananyev, Konstantin <konstantin.ananyev@intel.com>; dev@dpdk.org;
> Richardson, Bruce <bruce.richardson@intel.com>; Yigit, Ferruh
> <ferruh.yigit@intel.com>; Shelton, Benjamin H
> <benjamin.h.shelton@intel.com>; Vangati, Narender
> <narender.vangati@intel.com>
> Subject: Re: [dpdk-dev] [PATCH v4 01/24] eal: introduce one device scan
>
> On Tue, Jun 26, 2018 at 12:26:05PM +0000, Zhang, Qi Z wrote:
> >
> >
> > > -----Original Message-----
> > > From: Burakov, Anatoly
> > > Sent: Tuesday, June 26, 2018 7:48 PM
> > > To: Zhang, Qi Z <qi.z.zhang@intel.com>; thomas@monjalon.net
> > > Cc: Ananyev, Konstantin <konstantin.ananyev@intel.com>;
> > > dev@dpdk.org; Richardson, Bruce <bruce.richardson@intel.com>; Yigit,
> > > Ferruh <ferruh.yigit@intel.com>; Shelton, Benjamin H
> > > <benjamin.h.shelton@intel.com>; Vangati, Narender
> > > <narender.vangati@intel.com>
> > > Subject: Re: [PATCH v4 01/24] eal: introduce one device scan
> > >
> > > On 26-Jun-18 8:08 AM, Qi Zhang wrote:
> > > > When hot plug a new device, it is not necessary to scan everything
> > > > on the bus since the devname and devargs are already there. So new
> > > > rte_bus ops "scan_one" is introduced, bus driver can implement
> > > > this function to simplify the hotplug process.
> > > >
> > > > Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> > > > ---
> > > >
> > >
> > > <snip>
> > >
> > > > + * NULL for unsuccessful scan
> > > > + */
> > > > +typedef struct rte_device *(*rte_bus_scan_one_t)(struct
> > > > +rte_devargs *devargs);
> > > > +
> > > > +/**
> > > > * Implementation specific probe function which is responsible for
> linking
> > > > * devices on that bus with applicable drivers.
> > > > *
> > > > @@ -204,6 +219,7 @@ struct rte_bus {
> > > > TAILQ_ENTRY(rte_bus) next; /**< Next bus object in linked list */
> > > > const char *name; /**< Name of the bus */
> > > > rte_bus_scan_t scan; /**< Scan for devices attached to
> > > bus */
> > > > + rte_bus_scan_one_t scan_one; /**< Scan one device using devargs
> > > > +*/
> > > > rte_bus_probe_t probe; /**< Probe devices on bus */
> > > > rte_bus_find_device_t find_device; /**< Find a device on the bus */
> > > > rte_bus_plug_t plug; /**< Probe single device for drivers
> > > */
> > > >
> > >
> > > Does changing this structure break ABI for bus drivers?
> >
> > For bus driver, I think yes, but I'm not sure what I should do for
> > this, since this is not for application
> >
> >
>
> This should be appropriately announced in advance, in general.
> However, it seems there is some leeway if the new field will not move the
> others and not make the structure grow (i.e. replace a padding).
>
> There is an ABI check script that can be used.
>
> This however breaks the bus ABI, which breaks the EAL ABI.
> This is usually an issue.
OK, since we are able to invoke IPC request in a separate thread and also with below
fix, there is no issue on the vdev->scan during hotplug on secondary.
https://patches.dpdk.org/patch/41647/
ABI break is not necessary, I will withdraw patch 1 and 2.
Thanks
Qi
>
> More generally, I was in favor of changing the whole bus scan process to a
> per-device iteration. I was shut down on this when adding hotplug.
> As a result, bus->scan() process was made to require the operation to be
> idempotent.
>
> Adding a new ops adds noise to the bus API. It should be kept as clean as
> possible. This new one seems unnecessary, now that all bus scans are
> idempotent (when supporting hotplug).
>
> Regards,
> --
> Gaëtan Rivet
> 6WIND
^ permalink raw reply [relevance 3%]
* Re: [dpdk-dev] [PATCH v2] cmdline: rework as a wrapper to libedit
2018-06-27 10:36 0% ` Bruce Richardson
@ 2018-06-27 11:35 0% ` Olivier Matz
0 siblings, 0 replies; 200+ results
From: Olivier Matz @ 2018-06-27 11:35 UTC (permalink / raw)
To: Bruce Richardson
Cc: Adrien Mazarguil, dev, Keith Wiles, Jingjing Wu, Thomas Monjalon,
Ferruh Yigit, Jim Thompson, Anatoly Burakov
On Wed, Jun 27, 2018 at 11:36:28AM +0100, Bruce Richardson wrote:
> On Tue, Jun 26, 2018 at 03:21:21PM +0200, Olivier Matz wrote:
> > Hi Adrien,
> >
> > Better late than never, please find below some comments
> > about your patch.
> >
> > On Thu, Apr 19, 2018 at 05:13:53PM +0200, Adrien Mazarguil wrote:
> > > Disclaimer: this patch must not be confused with the CLI library [1]
> > > (work in progress) that will eventually supersede librte_cmdline itself
> > > with a different API.
> > >
> > > Rather, it modifies librte_cmdline to delegate all the heavy lifting
> > > (terminal and history handling), strips unused features and re-implements
> > > what remains of its public API as a wrapper to the editline library (also
> > > known as libedit) [2], a well-known, BSD-licensed and widely available
> > > library used by many projects which does everything needed and more [3].
> > >
> > > This approach was chosen because converting librte_cmdline as a wrapper to
> > > a more capable library was easier and faster than addressing its
> > > shortcomings and results in much less code to maintain in DPDK.
> > >
> > > It also provides a drop-in solution for applications that rely on
> > > librte_cmdline. They benefit from greatly improved command line handling
> > > without a meaningful impact on their code base.
> > >
> > > The main motivation behind this patch is testpmd's flow (rte_flow) command,
> > > which requires support for dynamic tokens and very long lines that must be
> > > broken down when displayed. This is not supported by librte_cmdline's
> > > limited terminal handling capabilities, resulting in a rather frustrating
> > > user experience.
> > >
> > > It had to be addressed given the importance of testpmd as one of the
> > > primary tool used by PMD developers.
> > >
> > > This rework results in the following changes:
> > >
> > > - Removed circular buffer management interface for command history
> > > (cmdline_cirbuf.c), command history being handled by libedit.
> > > - Removed raw command-line interpreter (cmdline_rdline.c).
> > > - Removed raw terminal handler (cmdline_vt100.c).
> > > - Removed all test/example code for the above.
> > > - Re-implemented high level interactive and non-interactive command-line
> > > handlers (cmdline.c and cmdline_socket.c) on top of libedit using its
> > > native interface, not its readline compatibility layer.
> > > - Made struct cmdline opaque so that applications relying on librte_cmdline
> > > do not need to include any libedit headers.
> > > - Applications do not need to include cmdline_rdline.h anymore.
> > > - Terminal resizing is now automatically handled.
> > > - New external dependency for applications relying on librte_cmdline.
> > > - Major version bump due to the ABI impact of these changes.
> > >
> > > [1] http://dpdk.org/browse/draft/dpdk-draft-cli/
> > > [2] http://thrysoee.dk/editline/
> > > [3] http://netbsd.gw.com/cgi-bin/man-cgi?editline++NetBSD-current
> > >
> > > Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> > > Cc: Olivier Matz <olivier.matz@6wind.com>
> > > Cc: Keith Wiles <keith.wiles@intel.com>
> > > Cc: Jingjing Wu <jingjing.wu@intel.com>
> > > Cc: Thomas Monjalon <thomas@monjalon.net>
> > > Cc: Ferruh Yigit <ferruh.yigit@intel.com>
> > > Cc: Jim Thompson <jim@netgate.com>
> > > Cc: Anatoly Burakov <anatoly.burakov@intel.com>
> > >
> > > --
> > >
> > > v2 changes:
> > >
> > > - Replaced an instance of snprintf() with rte_strlcpy() [5].
> > > - Rebased patch.
> > >
> > > [5] http://dpdk.org/ml/archives/dev/2018-April/097721.html
> > >
> > > v1 changes:
> > >
> > > No fundamental change since the original RFC [4], except it's been rebased
> > > several times and Meson build support was added in the meantime. Commit log
> > > was also shortened a bit.
> > >
> > > I'm re-sending this because I think it's useful, at least to me (duh). As
> > > the maintainer of rte_flow, I spend most of my time typing flow commands in
> > > testpmd and libedit makes that a pleasant experience.
> > >
> > > Try it out! And don't hesitate to send your acked-by line to get this in
> > > time for 18.05 :)
> > >
> > > [4] http://dpdk.org/ml/archives/dev/2017-November/081605.html
> >
> > Re-saying what I said the first time: I think this is a very good
> > improvement, removing lots of dpdk code that is better implemented in
> > well-known libraries.
> >
> >
> > The compilation with shared libraries fail. Please try for instance:
> > ./devtools/test-build.sh -j4 x86_64-native-linuxapp-clang+shared+debug
> >
> > I suggest to add in lib/librte_cmdline/Makefile:
> >
> > LDLIBS += $(shell pkg-config --libs libedit)
> >
> >
> > I also think something should be added in
> > /doc/guides/linux_gsg/sys_reqs.rst to highlight the new build
> > dependency.
> >
> >
> > I noticed a bad behavior change (in addition to many good ones):
> > ctrl-c now quits the application, and this was not the case before.
> > I often use ctrl-c to delete the line I'm currently editing. Please
> > see at the end a proposition to restore this feature.
> >
>
> I 100% disagree, please set things up that "ctrl-c" quits the application.
>
> Having our DPDK testpmd and auto-test apps fail to close on ctrl-c is just
> awful from a usability perspective IMHO! If there is ever a problem with
> the app and you need to kill it quickly, e.g. you want to stop one of those
> long-running autotests, the lack of ctrl-c is a pain.
Well, this is a good argument.
It looks that ctrl-u can do the job, so I may just need to change my
habits :)
Olivier
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [PATCH v2] cmdline: rework as a wrapper to libedit
2018-06-26 13:21 0% ` Olivier Matz
@ 2018-06-27 10:36 0% ` Bruce Richardson
2018-06-27 11:35 0% ` Olivier Matz
0 siblings, 1 reply; 200+ results
From: Bruce Richardson @ 2018-06-27 10:36 UTC (permalink / raw)
To: Olivier Matz
Cc: Adrien Mazarguil, dev, Keith Wiles, Jingjing Wu, Thomas Monjalon,
Ferruh Yigit, Jim Thompson, Anatoly Burakov
On Tue, Jun 26, 2018 at 03:21:21PM +0200, Olivier Matz wrote:
> Hi Adrien,
>
> Better late than never, please find below some comments
> about your patch.
>
> On Thu, Apr 19, 2018 at 05:13:53PM +0200, Adrien Mazarguil wrote:
> > Disclaimer: this patch must not be confused with the CLI library [1]
> > (work in progress) that will eventually supersede librte_cmdline itself
> > with a different API.
> >
> > Rather, it modifies librte_cmdline to delegate all the heavy lifting
> > (terminal and history handling), strips unused features and re-implements
> > what remains of its public API as a wrapper to the editline library (also
> > known as libedit) [2], a well-known, BSD-licensed and widely available
> > library used by many projects which does everything needed and more [3].
> >
> > This approach was chosen because converting librte_cmdline as a wrapper to
> > a more capable library was easier and faster than addressing its
> > shortcomings and results in much less code to maintain in DPDK.
> >
> > It also provides a drop-in solution for applications that rely on
> > librte_cmdline. They benefit from greatly improved command line handling
> > without a meaningful impact on their code base.
> >
> > The main motivation behind this patch is testpmd's flow (rte_flow) command,
> > which requires support for dynamic tokens and very long lines that must be
> > broken down when displayed. This is not supported by librte_cmdline's
> > limited terminal handling capabilities, resulting in a rather frustrating
> > user experience.
> >
> > It had to be addressed given the importance of testpmd as one of the
> > primary tool used by PMD developers.
> >
> > This rework results in the following changes:
> >
> > - Removed circular buffer management interface for command history
> > (cmdline_cirbuf.c), command history being handled by libedit.
> > - Removed raw command-line interpreter (cmdline_rdline.c).
> > - Removed raw terminal handler (cmdline_vt100.c).
> > - Removed all test/example code for the above.
> > - Re-implemented high level interactive and non-interactive command-line
> > handlers (cmdline.c and cmdline_socket.c) on top of libedit using its
> > native interface, not its readline compatibility layer.
> > - Made struct cmdline opaque so that applications relying on librte_cmdline
> > do not need to include any libedit headers.
> > - Applications do not need to include cmdline_rdline.h anymore.
> > - Terminal resizing is now automatically handled.
> > - New external dependency for applications relying on librte_cmdline.
> > - Major version bump due to the ABI impact of these changes.
> >
> > [1] http://dpdk.org/browse/draft/dpdk-draft-cli/
> > [2] http://thrysoee.dk/editline/
> > [3] http://netbsd.gw.com/cgi-bin/man-cgi?editline++NetBSD-current
> >
> > Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> > Cc: Olivier Matz <olivier.matz@6wind.com>
> > Cc: Keith Wiles <keith.wiles@intel.com>
> > Cc: Jingjing Wu <jingjing.wu@intel.com>
> > Cc: Thomas Monjalon <thomas@monjalon.net>
> > Cc: Ferruh Yigit <ferruh.yigit@intel.com>
> > Cc: Jim Thompson <jim@netgate.com>
> > Cc: Anatoly Burakov <anatoly.burakov@intel.com>
> >
> > --
> >
> > v2 changes:
> >
> > - Replaced an instance of snprintf() with rte_strlcpy() [5].
> > - Rebased patch.
> >
> > [5] http://dpdk.org/ml/archives/dev/2018-April/097721.html
> >
> > v1 changes:
> >
> > No fundamental change since the original RFC [4], except it's been rebased
> > several times and Meson build support was added in the meantime. Commit log
> > was also shortened a bit.
> >
> > I'm re-sending this because I think it's useful, at least to me (duh). As
> > the maintainer of rte_flow, I spend most of my time typing flow commands in
> > testpmd and libedit makes that a pleasant experience.
> >
> > Try it out! And don't hesitate to send your acked-by line to get this in
> > time for 18.05 :)
> >
> > [4] http://dpdk.org/ml/archives/dev/2017-November/081605.html
>
> Re-saying what I said the first time: I think this is a very good
> improvement, removing lots of dpdk code that is better implemented in
> well-known libraries.
>
>
> The compilation with shared libraries fail. Please try for instance:
> ./devtools/test-build.sh -j4 x86_64-native-linuxapp-clang+shared+debug
>
> I suggest to add in lib/librte_cmdline/Makefile:
>
> LDLIBS += $(shell pkg-config --libs libedit)
>
>
> I also think something should be added in
> /doc/guides/linux_gsg/sys_reqs.rst to highlight the new build
> dependency.
>
>
> I noticed a bad behavior change (in addition to many good ones):
> ctrl-c now quits the application, and this was not the case before.
> I often use ctrl-c to delete the line I'm currently editing. Please
> see at the end a proposition to restore this feature.
>
I 100% disagree, please set things up that "ctrl-c" quits the application.
Having our DPDK testpmd and auto-test apps fail to close on ctrl-c is just
awful from a usability perspective IMHO! If there is ever a problem with
the app and you need to kill it quickly, e.g. you want to stop one of those
long-running autotests, the lack of ctrl-c is a pain.
For me, the only valid use-case for a command-line app to catch the signal
from ctrl-c is to allow the app to do some cleanup before it quits.
/Bruce
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [PATCH v3 1/3] gso: support UDP/IPv4 fragmentation
2018-06-27 2:28 3% ` Hu, Jiayu
@ 2018-06-27 5:05 3% ` Hu, Jiayu
0 siblings, 0 replies; 200+ results
From: Hu, Jiayu @ 2018-06-27 5:05 UTC (permalink / raw)
To: 'Ophir Munk', 'dev@dpdk.org'
Cc: Wang, Xiao W, Ananyev, Konstantin, Zhang, Yuwei1, Iremonger,
Bernard, 'Thomas Monjalon'
> -----Original Message-----
> From: Hu, Jiayu
> Sent: Wednesday, June 27, 2018 10:29 AM
> To: Ophir Munk <ophirmu@mellanox.com>; dev@dpdk.org
> Cc: Wang, Xiao W <xiao.w.wang@intel.com>; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>; Zhang, Yuwei1
> <yuwei1.zhang@intel.com>; Iremonger, Bernard
> <bernard.iremonger@intel.com>; Thomas Monjalon
> <thomas@monjalon.net>
> Subject: RE: [dpdk-dev] [PATCH v3 1/3] gso: support UDP/IPv4
> fragmentation
>
> Hi Ophir,
>
> Replies are inline.
>
> > -----Original Message-----
> > From: Ophir Munk [mailto:ophirmu@mellanox.com]
> > Sent: Wednesday, June 27, 2018 7:59 AM
> > To: Hu, Jiayu <jiayu.hu@intel.com>; dev@dpdk.org
> > Cc: Wang, Xiao W <xiao.w.wang@intel.com>; Ananyev, Konstantin
> > <konstantin.ananyev@intel.com>; Zhang, Yuwei1
> > <yuwei1.zhang@intel.com>; Iremonger, Bernard
> > <bernard.iremonger@intel.com>; Thomas Monjalon
> > <thomas@monjalon.net>
> > Subject: RE: [dpdk-dev] [PATCH v3 1/3] gso: support UDP/IPv4
> > fragmentation
> >
> > Hi,
> > Please find some comments below.
> >
> > > -----Original Message-----
> > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jiayu Hu
> > > Sent: Friday, June 22, 2018 8:54 AM
> > > To: dev@dpdk.org
> > > Cc: xiao.w.wang@intel.com; konstantin.ananyev@intel.com;
> > > yuwei1.zhang@intel.com; bernard.iremonger@intel.com; Thomas
> > Monjalon
> > > <thomas@monjalon.net>; Jiayu Hu <jiayu.hu@intel.com>
> > > Subject: [dpdk-dev] [PATCH v3 1/3] gso: support UDP/IPv4
> fragmentation
> > >
> > > This patch adds GSO support for UDP/IPv4 packets. Supported packets
> > may
> > > include a single VLAN tag. UDP/IPv4 GSO doesn't check if input packets
> > have
> > > correct checksums, and doesn't update checksums for output packets
> (the
> > > responsibility for this lies with the application).
> > > Additionally, UDP/IPv4 GSO doesn't process IP fragmented packets.
> > >
> > > UDP/IPv4 GSO uses two chained MBUFs, one direct MBUF and one
> indrect
> > > MBUF, to organize an output packet. The direct MBUF stores the packet
> > > header, while the indirect mbuf simply points to a location within the
> > original
> > > packet's payload. Consequently, use of UDP GSO requires multi-segment
> > > MBUF support in the TX functions of the NIC driver.
> > >
> > > If a packet is GSO'd, UDP/IPv4 GSO reduces its MBUF refcnt by 1. As a
> > result,
> > > when all of its GSOed segments are freed, the packet is freed
> > automatically.
> > >
> > > Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
> > > ---
> > > lib/librte_gso/Makefile | 1 +
> > > lib/librte_gso/gso_common.h | 3 ++
> > > lib/librte_gso/gso_udp4.c | 81
> > > +++++++++++++++++++++++++++++++++++++++++++++
> > > lib/librte_gso/gso_udp4.h | 42 +++++++++++++++++++++++
> > > lib/librte_gso/meson.build | 2 +-
> > > lib/librte_gso/rte_gso.c | 24 +++++++++++---
> > > lib/librte_gso/rte_gso.h | 6 +++-
> > > 7 files changed, 152 insertions(+), 7 deletions(-) create mode 100644
> > > lib/librte_gso/gso_udp4.c create mode 100644
> lib/librte_gso/gso_udp4.h
> > >
> > > diff --git a/lib/librte_gso/Makefile b/lib/librte_gso/Makefile index
> > > 3648ec0..1fac53a 100644
> > > --- a/lib/librte_gso/Makefile
> > > +++ b/lib/librte_gso/Makefile
> > > @@ -19,6 +19,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_GSO) += rte_gso.c
> > > SRCS-$(CONFIG_RTE_LIBRTE_GSO) += gso_common.c
> > > SRCS-$(CONFIG_RTE_LIBRTE_GSO) += gso_tcp4.c
> > > SRCS-$(CONFIG_RTE_LIBRTE_GSO) += gso_tunnel_tcp4.c
> > > +SRCS-$(CONFIG_RTE_LIBRTE_GSO) += gso_udp4.c
> > >
> > > # install this header file
> > > SYMLINK-$(CONFIG_RTE_LIBRTE_GSO)-include += rte_gso.h diff --git
> > > a/lib/librte_gso/gso_common.h b/lib/librte_gso/gso_common.h index
> > > 5ca5974..6cd764f 100644
> > > --- a/lib/librte_gso/gso_common.h
> > > +++ b/lib/librte_gso/gso_common.h
> > > @@ -31,6 +31,9 @@
> > > (PKT_TX_TCP_SEG | PKT_TX_IPV4 | PKT_TX_OUTER_IPV4 |
> > \
> > > PKT_TX_TUNNEL_GRE))
> > >
> > > +#define IS_IPV4_UDP(flag) (((flag) & (PKT_TX_UDP_SEG | PKT_TX_IPV4))
> > ==
> > > \
> > > + (PKT_TX_UDP_SEG | PKT_TX_IPV4))
> > > +
> > > /**
> > > * Internal function which updates the UDP header of a packet,
> following
> > > * segmentation. This is required to update the header's datagram
> length
> > > field.
> > > diff --git a/lib/librte_gso/gso_udp4.c b/lib/librte_gso/gso_udp4.c new
> file
> > > mode 100644 index 0000000..927dee1
> > > --- /dev/null
> > > +++ b/lib/librte_gso/gso_udp4.c
> >
> > File gso_upd4.c could be very similar to file gso_tcp4.c and that would
> > avoid code duplication.
> > In a unified file you could use a tcp vs. udp flag to distinguish between
> them
> > when necessary.
> > The files are short (~75 lines) so it is not a critical issue.
>
> The function gso_tcp4_segment and gso_udp4_segment have different
> prototype,
> and their GSO rules are different. They are two different basic GSO types.
>
> The GSO library gives each GSO type (TCP, tunnel) an internal .c and .h file,
> and their name
> represents their content. The rte_gso_segment calls different function
> according to the GSO type.
> This style is very clear for developers or users to understand. In addition, as
> you said, the code
> is short. So I think it's better to keep this style for UDP/IPv4 GSO.
>
> >
> > > @@ -0,0 +1,81 @@
> > > +/* SPDX-License-Identifier: BSD-3-Clause
> > > + * Copyright(c) 2018 Intel Corporation
> > > + */
> > > +
> > > +#include "gso_common.h"
> > > +#include "gso_udp4.h"
> > > +
> > > +#define IPV4_HDR_MF_BIT (1U << 13)
> > > +
> > > +static inline void
> > > +update_ipv4_udp_headers(struct rte_mbuf *pkt, struct rte_mbuf
> **segs,
> > > + uint16_t nb_segs)
> > > +{
> > > + struct ipv4_hdr *ipv4_hdr;
> > > + uint16_t frag_offset = 0, is_mf;
> > > + uint16_t l2_hdrlen = pkt->l2_len, l3_hdrlen = pkt->l3_len;
> > > + uint16_t tail_idx = nb_segs - 1, length, i;
> > > +
> > > + /*
> > > + * Update IP header fields for output segments. Specifically,
> > > + * keep the same IP id, update fragment offset and total
> > > + * length.
> > > + */
> > > + for (i = 0; i < nb_segs; i++) {
> > > + ipv4_hdr = rte_pktmbuf_mtod_offset(segs[i], struct
> > ipv4_hdr
> > > *,
> > > + l2_hdrlen);
> > > + length = segs[i]->pkt_len - l2_hdrlen;
> > > + ipv4_hdr->total_length = rte_cpu_to_be_16(length);
> > > +
> > > + is_mf = i < tail_idx ? IPV4_HDR_MF_BIT : 0;
> > > + ipv4_hdr->fragment_offset =
> > > + rte_cpu_to_be_16(frag_offset | is_mf);
> > > + frag_offset += ((length - l3_hdrlen) >> 3);
> > > + }
> > > +}
> > > +
> > > +int
> > > +gso_udp4_segment(struct rte_mbuf *pkt,
> > > + uint16_t gso_size,
> > > + struct rte_mempool *direct_pool,
> > > + struct rte_mempool *indirect_pool,
> > > + struct rte_mbuf **pkts_out,
> > > + uint16_t nb_pkts_out)
> > > +{
> > > + struct ipv4_hdr *ipv4_hdr;
> > > + uint16_t pyld_unit_size, hdr_offset;
> > > + uint16_t frag_off;
> > > + int ret;
> > > +
> > > + /* Don't process the fragmented packet */
> > > + ipv4_hdr = rte_pktmbuf_mtod_offset(pkt, struct ipv4_hdr *,
> > > + pkt->l2_len);
> > > + frag_off = rte_be_to_cpu_16(ipv4_hdr->fragment_offset);
> > > + if (unlikely(IS_FRAGMENTED(frag_off))) {
> > > + pkts_out[0] = pkt;
> > > + return 1;
> > > + }
> > > +
> > > + /*
> > > + * UDP fragmentation is the same as IP fragmentation.
> > > + * Except the first one, other output packets just have l2
> > > + * and l3 headers.
> > > + */
> > > + hdr_offset = pkt->l2_len + pkt->l3_len;
> > > +
> > > + /* Don't process the packet without data. */
> > > + if (unlikely(hdr_offset + pkt->l4_len >= pkt->pkt_len)) {
> > > + pkts_out[0] = pkt;
> > > + return 1;
> > > + }
> > > +
> > > + pyld_unit_size = gso_size - hdr_offset;
> > > +
> > > + /* Segment the payload */
> > > + ret = gso_do_segment(pkt, hdr_offset, pyld_unit_size, direct_pool,
> > > + indirect_pool, pkts_out, nb_pkts_out);
> > > + if (ret > 1)
> > > + update_ipv4_udp_headers(pkt, pkts_out, ret);
> > > +
> > > + return ret;
> > > +}
> > > diff --git a/lib/librte_gso/gso_udp4.h b/lib/librte_gso/gso_udp4.h new
> file
> > > mode 100644 index 0000000..b2a2908
> >
> > File gso_upd4.h is almost identical to file gso_tcp4.h so both files
> (although
> > short ~40 lines) could have been unified into one file.
>
> Ditto.
>
> >
> > > --- /dev/null
> > > +++ b/lib/librte_gso/gso_udp4.h
> > > @@ -0,0 +1,42 @@
> > > +/* SPDX-License-Identifier: BSD-3-Clause
> > > + * Copyright(c) 2018 Intel Corporation
> > > + */
> > > +
> > > +#ifndef _GSO_UDP4_H_
> > > +#define _GSO_UDP4_H_
> > > +
> > > +#include <stdint.h>
> > > +#include <rte_mbuf.h>
> > > +
> > > +/**
> > > + * Segment an UDP/IPv4 packet. This function doesn't check if the
> input
> > > + * packet has correct checksums, and doesn't update checksums for
> > > +output
> > > + * GSO segments. Furthermore, it doesn't process IP fragment packets.
> > > + *
> > > + * @param pkt
> > > + * The packet mbuf to segment.
> > > + * @param gso_size
> > > + * The max length of a GSO segment, measured in bytes.
> > > + * @param direct_pool
> > > + * MBUF pool used for allocating direct buffers for output segments.
> > > + * @param indirect_pool
> > > + * MBUF pool used for allocating indirect buffers for output segments.
> > > + * @param pkts_out
> > > + * Pointer array used to store the MBUF addresses of output GSO
> > > + * segments, when the function succeeds. If the memory space in
> > > + * pkts_out is insufficient, it fails and returns -EINVAL.
> > > + * @param nb_pkts_out
> > > + * The max number of items that 'pkts_out' can keep.
> > > + *
> > > + * @return
> > > + * - The number of GSO segments filled in pkts_out on success.
> > > + * - Return -ENOMEM if run out of memory in MBUF pools.
> > > + * - Return -EINVAL for invalid parameters.
> > > + */
> > > +int gso_udp4_segment(struct rte_mbuf *pkt,
> > > + uint16_t gso_size,
> > > + struct rte_mempool *direct_pool,
> > > + struct rte_mempool *indirect_pool,
> > > + struct rte_mbuf **pkts_out,
> > > + uint16_t nb_pkts_out);
> > > +#endif
> > > diff --git a/lib/librte_gso/meson.build b/lib/librte_gso/meson.build
> index
> > > 056534f..ad8dd85 100644
> > > --- a/lib/librte_gso/meson.build
> > > +++ b/lib/librte_gso/meson.build
> > > @@ -1,7 +1,7 @@
> > > # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel
> > > Corporation
> > >
> > > -sources = files('gso_common.c', 'gso_tcp4.c',
> > > +sources = files('gso_common.c', 'gso_tcp4.c', 'gso_udp4.c',
> > > 'gso_tunnel_tcp4.c', 'rte_gso.c')
> > > headers = files('rte_gso.h')
> > > deps += ['ethdev']
> > > diff --git a/lib/librte_gso/rte_gso.c b/lib/librte_gso/rte_gso.c index
> > > a44e3d4..751b5b6 100644
> > > --- a/lib/librte_gso/rte_gso.c
> > > +++ b/lib/librte_gso/rte_gso.c
> > > @@ -11,6 +11,17 @@
> > > #include "gso_common.h"
> > > #include "gso_tcp4.h"
> > > #include "gso_tunnel_tcp4.h"
> > > +#include "gso_udp4.h"
> > > +
> > > +#define ILLEGAL_UDP_GSO_CTX(ctx) \
> > > + ((((ctx)->gso_types & DEV_TX_OFFLOAD_UDP_TSO) == 0) || \
> > > + (ctx)->gso_size < RTE_GSO_UDP_SEG_SIZE_MIN)
> > > +
> > > +#define ILLEGAL_TCP_GSO_CTX(ctx) \
> > > + ((((ctx)->gso_types & (DEV_TX_OFFLOAD_TCP_TSO | \
> > > + DEV_TX_OFFLOAD_VXLAN_TNL_TSO | \
> > > + DEV_TX_OFFLOAD_GRE_TNL_TSO)) == 0) || \
> > > + (ctx)->gso_size < RTE_GSO_SEG_SIZE_MIN)
> >
> > Can you please explain why it is correct that the min len for VXLAN_TNL
> or
> > GRE_TNL is that of TCP MIN size (RTE_GSO_SEG_SIZE_MIN)
>
> The logic here is a little complicated. First, we have two GSO types, i.e. TCP
> and UDP,
> and they have different requirements for min lengths and gso_types flags.
> In the code,
> we use ILLEGAL_UDP_GSO_CTX() and ILLEGAL_TCP_GSO_CTX() to check if
> the input packet
> doesn't meet the requirements. Rte_gso_segment() starts to process the
> input packet only
> when it meets UDP or TCP requirement. In other words, rte_gso_segment()
> stops if the
> packet doesn't meet both requirements at the same time. This is why I use
> " ILLEGAL_UDP_GSO_CTX(gso_ctx) && ILLEGAL_TCP_GSO_CTX(gso_ctx))"
> as the exit
> condition.
>
> RTE_GSO_SEG_SIZE_MIN is not used to decide if input tunnel packets meet
> length
> requirement, but just checks a min length. In fact, we cannot decide a real
> correct min
> length for a packet type, since it may have vlan header or not. The original
> GSO code
> leverages this macro for tunnel packets to do a minimal check, so I think we
> can keep it
> here.
>
> >
> > >
> >
> > To make the macros above and their usage below clearer:
> >
> > 1. I would change the || with &&. and == with !=
> >
> > #define ILLEGAL_UDP_GSO_CTX(ctx) \
> > ((((ctx)->gso_types & DEV_TX_OFFLOAD_UDP_TSO) != 0) && \
> > (ctx)->gso_size < RTE_GSO_UDP_SEG_SIZE_MIN)
>
> This macro doesn't check all conditions for illegal UDP GSO. For example,
> if we input a UDP/IPv4 packet with setting gso_size to 1500 and without
> setting
> DEV_TX_OFFLOAD_UDP_TSO in gso_types, this macro returns 0, which
> means
> it's a legal UDP GSO packet.
>
> If you mean we'd better use LEGAL rather than ILLEGAL as the check in the
> code,
> the exit condition should be:
>
> #define LEGAL_UDP_GSO_CTX(ctx) \
> ((((ctx)->gso_types & DEV_TX_OFFLOAD_UDP_TSO) != 0) && \
> (ctx)->gso_size >= RTE_GSO_UDP_SEG_SIZE_MIN)
>
> if (~(LEGAL_UDP_GSO_CTX(..) || LEGAL_TCP_GSO_CTX(..)))
> return -EINVAL;
>
> But in fact, it's the same as current implementation. I can add some
> explanations to the code for users to better understand the logic, if you
> think it's OK.
>
> >
> > #define ILLEGAL_TCP_GSO_CTX(ctx) \
> > ((((ctx)->gso_types & (DEV_TX_OFFLOAD_TCP_TSO | \
> > DEV_TX_OFFLOAD_VXLAN_TNL_TSO | \
> > DEV_TX_OFFLOAD_GRE_TNL_TSO)) != 0) && \
> > (ctx)->gso_size < RTE_GSO_SEG_SIZE_MIN)
> >
>
> Ditto.
>
> > 2. Then later I would change the && with ||
> >
> > Changing original:
> > (ILLEGAL_UDP_GSO_CTX(gso_ctx) &&
> > ILLEGAL_TCP_GSO_CTX(gso_ctx)))
> >
> > With this:
> > ILLEGAL_UDP_GSO_CTX(gso_ctx) ||
> > ILLEGAL_TCP_GSO_CTX(gso_ctx))
>
> Ditto.
>
> >
> >
> > > int
> > > rte_gso_segment(struct rte_mbuf *pkt,
> > > @@ -27,14 +38,12 @@ rte_gso_segment(struct rte_mbuf *pkt,
> > >
> > > if (pkt == NULL || pkts_out == NULL || gso_ctx == NULL ||
> > > nb_pkts_out < 1 ||
> > > - gso_ctx->gso_size < RTE_GSO_SEG_SIZE_MIN ||
> > > - ((gso_ctx->gso_types &
> > > (DEV_TX_OFFLOAD_TCP_TSO |
> > > - DEV_TX_OFFLOAD_VXLAN_TNL_TSO |
> > > - DEV_TX_OFFLOAD_GRE_TNL_TSO)) == 0))
> > > + (ILLEGAL_UDP_GSO_CTX(gso_ctx) &&
> > > + ILLEGAL_TCP_GSO_CTX(gso_ctx)))
> > > return -EINVAL;
> > >
> > > if (gso_ctx->gso_size >= pkt->pkt_len) {
> > > - pkt->ol_flags &= (~PKT_TX_TCP_SEG);
> > > + pkt->ol_flags &= (~(PKT_TX_TCP_SEG | PKT_TX_UDP_SEG));
> > > pkts_out[0] = pkt;
> > > return 1;
> > > }
> > > @@ -59,6 +68,11 @@ rte_gso_segment(struct rte_mbuf *pkt,
> > > ret = gso_tcp4_segment(pkt, gso_size, ipid_delta,
> > > direct_pool, indirect_pool,
> > > pkts_out, nb_pkts_out);
> > > + } else if (IS_IPV4_UDP(pkt->ol_flags) &&
> > > + (gso_ctx->gso_types &
> > > DEV_TX_OFFLOAD_UDP_TSO)) {
> > > + pkt->ol_flags &= (~PKT_TX_UDP_SEG);
> > > + ret = gso_udp4_segment(pkt, gso_size, direct_pool,
> > > + indirect_pool, pkts_out, nb_pkts_out);
> > > } else {
> > > /* unsupported packet, skip */
> > > pkts_out[0] = pkt;
> > > diff --git a/lib/librte_gso/rte_gso.h b/lib/librte_gso/rte_gso.h index
> > > f4abd61..a626a11 100644
> > > --- a/lib/librte_gso/rte_gso.h
> > > +++ b/lib/librte_gso/rte_gso.h
> > > @@ -17,10 +17,14 @@ extern "C" {
> > > #include <stdint.h>
> > > #include <rte_mbuf.h>
> > >
> > > -/* Minimum GSO segment size. */
> > > +/* Minimum GSO segment size for TCP based packets. */
> > > #define RTE_GSO_SEG_SIZE_MIN (sizeof(struct ether_hdr) + \
> > > sizeof(struct ipv4_hdr) + sizeof(struct tcp_hdr) + 1)
> >
> > RTE_GSO_SEG_SIZE_MIN is actually TCP min size. Can you name this
> macro
> > as
> > RTE_GSO_TCP_SEG_SIZE_MIN (symmetrically to the UDP macro below)?
> >
>
> Yes, you are right. The name is not good. But I don't know if changing name
> will introduce ABI change, so I select this name as a workaround.
Sorry, it will not cause ABI change but will influence the applications
which have already used the GSO library, if we rename RTE_GSO_SEG_SIZE_MIN.
This is because this macro is an external macro. From my perspective, I prefer to
introduce a new macro for UDP based GSO, instead of renaming it.
Jiayu
>
> Thanks,
> Jiayu
>
> > >
> > > +/* Minimum GSO segment size for UDP based packets. */ #define
> > > +RTE_GSO_UDP_SEG_SIZE_MIN (sizeof(struct ether_hdr) + \
> > > + sizeof(struct ipv4_hdr) + sizeof(struct udp_hdr) + 1)
> > > +
> > > /* GSO flags for rte_gso_ctx. */
> > > #define RTE_GSO_FLAG_IPID_FIXED (1ULL << 0) /**< Use fixed IP ids
> for
> > > output GSO segments. Setting
> > > --
> > > 2.7.4
^ permalink raw reply [relevance 3%]
* Re: [dpdk-dev] [PATCH v3 1/3] gso: support UDP/IPv4 fragmentation
@ 2018-06-27 2:28 3% ` Hu, Jiayu
2018-06-27 5:05 3% ` Hu, Jiayu
0 siblings, 1 reply; 200+ results
From: Hu, Jiayu @ 2018-06-27 2:28 UTC (permalink / raw)
To: Ophir Munk, dev
Cc: Wang, Xiao W, Ananyev, Konstantin, Zhang, Yuwei1, Iremonger,
Bernard, Thomas Monjalon
Hi Ophir,
Replies are inline.
> -----Original Message-----
> From: Ophir Munk [mailto:ophirmu@mellanox.com]
> Sent: Wednesday, June 27, 2018 7:59 AM
> To: Hu, Jiayu <jiayu.hu@intel.com>; dev@dpdk.org
> Cc: Wang, Xiao W <xiao.w.wang@intel.com>; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>; Zhang, Yuwei1
> <yuwei1.zhang@intel.com>; Iremonger, Bernard
> <bernard.iremonger@intel.com>; Thomas Monjalon
> <thomas@monjalon.net>
> Subject: RE: [dpdk-dev] [PATCH v3 1/3] gso: support UDP/IPv4
> fragmentation
>
> Hi,
> Please find some comments below.
>
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jiayu Hu
> > Sent: Friday, June 22, 2018 8:54 AM
> > To: dev@dpdk.org
> > Cc: xiao.w.wang@intel.com; konstantin.ananyev@intel.com;
> > yuwei1.zhang@intel.com; bernard.iremonger@intel.com; Thomas
> Monjalon
> > <thomas@monjalon.net>; Jiayu Hu <jiayu.hu@intel.com>
> > Subject: [dpdk-dev] [PATCH v3 1/3] gso: support UDP/IPv4 fragmentation
> >
> > This patch adds GSO support for UDP/IPv4 packets. Supported packets
> may
> > include a single VLAN tag. UDP/IPv4 GSO doesn't check if input packets
> have
> > correct checksums, and doesn't update checksums for output packets (the
> > responsibility for this lies with the application).
> > Additionally, UDP/IPv4 GSO doesn't process IP fragmented packets.
> >
> > UDP/IPv4 GSO uses two chained MBUFs, one direct MBUF and one indrect
> > MBUF, to organize an output packet. The direct MBUF stores the packet
> > header, while the indirect mbuf simply points to a location within the
> original
> > packet's payload. Consequently, use of UDP GSO requires multi-segment
> > MBUF support in the TX functions of the NIC driver.
> >
> > If a packet is GSO'd, UDP/IPv4 GSO reduces its MBUF refcnt by 1. As a
> result,
> > when all of its GSOed segments are freed, the packet is freed
> automatically.
> >
> > Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
> > ---
> > lib/librte_gso/Makefile | 1 +
> > lib/librte_gso/gso_common.h | 3 ++
> > lib/librte_gso/gso_udp4.c | 81
> > +++++++++++++++++++++++++++++++++++++++++++++
> > lib/librte_gso/gso_udp4.h | 42 +++++++++++++++++++++++
> > lib/librte_gso/meson.build | 2 +-
> > lib/librte_gso/rte_gso.c | 24 +++++++++++---
> > lib/librte_gso/rte_gso.h | 6 +++-
> > 7 files changed, 152 insertions(+), 7 deletions(-) create mode 100644
> > lib/librte_gso/gso_udp4.c create mode 100644 lib/librte_gso/gso_udp4.h
> >
> > diff --git a/lib/librte_gso/Makefile b/lib/librte_gso/Makefile index
> > 3648ec0..1fac53a 100644
> > --- a/lib/librte_gso/Makefile
> > +++ b/lib/librte_gso/Makefile
> > @@ -19,6 +19,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_GSO) += rte_gso.c
> > SRCS-$(CONFIG_RTE_LIBRTE_GSO) += gso_common.c
> > SRCS-$(CONFIG_RTE_LIBRTE_GSO) += gso_tcp4.c
> > SRCS-$(CONFIG_RTE_LIBRTE_GSO) += gso_tunnel_tcp4.c
> > +SRCS-$(CONFIG_RTE_LIBRTE_GSO) += gso_udp4.c
> >
> > # install this header file
> > SYMLINK-$(CONFIG_RTE_LIBRTE_GSO)-include += rte_gso.h diff --git
> > a/lib/librte_gso/gso_common.h b/lib/librte_gso/gso_common.h index
> > 5ca5974..6cd764f 100644
> > --- a/lib/librte_gso/gso_common.h
> > +++ b/lib/librte_gso/gso_common.h
> > @@ -31,6 +31,9 @@
> > (PKT_TX_TCP_SEG | PKT_TX_IPV4 | PKT_TX_OUTER_IPV4 |
> \
> > PKT_TX_TUNNEL_GRE))
> >
> > +#define IS_IPV4_UDP(flag) (((flag) & (PKT_TX_UDP_SEG | PKT_TX_IPV4))
> ==
> > \
> > + (PKT_TX_UDP_SEG | PKT_TX_IPV4))
> > +
> > /**
> > * Internal function which updates the UDP header of a packet, following
> > * segmentation. This is required to update the header's datagram length
> > field.
> > diff --git a/lib/librte_gso/gso_udp4.c b/lib/librte_gso/gso_udp4.c new file
> > mode 100644 index 0000000..927dee1
> > --- /dev/null
> > +++ b/lib/librte_gso/gso_udp4.c
>
> File gso_upd4.c could be very similar to file gso_tcp4.c and that would
> avoid code duplication.
> In a unified file you could use a tcp vs. udp flag to distinguish between them
> when necessary.
> The files are short (~75 lines) so it is not a critical issue.
The function gso_tcp4_segment and gso_udp4_segment have different prototype,
and their GSO rules are different. They are two different basic GSO types.
The GSO library gives each GSO type (TCP, tunnel) an internal .c and .h file, and their name
represents their content. The rte_gso_segment calls different function according to the GSO type.
This style is very clear for developers or users to understand. In addition, as you said, the code
is short. So I think it's better to keep this style for UDP/IPv4 GSO.
>
> > @@ -0,0 +1,81 @@
> > +/* SPDX-License-Identifier: BSD-3-Clause
> > + * Copyright(c) 2018 Intel Corporation
> > + */
> > +
> > +#include "gso_common.h"
> > +#include "gso_udp4.h"
> > +
> > +#define IPV4_HDR_MF_BIT (1U << 13)
> > +
> > +static inline void
> > +update_ipv4_udp_headers(struct rte_mbuf *pkt, struct rte_mbuf **segs,
> > + uint16_t nb_segs)
> > +{
> > + struct ipv4_hdr *ipv4_hdr;
> > + uint16_t frag_offset = 0, is_mf;
> > + uint16_t l2_hdrlen = pkt->l2_len, l3_hdrlen = pkt->l3_len;
> > + uint16_t tail_idx = nb_segs - 1, length, i;
> > +
> > + /*
> > + * Update IP header fields for output segments. Specifically,
> > + * keep the same IP id, update fragment offset and total
> > + * length.
> > + */
> > + for (i = 0; i < nb_segs; i++) {
> > + ipv4_hdr = rte_pktmbuf_mtod_offset(segs[i], struct
> ipv4_hdr
> > *,
> > + l2_hdrlen);
> > + length = segs[i]->pkt_len - l2_hdrlen;
> > + ipv4_hdr->total_length = rte_cpu_to_be_16(length);
> > +
> > + is_mf = i < tail_idx ? IPV4_HDR_MF_BIT : 0;
> > + ipv4_hdr->fragment_offset =
> > + rte_cpu_to_be_16(frag_offset | is_mf);
> > + frag_offset += ((length - l3_hdrlen) >> 3);
> > + }
> > +}
> > +
> > +int
> > +gso_udp4_segment(struct rte_mbuf *pkt,
> > + uint16_t gso_size,
> > + struct rte_mempool *direct_pool,
> > + struct rte_mempool *indirect_pool,
> > + struct rte_mbuf **pkts_out,
> > + uint16_t nb_pkts_out)
> > +{
> > + struct ipv4_hdr *ipv4_hdr;
> > + uint16_t pyld_unit_size, hdr_offset;
> > + uint16_t frag_off;
> > + int ret;
> > +
> > + /* Don't process the fragmented packet */
> > + ipv4_hdr = rte_pktmbuf_mtod_offset(pkt, struct ipv4_hdr *,
> > + pkt->l2_len);
> > + frag_off = rte_be_to_cpu_16(ipv4_hdr->fragment_offset);
> > + if (unlikely(IS_FRAGMENTED(frag_off))) {
> > + pkts_out[0] = pkt;
> > + return 1;
> > + }
> > +
> > + /*
> > + * UDP fragmentation is the same as IP fragmentation.
> > + * Except the first one, other output packets just have l2
> > + * and l3 headers.
> > + */
> > + hdr_offset = pkt->l2_len + pkt->l3_len;
> > +
> > + /* Don't process the packet without data. */
> > + if (unlikely(hdr_offset + pkt->l4_len >= pkt->pkt_len)) {
> > + pkts_out[0] = pkt;
> > + return 1;
> > + }
> > +
> > + pyld_unit_size = gso_size - hdr_offset;
> > +
> > + /* Segment the payload */
> > + ret = gso_do_segment(pkt, hdr_offset, pyld_unit_size, direct_pool,
> > + indirect_pool, pkts_out, nb_pkts_out);
> > + if (ret > 1)
> > + update_ipv4_udp_headers(pkt, pkts_out, ret);
> > +
> > + return ret;
> > +}
> > diff --git a/lib/librte_gso/gso_udp4.h b/lib/librte_gso/gso_udp4.h new file
> > mode 100644 index 0000000..b2a2908
>
> File gso_upd4.h is almost identical to file gso_tcp4.h so both files (although
> short ~40 lines) could have been unified into one file.
Ditto.
>
> > --- /dev/null
> > +++ b/lib/librte_gso/gso_udp4.h
> > @@ -0,0 +1,42 @@
> > +/* SPDX-License-Identifier: BSD-3-Clause
> > + * Copyright(c) 2018 Intel Corporation
> > + */
> > +
> > +#ifndef _GSO_UDP4_H_
> > +#define _GSO_UDP4_H_
> > +
> > +#include <stdint.h>
> > +#include <rte_mbuf.h>
> > +
> > +/**
> > + * Segment an UDP/IPv4 packet. This function doesn't check if the input
> > + * packet has correct checksums, and doesn't update checksums for
> > +output
> > + * GSO segments. Furthermore, it doesn't process IP fragment packets.
> > + *
> > + * @param pkt
> > + * The packet mbuf to segment.
> > + * @param gso_size
> > + * The max length of a GSO segment, measured in bytes.
> > + * @param direct_pool
> > + * MBUF pool used for allocating direct buffers for output segments.
> > + * @param indirect_pool
> > + * MBUF pool used for allocating indirect buffers for output segments.
> > + * @param pkts_out
> > + * Pointer array used to store the MBUF addresses of output GSO
> > + * segments, when the function succeeds. If the memory space in
> > + * pkts_out is insufficient, it fails and returns -EINVAL.
> > + * @param nb_pkts_out
> > + * The max number of items that 'pkts_out' can keep.
> > + *
> > + * @return
> > + * - The number of GSO segments filled in pkts_out on success.
> > + * - Return -ENOMEM if run out of memory in MBUF pools.
> > + * - Return -EINVAL for invalid parameters.
> > + */
> > +int gso_udp4_segment(struct rte_mbuf *pkt,
> > + uint16_t gso_size,
> > + struct rte_mempool *direct_pool,
> > + struct rte_mempool *indirect_pool,
> > + struct rte_mbuf **pkts_out,
> > + uint16_t nb_pkts_out);
> > +#endif
> > diff --git a/lib/librte_gso/meson.build b/lib/librte_gso/meson.build index
> > 056534f..ad8dd85 100644
> > --- a/lib/librte_gso/meson.build
> > +++ b/lib/librte_gso/meson.build
> > @@ -1,7 +1,7 @@
> > # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel
> > Corporation
> >
> > -sources = files('gso_common.c', 'gso_tcp4.c',
> > +sources = files('gso_common.c', 'gso_tcp4.c', 'gso_udp4.c',
> > 'gso_tunnel_tcp4.c', 'rte_gso.c')
> > headers = files('rte_gso.h')
> > deps += ['ethdev']
> > diff --git a/lib/librte_gso/rte_gso.c b/lib/librte_gso/rte_gso.c index
> > a44e3d4..751b5b6 100644
> > --- a/lib/librte_gso/rte_gso.c
> > +++ b/lib/librte_gso/rte_gso.c
> > @@ -11,6 +11,17 @@
> > #include "gso_common.h"
> > #include "gso_tcp4.h"
> > #include "gso_tunnel_tcp4.h"
> > +#include "gso_udp4.h"
> > +
> > +#define ILLEGAL_UDP_GSO_CTX(ctx) \
> > + ((((ctx)->gso_types & DEV_TX_OFFLOAD_UDP_TSO) == 0) || \
> > + (ctx)->gso_size < RTE_GSO_UDP_SEG_SIZE_MIN)
> > +
> > +#define ILLEGAL_TCP_GSO_CTX(ctx) \
> > + ((((ctx)->gso_types & (DEV_TX_OFFLOAD_TCP_TSO | \
> > + DEV_TX_OFFLOAD_VXLAN_TNL_TSO | \
> > + DEV_TX_OFFLOAD_GRE_TNL_TSO)) == 0) || \
> > + (ctx)->gso_size < RTE_GSO_SEG_SIZE_MIN)
>
> Can you please explain why it is correct that the min len for VXLAN_TNL or
> GRE_TNL is that of TCP MIN size (RTE_GSO_SEG_SIZE_MIN)
The logic here is a little complicated. First, we have two GSO types, i.e. TCP and UDP,
and they have different requirements for min lengths and gso_types flags. In the code,
we use ILLEGAL_UDP_GSO_CTX() and ILLEGAL_TCP_GSO_CTX() to check if the input packet
doesn't meet the requirements. Rte_gso_segment() starts to process the input packet only
when it meets UDP or TCP requirement. In other words, rte_gso_segment() stops if the
packet doesn't meet both requirements at the same time. This is why I use
" ILLEGAL_UDP_GSO_CTX(gso_ctx) && ILLEGAL_TCP_GSO_CTX(gso_ctx))" as the exit
condition.
RTE_GSO_SEG_SIZE_MIN is not used to decide if input tunnel packets meet length
requirement, but just checks a min length. In fact, we cannot decide a real correct min
length for a packet type, since it may have vlan header or not. The original GSO code
leverages this macro for tunnel packets to do a minimal check, so I think we can keep it
here.
>
> >
>
> To make the macros above and their usage below clearer:
>
> 1. I would change the || with &&. and == with !=
>
> #define ILLEGAL_UDP_GSO_CTX(ctx) \
> ((((ctx)->gso_types & DEV_TX_OFFLOAD_UDP_TSO) != 0) && \
> (ctx)->gso_size < RTE_GSO_UDP_SEG_SIZE_MIN)
This macro doesn't check all conditions for illegal UDP GSO. For example,
if we input a UDP/IPv4 packet with setting gso_size to 1500 and without setting
DEV_TX_OFFLOAD_UDP_TSO in gso_types, this macro returns 0, which means
it's a legal UDP GSO packet.
If you mean we'd better use LEGAL rather than ILLEGAL as the check in the code,
the exit condition should be:
#define LEGAL_UDP_GSO_CTX(ctx) \
((((ctx)->gso_types & DEV_TX_OFFLOAD_UDP_TSO) != 0) && \
(ctx)->gso_size >= RTE_GSO_UDP_SEG_SIZE_MIN)
if (~(LEGAL_UDP_GSO_CTX(..) || LEGAL_TCP_GSO_CTX(..)))
return -EINVAL;
But in fact, it's the same as current implementation. I can add some
explanations to the code for users to better understand the logic, if you
think it's OK.
>
> #define ILLEGAL_TCP_GSO_CTX(ctx) \
> ((((ctx)->gso_types & (DEV_TX_OFFLOAD_TCP_TSO | \
> DEV_TX_OFFLOAD_VXLAN_TNL_TSO | \
> DEV_TX_OFFLOAD_GRE_TNL_TSO)) != 0) && \
> (ctx)->gso_size < RTE_GSO_SEG_SIZE_MIN)
>
Ditto.
> 2. Then later I would change the && with ||
>
> Changing original:
> (ILLEGAL_UDP_GSO_CTX(gso_ctx) &&
> ILLEGAL_TCP_GSO_CTX(gso_ctx)))
>
> With this:
> ILLEGAL_UDP_GSO_CTX(gso_ctx) ||
> ILLEGAL_TCP_GSO_CTX(gso_ctx))
Ditto.
>
>
> > int
> > rte_gso_segment(struct rte_mbuf *pkt,
> > @@ -27,14 +38,12 @@ rte_gso_segment(struct rte_mbuf *pkt,
> >
> > if (pkt == NULL || pkts_out == NULL || gso_ctx == NULL ||
> > nb_pkts_out < 1 ||
> > - gso_ctx->gso_size < RTE_GSO_SEG_SIZE_MIN ||
> > - ((gso_ctx->gso_types &
> > (DEV_TX_OFFLOAD_TCP_TSO |
> > - DEV_TX_OFFLOAD_VXLAN_TNL_TSO |
> > - DEV_TX_OFFLOAD_GRE_TNL_TSO)) == 0))
> > + (ILLEGAL_UDP_GSO_CTX(gso_ctx) &&
> > + ILLEGAL_TCP_GSO_CTX(gso_ctx)))
> > return -EINVAL;
> >
> > if (gso_ctx->gso_size >= pkt->pkt_len) {
> > - pkt->ol_flags &= (~PKT_TX_TCP_SEG);
> > + pkt->ol_flags &= (~(PKT_TX_TCP_SEG | PKT_TX_UDP_SEG));
> > pkts_out[0] = pkt;
> > return 1;
> > }
> > @@ -59,6 +68,11 @@ rte_gso_segment(struct rte_mbuf *pkt,
> > ret = gso_tcp4_segment(pkt, gso_size, ipid_delta,
> > direct_pool, indirect_pool,
> > pkts_out, nb_pkts_out);
> > + } else if (IS_IPV4_UDP(pkt->ol_flags) &&
> > + (gso_ctx->gso_types &
> > DEV_TX_OFFLOAD_UDP_TSO)) {
> > + pkt->ol_flags &= (~PKT_TX_UDP_SEG);
> > + ret = gso_udp4_segment(pkt, gso_size, direct_pool,
> > + indirect_pool, pkts_out, nb_pkts_out);
> > } else {
> > /* unsupported packet, skip */
> > pkts_out[0] = pkt;
> > diff --git a/lib/librte_gso/rte_gso.h b/lib/librte_gso/rte_gso.h index
> > f4abd61..a626a11 100644
> > --- a/lib/librte_gso/rte_gso.h
> > +++ b/lib/librte_gso/rte_gso.h
> > @@ -17,10 +17,14 @@ extern "C" {
> > #include <stdint.h>
> > #include <rte_mbuf.h>
> >
> > -/* Minimum GSO segment size. */
> > +/* Minimum GSO segment size for TCP based packets. */
> > #define RTE_GSO_SEG_SIZE_MIN (sizeof(struct ether_hdr) + \
> > sizeof(struct ipv4_hdr) + sizeof(struct tcp_hdr) + 1)
>
> RTE_GSO_SEG_SIZE_MIN is actually TCP min size. Can you name this macro
> as
> RTE_GSO_TCP_SEG_SIZE_MIN (symmetrically to the UDP macro below)?
>
Yes, you are right. The name is not good. But I don't know if changing name
will introduce ABI change, so I select this name as a workaround.
Thanks,
Jiayu
> >
> > +/* Minimum GSO segment size for UDP based packets. */ #define
> > +RTE_GSO_UDP_SEG_SIZE_MIN (sizeof(struct ether_hdr) + \
> > + sizeof(struct ipv4_hdr) + sizeof(struct udp_hdr) + 1)
> > +
> > /* GSO flags for rte_gso_ctx. */
> > #define RTE_GSO_FLAG_IPID_FIXED (1ULL << 0) /**< Use fixed IP ids for
> > output GSO segments. Setting
> > --
> > 2.7.4
^ permalink raw reply [relevance 3%]
* Re: [dpdk-dev] [PATCH v4 01/24] eal: introduce one device scan
2018-06-26 12:26 0% ` Zhang, Qi Z
@ 2018-06-26 16:33 4% ` Gaëtan Rivet
2018-06-27 12:32 3% ` Zhang, Qi Z
0 siblings, 1 reply; 200+ results
From: Gaëtan Rivet @ 2018-06-26 16:33 UTC (permalink / raw)
To: Zhang, Qi Z
Cc: Burakov, Anatoly, thomas, Ananyev, Konstantin, dev, Richardson,
Bruce, Yigit, Ferruh, Shelton, Benjamin H, Vangati, Narender
On Tue, Jun 26, 2018 at 12:26:05PM +0000, Zhang, Qi Z wrote:
>
>
> > -----Original Message-----
> > From: Burakov, Anatoly
> > Sent: Tuesday, June 26, 2018 7:48 PM
> > To: Zhang, Qi Z <qi.z.zhang@intel.com>; thomas@monjalon.net
> > Cc: Ananyev, Konstantin <konstantin.ananyev@intel.com>; dev@dpdk.org;
> > Richardson, Bruce <bruce.richardson@intel.com>; Yigit, Ferruh
> > <ferruh.yigit@intel.com>; Shelton, Benjamin H
> > <benjamin.h.shelton@intel.com>; Vangati, Narender
> > <narender.vangati@intel.com>
> > Subject: Re: [PATCH v4 01/24] eal: introduce one device scan
> >
> > On 26-Jun-18 8:08 AM, Qi Zhang wrote:
> > > When hot plug a new device, it is not necessary to scan everything on
> > > the bus since the devname and devargs are already there. So new
> > > rte_bus ops "scan_one" is introduced, bus driver can implement this
> > > function to simplify the hotplug process.
> > >
> > > Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> > > ---
> > >
> >
> > <snip>
> >
> > > + * NULL for unsuccessful scan
> > > + */
> > > +typedef struct rte_device *(*rte_bus_scan_one_t)(struct rte_devargs
> > > +*devargs);
> > > +
> > > +/**
> > > * Implementation specific probe function which is responsible for linking
> > > * devices on that bus with applicable drivers.
> > > *
> > > @@ -204,6 +219,7 @@ struct rte_bus {
> > > TAILQ_ENTRY(rte_bus) next; /**< Next bus object in linked list */
> > > const char *name; /**< Name of the bus */
> > > rte_bus_scan_t scan; /**< Scan for devices attached to
> > bus */
> > > + rte_bus_scan_one_t scan_one; /**< Scan one device using devargs */
> > > rte_bus_probe_t probe; /**< Probe devices on bus */
> > > rte_bus_find_device_t find_device; /**< Find a device on the bus */
> > > rte_bus_plug_t plug; /**< Probe single device for drivers
> > */
> > >
> >
> > Does changing this structure break ABI for bus drivers?
>
> For bus driver, I think yes, but I'm not sure what I should do for this, since this is not for application
>
>
This should be appropriately announced in advance, in general.
However, it seems there is some leeway if the new field will not move
the others and not make the structure grow (i.e. replace a padding).
There is an ABI check script that can be used.
This however breaks the bus ABI, which breaks the EAL ABI.
This is usually an issue.
More generally, I was in favor of changing the whole bus scan process to a
per-device iteration. I was shut down on this when adding hotplug.
As a result, bus->scan() process was made to require the operation to be
idempotent.
Adding a new ops adds noise to the bus API. It should be kept as clean
as possible. This new one seems unnecessary, now that all bus scans are
idempotent (when supporting hotplug).
Regards,
--
Gaëtan Rivet
6WIND
^ permalink raw reply [relevance 4%]
* Re: [dpdk-dev] [PATCH v2] cmdline: rework as a wrapper to libedit
@ 2018-06-26 13:21 0% ` Olivier Matz
2018-06-27 10:36 0% ` Bruce Richardson
0 siblings, 1 reply; 200+ results
From: Olivier Matz @ 2018-06-26 13:21 UTC (permalink / raw)
To: Adrien Mazarguil
Cc: dev, Keith Wiles, Jingjing Wu, Thomas Monjalon, Ferruh Yigit,
Jim Thompson, Anatoly Burakov
Hi Adrien,
Better late than never, please find below some comments
about your patch.
On Thu, Apr 19, 2018 at 05:13:53PM +0200, Adrien Mazarguil wrote:
> Disclaimer: this patch must not be confused with the CLI library [1]
> (work in progress) that will eventually supersede librte_cmdline itself
> with a different API.
>
> Rather, it modifies librte_cmdline to delegate all the heavy lifting
> (terminal and history handling), strips unused features and re-implements
> what remains of its public API as a wrapper to the editline library (also
> known as libedit) [2], a well-known, BSD-licensed and widely available
> library used by many projects which does everything needed and more [3].
>
> This approach was chosen because converting librte_cmdline as a wrapper to
> a more capable library was easier and faster than addressing its
> shortcomings and results in much less code to maintain in DPDK.
>
> It also provides a drop-in solution for applications that rely on
> librte_cmdline. They benefit from greatly improved command line handling
> without a meaningful impact on their code base.
>
> The main motivation behind this patch is testpmd's flow (rte_flow) command,
> which requires support for dynamic tokens and very long lines that must be
> broken down when displayed. This is not supported by librte_cmdline's
> limited terminal handling capabilities, resulting in a rather frustrating
> user experience.
>
> It had to be addressed given the importance of testpmd as one of the
> primary tool used by PMD developers.
>
> This rework results in the following changes:
>
> - Removed circular buffer management interface for command history
> (cmdline_cirbuf.c), command history being handled by libedit.
> - Removed raw command-line interpreter (cmdline_rdline.c).
> - Removed raw terminal handler (cmdline_vt100.c).
> - Removed all test/example code for the above.
> - Re-implemented high level interactive and non-interactive command-line
> handlers (cmdline.c and cmdline_socket.c) on top of libedit using its
> native interface, not its readline compatibility layer.
> - Made struct cmdline opaque so that applications relying on librte_cmdline
> do not need to include any libedit headers.
> - Applications do not need to include cmdline_rdline.h anymore.
> - Terminal resizing is now automatically handled.
> - New external dependency for applications relying on librte_cmdline.
> - Major version bump due to the ABI impact of these changes.
>
> [1] http://dpdk.org/browse/draft/dpdk-draft-cli/
> [2] http://thrysoee.dk/editline/
> [3] http://netbsd.gw.com/cgi-bin/man-cgi?editline++NetBSD-current
>
> Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> Cc: Olivier Matz <olivier.matz@6wind.com>
> Cc: Keith Wiles <keith.wiles@intel.com>
> Cc: Jingjing Wu <jingjing.wu@intel.com>
> Cc: Thomas Monjalon <thomas@monjalon.net>
> Cc: Ferruh Yigit <ferruh.yigit@intel.com>
> Cc: Jim Thompson <jim@netgate.com>
> Cc: Anatoly Burakov <anatoly.burakov@intel.com>
>
> --
>
> v2 changes:
>
> - Replaced an instance of snprintf() with rte_strlcpy() [5].
> - Rebased patch.
>
> [5] http://dpdk.org/ml/archives/dev/2018-April/097721.html
>
> v1 changes:
>
> No fundamental change since the original RFC [4], except it's been rebased
> several times and Meson build support was added in the meantime. Commit log
> was also shortened a bit.
>
> I'm re-sending this because I think it's useful, at least to me (duh). As
> the maintainer of rte_flow, I spend most of my time typing flow commands in
> testpmd and libedit makes that a pleasant experience.
>
> Try it out! And don't hesitate to send your acked-by line to get this in
> time for 18.05 :)
>
> [4] http://dpdk.org/ml/archives/dev/2017-November/081605.html
Re-saying what I said the first time: I think this is a very good
improvement, removing lots of dpdk code that is better implemented in
well-known libraries.
The compilation with shared libraries fail. Please try for instance:
./devtools/test-build.sh -j4 x86_64-native-linuxapp-clang+shared+debug
I suggest to add in lib/librte_cmdline/Makefile:
LDLIBS += $(shell pkg-config --libs libedit)
I also think something should be added in
/doc/guides/linux_gsg/sys_reqs.rst to highlight the new build
dependency.
I noticed a bad behavior change (in addition to many good ones):
ctrl-c now quits the application, and this was not the case before.
I often use ctrl-c to delete the line I'm currently editing. Please
see at the end a proposition to restore this feature.
Finally, the patch removes some functions, so it should be announced
with a deprecation notice.
[...]
> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
> index 0b442c3a6..6b4d9dbfd 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -48,7 +48,6 @@
> #include <rte_flow.h>
> #include <rte_gro.h>
>
> -#include <cmdline_rdline.h>
> #include <cmdline_parse.h>
> #include <cmdline_parse_num.h>
> #include <cmdline_parse_string.h>
FYI, after rebase, same hunk is also required in
examples/vhost_crypto/main.c
[...]
> diff --git a/lib/librte_cmdline/cmdline.c b/lib/librte_cmdline/cmdline.c
> index 591b78b0f..1c45cd9ff 100644
> --- a/lib/librte_cmdline/cmdline.c
> +++ b/lib/librte_cmdline/cmdline.c
> @@ -4,79 +4,183 @@
> * All rights reserved.
> */
>
> +#include <ctype.h>
> +#include <histedit.h>
histedit.h would be better after system includes.
[...]
> @@ -207,48 +317,49 @@ cmdline_poll(struct cmdline *cl)
> {
> struct pollfd pfd;
> int status;
> - ssize_t read_status;
> - char c;
> + int read_status;
> + int flags;
>
> if (!cl)
> return -EINVAL;
> - else if (cl->rdl.status == RDLINE_EXITED)
> + else if (cl->error)
> + return RDLINE_ERROR;
> + else if (cl->eof)
> return RDLINE_EXITED;
>
> - pfd.fd = cl->s_in;
> + pfd.fd = fileno(cl->f_in);
> pfd.events = POLLIN;
> pfd.revents = 0;
>
> status = poll(&pfd, 1, 0);
> if (status < 0)
> - return status;
> - else if (status > 0) {
> - c = -1;
> - read_status = read(cl->s_in, &c, 1);
> - if (read_status < 0)
> - return read_status;
> -
> - status = cmdline_in(cl, &c, 1);
> - if (status < 0 && cl->rdl.status != RDLINE_EXITED)
> - return status;
> - }
> -
> - return cl->rdl.status;
> + return RDLINE_ERROR;
> + if (!status)
> + return RDLINE_RUNNING;
> + flags = fcntl(pfd.fd, F_GETFL);
> + if (!(flags & O_NONBLOCK))
> + fcntl(pfd.fd, F_SETFL, flags | O_NONBLOCK);
We just checked that fd is readable, what is the purpose of
adding the O_NONBLOCK flag?
> + if (!el_gets(cl->el, &read_status) && read_status == -1)
> + cl->error = 1;
Either from documentation or libedit code, I don't think it is
possible that read_status is set to -1. Am I missing something?
> + if (!(flags & O_NONBLOCK))
> + fcntl(pfd.fd, F_SETFL, flags);
> + return cl->error ? RDLINE_ERROR :
> + cl->eof ? RDLINE_EXITED :
> + RDLINE_RUNNING;
> }
>
> void
> cmdline_interact(struct cmdline *cl)
> {
> - char c;
> -
> if (!cl)
> return;
>
> - c = -1;
> - while (1) {
> - if (read(cl->s_in, &c, 1) <= 0)
> - break;
> - if (cmdline_in(cl, &c, 1) < 0)
> - break;
> + while (!cl->error && !cl->eof) {
> + int read_status;
> +
> + if (el_gets(cl->el, &read_status))
> + continue;
> + if (read_status == -1)
> + cl->error = 1;
Same comment here about read_status.
Thanks
Olivier
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [PATCH v4 01/24] eal: introduce one device scan
2018-06-26 11:47 3% ` Burakov, Anatoly
@ 2018-06-26 12:26 0% ` Zhang, Qi Z
2018-06-26 16:33 4% ` Gaëtan Rivet
0 siblings, 1 reply; 200+ results
From: Zhang, Qi Z @ 2018-06-26 12:26 UTC (permalink / raw)
To: Burakov, Anatoly, thomas
Cc: Ananyev, Konstantin, dev, Richardson, Bruce, Yigit, Ferruh,
Shelton, Benjamin H, Vangati, Narender
> -----Original Message-----
> From: Burakov, Anatoly
> Sent: Tuesday, June 26, 2018 7:48 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; thomas@monjalon.net
> Cc: Ananyev, Konstantin <konstantin.ananyev@intel.com>; dev@dpdk.org;
> Richardson, Bruce <bruce.richardson@intel.com>; Yigit, Ferruh
> <ferruh.yigit@intel.com>; Shelton, Benjamin H
> <benjamin.h.shelton@intel.com>; Vangati, Narender
> <narender.vangati@intel.com>
> Subject: Re: [PATCH v4 01/24] eal: introduce one device scan
>
> On 26-Jun-18 8:08 AM, Qi Zhang wrote:
> > When hot plug a new device, it is not necessary to scan everything on
> > the bus since the devname and devargs are already there. So new
> > rte_bus ops "scan_one" is introduced, bus driver can implement this
> > function to simplify the hotplug process.
> >
> > Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> > ---
> >
>
> <snip>
>
> > + * NULL for unsuccessful scan
> > + */
> > +typedef struct rte_device *(*rte_bus_scan_one_t)(struct rte_devargs
> > +*devargs);
> > +
> > +/**
> > * Implementation specific probe function which is responsible for linking
> > * devices on that bus with applicable drivers.
> > *
> > @@ -204,6 +219,7 @@ struct rte_bus {
> > TAILQ_ENTRY(rte_bus) next; /**< Next bus object in linked list */
> > const char *name; /**< Name of the bus */
> > rte_bus_scan_t scan; /**< Scan for devices attached to
> bus */
> > + rte_bus_scan_one_t scan_one; /**< Scan one device using devargs */
> > rte_bus_probe_t probe; /**< Probe devices on bus */
> > rte_bus_find_device_t find_device; /**< Find a device on the bus */
> > rte_bus_plug_t plug; /**< Probe single device for drivers
> */
> >
>
> Does changing this structure break ABI for bus drivers?
For bus driver, I think yes, but I'm not sure what I should do for this, since this is not for application
>
> --
> Thanks,
> Anatoly
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [PATCH v4 01/24] eal: introduce one device scan
@ 2018-06-26 11:47 3% ` Burakov, Anatoly
2018-06-26 12:26 0% ` Zhang, Qi Z
0 siblings, 1 reply; 200+ results
From: Burakov, Anatoly @ 2018-06-26 11:47 UTC (permalink / raw)
To: Qi Zhang, thomas
Cc: konstantin.ananyev, dev, bruce.richardson, ferruh.yigit,
benjamin.h.shelton, narender.vangati
On 26-Jun-18 8:08 AM, Qi Zhang wrote:
> When hot plug a new device, it is not necessary to scan everything
> on the bus since the devname and devargs are already there. So new
> rte_bus ops "scan_one" is introduced, bus driver can implement this
> function to simplify the hotplug process.
>
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> ---
>
<snip>
> + * NULL for unsuccessful scan
> + */
> +typedef struct rte_device *(*rte_bus_scan_one_t)(struct rte_devargs *devargs);
> +
> +/**
> * Implementation specific probe function which is responsible for linking
> * devices on that bus with applicable drivers.
> *
> @@ -204,6 +219,7 @@ struct rte_bus {
> TAILQ_ENTRY(rte_bus) next; /**< Next bus object in linked list */
> const char *name; /**< Name of the bus */
> rte_bus_scan_t scan; /**< Scan for devices attached to bus */
> + rte_bus_scan_one_t scan_one; /**< Scan one device using devargs */
> rte_bus_probe_t probe; /**< Probe devices on bus */
> rte_bus_find_device_t find_device; /**< Find a device on the bus */
> rte_bus_plug_t plug; /**< Probe single device for drivers */
>
Does changing this structure break ABI for bus drivers?
--
Thanks,
Anatoly
^ permalink raw reply [relevance 3%]
* Re: [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session size functions
2018-06-26 5:28 0% ` Verma, Shally
@ 2018-06-26 8:17 0% ` De Lara Guarch, Pablo
0 siblings, 0 replies; 200+ results
From: De Lara Guarch, Pablo @ 2018-06-26 8:17 UTC (permalink / raw)
To: Verma, Shally, Akhil Goyal, Doherty, Declan, ravi1.kumar, Jacob,
Jerin, Zhang, Roy Fan, Trahe, Fiona, tdu, jianjay.zhou
Cc: dev
> -----Original Message-----
> From: Verma, Shally [mailto:Shally.Verma@cavium.com]
> Sent: Tuesday, June 26, 2018 6:28 AM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Akhil Goyal
> <akhil.goyal@nxp.com>; Doherty, Declan <declan.doherty@intel.com>;
> ravi1.kumar@amd.com; Jacob, Jerin <Jerin.JacobKollanukkaran@cavium.com>;
> Zhang, Roy Fan <roy.fan.zhang@intel.com>; Trahe, Fiona
> <fiona.trahe@intel.com>; tdu@semihalf.com; jianjay.zhou@huawei.com
> Cc: dev@dpdk.org
> Subject: RE: [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session size
> functions
>
>
>
> >-----Original Message-----
> >From: De Lara Guarch, Pablo [mailto:pablo.de.lara.guarch@intel.com]
> >Sent: 25 June 2018 22:10
> >To: Verma, Shally <Shally.Verma@cavium.com>; Akhil Goyal
> ><akhil.goyal@nxp.com>; Doherty, Declan <declan.doherty@intel.com>;
> >ravi1.kumar@amd.com; Jacob, Jerin
> ><Jerin.JacobKollanukkaran@cavium.com>; Zhang, Roy Fan
> ><roy.fan.zhang@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>;
> >tdu@semihalf.com; jianjay.zhou@huawei.com
> >Cc: dev@dpdk.org
> >Subject: RE: [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session
> >size functions
> >
> >External Email
> >
> >> -----Original Message-----
> >> From: Verma, Shally [mailto:Shally.Verma@cavium.com]
> >> Sent: Friday, June 22, 2018 6:02 PM
> >> To: Akhil Goyal <akhil.goyal@nxp.com>; De Lara Guarch, Pablo
> >> <pablo.de.lara.guarch@intel.com>; Doherty, Declan
> >> <declan.doherty@intel.com>; ravi1.kumar@amd.com; Jacob, Jerin
> >> <Jerin.JacobKollanukkaran@cavium.com>; Zhang, Roy Fan
> >> <roy.fan.zhang@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>;
> >> tdu@semihalf.com; jianjay.zhou@huawei.com
> >> Cc: dev@dpdk.org
> >> Subject: RE: [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session
> >> size functions
> >>
> >> Hi Pablo
> >>
> >> >-----Original Message-----
> >> >From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Akhil Goyal
> >> >Sent: 21 June 2018 18:29
> >> >To: Pablo de Lara <pablo.de.lara.guarch@intel.com>;
> >> >declan.doherty@intel.com; ravi1.kumar@amd.com; Jacob, Jerin
> >> ><Jerin.JacobKollanukkaran@cavium.com>; roy.fan.zhang@intel.com;
> >> >fiona.trahe@intel.com; tdu@semihalf.com; jianjay.zhou@huawei.com
> >> >Cc: dev@dpdk.org
> >> >Subject: Re: [dpdk-dev] [PATCH 5/6] cryptodev: remove old get
> >> >session size functions
> >> >
> >> >External Email
> >> >
> >> >Hi Pablo,
> >> >
> >> >
> >> >On 6/9/2018 3:32 AM, Pablo de Lara wrote:
> >> >> Removed rte_cryptodev_get_header_session_size
> >> >> and rte_cryptodev_get_private_session_size functions, as they have
> >> >> been substituted with functions specific for symmetric operations,
> >> >> with _sym_ word after "rte_cryptodev_".
> >> >>
> >> >> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> >> >> ---
> >
> >...
> >
> >> >> +
> >> >> + - ``rte_cryptodev_get_header_session_size`` is replaced with
> >> >> + ``rte_cryptodev_sym_get_header_session_size``
> >> >> + - ``rte_cryptodev_get_private_session_size`` is replaced with
> >> >> + ``rte_cryptodev_sym_get_private_session_size``
> >> >> +
> >> >rte_cryptodev_get_private_session_size is not removed in this patch.
> >> >I think you missed it in your patch.
> >
> >Right Akhil, thanks for spotting this. Will fix in next version.
> >
> >> >
> >> >-Akhil
> >> >>
> >> >> ABI Changes
> >> >> -----------
> >> >> diff --git a/lib/librte_cryptodev/rte_cryptodev.c
> >> >> b/lib/librte_cryptodev/rte_cryptodev.c
> >> >> index a07904fb9..40e249e79 100644
> >> >> --- a/lib/librte_cryptodev/rte_cryptodev.c
> >> >> +++ b/lib/librte_cryptodev/rte_cryptodev.c
> >> >> @@ -1181,12 +1181,6 @@ rte_cryptodev_sym_session_free(struct
> >> rte_cryptodev_sym_session *sess)
> >> >> return 0;
> >> >> }
> >> >>
> >> >> -unsigned int
> >> >> -rte_cryptodev_get_header_session_size(void)
> >> >> -{
> >> >> - return rte_cryptodev_sym_get_header_session_size();
> >> >> -}
> >> >> -
> >> >> unsigned int
> >> >> rte_cryptodev_sym_get_header_session_size(void)
> >> >> {
> >>
> >> [Shally] I missed this before. I think this implementation either
> >> should change to use nb_drivers which support symmetric or else I am
> >> not seeing a need for separate sym specific API for header_size since
> >> it will always be same for both sym and asym.
> >
> >The implementation is already using nb_drivers to calculate the size, right?
> [Shally] I meant change it to nb_sym_drivers, where nb_sym_drivers = number
> of drivers that have symmetric capability
Ok, I see now. Well, this will overcomplicate things, rte_cryptodev_allocate_driver
would need to be changed to two functions,
one for symmetric and another for asymmetric, causing an API breakage.
I think as long as the session creation/initialization functions check if a PMD supports
symmetric and/or asymmetric, we should be OK.
We might need some changes in the current symmetric implementation to peform those checks
and in the new asymmetric implementation.
Thanks,
Pablo
>
> >Anyway, I understand that the way asymmetric sessions are done, the API
> >will be the same, but this could change in the future and since we have
> >already deprecated the generic function (get_header_session_size), I think we
> should continue and have both _sym and _asym_ functions.
> >
> [Shally] Ok.
> >Thanks,
> >Pablo
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session size functions
2018-06-25 16:40 0% ` De Lara Guarch, Pablo
@ 2018-06-26 5:28 0% ` Verma, Shally
2018-06-26 8:17 0% ` De Lara Guarch, Pablo
0 siblings, 1 reply; 200+ results
From: Verma, Shally @ 2018-06-26 5:28 UTC (permalink / raw)
To: De Lara Guarch, Pablo, Akhil Goyal, Doherty, Declan, ravi1.kumar,
Jacob, Jerin, Zhang, Roy Fan, Trahe, Fiona, tdu, jianjay.zhou
Cc: dev
>-----Original Message-----
>From: De Lara Guarch, Pablo [mailto:pablo.de.lara.guarch@intel.com]
>Sent: 25 June 2018 22:10
>To: Verma, Shally <Shally.Verma@cavium.com>; Akhil Goyal <akhil.goyal@nxp.com>; Doherty, Declan <declan.doherty@intel.com>;
>ravi1.kumar@amd.com; Jacob, Jerin <Jerin.JacobKollanukkaran@cavium.com>; Zhang, Roy Fan <roy.fan.zhang@intel.com>; Trahe,
>Fiona <fiona.trahe@intel.com>; tdu@semihalf.com; jianjay.zhou@huawei.com
>Cc: dev@dpdk.org
>Subject: RE: [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session size functions
>
>External Email
>
>> -----Original Message-----
>> From: Verma, Shally [mailto:Shally.Verma@cavium.com]
>> Sent: Friday, June 22, 2018 6:02 PM
>> To: Akhil Goyal <akhil.goyal@nxp.com>; De Lara Guarch, Pablo
>> <pablo.de.lara.guarch@intel.com>; Doherty, Declan
>> <declan.doherty@intel.com>; ravi1.kumar@amd.com; Jacob, Jerin
>> <Jerin.JacobKollanukkaran@cavium.com>; Zhang, Roy Fan
>> <roy.fan.zhang@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>;
>> tdu@semihalf.com; jianjay.zhou@huawei.com
>> Cc: dev@dpdk.org
>> Subject: RE: [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session size
>> functions
>>
>> Hi Pablo
>>
>> >-----Original Message-----
>> >From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Akhil Goyal
>> >Sent: 21 June 2018 18:29
>> >To: Pablo de Lara <pablo.de.lara.guarch@intel.com>;
>> >declan.doherty@intel.com; ravi1.kumar@amd.com; Jacob, Jerin
>> ><Jerin.JacobKollanukkaran@cavium.com>; roy.fan.zhang@intel.com;
>> >fiona.trahe@intel.com; tdu@semihalf.com; jianjay.zhou@huawei.com
>> >Cc: dev@dpdk.org
>> >Subject: Re: [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session
>> >size functions
>> >
>> >External Email
>> >
>> >Hi Pablo,
>> >
>> >
>> >On 6/9/2018 3:32 AM, Pablo de Lara wrote:
>> >> Removed rte_cryptodev_get_header_session_size
>> >> and rte_cryptodev_get_private_session_size functions, as they have
>> >> been substituted with functions specific for symmetric operations,
>> >> with _sym_ word after "rte_cryptodev_".
>> >>
>> >> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
>> >> ---
>
>...
>
>> >> +
>> >> + - ``rte_cryptodev_get_header_session_size`` is replaced with
>> >> + ``rte_cryptodev_sym_get_header_session_size``
>> >> + - ``rte_cryptodev_get_private_session_size`` is replaced with
>> >> + ``rte_cryptodev_sym_get_private_session_size``
>> >> +
>> >rte_cryptodev_get_private_session_size is not removed in this patch. I
>> >think you missed it in your patch.
>
>Right Akhil, thanks for spotting this. Will fix in next version.
>
>> >
>> >-Akhil
>> >>
>> >> ABI Changes
>> >> -----------
>> >> diff --git a/lib/librte_cryptodev/rte_cryptodev.c
>> >> b/lib/librte_cryptodev/rte_cryptodev.c
>> >> index a07904fb9..40e249e79 100644
>> >> --- a/lib/librte_cryptodev/rte_cryptodev.c
>> >> +++ b/lib/librte_cryptodev/rte_cryptodev.c
>> >> @@ -1181,12 +1181,6 @@ rte_cryptodev_sym_session_free(struct
>> rte_cryptodev_sym_session *sess)
>> >> return 0;
>> >> }
>> >>
>> >> -unsigned int
>> >> -rte_cryptodev_get_header_session_size(void)
>> >> -{
>> >> - return rte_cryptodev_sym_get_header_session_size();
>> >> -}
>> >> -
>> >> unsigned int
>> >> rte_cryptodev_sym_get_header_session_size(void)
>> >> {
>>
>> [Shally] I missed this before. I think this implementation either should change to
>> use nb_drivers which support symmetric or else I am not seeing a need for
>> separate sym specific API for header_size since it will always be same for both
>> sym and asym.
>
>The implementation is already using nb_drivers to calculate the size, right?
[Shally] I meant change it to nb_sym_drivers, where nb_sym_drivers = number of drivers that have symmetric capability
>Anyway, I understand that the way asymmetric sessions are done, the API
>will be the same, but this could change in the future and since we have already deprecated the
>generic function (get_header_session_size), I think we should continue and have both _sym and _asym_ functions.
>
[Shally] Ok.
>Thanks,
>Pablo
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [PATCH v8] checkpatches.sh: Add checks for ABI symbol addition
2018-06-14 13:30 6% ` [dpdk-dev] [PATCH v8] " Neil Horman
@ 2018-06-25 23:04 4% ` Thomas Monjalon
2018-06-27 17:58 4% ` Neil Horman
0 siblings, 1 reply; 200+ results
From: Thomas Monjalon @ 2018-06-25 23:04 UTC (permalink / raw)
To: Neil Horman
Cc: dev, john.mcnamara, bruce.richardson, Ferruh Yigit, Stephen Hemminger
14/06/2018 15:30, Neil Horman:
> * found a way to eliminate the use of filterdiff (new awk rules)
Thanks a lot for not requiring filterdiff dependency.
[...]
> + # Just inform the user of this occurrence, but
> + # don't flag it as an error
> + echo -n "INFO: symbol $syname is added but "
> + echo -n "patch has insuficient context "
> + echo -n "to determine the section name "
> + echo -n "please ensure the version is "
> + echo "EXPERIMENTAL"
For info, I think nowadays "printf" is preferred over "echo -n"
But if you prefer "echo -n" for any reason, no problem.
[...]
> +exit $exit_code
> +
> +
Ironically, this patch doesn't pass checkpatch test because of
the trailing new lines.
[...]
> +clean_tmp_files() {
> + echo $TMPINPUT | grep -q checkpaches
Two comments here.
Since TMPINPUT is not supposed to be overwritten by environment,
I think it is better to make it lowercase (kind of convention).
What the grep is supposed to match?
(side note, there is a typo: checkpaches -> checkpatches)
Is it to remove file only in case of mktemp?
I think it is a risky pattern matching. I suggest '^checkpatches\.'
> + if [ $? -eq 0 ]; then
Could be easier to read if combining "if" and "grep":
if echo $tmpinput | grep -q '^checkpatches\.' ; then
> + rm -f $TMPINPUT
> + fi
> +}
[...]
> + TMPINPUT=$(mktemp checkpatches.XXXXXX)
Open to discussion: do we prefer local dir or /tmp?
Some tools are using /tmp.
[...]
> + report=$($DPDK_CHECKPATCH_PATH $options $TMPINPUT 2>/dev/null)
> +
Please, no blank line between command and test.
> + if [ $? -ne 0 ]
> + then
> + $verbose || printf '\n### %s\n\n' "$3"
> + printf '%s\n' "$report" | sed -n '1,/^total:.*lines checked$/p'
> + ret=1
> + fi
> +
> + ! $verbose || printf '\nChecking API additions/removals:\n'
> +
> + report=$($VALIDATE_NEW_API "$TMPINPUT")
> +
Same comments about blank lines.
> + if [ $? -ne 0 ]; then
> + printf '%s\n' "$report"
> + ret=1
> + fi
> +
> + clean_tmp_files
> + if [ $ret -eq 0 ]; then
> + return 0
> fi
> - [ $? -ne 0 ] || return 0
Why replacing this oneliner by a longer "if" block?
After this review, I think I won't have any more comment.
Thanks Neil
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH v2 13/15] cryptodev: replace mbuf scatter gather flag
` (3 preceding siblings ...)
2018-06-25 8:48 4% ` [dpdk-dev] [PATCH v2 12/15] cryptodev: remove old get session size functions Pablo de Lara
@ 2018-06-25 8:48 3% ` Pablo de Lara
4 siblings, 0 replies; 200+ results
From: Pablo de Lara @ 2018-06-25 8:48 UTC (permalink / raw)
To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
Cc: dev, Pablo de Lara
The current mbuf scatter gatter feature flag is
too ambiguous, as it is not clear if input and/or output
buffers can be scatter gather mbufs or not, plus
if in-place and/or out-of-place is supported.
Therefore, five new flags will replace this flag:
- RTE_CRYPTODEV_FF_IN_PLACE_SGL
- RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT
- RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT
- RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT
- RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
doc/guides/rel_notes/deprecation.rst | 2 --
doc/guides/rel_notes/release_18_08.rst | 8 +++++
drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 2 +-
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 6 +++-
drivers/crypto/dpaa_sec/dpaa_sec.c | 6 +++-
drivers/crypto/null/null_crypto_pmd.c | 2 +-
drivers/crypto/openssl/rte_openssl_pmd.c | 2 +-
drivers/crypto/qat/qat_sym_pmd.c | 6 +++-
lib/librte_cryptodev/rte_cryptodev.c | 12 ++++++--
lib/librte_cryptodev/rte_cryptodev.h | 46 +++++++++++++++++++----------
test/test/test_cryptodev.c | 31 +++++++++++++------
test/test/test_cryptodev_blockcipher.c | 21 ++++++++++---
12 files changed, 106 insertions(+), 38 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 9a73b1d8e..62d635b74 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -105,5 +105,3 @@ Deprecation Notices
``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
18.05 and removed in 18.08, as there are no drivers doing anything useful
with them.
- - Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
- so some will be replaced by more explicit flags.
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index e482d3d5f..2a136d88c 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -78,6 +78,14 @@ API Changes
- ``rte_cryptodev_get_private_session_size`` is replaced with
``rte_cryptodev_sym_get_private_session_size``
+* cryptodev: Feature flag ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` is
+ replaced with the following more explicit flags:
+ - ``RTE_CRYPTODEV_FF_IN_PLACE_SGL``
+ - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT``
+ - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT``
+ - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT``
+ - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT``
+
ABI Changes
-----------
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index cd5b1952b..03917f220 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -492,7 +492,7 @@ aesni_gcm_create(const char *name,
dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
RTE_CRYPTODEV_FF_CPU_AESNI |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT;
switch (vector_mode) {
case RTE_AESNI_GCM_SSE:
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 1b1c30d85..4daee5f59 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -2762,7 +2762,11 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev)
RTE_CRYPTODEV_FF_HW_ACCELERATED |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
RTE_CRYPTODEV_FF_SECURITY |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_IN_PLACE_SGL |
+ RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT |
+ RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT |
+ RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT |
+ RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT;
internals = cryptodev->data->dev_private;
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index b96552c57..8ad25f2be 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -2271,7 +2271,11 @@ dpaa_sec_dev_init(struct rte_cryptodev *cryptodev)
RTE_CRYPTODEV_FF_HW_ACCELERATED |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
RTE_CRYPTODEV_FF_SECURITY |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_IN_PLACE_SGL |
+ RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT |
+ RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT |
+ RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT |
+ RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT;
internals = cryptodev->data->dev_private;
internals->max_nb_queue_pairs = RTE_DPAA_MAX_NB_SEC_QPS;
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index 478ac0b62..224ba7233 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -177,7 +177,7 @@ cryptodev_null_create(const char *name,
dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_IN_PLACE_SGL;
internals = dev->data->dev_private;
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 972e2adfe..94b6e2de9 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -1660,7 +1660,7 @@ cryptodev_openssl_create(const char *name,
dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
RTE_CRYPTODEV_FF_CPU_AESNI |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT;
/* Set vector instructions mode supported */
internals = dev->data->dev_private;
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index ee8633b85..629904e2f 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -274,7 +274,11 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev)
cryptodev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
RTE_CRYPTODEV_FF_HW_ACCELERATED |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_IN_PLACE_SGL |
+ RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT |
+ RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT |
+ RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT |
+ RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT;
internals = cryptodev->data->dev_private;
internals->qat_dev = qat_pci_dev;
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 381330f3d..15110661b 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -361,8 +361,16 @@ rte_cryptodev_get_feature_name(uint64_t flag)
return "CPU_AESNI";
case RTE_CRYPTODEV_FF_HW_ACCELERATED:
return "HW_ACCELERATED";
- case RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER:
- return "MBUF_SCATTER_GATHER";
+ case RTE_CRYPTODEV_FF_IN_PLACE_SGL:
+ return "IN_PLACE_SGL";
+ case RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT:
+ return "OUT_OF_PLACE_SGL_IN_SGL_OUT";
+ case RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT:
+ return "OUT_OF_PLACE_SGL_IN_FB_OUT";
+ case RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT:
+ return "OUT_OF_PLACE_FB_IN_SGL_OUT";
+ case RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT:
+ return "OUT_OF_PLACE_FB_IN_FB_OUT";
case RTE_CRYPTODEV_FF_CPU_NEON:
return "CPU_NEON";
case RTE_CRYPTODEV_FF_CPU_ARM_CE:
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index a60eb38e4..c897dc6e2 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -327,31 +327,47 @@ rte_cryptodev_get_aead_algo_enum(enum rte_crypto_aead_algorithm *algo_enum,
*
* Keep these flags synchronised with rte_cryptodev_get_feature_name()
*/
-#define RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO (1ULL << 0)
+#define RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO (1ULL << 0)
/**< Symmetric crypto operations are supported */
-#define RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO (1ULL << 1)
+#define RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO (1ULL << 1)
/**< Asymmetric crypto operations are supported */
-#define RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING (1ULL << 2)
+#define RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING (1ULL << 2)
/**< Chaining symmetric crypto operations are supported */
-#define RTE_CRYPTODEV_FF_CPU_SSE (1ULL << 3)
+#define RTE_CRYPTODEV_FF_CPU_SSE (1ULL << 3)
/**< Utilises CPU SIMD SSE instructions */
-#define RTE_CRYPTODEV_FF_CPU_AVX (1ULL << 4)
+#define RTE_CRYPTODEV_FF_CPU_AVX (1ULL << 4)
/**< Utilises CPU SIMD AVX instructions */
-#define RTE_CRYPTODEV_FF_CPU_AVX2 (1ULL << 5)
+#define RTE_CRYPTODEV_FF_CPU_AVX2 (1ULL << 5)
/**< Utilises CPU SIMD AVX2 instructions */
-#define RTE_CRYPTODEV_FF_CPU_AESNI (1ULL << 6)
+#define RTE_CRYPTODEV_FF_CPU_AESNI (1ULL << 6)
/**< Utilises CPU AES-NI instructions */
-#define RTE_CRYPTODEV_FF_HW_ACCELERATED (1ULL << 7)
-/**< Operations are off-loaded to an external hardware accelerator */
-#define RTE_CRYPTODEV_FF_CPU_AVX512 (1ULL << 8)
+#define RTE_CRYPTODEV_FF_HW_ACCELERATED (1ULL << 7)
+/**< Operations are off-loaded to an
+ * external hardware accelerator
+ */
+#define RTE_CRYPTODEV_FF_CPU_AVX512 (1ULL << 8)
/**< Utilises CPU SIMD AVX512 instructions */
-#define RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER (1ULL << 9)
-/**< Scatter-gather mbufs are supported */
-#define RTE_CRYPTODEV_FF_CPU_NEON (1ULL << 10)
+#define RTE_CRYPTODEV_FF_IN_PLACE_SGL (1ULL << 9)
+/**< In-place Scatter-gather (SGL) mbufs are supported */
+#define RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT (1ULL << 10)
+/**< Out-of-place Scatter-gather (SGL) mbufs are
+ * supported in input and output
+ */
+#define RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT (1ULL << 11)
+/**< Out-of-place Scatter-gather (SGL) mbufs are supported
+ * in input, but only flat buffers (FB) are supported in output
+ */
+#define RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT (1ULL << 12)
+/**< Out-of-place Scatter-gather (SGL) mbufs are supported
+ * in output, but only flat buffers (FB) are supported in input
+ */
+#define RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT (1ULL << 13)
+/**< Only flat buffers (FB) are supported in input and output */
+#define RTE_CRYPTODEV_FF_CPU_NEON (1ULL << 14)
/**< Utilises CPU NEON instructions */
-#define RTE_CRYPTODEV_FF_CPU_ARM_CE (1ULL << 11)
+#define RTE_CRYPTODEV_FF_CPU_ARM_CE (1ULL << 15)
/**< Utilises ARM CPU Cryptographic Extensions */
-#define RTE_CRYPTODEV_FF_SECURITY (1ULL << 12)
+#define RTE_CRYPTODEV_FF_SECURITY (1ULL << 16)
/**< Support Security Protocol Processing */
diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 73aadaced..84fcf0651 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -3160,8 +3160,11 @@ test_kasumi_encryption_sgl(const struct kasumi_test_data *tdata)
struct rte_cryptodev_info dev_info;
rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
- if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
- printf("Device doesn't support scatter-gather. "
+
+ uint64_t feat_flags = dev_info.feature_flags;
+
+ if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {
+ printf("Device doesn't support in-place scatter-gather. "
"Test Skipped.\n");
return 0;
}
@@ -3308,8 +3311,11 @@ test_kasumi_encryption_oop_sgl(const struct kasumi_test_data *tdata)
struct rte_cryptodev_info dev_info;
rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
- if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
- printf("Device doesn't support scatter-gather. "
+
+ uint64_t feat_flags = dev_info.feature_flags;
+ if (!(feat_flags & RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT)) {
+ printf("Device doesn't support out-of-place scatter-gather "
+ "in both input and output mbufs. "
"Test Skipped.\n");
return 0;
}
@@ -3659,8 +3665,12 @@ test_snow3g_encryption_oop_sgl(const struct snow3g_test_data *tdata)
struct rte_cryptodev_info dev_info;
rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
- if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
- printf("Device doesn't support scatter-gather. "
+
+ uint64_t feat_flags = dev_info.feature_flags;
+
+ if (!(feat_flags & RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT)) {
+ printf("Device doesn't support out-of-place scatter-gather "
+ "in both input and output mbufs. "
"Test Skipped.\n");
return 0;
}
@@ -4493,10 +4503,13 @@ test_zuc_encryption_sgl(const struct wireless_test_data *tdata)
return -ENOTSUP;
rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
- if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
- printf("Device doesn't support scatter-gather. "
+
+ uint64_t feat_flags = dev_info.feature_flags;
+
+ if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {
+ printf("Device doesn't support in-place scatter-gather. "
"Test Skipped.\n");
- return -ENOTSUP;
+ return 0;
}
plaintext_len = ceil_byte_length(tdata->plaintext.len);
diff --git a/test/test/test_cryptodev_blockcipher.c b/test/test/test_cryptodev_blockcipher.c
index 256a7daa2..7a11b3af8 100644
--- a/test/test/test_cryptodev_blockcipher.c
+++ b/test/test/test_cryptodev_blockcipher.c
@@ -77,12 +77,25 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
if (t->feature_mask & BLOCKCIPHER_TEST_FEATURE_SG) {
rte_cryptodev_info_get(dev_id, &dev_info);
- if (!(dev_info.feature_flags &
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
- printf("Device doesn't support scatter-gather. "
+ uint64_t feat_flags = dev_info.feature_flags;
+ uint64_t oop_flag = RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT;
+
+ if (t->feature_mask && BLOCKCIPHER_TEST_FEATURE_OOP) {
+ if (!(feat_flags & oop_flag)) {
+ printf("Device doesn't support out-of-place "
+ "scatter-gather in input mbuf. "
+ "Test Skipped.\n");
+ return 0;
+ }
+ } else {
+ if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {
+ printf("Device doesn't support in-place "
+ "scatter-gather mbufs. "
"Test Skipped.\n");
- return 0;
+ return 0;
+ }
}
+
nb_segs = 3;
}
--
2.14.4
^ permalink raw reply [relevance 3%]
* [dpdk-dev] [PATCH v2 12/15] cryptodev: remove old get session size functions
` (2 preceding siblings ...)
2018-06-25 8:48 2% ` [dpdk-dev] [PATCH v2 11/15] cryptodev: remove queue start/stop functions Pablo de Lara
@ 2018-06-25 8:48 4% ` Pablo de Lara
2018-06-25 8:48 3% ` [dpdk-dev] [PATCH v2 13/15] cryptodev: replace mbuf scatter gather flag Pablo de Lara
4 siblings, 0 replies; 200+ results
From: Pablo de Lara @ 2018-06-25 8:48 UTC (permalink / raw)
To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
Cc: dev, Pablo de Lara
Removed rte_cryptodev_get_header_session_size
and rte_cryptodev_get_private_session_size functions,
as they have been substituted with functions
specific for symmetric operations, with _sym_ word
after "rte_cryptodev_".
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
doc/guides/rel_notes/deprecation.rst | 6 ------
doc/guides/rel_notes/release_18_08.rst | 8 ++++++++
lib/librte_cryptodev/rte_cryptodev.c | 12 ------------
lib/librte_cryptodev/rte_cryptodev.h | 25 -------------------------
lib/librte_cryptodev/rte_cryptodev_version.map | 2 --
5 files changed, 8 insertions(+), 45 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 91592534e..9a73b1d8e 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -107,9 +107,3 @@ Deprecation Notices
with them.
- Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
so some will be replaced by more explicit flags.
- - Function ``rte_cryptodev_get_header_session_size()`` will be deprecated
- in 18.05, and it gets replaced with ``rte_cryptodev_sym_get_header_session_size()``.
- It will be removed in 18.08.
- - Function ``rte_cryptodev_get_private_session_size()`` will be deprecated
- in 18.05, and it gets replaced with ``rte_cryptodev_sym_get_private_session_size()``.
- It will be removed in 18.08.
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index cfb2885a1..e482d3d5f 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -70,6 +70,14 @@ API Changes
- ``rte_cryptodev_queue_pair_start``
- ``rte_cryptodev_queue_pair_stop``
+* cryptodev: Following functions were deprecated and are replaced by
+ other functions in 18.08:
+
+ - ``rte_cryptodev_get_header_session_size`` is replaced with
+ ``rte_cryptodev_sym_get_header_session_size``
+ - ``rte_cryptodev_get_private_session_size`` is replaced with
+ ``rte_cryptodev_sym_get_private_session_size``
+
ABI Changes
-----------
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index a07904fb9..381330f3d 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -1181,12 +1181,6 @@ rte_cryptodev_sym_session_free(struct rte_cryptodev_sym_session *sess)
return 0;
}
-unsigned int
-rte_cryptodev_get_header_session_size(void)
-{
- return rte_cryptodev_sym_get_header_session_size();
-}
-
unsigned int
rte_cryptodev_sym_get_header_session_size(void)
{
@@ -1198,12 +1192,6 @@ rte_cryptodev_sym_get_header_session_size(void)
return ((sizeof(void *) * nb_drivers) + sizeof(uint8_t));
}
-unsigned int
-rte_cryptodev_get_private_session_size(uint8_t dev_id)
-{
- return rte_cryptodev_sym_get_private_session_size(dev_id);
-}
-
unsigned int
rte_cryptodev_sym_get_private_session_size(uint8_t dev_id)
{
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 0d994397d..a60eb38e4 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -933,31 +933,6 @@ int
rte_cryptodev_sym_session_clear(uint8_t dev_id,
struct rte_cryptodev_sym_session *sess);
-/**
- * @deprecated
- * Get the size of the header session, for all registered drivers.
- *
- * @return
- * Size of the header session.
- */
-__rte_deprecated
-unsigned int
-rte_cryptodev_get_header_session_size(void);
-
-/**
- * @deprecated
- * Get the size of the private session data for a device.
- *
- * @param dev_id The device identifier.
- *
- * @return
- * - Size of the private data, if successful
- * - 0 if device is invalid or does not have private session
- */
-__rte_deprecated
-unsigned int
-rte_cryptodev_get_private_session_size(uint8_t dev_id);
-
/**
* Get the size of the header session, for all registered drivers.
*
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index 020b45754..0ab6d5195 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -63,8 +63,6 @@ DPDK_17.08 {
rte_cryptodev_driver_id_get;
rte_cryptodev_driver_name_get;
rte_cryptodev_get_aead_algo_enum;
- rte_cryptodev_get_header_session_size;
- rte_cryptodev_get_private_session_size;
rte_cryptodev_sym_capability_check_aead;
rte_cryptodev_sym_session_init;
rte_cryptodev_sym_session_clear;
--
2.14.4
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH v2 11/15] cryptodev: remove queue start/stop functions
2018-06-25 8:48 4% ` [dpdk-dev] [PATCH v2 01/15] cryptodev: replace bus specific struct with generic dev Pablo de Lara
2018-06-25 8:48 4% ` [dpdk-dev] [PATCH v2 08/15] cryptodev: define value for unlimited sessions Pablo de Lara
@ 2018-06-25 8:48 2% ` Pablo de Lara
2018-06-25 8:48 4% ` [dpdk-dev] [PATCH v2 12/15] cryptodev: remove old get session size functions Pablo de Lara
2018-06-25 8:48 3% ` [dpdk-dev] [PATCH v2 13/15] cryptodev: replace mbuf scatter gather flag Pablo de Lara
4 siblings, 0 replies; 200+ results
From: Pablo de Lara @ 2018-06-25 8:48 UTC (permalink / raw)
To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
Cc: dev, Pablo de Lara
Removed cryptodev queue start/stop functions,
as they were marked deprecated in 18.05, since they
were not implemented by any driver.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
doc/guides/rel_notes/deprecation.rst | 4 ---
doc/guides/rel_notes/release_18_08.rst | 5 +++
drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c | 18 -----------
drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 18 -----------
drivers/crypto/armv8/rte_armv8_pmd_ops.c | 18 -----------
drivers/crypto/ccp/ccp_pmd_ops.c | 16 ----------
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 22 -------------
drivers/crypto/dpaa_sec/dpaa_sec.c | 22 -------------
drivers/crypto/kasumi/rte_kasumi_pmd_ops.c | 18 -----------
drivers/crypto/mvsam/rte_mrvl_pmd_ops.c | 28 ----------------
drivers/crypto/null/null_crypto_pmd_ops.c | 18 -----------
drivers/crypto/openssl/rte_openssl_pmd_ops.c | 18 -----------
drivers/crypto/qat/qat_sym_pmd.c | 2 --
drivers/crypto/scheduler/scheduler_pmd_ops.c | 18 -----------
drivers/crypto/snow3g/rte_snow3g_pmd_ops.c | 18 -----------
drivers/crypto/virtio/virtio_cryptodev.c | 2 --
drivers/crypto/zuc/rte_zuc_pmd_ops.c | 18 -----------
lib/librte_cryptodev/rte_cryptodev.c | 44 --------------------------
lib/librte_cryptodev/rte_cryptodev.h | 37 ----------------------
lib/librte_cryptodev/rte_cryptodev_pmd.h | 26 ---------------
lib/librte_cryptodev/rte_cryptodev_version.map | 2 --
21 files changed, 5 insertions(+), 367 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index dc014da21..91592534e 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -105,10 +105,6 @@ Deprecation Notices
``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
18.05 and removed in 18.08, as there are no drivers doing anything useful
with them.
- - Functions ``rte_cryptodev_queue_pair_start()`` and
- ``rte_cryptodev_queue_pair_stop()`` will be deprecated from 18.05
- and removed in 18.08, as there are no drivers doing anything useful
- with them.
- Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
so some will be replaced by more explicit flags.
- Function ``rte_cryptodev_get_header_session_size()`` will be deprecated
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 2b994ee78..cfb2885a1 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -65,6 +65,11 @@ API Changes
Value 0 is accepted in ``sym.max_nb_sessions``, meaning that a device
supports an unlimited number of sessions.
+* cryptodev: Following functions were deprecated and are removed in 18.08:
+
+ - ``rte_cryptodev_queue_pair_start``
+ - ``rte_cryptodev_queue_pair_stop``
+
ABI Changes
-----------
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
index 796ccdbd8..e24453a7e 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
@@ -243,22 +243,6 @@ aesni_gcm_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-aesni_gcm_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-aesni_gcm_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
aesni_gcm_pmd_qp_count(struct rte_cryptodev *dev)
@@ -340,8 +324,6 @@ struct rte_cryptodev_ops aesni_gcm_pmd_ops = {
.queue_pair_setup = aesni_gcm_pmd_qp_setup,
.queue_pair_release = aesni_gcm_pmd_qp_release,
- .queue_pair_start = aesni_gcm_pmd_qp_start,
- .queue_pair_stop = aesni_gcm_pmd_qp_stop,
.queue_pair_count = aesni_gcm_pmd_qp_count,
.session_get_size = aesni_gcm_pmd_session_get_size,
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
index 101fdc5c6..6eb37a5bf 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -509,22 +509,6 @@ aesni_mb_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-aesni_mb_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-aesni_mb_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
aesni_mb_pmd_qp_count(struct rte_cryptodev *dev)
@@ -607,8 +591,6 @@ struct rte_cryptodev_ops aesni_mb_pmd_ops = {
.queue_pair_setup = aesni_mb_pmd_qp_setup,
.queue_pair_release = aesni_mb_pmd_qp_release,
- .queue_pair_start = aesni_mb_pmd_qp_start,
- .queue_pair_stop = aesni_mb_pmd_qp_stop,
.queue_pair_count = aesni_mb_pmd_qp_count,
.session_get_size = aesni_mb_pmd_session_get_size,
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
index b654f7528..5e8a5a292 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
@@ -258,22 +258,6 @@ armv8_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-armv8_crypto_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-armv8_crypto_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
armv8_crypto_pmd_qp_count(struct rte_cryptodev *dev)
@@ -354,8 +338,6 @@ struct rte_cryptodev_ops armv8_crypto_pmd_ops = {
.queue_pair_setup = armv8_crypto_pmd_qp_setup,
.queue_pair_release = armv8_crypto_pmd_qp_release,
- .queue_pair_start = armv8_crypto_pmd_qp_start,
- .queue_pair_stop = armv8_crypto_pmd_qp_stop,
.queue_pair_count = armv8_crypto_pmd_qp_count,
.session_get_size = armv8_crypto_pmd_session_get_size,
diff --git a/drivers/crypto/ccp/ccp_pmd_ops.c b/drivers/crypto/ccp/ccp_pmd_ops.c
index dbe545c10..1cb944406 100644
--- a/drivers/crypto/ccp/ccp_pmd_ops.c
+++ b/drivers/crypto/ccp/ccp_pmd_ops.c
@@ -748,20 +748,6 @@ ccp_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-static int
-ccp_pmd_qp_start(struct rte_cryptodev *dev __rte_unused,
- uint16_t queue_pair_id __rte_unused)
-{
- return -ENOTSUP;
-}
-
-static int
-ccp_pmd_qp_stop(struct rte_cryptodev *dev __rte_unused,
- uint16_t queue_pair_id __rte_unused)
-{
- return -ENOTSUP;
-}
-
static uint32_t
ccp_pmd_qp_count(struct rte_cryptodev *dev)
{
@@ -837,8 +823,6 @@ struct rte_cryptodev_ops ccp_ops = {
.queue_pair_setup = ccp_pmd_qp_setup,
.queue_pair_release = ccp_pmd_qp_release,
- .queue_pair_start = ccp_pmd_qp_start,
- .queue_pair_stop = ccp_pmd_qp_stop,
.queue_pair_count = ccp_pmd_qp_count,
.session_get_size = ccp_pmd_session_get_size,
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index bc091c560..1b1c30d85 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -1470,26 +1470,6 @@ dpaa2_sec_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return retcode;
}
-/** Start queue pair */
-static int
-dpaa2_sec_queue_pair_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- PMD_INIT_FUNC_TRACE();
-
- return 0;
-}
-
-/** Stop queue pair */
-static int
-dpaa2_sec_queue_pair_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- PMD_INIT_FUNC_TRACE();
-
- return 0;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
dpaa2_sec_queue_pair_count(struct rte_cryptodev *dev)
@@ -2716,8 +2696,6 @@ static struct rte_cryptodev_ops crypto_ops = {
.stats_reset = dpaa2_sec_stats_reset,
.queue_pair_setup = dpaa2_sec_queue_pair_setup,
.queue_pair_release = dpaa2_sec_queue_pair_release,
- .queue_pair_start = dpaa2_sec_queue_pair_start,
- .queue_pair_stop = dpaa2_sec_queue_pair_stop,
.queue_pair_count = dpaa2_sec_queue_pair_count,
.session_get_size = dpaa2_sec_session_get_size,
.session_configure = dpaa2_sec_session_configure,
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 73cae483b..b96552c57 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -1585,26 +1585,6 @@ dpaa_sec_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return 0;
}
-/** Start queue pair */
-static int
-dpaa_sec_queue_pair_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- PMD_INIT_FUNC_TRACE();
-
- return 0;
-}
-
-/** Stop queue pair */
-static int
-dpaa_sec_queue_pair_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- PMD_INIT_FUNC_TRACE();
-
- return 0;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
dpaa_sec_queue_pair_count(struct rte_cryptodev *dev)
@@ -2227,8 +2207,6 @@ static struct rte_cryptodev_ops crypto_ops = {
.dev_infos_get = dpaa_sec_dev_infos_get,
.queue_pair_setup = dpaa_sec_queue_pair_setup,
.queue_pair_release = dpaa_sec_queue_pair_release,
- .queue_pair_start = dpaa_sec_queue_pair_start,
- .queue_pair_stop = dpaa_sec_queue_pair_stop,
.queue_pair_count = dpaa_sec_queue_pair_count,
.session_get_size = dpaa_sec_session_get_size,
.session_configure = dpaa_sec_session_configure,
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
index e72f2ae0b..4174f1f80 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
@@ -229,22 +229,6 @@ kasumi_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-kasumi_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-kasumi_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
kasumi_pmd_qp_count(struct rte_cryptodev *dev)
@@ -325,8 +309,6 @@ struct rte_cryptodev_ops kasumi_pmd_ops = {
.queue_pair_setup = kasumi_pmd_qp_setup,
.queue_pair_release = kasumi_pmd_qp_release,
- .queue_pair_start = kasumi_pmd_qp_start,
- .queue_pair_stop = kasumi_pmd_qp_stop,
.queue_pair_count = kasumi_pmd_qp_count,
.session_get_size = kasumi_pmd_session_get_size,
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
index 07850098b..8710ba3b7 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
@@ -596,32 +596,6 @@ mrvl_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair (PMD ops callback) - not supported.
- *
- * @param dev Pointer to the device structure.
- * @param qp_id ID of the Queue Pair.
- * @returns -ENOTSUP. Always.
- */
-static int
-mrvl_crypto_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair (PMD ops callback) - not supported.
- *
- * @param dev Pointer to the device structure.
- * @param qp_id ID of the Queue Pair.
- * @returns -ENOTSUP. Always.
- */
-static int
-mrvl_crypto_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs (PMD ops callback).
*
* @param dev Pointer to the device structure.
@@ -739,8 +713,6 @@ static struct rte_cryptodev_ops mrvl_crypto_pmd_ops = {
.queue_pair_setup = mrvl_crypto_pmd_qp_setup,
.queue_pair_release = mrvl_crypto_pmd_qp_release,
- .queue_pair_start = mrvl_crypto_pmd_qp_start,
- .queue_pair_stop = mrvl_crypto_pmd_qp_stop,
.queue_pair_count = mrvl_crypto_pmd_qp_count,
.session_get_size = mrvl_crypto_pmd_session_get_size,
diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
index 2842498af..e43fba7db 100644
--- a/drivers/crypto/null/null_crypto_pmd_ops.c
+++ b/drivers/crypto/null/null_crypto_pmd_ops.c
@@ -240,22 +240,6 @@ null_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-null_crypto_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-null_crypto_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
null_crypto_pmd_qp_count(struct rte_cryptodev *dev)
@@ -336,8 +320,6 @@ struct rte_cryptodev_ops pmd_ops = {
.queue_pair_setup = null_crypto_pmd_qp_setup,
.queue_pair_release = null_crypto_pmd_qp_release,
- .queue_pair_start = null_crypto_pmd_qp_start,
- .queue_pair_stop = null_crypto_pmd_qp_stop,
.queue_pair_count = null_crypto_pmd_qp_count,
.session_get_size = null_crypto_pmd_session_get_size,
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index d194e3657..554177d20 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -648,22 +648,6 @@ openssl_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-openssl_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-openssl_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
openssl_pmd_qp_count(struct rte_cryptodev *dev)
@@ -746,8 +730,6 @@ struct rte_cryptodev_ops openssl_pmd_ops = {
.queue_pair_setup = openssl_pmd_qp_setup,
.queue_pair_release = openssl_pmd_qp_release,
- .queue_pair_start = openssl_pmd_qp_start,
- .queue_pair_stop = openssl_pmd_qp_stop,
.queue_pair_count = openssl_pmd_qp_count,
.session_get_size = openssl_pmd_session_get_size,
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index 84dd5bec8..ee8633b85 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -202,8 +202,6 @@ static struct rte_cryptodev_ops crypto_qat_ops = {
.stats_reset = qat_sym_stats_reset,
.queue_pair_setup = qat_sym_qp_setup,
.queue_pair_release = qat_sym_qp_release,
- .queue_pair_start = NULL,
- .queue_pair_stop = NULL,
.queue_pair_count = NULL,
/* Crypto related operations */
diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index 16a8021c8..f363e3257 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -439,22 +439,6 @@ scheduler_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return 0;
}
-/** Start queue pair */
-static int
-scheduler_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-scheduler_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
scheduler_pmd_qp_count(struct rte_cryptodev *dev)
@@ -535,8 +519,6 @@ struct rte_cryptodev_ops scheduler_pmd_ops = {
.queue_pair_setup = scheduler_pmd_qp_setup,
.queue_pair_release = scheduler_pmd_qp_release,
- .queue_pair_start = scheduler_pmd_qp_start,
- .queue_pair_stop = scheduler_pmd_qp_stop,
.queue_pair_count = scheduler_pmd_qp_count,
.session_get_size = scheduler_pmd_session_get_size,
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
index 6f8b9e2c6..fe882c366 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
@@ -231,22 +231,6 @@ snow3g_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-snow3g_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-snow3g_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
snow3g_pmd_qp_count(struct rte_cryptodev *dev)
@@ -327,8 +311,6 @@ struct rte_cryptodev_ops snow3g_pmd_ops = {
.queue_pair_setup = snow3g_pmd_qp_setup,
.queue_pair_release = snow3g_pmd_qp_release,
- .queue_pair_start = snow3g_pmd_qp_start,
- .queue_pair_stop = snow3g_pmd_qp_stop,
.queue_pair_count = snow3g_pmd_qp_count,
.session_get_size = snow3g_pmd_session_get_size,
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 1da4ae871..0be435c8c 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -515,8 +515,6 @@ static struct rte_cryptodev_ops virtio_crypto_dev_ops = {
.queue_pair_setup = virtio_crypto_qp_setup,
.queue_pair_release = virtio_crypto_qp_release,
- .queue_pair_start = NULL,
- .queue_pair_stop = NULL,
.queue_pair_count = NULL,
/* Crypto related operations */
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
index b39e35b9f..79326d8f5 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
@@ -231,22 +231,6 @@ zuc_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-zuc_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-zuc_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
zuc_pmd_qp_count(struct rte_cryptodev *dev)
@@ -327,8 +311,6 @@ struct rte_cryptodev_ops zuc_pmd_ops = {
.queue_pair_setup = zuc_pmd_qp_setup,
.queue_pair_release = zuc_pmd_qp_release,
- .queue_pair_start = zuc_pmd_qp_start,
- .queue_pair_stop = zuc_pmd_qp_stop,
.queue_pair_count = zuc_pmd_qp_count,
.session_get_size = zuc_pmd_session_get_size,
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 457ac5670..a07904fb9 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -702,50 +702,6 @@ rte_cryptodev_queue_pairs_config(struct rte_cryptodev *dev, uint16_t nb_qpairs,
return 0;
}
-int
-rte_cryptodev_queue_pair_start(uint8_t dev_id, uint16_t queue_pair_id)
-{
- struct rte_cryptodev *dev;
-
- if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
- CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
- return -EINVAL;
- }
-
- dev = &rte_crypto_devices[dev_id];
- if (queue_pair_id >= dev->data->nb_queue_pairs) {
- CDEV_LOG_ERR("Invalid queue_pair_id=%d", queue_pair_id);
- return -EINVAL;
- }
-
- RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_pair_start, -ENOTSUP);
-
- return dev->dev_ops->queue_pair_start(dev, queue_pair_id);
-
-}
-
-int
-rte_cryptodev_queue_pair_stop(uint8_t dev_id, uint16_t queue_pair_id)
-{
- struct rte_cryptodev *dev;
-
- if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
- CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
- return -EINVAL;
- }
-
- dev = &rte_crypto_devices[dev_id];
- if (queue_pair_id >= dev->data->nb_queue_pairs) {
- CDEV_LOG_ERR("Invalid queue_pair_id=%d", queue_pair_id);
- return -EINVAL;
- }
-
- RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_pair_stop, -ENOTSUP);
-
- return dev->dev_ops->queue_pair_stop(dev, queue_pair_id);
-
-}
-
int
rte_cryptodev_configure(uint8_t dev_id, struct rte_cryptodev_config *config)
{
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 64ffbafca..0d994397d 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -601,43 +601,6 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
const struct rte_cryptodev_qp_conf *qp_conf, int socket_id,
struct rte_mempool *session_pool);
-/**
- * @deprecated
- * Start a specified queue pair of a device. It is used
- * when deferred_start flag of the specified queue is true.
- *
- * @param dev_id The identifier of the device
- * @param queue_pair_id The index of the queue pair to start. The value
- * must be in the range [0, nb_queue_pair - 1]
- * previously supplied to
- * rte_crypto_dev_configure().
- * @return
- * - 0: Success, the transmit queue is correctly set up.
- * - -EINVAL: The dev_id or the queue_id out of range.
- * - -ENOTSUP: The function not supported in PMD driver.
- */
-__rte_deprecated
-extern int
-rte_cryptodev_queue_pair_start(uint8_t dev_id, uint16_t queue_pair_id);
-
-/**
- * @deprecated
- * Stop specified queue pair of a device
- *
- * @param dev_id The identifier of the device
- * @param queue_pair_id The index of the queue pair to stop. The value
- * must be in the range [0, nb_queue_pair - 1]
- * previously supplied to
- * rte_cryptodev_configure().
- * @return
- * - 0: Success, the transmit queue is correctly set up.
- * - -EINVAL: The dev_id or the queue_id out of range.
- * - -ENOTSUP: The function not supported in PMD driver.
- */
-__rte_deprecated
-extern int
-rte_cryptodev_queue_pair_stop(uint8_t dev_id, uint16_t queue_pair_id);
-
/**
* Get the number of queue pairs on a specific crypto device
*
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index 0739ce065..b47730eaf 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -211,28 +211,6 @@ typedef void (*cryptodev_stats_reset_t)(struct rte_cryptodev *dev);
typedef void (*cryptodev_info_get_t)(struct rte_cryptodev *dev,
struct rte_cryptodev_info *dev_info);
-/**
- * Start queue pair of a device.
- *
- * @param dev Crypto device pointer
- * @param qp_id Queue Pair Index
- *
- * @return Returns 0 on success.
- */
-typedef int (*cryptodev_queue_pair_start_t)(struct rte_cryptodev *dev,
- uint16_t qp_id);
-
-/**
- * Stop queue pair of a device.
- *
- * @param dev Crypto device pointer
- * @param qp_id Queue Pair Index
- *
- * @return Returns 0 on success.
- */
-typedef int (*cryptodev_queue_pair_stop_t)(struct rte_cryptodev *dev,
- uint16_t qp_id);
-
/**
* Setup a queue pair for a device.
*
@@ -371,10 +349,6 @@ struct rte_cryptodev_ops {
/**< Set up a device queue pair. */
cryptodev_queue_pair_release_t queue_pair_release;
/**< Release a queue pair. */
- cryptodev_queue_pair_start_t queue_pair_start;
- /**< Start a queue pair. */
- cryptodev_queue_pair_stop_t queue_pair_stop;
- /**< Stop a queue pair. */
cryptodev_queue_pair_count_t queue_pair_count;
/**< Get count of the queue pairs. */
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index be8f4c1a7..020b45754 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -22,8 +22,6 @@ DPDK_16.04 {
rte_cryptodev_stop;
rte_cryptodev_queue_pair_count;
rte_cryptodev_queue_pair_setup;
- rte_cryptodev_queue_pair_start;
- rte_cryptodev_queue_pair_stop;
rte_crypto_op_pool_create;
local: *;
--
2.14.4
^ permalink raw reply [relevance 2%]
* [dpdk-dev] [PATCH v2 08/15] cryptodev: define value for unlimited sessions
2018-06-25 8:48 4% ` [dpdk-dev] [PATCH v2 01/15] cryptodev: replace bus specific struct with generic dev Pablo de Lara
@ 2018-06-25 8:48 4% ` Pablo de Lara
2018-06-25 8:48 2% ` [dpdk-dev] [PATCH v2 11/15] cryptodev: remove queue start/stop functions Pablo de Lara
` (2 subsequent siblings)
4 siblings, 0 replies; 200+ results
From: Pablo de Lara @ 2018-06-25 8:48 UTC (permalink / raw)
To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
Cc: dev, Pablo de Lara
Currently, the info structure contains the maximum number
of sessions that a device can manage.
This field was useful when the session mempool was created inside
each device, but now it is created at the application level.
Most PMDs do not have a limitation on the sessions managed,
but a few do, therefore this field must remain in the structure.
However, a new value, 0, can be used to indicate that
a device does not have an actual maximum of sessions.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
app/test-crypto-perf/main.c | 2 +-
doc/guides/rel_notes/release_18_08.rst | 2 ++
examples/ipsec-secgw/ipsec-secgw.c | 2 +-
lib/librte_cryptodev/rte_cryptodev.h | 5 ++++-
test/test/test_cryptodev.c | 6 ++++--
5 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index b02d3f597..87aaba0ce 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -169,7 +169,7 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs,
* A single session is required per queue pair
* in each device
*/
- if (dev_max_nb_sess < opts->nb_qps) {
+ if (dev_max_nb_sess != 0 && dev_max_nb_sess < opts->nb_qps) {
RTE_LOG(ERR, USER1,
"Device does not support at least "
"%u sessions\n", opts->nb_qps);
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 6bf53dc31..2b994ee78 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -62,6 +62,8 @@ API Changes
* cryptodev: In struct ``struct rte_cryptodev_info``, field ``rte_pci_device *pci_dev``
has been replaced with field ``struct rte_device *device``.
+ Value 0 is accepted in ``sym.max_nb_sessions``, meaning that a device
+ supports an unlimited number of sessions.
ABI Changes
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 2582dcb6e..dacf323c9 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -1441,7 +1441,7 @@ cryptodevs_init(void)
dev_conf.nb_queue_pairs = qp;
uint32_t dev_max_sess = cdev_info.sym.max_nb_sessions;
- if (dev_max_sess < (CDEV_MP_NB_OBJS / 2))
+ if (dev_max_sess != 0 && dev_max_sess < (CDEV_MP_NB_OBJS / 2))
rte_exit(EXIT_FAILURE,
"Device does not support at least %u "
"sessions", CDEV_MP_NB_OBJS / 2);
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 0a4dd39b1..64ffbafca 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -384,7 +384,10 @@ struct rte_cryptodev_info {
struct {
unsigned max_nb_sessions;
- /**< Maximum number of sessions supported by device. */
+ /**< Maximum number of sessions supported by device.
+ * If 0, the device does not have any limitation in
+ * number of sessions that can be used.
+ */
} sym;
};
diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 5c906cfae..73aadaced 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -436,7 +436,8 @@ testsuite_setup(void)
* Create mempool with maximum number of sessions * 2,
* to include the session headers
*/
- if (info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
+ if (info.sym.max_nb_sessions != 0 &&
+ info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
RTE_LOG(ERR, USER1, "Device does not support "
"at least %u sessions\n",
MAX_NB_SESSIONS);
@@ -8546,7 +8547,8 @@ test_scheduler_attach_slave_op(void)
unsigned int session_size =
rte_cryptodev_sym_get_private_session_size(i);
- if (info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
+ if (info.sym.max_nb_sessions != 0 &&
+ info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
RTE_LOG(ERR, USER1,
"Device does not support "
"at least %u sessions\n",
--
2.14.4
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH v2 01/15] cryptodev: replace bus specific struct with generic dev
@ 2018-06-25 8:48 4% ` Pablo de Lara
2018-06-25 8:48 4% ` [dpdk-dev] [PATCH v2 08/15] cryptodev: define value for unlimited sessions Pablo de Lara
` (3 subsequent siblings)
4 siblings, 0 replies; 200+ results
From: Pablo de Lara @ 2018-06-25 8:48 UTC (permalink / raw)
To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
Cc: dev, Pablo de Lara
Structure rte_cryptodev_info has currently PCI device
information ("struct rte_pci_device") in it.
This information is not generic to all devices,
so this gets replaced with the generic "rte_device" structure,
compatible with all crypto devices.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
doc/guides/prog_guide/cryptodev_lib.rst | 2 +-
doc/guides/rel_notes/deprecation.rst | 2 --
doc/guides/rel_notes/release_18_08.rst | 5 ++++-
drivers/crypto/qat/qat_sym_pmd.c | 1 -
drivers/crypto/virtio/virtio_cryptodev.c | 1 -
lib/librte_cryptodev/rte_cryptodev.c | 1 +
lib/librte_cryptodev/rte_cryptodev.h | 6 +++---
7 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst
index 30f0bcf7a..d02bb7514 100644
--- a/doc/guides/prog_guide/cryptodev_lib.rst
+++ b/doc/guides/prog_guide/cryptodev_lib.rst
@@ -269,7 +269,7 @@ relevant information for the device.
struct rte_cryptodev_info {
const char *driver_name;
uint8_t driver_id;
- struct rte_pci_device *pci_dev;
+ struct rte_device *device;
uint64_t feature_flags;
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 1ce692eac..b71080bb8 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -104,8 +104,6 @@ Deprecation Notices
- Removal of ``sym`` structure in ``rte_cryptodev_info`` structure,
containing fields not relevant anymore since the session mempool
is not internal in the crypto device anymore.
- - Replacement of ``pci_dev`` field with the more generic ``rte_device``
- structure.
- Functions ``rte_cryptodev_queue_pair_attach_sym_session()`` and
``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
18.05 and removed in 18.08, as there are no drivers doing anything useful
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index bc0124295..6bf53dc31 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -60,6 +60,9 @@ API Changes
Also, make sure to start the actual text at the margin.
=========================================================
+* cryptodev: In struct ``struct rte_cryptodev_info``, field ``rte_pci_device *pci_dev``
+ has been replaced with field ``struct rte_device *device``.
+
ABI Changes
-----------
@@ -118,7 +121,7 @@ The libraries prepended with a plus sign were incremented in this version.
librte_cmdline.so.2
librte_common_octeontx.so.1
librte_compressdev.so.1
- librte_cryptodev.so.4
+ + librte_cryptodev.so.5
librte_distributor.so.1
librte_eal.so.7
librte_ethdev.so.9
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index 115639089..0bc042a75 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -74,7 +74,6 @@ static void qat_sym_dev_info_get(struct rte_cryptodev *dev,
info->capabilities = internals->qat_dev_capabilities;
info->sym.max_nb_sessions = QAT_SYM_PMD_MAX_NB_SESSIONS;
info->driver_id = cryptodev_qat_driver_id;
- info->pci_dev = RTE_DEV_TO_PCI(dev->device);
}
}
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index df88953f6..482edea1a 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -1409,7 +1409,6 @@ virtio_crypto_dev_info_get(struct rte_cryptodev *dev,
if (info != NULL) {
info->driver_id = cryptodev_virtio_driver_id;
- info->pci_dev = RTE_DEV_TO_PCI(dev->device);
info->feature_flags = dev->feature_flags;
info->max_nb_queue_pairs = hw->max_dataqueues;
info->sym.max_nb_sessions =
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 7e5821246..457ac5670 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -966,6 +966,7 @@ rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info)
(*dev->dev_ops->dev_infos_get)(dev, dev_info);
dev_info->driver_name = dev->device->driver->name;
+ dev_info->device = dev->device;
}
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 92ce6d49a..9a49f9d86 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -369,9 +369,9 @@ rte_cryptodev_get_feature_name(uint64_t flag);
/** Crypto device information */
struct rte_cryptodev_info {
- const char *driver_name; /**< Driver name. */
- uint8_t driver_id; /**< Driver identifier */
- struct rte_pci_device *pci_dev; /**< PCI information. */
+ const char *driver_name; /**< Driver name. */
+ uint8_t driver_id; /**< Driver identifier */
+ struct rte_device *device; /**< Generic device information. */
uint64_t feature_flags;
/**< Feature flags exposes HW/SW features for the given device */
--
2.14.4
^ permalink raw reply [relevance 4%]
* Re: [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session size functions
2018-06-22 17:02 0% ` Verma, Shally
@ 2018-06-25 16:40 0% ` De Lara Guarch, Pablo
2018-06-26 5:28 0% ` Verma, Shally
0 siblings, 1 reply; 200+ results
From: De Lara Guarch, Pablo @ 2018-06-25 16:40 UTC (permalink / raw)
To: Verma, Shally, Akhil Goyal, Doherty, Declan, ravi1.kumar, Jacob,
Jerin, Zhang, Roy Fan, Trahe, Fiona, tdu, jianjay.zhou
Cc: dev
> -----Original Message-----
> From: Verma, Shally [mailto:Shally.Verma@cavium.com]
> Sent: Friday, June 22, 2018 6:02 PM
> To: Akhil Goyal <akhil.goyal@nxp.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; Doherty, Declan
> <declan.doherty@intel.com>; ravi1.kumar@amd.com; Jacob, Jerin
> <Jerin.JacobKollanukkaran@cavium.com>; Zhang, Roy Fan
> <roy.fan.zhang@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>;
> tdu@semihalf.com; jianjay.zhou@huawei.com
> Cc: dev@dpdk.org
> Subject: RE: [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session size
> functions
>
> Hi Pablo
>
> >-----Original Message-----
> >From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Akhil Goyal
> >Sent: 21 June 2018 18:29
> >To: Pablo de Lara <pablo.de.lara.guarch@intel.com>;
> >declan.doherty@intel.com; ravi1.kumar@amd.com; Jacob, Jerin
> ><Jerin.JacobKollanukkaran@cavium.com>; roy.fan.zhang@intel.com;
> >fiona.trahe@intel.com; tdu@semihalf.com; jianjay.zhou@huawei.com
> >Cc: dev@dpdk.org
> >Subject: Re: [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session
> >size functions
> >
> >External Email
> >
> >Hi Pablo,
> >
> >
> >On 6/9/2018 3:32 AM, Pablo de Lara wrote:
> >> Removed rte_cryptodev_get_header_session_size
> >> and rte_cryptodev_get_private_session_size functions, as they have
> >> been substituted with functions specific for symmetric operations,
> >> with _sym_ word after "rte_cryptodev_".
> >>
> >> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> >> ---
...
> >> +
> >> + - ``rte_cryptodev_get_header_session_size`` is replaced with
> >> + ``rte_cryptodev_sym_get_header_session_size``
> >> + - ``rte_cryptodev_get_private_session_size`` is replaced with
> >> + ``rte_cryptodev_sym_get_private_session_size``
> >> +
> >rte_cryptodev_get_private_session_size is not removed in this patch. I
> >think you missed it in your patch.
Right Akhil, thanks for spotting this. Will fix in next version.
> >
> >-Akhil
> >>
> >> ABI Changes
> >> -----------
> >> diff --git a/lib/librte_cryptodev/rte_cryptodev.c
> >> b/lib/librte_cryptodev/rte_cryptodev.c
> >> index a07904fb9..40e249e79 100644
> >> --- a/lib/librte_cryptodev/rte_cryptodev.c
> >> +++ b/lib/librte_cryptodev/rte_cryptodev.c
> >> @@ -1181,12 +1181,6 @@ rte_cryptodev_sym_session_free(struct
> rte_cryptodev_sym_session *sess)
> >> return 0;
> >> }
> >>
> >> -unsigned int
> >> -rte_cryptodev_get_header_session_size(void)
> >> -{
> >> - return rte_cryptodev_sym_get_header_session_size();
> >> -}
> >> -
> >> unsigned int
> >> rte_cryptodev_sym_get_header_session_size(void)
> >> {
>
> [Shally] I missed this before. I think this implementation either should change to
> use nb_drivers which support symmetric or else I am not seeing a need for
> separate sym specific API for header_size since it will always be same for both
> sym and asym.
The implementation is already using nb_drivers to calculate the size, right?
Anyway, I understand that the way asymmetric sessions are done, the API
will be the same, but this could change in the future and since we have already deprecated the
generic function (get_header_session_size), I think we should continue and have both _sym and _asym_ functions.
Thanks,
Pablo
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session size functions
2018-06-21 12:59 0% ` Akhil Goyal
@ 2018-06-22 17:02 0% ` Verma, Shally
2018-06-25 16:40 0% ` De Lara Guarch, Pablo
0 siblings, 1 reply; 200+ results
From: Verma, Shally @ 2018-06-22 17:02 UTC (permalink / raw)
To: Akhil Goyal, Pablo de Lara, declan.doherty, ravi1.kumar, Jacob,
Jerin, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
Cc: dev
Hi Pablo
>-----Original Message-----
>From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Akhil Goyal
>Sent: 21 June 2018 18:29
>To: Pablo de Lara <pablo.de.lara.guarch@intel.com>; declan.doherty@intel.com; ravi1.kumar@amd.com; Jacob, Jerin
><Jerin.JacobKollanukkaran@cavium.com>; roy.fan.zhang@intel.com; fiona.trahe@intel.com; tdu@semihalf.com;
>jianjay.zhou@huawei.com
>Cc: dev@dpdk.org
>Subject: Re: [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session size functions
>
>External Email
>
>Hi Pablo,
>
>
>On 6/9/2018 3:32 AM, Pablo de Lara wrote:
>> Removed rte_cryptodev_get_header_session_size
>> and rte_cryptodev_get_private_session_size functions,
>> as they have been substituted with functions
>> specific for symmetric operations, with _sym_ word
>> after "rte_cryptodev_".
>>
>> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
>> ---
>> doc/guides/rel_notes/deprecation.rst | 6 ------
>> doc/guides/rel_notes/release_18_08.rst | 8 ++++++++
>> lib/librte_cryptodev/rte_cryptodev.c | 6 ------
>> lib/librte_cryptodev/rte_cryptodev.h | 11 -----------
>> lib/librte_cryptodev/rte_cryptodev_version.map | 2 --
>> 5 files changed, 8 insertions(+), 25 deletions(-)
>>
>> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
>> index 91592534e..9a73b1d8e 100644
>> --- a/doc/guides/rel_notes/deprecation.rst
>> +++ b/doc/guides/rel_notes/deprecation.rst
>> @@ -107,9 +107,3 @@ Deprecation Notices
>> with them.
>> - Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
>> so some will be replaced by more explicit flags.
>> - - Function ``rte_cryptodev_get_header_session_size()`` will be deprecated
>> - in 18.05, and it gets replaced with ``rte_cryptodev_sym_get_header_session_size()``.
>> - It will be removed in 18.08.
>> - - Function ``rte_cryptodev_get_private_session_size()`` will be deprecated
>> - in 18.05, and it gets replaced with ``rte_cryptodev_sym_get_private_session_size()``.
>> - It will be removed in 18.08.
>> diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
>> index 3fa9a6e68..0624f3701 100644
>> --- a/doc/guides/rel_notes/release_18_08.rst
>> +++ b/doc/guides/rel_notes/release_18_08.rst
>> @@ -64,6 +64,14 @@ API Changes
>> - ``rte_cryptodev_queue_pair_start``
>> - ``rte_cryptodev_queue_pair_stop``
>>
>> +* cryptodev: Following functions were deprecated and are replaced by
>> + other functions in 18.08:
>> +
>> + - ``rte_cryptodev_get_header_session_size`` is replaced with
>> + ``rte_cryptodev_sym_get_header_session_size``
>> + - ``rte_cryptodev_get_private_session_size`` is replaced with
>> + ``rte_cryptodev_sym_get_private_session_size``
>> +
>rte_cryptodev_get_private_session_size is not removed in this patch. I
>think you missed it in your patch.
>
>-Akhil
>>
>> ABI Changes
>> -----------
>> diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
>> index a07904fb9..40e249e79 100644
>> --- a/lib/librte_cryptodev/rte_cryptodev.c
>> +++ b/lib/librte_cryptodev/rte_cryptodev.c
>> @@ -1181,12 +1181,6 @@ rte_cryptodev_sym_session_free(struct rte_cryptodev_sym_session *sess)
>> return 0;
>> }
>>
>> -unsigned int
>> -rte_cryptodev_get_header_session_size(void)
>> -{
>> - return rte_cryptodev_sym_get_header_session_size();
>> -}
>> -
>> unsigned int
>> rte_cryptodev_sym_get_header_session_size(void)
>> {
[Shally] I missed this before. I think this implementation either should change to use nb_drivers which support symmetric or else I am not seeing a need for separate sym specific API for header_size since it will always be same for both sym and asym.
Thanks
Shally
>> diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
>> index 90487bffc..8e8a59522 100644
>> --- a/lib/librte_cryptodev/rte_cryptodev.h
>> +++ b/lib/librte_cryptodev/rte_cryptodev.h
>> @@ -925,17 +925,6 @@ int
>> rte_cryptodev_sym_session_clear(uint8_t dev_id,
>> struct rte_cryptodev_sym_session *sess);
>>
>> -/**
>> - * @deprecated
>> - * Get the size of the header session, for all registered drivers.
>> - *
>> - * @return
>> - * Size of the header session.
>> - */
>> -__rte_deprecated
>> -unsigned int
>> -rte_cryptodev_get_header_session_size(void);
>> -
>> /**
>> * @deprecated
>> * Get the size of the private session data for a device.
>> diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
>> index 020b45754..0ab6d5195 100644
>> --- a/lib/librte_cryptodev/rte_cryptodev_version.map
>> +++ b/lib/librte_cryptodev/rte_cryptodev_version.map
>> @@ -63,8 +63,6 @@ DPDK_17.08 {
>> rte_cryptodev_driver_id_get;
>> rte_cryptodev_driver_name_get;
>> rte_cryptodev_get_aead_algo_enum;
>> - rte_cryptodev_get_header_session_size;
>> - rte_cryptodev_get_private_session_size;
>> rte_cryptodev_sym_capability_check_aead;
>> rte_cryptodev_sym_session_init;
>> rte_cryptodev_sym_session_clear;
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [PATCH 1/2] cryptodev: add min headroom and tailroom requirement
2018-06-22 6:52 3% ` Joseph, Anoob
@ 2018-06-22 10:03 0% ` Akhil Goyal
0 siblings, 0 replies; 200+ results
From: Akhil Goyal @ 2018-06-22 10:03 UTC (permalink / raw)
To: Joseph, Anoob, Declan Doherty, Pablo de Lara
Cc: Ankur Dwivedi, Jerin Jacob, Narayana Prasad, dev
Hi Anoob,
On 6/22/2018 12:22 PM, Joseph, Anoob wrote:
> Hi Akhil,
>
> The change adds couple of entries in cryptodev_info structure. I was
> under the impression this will be an ABI change and would need one
> release cycle. If we can get this through in 18.08, it would be great.
> Do you want me to revise the patch stating it that way?
If you are adding a deprecation notice for next release, then you cannot add code in that release.
To add this in current release, I think Pablo can take a decision on this.
>
> Thanks,
> Anoob
> On 21-06-2018 19:54, Akhil Goyal wrote:
>>
>> On 6/19/2018 11:56 AM, Anoob Joseph wrote:
>>> Enabling crypto devs to specify the minimum headroom and tailroom it
>>> expects in the mbuf. For net PMDs, standard headroom has to be honoured
>>> by applications, which is not strictly followed for crypto devs. This
>>> prevents crypto devs from using free space in mbuf (available as
>>> head/tailroom) for internal requirements in crypto operations. Addition
>>> of head/tailroom requirement will help PMDs to communicate such
>>> requirements to the application.
>>>
>>> The availability and use of head/tailroom is an optimization if the
>>> hardware supports use of head/tailroom for crypto-op info. For devices
>>> that do not support using the head/tailroom, they can continue to
>>> operate
>>> without any performance-drop.
>>>
>>> Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
>>> ---
>>> doc/guides/rel_notes/deprecation.rst | 4 ++++
>>> lib/librte_cryptodev/rte_cryptodev.h | 6 ++++++
>>> 2 files changed, 10 insertions(+)
>>>
>>> diff --git a/doc/guides/rel_notes/deprecation.rst
>>> b/doc/guides/rel_notes/deprecation.rst
>>> index 1ce692e..a547289 100644
>>> --- a/doc/guides/rel_notes/deprecation.rst
>>> +++ b/doc/guides/rel_notes/deprecation.rst
>>> @@ -122,3 +122,7 @@ Deprecation Notices
>>> - Function ``rte_cryptodev_get_private_session_size()`` will be
>>> deprecated
>>> in 18.05, and it gets replaced with
>>> ``rte_cryptodev_sym_get_private_session_size()``.
>>> It will be removed in 18.08.
>>> + - New field, ``min_headroom_req``, added in
>>> ``rte_cryptodev_info`` structure. It will be
>>> + added in 18.11.
>>> + - New field, ``min_tailroom_req``, added in
>>> ``rte_cryptodev_info`` structure. It will be
>>> + added in 18.11.
>>
>> Is this targeted for 18.08 or 18.11?
>>
>>> diff --git a/lib/librte_cryptodev/rte_cryptodev.h
>>> b/lib/librte_cryptodev/rte_cryptodev.h
>>> index 92ce6d4..fa944b8 100644
>>> --- a/lib/librte_cryptodev/rte_cryptodev.h
>>> +++ b/lib/librte_cryptodev/rte_cryptodev.h
>>> @@ -382,6 +382,12 @@ struct rte_cryptodev_info {
>>> unsigned max_nb_queue_pairs;
>>> /**< Maximum number of queues pairs supported by device. */
>>>
>>> + uint32_t min_headroom_req;
>>> + /**< Minimum mbuf headroom required by device */
>>> +
>>> + uint32_t min_tailroom_req;
>>> + /**< Minimum mbuf tailroom required by device */
>>> +
>>> struct {
>>> unsigned max_nb_sessions;
>>> /**< Maximum number of sessions supported by device. */
>>
>
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [PATCH 1/2] cryptodev: add min headroom and tailroom requirement
@ 2018-06-22 6:52 3% ` Joseph, Anoob
2018-06-22 10:03 0% ` Akhil Goyal
0 siblings, 1 reply; 200+ results
From: Joseph, Anoob @ 2018-06-22 6:52 UTC (permalink / raw)
To: Akhil Goyal, Declan Doherty, Pablo de Lara
Cc: Ankur Dwivedi, Jerin Jacob, Narayana Prasad, dev
Hi Akhil,
The change adds couple of entries in cryptodev_info structure. I was
under the impression this will be an ABI change and would need one
release cycle. If we can get this through in 18.08, it would be great.
Do you want me to revise the patch stating it that way?
Thanks,
Anoob
On 21-06-2018 19:54, Akhil Goyal wrote:
>
> On 6/19/2018 11:56 AM, Anoob Joseph wrote:
>> Enabling crypto devs to specify the minimum headroom and tailroom it
>> expects in the mbuf. For net PMDs, standard headroom has to be honoured
>> by applications, which is not strictly followed for crypto devs. This
>> prevents crypto devs from using free space in mbuf (available as
>> head/tailroom) for internal requirements in crypto operations. Addition
>> of head/tailroom requirement will help PMDs to communicate such
>> requirements to the application.
>>
>> The availability and use of head/tailroom is an optimization if the
>> hardware supports use of head/tailroom for crypto-op info. For devices
>> that do not support using the head/tailroom, they can continue to
>> operate
>> without any performance-drop.
>>
>> Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
>> ---
>> doc/guides/rel_notes/deprecation.rst | 4 ++++
>> lib/librte_cryptodev/rte_cryptodev.h | 6 ++++++
>> 2 files changed, 10 insertions(+)
>>
>> diff --git a/doc/guides/rel_notes/deprecation.rst
>> b/doc/guides/rel_notes/deprecation.rst
>> index 1ce692e..a547289 100644
>> --- a/doc/guides/rel_notes/deprecation.rst
>> +++ b/doc/guides/rel_notes/deprecation.rst
>> @@ -122,3 +122,7 @@ Deprecation Notices
>> - Function ``rte_cryptodev_get_private_session_size()`` will be
>> deprecated
>> in 18.05, and it gets replaced with
>> ``rte_cryptodev_sym_get_private_session_size()``.
>> It will be removed in 18.08.
>> + - New field, ``min_headroom_req``, added in ``rte_cryptodev_info``
>> structure. It will be
>> + added in 18.11.
>> + - New field, ``min_tailroom_req``, added in ``rte_cryptodev_info``
>> structure. It will be
>> + added in 18.11.
>
> Is this targeted for 18.08 or 18.11?
>
>> diff --git a/lib/librte_cryptodev/rte_cryptodev.h
>> b/lib/librte_cryptodev/rte_cryptodev.h
>> index 92ce6d4..fa944b8 100644
>> --- a/lib/librte_cryptodev/rte_cryptodev.h
>> +++ b/lib/librte_cryptodev/rte_cryptodev.h
>> @@ -382,6 +382,12 @@ struct rte_cryptodev_info {
>> unsigned max_nb_queue_pairs;
>> /**< Maximum number of queues pairs supported by device. */
>>
>> + uint32_t min_headroom_req;
>> + /**< Minimum mbuf headroom required by device */
>> +
>> + uint32_t min_tailroom_req;
>> + /**< Minimum mbuf tailroom required by device */
>> +
>> struct {
>> unsigned max_nb_sessions;
>> /**< Maximum number of sessions supported by device. */
>
^ permalink raw reply [relevance 3%]
* Re: [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session size functions
2018-06-08 22:02 4% ` [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session size functions Pablo de Lara
@ 2018-06-21 12:59 0% ` Akhil Goyal
2018-06-22 17:02 0% ` Verma, Shally
0 siblings, 1 reply; 200+ results
From: Akhil Goyal @ 2018-06-21 12:59 UTC (permalink / raw)
To: Pablo de Lara, declan.doherty, ravi1.kumar, jerin.jacob,
roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
Cc: dev
Hi Pablo,
On 6/9/2018 3:32 AM, Pablo de Lara wrote:
> Removed rte_cryptodev_get_header_session_size
> and rte_cryptodev_get_private_session_size functions,
> as they have been substituted with functions
> specific for symmetric operations, with _sym_ word
> after "rte_cryptodev_".
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
> doc/guides/rel_notes/deprecation.rst | 6 ------
> doc/guides/rel_notes/release_18_08.rst | 8 ++++++++
> lib/librte_cryptodev/rte_cryptodev.c | 6 ------
> lib/librte_cryptodev/rte_cryptodev.h | 11 -----------
> lib/librte_cryptodev/rte_cryptodev_version.map | 2 --
> 5 files changed, 8 insertions(+), 25 deletions(-)
>
> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> index 91592534e..9a73b1d8e 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -107,9 +107,3 @@ Deprecation Notices
> with them.
> - Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
> so some will be replaced by more explicit flags.
> - - Function ``rte_cryptodev_get_header_session_size()`` will be deprecated
> - in 18.05, and it gets replaced with ``rte_cryptodev_sym_get_header_session_size()``.
> - It will be removed in 18.08.
> - - Function ``rte_cryptodev_get_private_session_size()`` will be deprecated
> - in 18.05, and it gets replaced with ``rte_cryptodev_sym_get_private_session_size()``.
> - It will be removed in 18.08.
> diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
> index 3fa9a6e68..0624f3701 100644
> --- a/doc/guides/rel_notes/release_18_08.rst
> +++ b/doc/guides/rel_notes/release_18_08.rst
> @@ -64,6 +64,14 @@ API Changes
> - ``rte_cryptodev_queue_pair_start``
> - ``rte_cryptodev_queue_pair_stop``
>
> +* cryptodev: Following functions were deprecated and are replaced by
> + other functions in 18.08:
> +
> + - ``rte_cryptodev_get_header_session_size`` is replaced with
> + ``rte_cryptodev_sym_get_header_session_size``
> + - ``rte_cryptodev_get_private_session_size`` is replaced with
> + ``rte_cryptodev_sym_get_private_session_size``
> +
rte_cryptodev_get_private_session_size is not removed in this patch. I
think you missed it in your patch.
-Akhil
>
> ABI Changes
> -----------
> diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
> index a07904fb9..40e249e79 100644
> --- a/lib/librte_cryptodev/rte_cryptodev.c
> +++ b/lib/librte_cryptodev/rte_cryptodev.c
> @@ -1181,12 +1181,6 @@ rte_cryptodev_sym_session_free(struct rte_cryptodev_sym_session *sess)
> return 0;
> }
>
> -unsigned int
> -rte_cryptodev_get_header_session_size(void)
> -{
> - return rte_cryptodev_sym_get_header_session_size();
> -}
> -
> unsigned int
> rte_cryptodev_sym_get_header_session_size(void)
> {
> diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
> index 90487bffc..8e8a59522 100644
> --- a/lib/librte_cryptodev/rte_cryptodev.h
> +++ b/lib/librte_cryptodev/rte_cryptodev.h
> @@ -925,17 +925,6 @@ int
> rte_cryptodev_sym_session_clear(uint8_t dev_id,
> struct rte_cryptodev_sym_session *sess);
>
> -/**
> - * @deprecated
> - * Get the size of the header session, for all registered drivers.
> - *
> - * @return
> - * Size of the header session.
> - */
> -__rte_deprecated
> -unsigned int
> -rte_cryptodev_get_header_session_size(void);
> -
> /**
> * @deprecated
> * Get the size of the private session data for a device.
> diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
> index 020b45754..0ab6d5195 100644
> --- a/lib/librte_cryptodev/rte_cryptodev_version.map
> +++ b/lib/librte_cryptodev/rte_cryptodev_version.map
> @@ -63,8 +63,6 @@ DPDK_17.08 {
> rte_cryptodev_driver_id_get;
> rte_cryptodev_driver_name_get;
> rte_cryptodev_get_aead_algo_enum;
> - rte_cryptodev_get_header_session_size;
> - rte_cryptodev_get_private_session_size;
> rte_cryptodev_sym_capability_check_aead;
> rte_cryptodev_sym_session_init;
> rte_cryptodev_sym_session_clear;
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [PATCH v2 03/22] ethdev: add function to release port in local process
2018-06-21 8:06 3% ` Burakov, Anatoly
2018-06-21 8:21 4% ` Thomas Monjalon
@ 2018-06-21 8:21 0% ` Zhang, Qi Z
1 sibling, 0 replies; 200+ results
From: Zhang, Qi Z @ 2018-06-21 8:21 UTC (permalink / raw)
To: Burakov, Anatoly, thomas
Cc: Ananyev, Konstantin, dev, Richardson, Bruce, Yigit, Ferruh,
Shelton, Benjamin H, Vangati, Narender
> -----Original Message-----
> From: Burakov, Anatoly
> Sent: Thursday, June 21, 2018 4:06 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; thomas@monjalon.net
> Cc: Ananyev, Konstantin <konstantin.ananyev@intel.com>; dev@dpdk.org;
> Richardson, Bruce <bruce.richardson@intel.com>; Yigit, Ferruh
> <ferruh.yigit@intel.com>; Shelton, Benjamin H
> <benjamin.h.shelton@intel.com>; Vangati, Narender
> <narender.vangati@intel.com>
> Subject: Re: [PATCH v2 03/22] ethdev: add function to release port in local
> process
>
> On 21-Jun-18 3:00 AM, Qi Zhang wrote:
> > Add driver API rte_eth_release_port_private to support the requirement
> > that an ethdev only be released on secondary process, so only local
> > state be set to unused , share data will not be reset so primary
> > process can still use it.
> >
> > Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> > ---
>
> <snip>
>
> >
> > /**
> > * @internal
> > + * Release the specified ethdev port in local process, only set to
> > +ethdev
> > + * state to unused, but not reset share data since it assume other
> > +process
> > + * is still using it, typically it is called by secondary process.
> > + *
> > + * @param eth_dev
> > + * The *eth_dev* pointer is the address of the *rte_eth_dev* structure.
> > + * @return
> > + * - 0 on success, negative on error
> > + */
> > +int rte_eth_dev_release_port_private(struct rte_eth_dev *eth_dev);
> > +
>
> As far as i can tell, even though the function is marked as internal, it should still
> be exported in the .map file (see rte_eth_dev_allocate() for example).
>
> Thomas and others, does this count as new API? Should this be marked as
> __rte_experimental? Presumably, we guarantee ABI stability for internal
> functions too, so my expectation would be yes.
Sorry, I not intent to mark this as experimental, I must forgot to remove this
It should rte_eth_dev_attach/detach_private and rte_eth_dev_lock/unlock .
I guess internal API is not necessary to have this.
I will remove it in v3
Thanks
Qi
>
> > +/**
> > + * @internal
> > * Release device queues and clear its configuration to force the user
> > * application to reconfigure it. It is for internal use only.
> > *
> >
>
>
> --
> Thanks,
> Anatoly
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [PATCH v2 03/22] ethdev: add function to release port in local process
2018-06-21 8:06 3% ` Burakov, Anatoly
@ 2018-06-21 8:21 4% ` Thomas Monjalon
2018-06-21 8:21 0% ` Zhang, Qi Z
1 sibling, 0 replies; 200+ results
From: Thomas Monjalon @ 2018-06-21 8:21 UTC (permalink / raw)
To: Burakov, Anatoly, Qi Zhang
Cc: konstantin.ananyev, dev, bruce.richardson, ferruh.yigit,
benjamin.h.shelton, narender.vangati
21/06/2018 10:06, Burakov, Anatoly:
> On 21-Jun-18 3:00 AM, Qi Zhang wrote:
> > Add driver API rte_eth_release_port_private to support the
> > requirement that an ethdev only be released on secondary process,
> > so only local state be set to unused , share data will not be
> > reset so primary process can still use it.
> >
> > Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> > ---
>
> <snip>
>
> >
> > /**
> > * @internal
> > + * Release the specified ethdev port in local process, only set to ethdev
> > + * state to unused, but not reset share data since it assume other process
> > + * is still using it, typically it is called by secondary process.
> > + *
> > + * @param eth_dev
> > + * The *eth_dev* pointer is the address of the *rte_eth_dev* structure.
> > + * @return
> > + * - 0 on success, negative on error
> > + */
> > +int rte_eth_dev_release_port_private(struct rte_eth_dev *eth_dev);
> > +
>
> As far as i can tell, even though the function is marked as internal, it
> should still be exported in the .map file (see rte_eth_dev_allocate()
> for example).
>
> Thomas and others, does this count as new API? Should this be marked as
> __rte_experimental? Presumably, we guarantee ABI stability for internal
> functions too, so my expectation would be yes.
You know the A in ABI stands for Application :)
If it is not called by application, it has no impact on ABI.
However, I am not sure about having this function at all.
Who is calling it?
^ permalink raw reply [relevance 4%]
* Re: [dpdk-dev] [PATCH v2 03/22] ethdev: add function to release port in local process
@ 2018-06-21 8:06 3% ` Burakov, Anatoly
2018-06-21 8:21 4% ` Thomas Monjalon
2018-06-21 8:21 0% ` Zhang, Qi Z
0 siblings, 2 replies; 200+ results
From: Burakov, Anatoly @ 2018-06-21 8:06 UTC (permalink / raw)
To: Qi Zhang, thomas
Cc: konstantin.ananyev, dev, bruce.richardson, ferruh.yigit,
benjamin.h.shelton, narender.vangati
On 21-Jun-18 3:00 AM, Qi Zhang wrote:
> Add driver API rte_eth_release_port_private to support the
> requirement that an ethdev only be released on secondary process,
> so only local state be set to unused , share data will not be
> reset so primary process can still use it.
>
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> ---
<snip>
>
> /**
> * @internal
> + * Release the specified ethdev port in local process, only set to ethdev
> + * state to unused, but not reset share data since it assume other process
> + * is still using it, typically it is called by secondary process.
> + *
> + * @param eth_dev
> + * The *eth_dev* pointer is the address of the *rte_eth_dev* structure.
> + * @return
> + * - 0 on success, negative on error
> + */
> +int rte_eth_dev_release_port_private(struct rte_eth_dev *eth_dev);
> +
As far as i can tell, even though the function is marked as internal, it
should still be exported in the .map file (see rte_eth_dev_allocate()
for example).
Thomas and others, does this count as new API? Should this be marked as
__rte_experimental? Presumably, we guarantee ABI stability for internal
functions too, so my expectation would be yes.
> +/**
> + * @internal
> * Release device queues and clear its configuration to force the user
> * application to reconfigure it. It is for internal use only.
> *
>
--
Thanks,
Anatoly
^ permalink raw reply [relevance 3%]
* Re: [dpdk-dev] [PATCH v2 01/22] eal: introduce one device scan
@ 2018-06-21 7:56 3% ` Burakov, Anatoly
0 siblings, 0 replies; 200+ results
From: Burakov, Anatoly @ 2018-06-21 7:56 UTC (permalink / raw)
To: Qi Zhang, thomas
Cc: konstantin.ananyev, dev, bruce.richardson, ferruh.yigit,
benjamin.h.shelton, narender.vangati
On 21-Jun-18 3:00 AM, Qi Zhang wrote:
> When hot plug a new device, it is not necessary to scan everything
> on the bus since the devname and devargs are already there. So new
> rte_bus ops "scan_one" is introduced, bus driver can implement this
> function to simplify the hotplug process.
>
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> ---
>
<snip>
> +/**
> * Implementation specific probe function which is responsible for linking
> * devices on that bus with applicable drivers.
> *
> @@ -204,6 +219,7 @@ struct rte_bus {
> TAILQ_ENTRY(rte_bus) next; /**< Next bus object in linked list */
> const char *name; /**< Name of the bus */
> rte_bus_scan_t scan; /**< Scan for devices attached to bus */
> + rte_bus_scan_one_t scan_one; /**< Scan one device using devargs */
> rte_bus_probe_t probe; /**< Probe devices on bus */
> rte_bus_find_device_t find_device; /**< Find a device on the bus */
> rte_bus_plug_t plug; /**< Probe single device for drivers */
>
Does this break ABI for bus?
--
Thanks,
Anatoly
^ permalink raw reply [relevance 3%]
* [dpdk-dev] [PATCH v8] checkpatches.sh: Add checks for ABI symbol addition
2018-06-05 12:21 6% ` [dpdk-dev] [PATCH v7] " Neil Horman
@ 2018-06-14 13:30 6% ` Neil Horman
2018-06-25 23:04 4% ` Thomas Monjalon
2018-06-27 18:01 6% ` [dpdk-dev] [PATCH v9] " Neil Horman
3 siblings, 1 reply; 200+ results
From: Neil Horman @ 2018-06-14 13:30 UTC (permalink / raw)
To: dev
Cc: Neil Horman, thomas, john.mcnamara, bruce.richardson,
Ferruh Yigit, Stephen Hemminger
Recently, some additional patches were added to allow for programmatic
marking of C symbols as experimental. The addition of these markers is
dependent on the manual addition of exported symbols to the EXPERIMENTAL
section of the corresponding libraries version map file. The consensus
on review is that, in addition to mandating the addition of symbols to
the EXPERIMENTAL version in the map, we need a mechanism to enforce our
documented process of mandating that addition when they are introduced.
To that end, I am proposing this change. It is an addition to the
checkpatches script, which scan incoming patches for additions and
removals of symbols to the map file, and warns the user appropriately
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: thomas@monjalon.net
CC: john.mcnamara@intel.com
CC: bruce.richardson@intel.com
CC: Ferruh Yigit <ferruh.yigit@intel.com>
CC: Stephen Hemminger <stephen@networkplumber.org>
---
Change notes
v2)
* Cleaned up and documented awk script (shemminger)
* fixed sort/uniq usage (shemminger)
* moved checking to new script (tmonjalon)
* added maintainer entry (tmonjalon)
* added license (tmonjalon)
v3)
* Changed symbol check script name (tmonjalon)
* Trapped exit to clean temp file (tmonjalon)
* Honored verbose command (tmonjalon)
* Cleaned left over debug bits (tmonjalon)
* Updated location in MAINTAINERS file (tmonjalon)
v4)
* Updated maintainers file (tmonjalon)
v5)
* undo V4 (tmojalon)
v6)
* Cleaning up more nits (tmonjalon)
* Combining some lines (tmonjalon)
* Fixing error print condition (tmonjalon)
* Redirect stdin to a file to allow rewinding for
Multiple passes on tools (nhorman)
v7)
* More nits (tmonjalon)
* consoloidating some common report lines (tmonjalon)
* move SPDX identifier to line 2 (nhorman)
* fix some checkpatch errors
v8)
* spelling fix (nhorman)
* found a way to eliminate the use of filterdiff (new awk rules)
---
MAINTAINERS | 1 +
devtools/check-symbol-change.sh | 161 ++++++++++++++++++++++++++++++++
devtools/checkpatches.sh | 50 ++++++++--
3 files changed, 205 insertions(+), 7 deletions(-)
create mode 100755 devtools/check-symbol-change.sh
diff --git a/MAINTAINERS b/MAINTAINERS
index 4667fa7fb..7b1180fe0 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -122,6 +122,7 @@ M: Neil Horman <nhorman@tuxdriver.com>
F: lib/librte_compat/
F: doc/guides/rel_notes/deprecation.rst
F: devtools/validate-abi.sh
+F: devtools/check-symbol-change.sh
F: buildtools/check-experimental-syms.sh
Driver information
diff --git a/devtools/check-symbol-change.sh b/devtools/check-symbol-change.sh
new file mode 100755
index 000000000..6d7d83db4
--- /dev/null
+++ b/devtools/check-symbol-change.sh
@@ -0,0 +1,161 @@
+#!/bin/sh
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2018 Neil Horman <nhorman@tuxdriver.com>
+
+build_map_changes()
+{
+ local fname=$1
+ local mapdb=$2
+
+ cat $fname | awk '
+ # Initialize our variables
+ BEGIN {map="";sym="";ar="";sec=""; in_sec=0; in_map=0}
+
+ # Anything that starts with + or -, followed by an a
+ # and ends in the string .map is the name of our map file
+ # This may appear multiple times in a patch if multiple
+ # map files are altered, and all section/symbol names
+ # appearing between a triggering of this rule and the
+ # next trigger of this rule are associated with this file
+ /[-+] a\/.*\.map/ {map=$2; in_map=1}
+
+ # Same pattern as above, only it matches on anything that
+ # doesnt end in 'map', indicating we have left the map chunk.
+ # When we hit this, turn off the in_map variable, which
+ # supresses the subordonate rules below
+ /[-+] a\/.*\.^(map)/ {in_map=0}
+
+ # Triggering this rule, which starts a line with a + and ends it
+ # with a { identifies a versioned section. The section name is
+ # the rest of the line with the + and { symbols remvoed.
+ # Triggering this rule sets in_sec to 1, which actives the
+ # symbol rule below
+ /+.*{/ {gsub("+","");
+ if (in_map == 1) {
+ sec=$1; in_sec=1;
+ }
+ }
+
+ # This rule idenfies the end of a section, and disables the
+ # symbol rule
+ /.*}/ {in_sec=0}
+
+ # This rule matches on a + followed by any characters except a :
+ # (which denotes a global vs local segment), and ends with a ;.
+ # The semicolon is removed and the symbol is printed with its
+ # association file name and version section, along with an
+ # indicator that the symbol is a new addition. Note this rule
+ # only works if we have found a version section in the rule
+ # above (hence the in_sec check) And found a map file (the
+ # in_map check). If we are not in a map chunk, do nothing. If
+ # we are in a map chunk but not a section chunk, record it as
+ # unknown.
+ /^+[^}].*[^:*];/ {gsub(";","");sym=$2;
+ if (in_map == 1) {
+ if (in_sec == 1) {
+ print map " " sym " " sec " add"
+ } else {
+ print map " " sym " unknown add"
+ }
+ }
+ }
+
+ # This is the same rule as above, but the rule matches on a
+ # leading - rather than a +, denoting that the symbol is being
+ # removed.
+ /^-[^}].*[^:*];/ {gsub(";","");sym=$2;
+ if (in_map == 1) {
+ if (in_sec == 1) {
+ print map " " sym " " sec " del"
+ } else {
+ print map " " sym " unknown del"
+ }
+ }
+ }' > ./$mapdb
+
+ sort -u $mapdb > ./$mapdb.2
+ mv -f $mapdb.2 $mapdb
+
+}
+
+check_for_rule_violations()
+{
+ local mapdb=$1
+ local mname
+ local symname
+ local secname
+ local ar
+ local ret=0
+
+ while read mname symname secname ar
+ do
+ if [ "$ar" == "add" ]
+ then
+
+ if [ "$secname" == "unknown" ]
+ then
+ # Just inform the user of this occurrence, but
+ # don't flag it as an error
+ echo -n "INFO: symbol $syname is added but "
+ echo -n "patch has insuficient context "
+ echo -n "to determine the section name "
+ echo -n "please ensure the version is "
+ echo "EXPERIMENTAL"
+ continue
+ fi
+
+ if [ "$secname" != "EXPERIMENTAL" ]
+ then
+ # Symbols that are getting added in a section
+ # other than the experimental section
+ # to be moving from an already supported
+ # section or its a violation
+ grep -q \
+ "$mname $symname [^EXPERIMENTAL] del" $mapdb
+ if [ $? -ne 0 ]
+ then
+ echo -n "ERROR: symbol $symname "
+ echo -n "is added in a section "
+ echo -n "other than the EXPERIMENTAL "
+ echo "section of the version map"
+ ret=1
+ fi
+ fi
+ else
+
+ if [ "$secname" != "EXPERIMENTAL" ]
+ then
+ # Just inform users that non-experimenal
+ # symbols need to go through a deprecation
+ # process
+ echo -n "INFO: symbol $symname is being "
+ echo -n "removed, ensure that it has "
+ echo "gone through the deprecation process"
+ fi
+ fi
+ done < $mapdb
+
+ return $ret
+}
+
+trap clean_and_exit_on_sig EXIT
+
+mapfile=`mktemp mapdb.XXXXXX`
+patch=$1
+exit_code=1
+
+clean_and_exit_on_sig()
+{
+ rm -f $mapfile
+ exit $exit_code
+}
+
+build_map_changes $patch $mapfile
+check_for_rule_violations $mapfile
+exit_code=$?
+
+rm -f $mapfile
+
+exit $exit_code
+
+
diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index 663b7c426..10ba35340 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -7,6 +7,9 @@
# - DPDK_CHECKPATCH_LINE_LENGTH
. $(dirname $(readlink -e $0))/load-devel-config
+
+VALIDATE_NEW_API=$(dirname $(readlink -e $0))/check-symbol-change.sh
+
length=${DPDK_CHECKPATCH_LINE_LENGTH:-80}
# override default Linux options
@@ -21,6 +24,15 @@ SPLIT_STRING,LONG_LINE_STRING,\
LINE_SPACING,PARENTHESIS_ALIGNMENT,NETWORKING_BLOCK_COMMENT_STYLE,\
NEW_TYPEDEFS,COMPARISON_TO_NULL"
+clean_tmp_files() {
+ echo $TMPINPUT | grep -q checkpaches
+ if [ $? -eq 0 ]; then
+ rm -f $TMPINPUT
+ fi
+}
+
+trap "clean_tmp_files" SIGINT
+
print_usage () {
cat <<- END_OF_HELP
usage: $(basename $0) [-q] [-v] [-nX|patch1 [patch2] ...]]
@@ -58,19 +70,43 @@ total=0
status=0
check () { # <patch> <commit> <title>
+ local ret=0
+
total=$(($total + 1))
! $verbose || printf '\n### %s\n\n' "$3"
if [ -n "$1" ] ; then
- report=$($DPDK_CHECKPATCH_PATH $options "$1" 2>/dev/null)
+ TMPINPUT=$1
elif [ -n "$2" ] ; then
- report=$(git format-patch --find-renames --no-stat --stdout -1 $commit |
- $DPDK_CHECKPATCH_PATH $options - 2>/dev/null)
+ TMPINPUT=$(mktemp checkpatches.XXXXXX)
+ git format-patch --find-renames \
+ --no-stat --stdout -1 $commit > ./$TMPINPUT
else
- report=$($DPDK_CHECKPATCH_PATH $options - 2>/dev/null)
+ TMPINPUT=$(mktemp checkpatches.XXXXXX)
+ cat > ./$TMPINPUT
+ fi
+
+ report=$($DPDK_CHECKPATCH_PATH $options $TMPINPUT 2>/dev/null)
+
+ if [ $? -ne 0 ]
+ then
+ $verbose || printf '\n### %s\n\n' "$3"
+ printf '%s\n' "$report" | sed -n '1,/^total:.*lines checked$/p'
+ ret=1
+ fi
+
+ ! $verbose || printf '\nChecking API additions/removals:\n'
+
+ report=$($VALIDATE_NEW_API "$TMPINPUT")
+
+ if [ $? -ne 0 ]; then
+ printf '%s\n' "$report"
+ ret=1
+ fi
+
+ clean_tmp_files
+ if [ $ret -eq 0 ]; then
+ return 0
fi
- [ $? -ne 0 ] || return 0
- $verbose || printf '\n### %s\n\n' "$3"
- printf '%s\n' "$report" | sed -n '1,/^total:.*lines checked$/p'
status=$(($status + 1))
}
--
2.17.1
^ permalink raw reply [relevance 6%]
* Re: [dpdk-dev] [PATCH] cryptodev: fix ABI breakage
2018-06-13 9:36 8% [dpdk-dev] [PATCH] cryptodev: fix ABI breakage Pablo de Lara
2018-06-13 9:50 4% ` Ananyev, Konstantin
@ 2018-06-13 10:00 4% ` Gujjar, Abhinandan S
2018-06-27 21:14 4% ` De Lara Guarch, Pablo
1 sibling, 1 reply; 200+ results
From: Gujjar, Abhinandan S @ 2018-06-13 10:00 UTC (permalink / raw)
To: De Lara Guarch, Pablo, Doherty, Declan; +Cc: dev, stable
> -----Original Message-----
> From: De Lara Guarch, Pablo
> Sent: Wednesday, June 13, 2018 3:07 PM
> To: Doherty, Declan <declan.doherty@intel.com>; Gujjar, Abhinandan S
> <abhinandan.gujjar@intel.com>
> Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>;
> stable@dpdk.org
> Subject: [PATCH] cryptodev: fix ABI breakage
>
> In 17.08, the crypto operation was restructured, and some reserved bytes (5)
> were added to have the mempool pointer aligned to 64 bits, since the structure
> is expected to be aligned to 64 bits, allowing future additions with no ABI
> breakage needed.
>
> In 18.05, a new 2-byte field was added, so the reserved bytes were reduced to 3.
> However, this field was added after the first 3 bytes of the structure, causing it
> to be placed in an offset of 4 bytes, and therefore, forcing the mempool pointer
> to be placed after 16 bytes, instead of a 8 bytes, causing unintentionally the ABI
> breakage.
>
> This commit fixes the breakage, by swapping the reserved bytes and the
> private_data_offset field, so the latter is aligned to 2 bytes and the offset of the
> mempool pointer returns to its original offset,
> 8 bytes.
>
> Fixes: 54c836846603 ("cryptodev: set private data for session-less mode")
> Cc: stable@dpdk.org
>
> Reported-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
> lib/librte_cryptodev/rte_crypto.h | 51 +++++++++++++++++++------------
> 1 file changed, 31 insertions(+), 20 deletions(-)
>
> diff --git a/lib/librte_cryptodev/rte_crypto.h b/lib/librte_cryptodev/rte_crypto.h
> index 25404264b..a16be656d 100644
> --- a/lib/librte_cryptodev/rte_crypto.h
> +++ b/lib/librte_cryptodev/rte_crypto.h
> @@ -73,26 +73,37 @@ enum rte_crypto_op_sess_type {
> * rte_cryptodev_enqueue_burst() / rte_cryptodev_dequeue_burst() .
> */
> struct rte_crypto_op {
> - uint8_t type;
> - /**< operation type */
> - uint8_t status;
> - /**<
> - * operation status - this is reset to
> - * RTE_CRYPTO_OP_STATUS_NOT_PROCESSED on allocation from
> mempool and
> - * will be set to RTE_CRYPTO_OP_STATUS_SUCCESS after crypto
> operation
> - * is successfully processed by a crypto PMD
> - */
> - uint8_t sess_type;
> - /**< operation session type */
> - uint16_t private_data_offset;
> - /**< Offset to indicate start of private data (if any). The offset
> - * is counted from the start of the rte_crypto_op including IV.
> - * The private data may be used by the application to store
> - * information which should remain untouched in the library/driver
> - */
> -
> - uint8_t reserved[3];
> - /**< Reserved bytes to fill 64 bits for future additions */
> + __extension__
> + union {
> + uint64_t raw;
> + __extension__
> + struct {
> + uint8_t type;
> + /**< operation type */
> + uint8_t status;
> + /**<
> + * operation status - this is reset to
> + * RTE_CRYPTO_OP_STATUS_NOT_PROCESSED on
> allocation
> + * from mempool and will be set to
> + * RTE_CRYPTO_OP_STATUS_SUCCESS after crypto
> operation
> + * is successfully processed by a crypto PMD
> + */
> + uint8_t sess_type;
> + /**< operation session type */
> + uint8_t reserved[3];
> + /**< Reserved bytes to fill 64 bits for
> + * future additions
> + */
> + uint16_t private_data_offset;
> + /**< Offset to indicate start of private data (if any).
> + * The offset is counted from the start of the
> + * rte_crypto_op including IV.
> + * The private data may be used by the application
> + * to store information which should remain untouched
> + * in the library/driver
> + */
> + };
> + };
> struct rte_mempool *mempool;
> /**< crypto operation mempool which operation is allocated from */
>
> --
Acked-by: Abhinandan Gujjar <Abhinandan.gujjar@intel.com>
> 2.17.0
^ permalink raw reply [relevance 4%]
* Re: [dpdk-dev] [PATCH] cryptodev: fix ABI breakage
2018-06-13 9:36 8% [dpdk-dev] [PATCH] cryptodev: fix ABI breakage Pablo de Lara
@ 2018-06-13 9:50 4% ` Ananyev, Konstantin
2018-06-13 10:00 4% ` Gujjar, Abhinandan S
1 sibling, 0 replies; 200+ results
From: Ananyev, Konstantin @ 2018-06-13 9:50 UTC (permalink / raw)
To: De Lara Guarch, Pablo, Doherty, Declan, Gujjar, Abhinandan S
Cc: dev, De Lara Guarch, Pablo, stable
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> Sent: Wednesday, June 13, 2018 10:37 AM
> To: Doherty, Declan <declan.doherty@intel.com>; Gujjar, Abhinandan S <abhinandan.gujjar@intel.com>
> Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] cryptodev: fix ABI breakage
>
> In 17.08, the crypto operation was restructured,
> and some reserved bytes (5) were added to have the mempool
> pointer aligned to 64 bits, since the structure is expected
> to be aligned to 64 bits, allowing future additions with no
> ABI breakage needed.
>
> In 18.05, a new 2-byte field was added, so the reserved bytes
> were reduced to 3. However, this field was added after the first 3 bytes
> of the structure, causing it to be placed in an offset of 4 bytes,
> and therefore, forcing the mempool pointer to be placed after 16 bytes,
> instead of a 8 bytes, causing unintentionally the ABI breakage.
>
> This commit fixes the breakage, by swapping the reserved bytes
> and the private_data_offset field, so the latter is aligned to 2 bytes
> and the offset of the mempool pointer returns to its original offset,
> 8 bytes.
>
> Fixes: 54c836846603 ("cryptodev: set private data for session-less mode")
> Cc: stable@dpdk.org
>
> Reported-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
> lib/librte_cryptodev/rte_crypto.h | 51 +++++++++++++++++++------------
> 1 file changed, 31 insertions(+), 20 deletions(-)
>
> diff --git a/lib/librte_cryptodev/rte_crypto.h b/lib/librte_cryptodev/rte_crypto.h
> index 25404264b..a16be656d 100644
> --- a/lib/librte_cryptodev/rte_crypto.h
> +++ b/lib/librte_cryptodev/rte_crypto.h
> @@ -73,26 +73,37 @@ enum rte_crypto_op_sess_type {
> * rte_cryptodev_enqueue_burst() / rte_cryptodev_dequeue_burst() .
> */
> struct rte_crypto_op {
> - uint8_t type;
> - /**< operation type */
> - uint8_t status;
> - /**<
> - * operation status - this is reset to
> - * RTE_CRYPTO_OP_STATUS_NOT_PROCESSED on allocation from mempool and
> - * will be set to RTE_CRYPTO_OP_STATUS_SUCCESS after crypto operation
> - * is successfully processed by a crypto PMD
> - */
> - uint8_t sess_type;
> - /**< operation session type */
> - uint16_t private_data_offset;
> - /**< Offset to indicate start of private data (if any). The offset
> - * is counted from the start of the rte_crypto_op including IV.
> - * The private data may be used by the application to store
> - * information which should remain untouched in the library/driver
> - */
> -
> - uint8_t reserved[3];
> - /**< Reserved bytes to fill 64 bits for future additions */
> + __extension__
> + union {
> + uint64_t raw;
> + __extension__
> + struct {
> + uint8_t type;
> + /**< operation type */
> + uint8_t status;
> + /**<
> + * operation status - this is reset to
> + * RTE_CRYPTO_OP_STATUS_NOT_PROCESSED on allocation
> + * from mempool and will be set to
> + * RTE_CRYPTO_OP_STATUS_SUCCESS after crypto operation
> + * is successfully processed by a crypto PMD
> + */
> + uint8_t sess_type;
> + /**< operation session type */
> + uint8_t reserved[3];
> + /**< Reserved bytes to fill 64 bits for
> + * future additions
> + */
> + uint16_t private_data_offset;
> + /**< Offset to indicate start of private data (if any).
> + * The offset is counted from the start of the
> + * rte_crypto_op including IV.
> + * The private data may be used by the application
> + * to store information which should remain untouched
> + * in the library/driver
> + */
> + };
> + };
> struct rte_mempool *mempool;
> /**< crypto operation mempool which operation is allocated from */
>
> --
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> 2.17.0
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH] cryptodev: fix ABI breakage
@ 2018-06-13 9:36 8% Pablo de Lara
2018-06-13 9:50 4% ` Ananyev, Konstantin
2018-06-13 10:00 4% ` Gujjar, Abhinandan S
0 siblings, 2 replies; 200+ results
From: Pablo de Lara @ 2018-06-13 9:36 UTC (permalink / raw)
To: declan.doherty, abhinandan.gujjar; +Cc: dev, Pablo de Lara, stable
In 17.08, the crypto operation was restructured,
and some reserved bytes (5) were added to have the mempool
pointer aligned to 64 bits, since the structure is expected
to be aligned to 64 bits, allowing future additions with no
ABI breakage needed.
In 18.05, a new 2-byte field was added, so the reserved bytes
were reduced to 3. However, this field was added after the first 3 bytes
of the structure, causing it to be placed in an offset of 4 bytes,
and therefore, forcing the mempool pointer to be placed after 16 bytes,
instead of a 8 bytes, causing unintentionally the ABI breakage.
This commit fixes the breakage, by swapping the reserved bytes
and the private_data_offset field, so the latter is aligned to 2 bytes
and the offset of the mempool pointer returns to its original offset,
8 bytes.
Fixes: 54c836846603 ("cryptodev: set private data for session-less mode")
Cc: stable@dpdk.org
Reported-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
lib/librte_cryptodev/rte_crypto.h | 51 +++++++++++++++++++------------
1 file changed, 31 insertions(+), 20 deletions(-)
diff --git a/lib/librte_cryptodev/rte_crypto.h b/lib/librte_cryptodev/rte_crypto.h
index 25404264b..a16be656d 100644
--- a/lib/librte_cryptodev/rte_crypto.h
+++ b/lib/librte_cryptodev/rte_crypto.h
@@ -73,26 +73,37 @@ enum rte_crypto_op_sess_type {
* rte_cryptodev_enqueue_burst() / rte_cryptodev_dequeue_burst() .
*/
struct rte_crypto_op {
- uint8_t type;
- /**< operation type */
- uint8_t status;
- /**<
- * operation status - this is reset to
- * RTE_CRYPTO_OP_STATUS_NOT_PROCESSED on allocation from mempool and
- * will be set to RTE_CRYPTO_OP_STATUS_SUCCESS after crypto operation
- * is successfully processed by a crypto PMD
- */
- uint8_t sess_type;
- /**< operation session type */
- uint16_t private_data_offset;
- /**< Offset to indicate start of private data (if any). The offset
- * is counted from the start of the rte_crypto_op including IV.
- * The private data may be used by the application to store
- * information which should remain untouched in the library/driver
- */
-
- uint8_t reserved[3];
- /**< Reserved bytes to fill 64 bits for future additions */
+ __extension__
+ union {
+ uint64_t raw;
+ __extension__
+ struct {
+ uint8_t type;
+ /**< operation type */
+ uint8_t status;
+ /**<
+ * operation status - this is reset to
+ * RTE_CRYPTO_OP_STATUS_NOT_PROCESSED on allocation
+ * from mempool and will be set to
+ * RTE_CRYPTO_OP_STATUS_SUCCESS after crypto operation
+ * is successfully processed by a crypto PMD
+ */
+ uint8_t sess_type;
+ /**< operation session type */
+ uint8_t reserved[3];
+ /**< Reserved bytes to fill 64 bits for
+ * future additions
+ */
+ uint16_t private_data_offset;
+ /**< Offset to indicate start of private data (if any).
+ * The offset is counted from the start of the
+ * rte_crypto_op including IV.
+ * The private data may be used by the application
+ * to store information which should remain untouched
+ * in the library/driver
+ */
+ };
+ };
struct rte_mempool *mempool;
/**< crypto operation mempool which operation is allocated from */
--
2.17.0
^ permalink raw reply [relevance 8%]
* Re: [dpdk-dev] [PATCH 3/6] cryptodev: remove max number of sessions
2018-06-08 22:02 1% ` [dpdk-dev] [PATCH 3/6] cryptodev: remove max number of sessions Pablo de Lara
@ 2018-06-12 11:37 0% ` Tomasz Duszynski
0 siblings, 0 replies; 200+ results
From: Tomasz Duszynski @ 2018-06-12 11:37 UTC (permalink / raw)
To: Pablo de Lara
Cc: declan.doherty, akhil.goyal, ravi1.kumar, jerin.jacob,
roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou, dev
Hello Pablo,
On Fri, Jun 08, 2018 at 11:02:31PM +0100, Pablo de Lara wrote:
> Sessions are not created and stored in the crypto device
> anymore, since now the session mempool is created
> at the application level.
>
> Therefore the limitation of the maximum number of sessions
> that can be created should not be dependent of the crypto device.
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
> config/common_base | 12 ------------
> config/rte_config.h | 14 --------------
> doc/guides/cryptodevs/aesni_gcm.rst | 4 +---
> doc/guides/cryptodevs/aesni_mb.rst | 4 +---
> doc/guides/cryptodevs/armv8.rst | 1 -
> doc/guides/cryptodevs/ccp.rst | 2 --
> doc/guides/cryptodevs/dpaa2_sec.rst | 5 -----
> doc/guides/cryptodevs/dpaa_sec.rst | 5 -----
> doc/guides/cryptodevs/kasumi.rst | 4 +---
> doc/guides/cryptodevs/mvsam.rst | 1 -
> doc/guides/cryptodevs/null.rst | 4 +---
> doc/guides/cryptodevs/openssl.rst | 1 -
> doc/guides/cryptodevs/scheduler.rst | 4 ----
> doc/guides/cryptodevs/snow3g.rst | 4 +---
> doc/guides/cryptodevs/zuc.rst | 4 +---
> doc/guides/prog_guide/cryptodev_lib.rst | 9 ++-------
> doc/guides/rel_notes/deprecation.rst | 3 ---
> doc/guides/rel_notes/release_18_08.rst | 3 ++-
> drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 5 +----
> drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c | 1 -
> drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h | 2 --
> drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 5 +----
> drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 1 -
> .../crypto/aesni_mb/rte_aesni_mb_pmd_private.h | 2 --
> drivers/crypto/armv8/rte_armv8_pmd.c | 5 +----
> drivers/crypto/armv8/rte_armv8_pmd_ops.c | 1 -
> drivers/crypto/armv8/rte_armv8_pmd_private.h | 2 --
> drivers/crypto/ccp/ccp_pmd_ops.c | 1 -
> drivers/crypto/ccp/ccp_pmd_private.h | 1 -
> drivers/crypto/ccp/rte_ccp_pmd.c | 16 +---------------
> drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 3 ++-
> drivers/crypto/dpaa_sec/dpaa_sec.c | 1 -
> drivers/crypto/dpaa_sec/dpaa_sec.h | 1 +
> drivers/crypto/kasumi/rte_kasumi_pmd.c | 5 +----
> drivers/crypto/kasumi/rte_kasumi_pmd_ops.c | 1 -
> drivers/crypto/kasumi/rte_kasumi_pmd_private.h | 2 --
> drivers/crypto/mvsam/rte_mrvl_pmd.c | 6 ------
> drivers/crypto/mvsam/rte_mrvl_pmd_ops.c | 1 -
> drivers/crypto/mvsam/rte_mrvl_pmd_private.h | 1 -
> drivers/crypto/null/null_crypto_pmd.c | 3 ---
> drivers/crypto/null/null_crypto_pmd_ops.c | 1 -
> drivers/crypto/null/null_crypto_pmd_private.h | 1 -
> drivers/crypto/openssl/rte_openssl_pmd.c | 3 ---
> drivers/crypto/openssl/rte_openssl_pmd_ops.c | 1 -
> drivers/crypto/openssl/rte_openssl_pmd_private.h | 2 --
> drivers/crypto/qat/qat_crypto.c | 1 -
> drivers/crypto/qat/qat_crypto.h | 2 --
> drivers/crypto/qat/rte_qat_cryptodev.c | 4 +---
> drivers/crypto/scheduler/scheduler_pmd.c | 13 +------------
> drivers/crypto/scheduler/scheduler_pmd_ops.c | 7 -------
> drivers/crypto/snow3g/rte_snow3g_pmd.c | 3 ---
> drivers/crypto/snow3g/rte_snow3g_pmd_ops.c | 1 -
> drivers/crypto/snow3g/rte_snow3g_pmd_private.h | 2 --
> drivers/crypto/virtio/virtio_cryptodev.c | 3 ---
> drivers/crypto/zuc/rte_zuc_pmd.c | 5 +----
> drivers/crypto/zuc/rte_zuc_pmd_ops.c | 1 -
> drivers/crypto/zuc/rte_zuc_pmd_private.h | 2 --
> lib/librte_cryptodev/rte_cryptodev.h | 5 -----
> lib/librte_cryptodev/rte_cryptodev_pmd.c | 12 ++----------
> lib/librte_cryptodev/rte_cryptodev_pmd.h | 4 ----
> test/test/test_cryptodev.c | 13 +++++++------
> 61 files changed, 30 insertions(+), 206 deletions(-)
>
> diff --git a/config/common_base b/config/common_base
> index 6b0d1cbbb..db6dec335 100644
> --- a/config/common_base
> +++ b/config/common_base
> @@ -473,14 +473,12 @@ CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO_DEBUG=n
> # Compile NXP DPAA2 crypto sec driver for CAAM HW
> #
> CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC=n
> -CONFIG_RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS=2048
>
> #
> # NXP DPAA caam - crypto driver
> #
> CONFIG_RTE_LIBRTE_PMD_DPAA_SEC=n
> CONFIG_RTE_LIBRTE_DPAA_MAX_CRYPTODEV=4
> -CONFIG_RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS=2048
>
> #
> # Compile PMD for QuickAssist based devices
> @@ -490,11 +488,6 @@ CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_INIT=n
> CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_TX=n
> CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_RX=n
> CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_DRIVER=n
> -#
> -# Number of sessions to create in the session memory pool
> -# on a single QuickAssist device.
> -#
> -CONFIG_RTE_QAT_PMD_MAX_NB_SESSIONS=2048
>
> #
> # Compile PMD for virtio crypto devices
> @@ -504,11 +497,6 @@ CONFIG_RTE_LIBRTE_PMD_VIRTIO_CRYPTO=y
> # Number of maximum virtio crypto devices
> #
> CONFIG_RTE_MAX_VIRTIO_CRYPTO=32
> -#
> -# Number of sessions to create in the session memory pool
> -# on a single virtio crypto device.
> -#
> -CONFIG_RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS=1024
>
> #
> # Compile PMD for AESNI backed device
> diff --git a/config/rte_config.h b/config/rte_config.h
> index a1d01759e..7261d28d6 100644
> --- a/config/rte_config.h
> +++ b/config/rte_config.h
> @@ -85,23 +85,9 @@
>
> /****** driver defines ********/
>
> -/*
> - * Number of sessions to create in the session memory pool
> - * on a single instance of crypto HW device.
> - */
> -/* QuickAssist device */
> -#define RTE_QAT_PMD_MAX_NB_SESSIONS 2048
> -
> /* virtio crypto defines */
> -#define RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS 1024
> #define RTE_MAX_VIRTIO_CRYPTO 32
>
> -/* DPAA2_SEC */
> -#define RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS 2048
> -
> -/* DPAA_SEC */
> -#define RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS 2048
> -
> /* DPAA SEC max cryptodev devices*/
> #define RTE_LIBRTE_DPAA_MAX_CRYPTODEV 4
>
> diff --git a/doc/guides/cryptodevs/aesni_gcm.rst b/doc/guides/cryptodevs/aesni_gcm.rst
> index 01590e850..2cfd1e9f7 100644
> --- a/doc/guides/cryptodevs/aesni_gcm.rst
> +++ b/doc/guides/cryptodevs/aesni_gcm.rst
> @@ -83,11 +83,9 @@ The following parameters (all optional) can be provided in the previous two call
>
> * max_nb_queue_pairs: Specify the maximum number of queue pairs in the device (8 by default).
>
> -* max_nb_sessions: Specify the maximum number of sessions that can be created (2048 by default).
> -
> Example:
>
> .. code-block:: console
>
> - ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_aesni_gcm,socket_id=0,max_nb_sessions=128" \
> + ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_aesni_gcm,socket_id=0" \
> -- -p 1 --cdev SW --chain AEAD --aead_algo "aes-gcm"
> diff --git a/doc/guides/cryptodevs/aesni_mb.rst b/doc/guides/cryptodevs/aesni_mb.rst
> index 236828c0a..a0602a10d 100644
> --- a/doc/guides/cryptodevs/aesni_mb.rst
> +++ b/doc/guides/cryptodevs/aesni_mb.rst
> @@ -106,13 +106,11 @@ The following parameters (all optional) can be provided in the previous two call
>
> * max_nb_queue_pairs: Specify the maximum number of queue pairs in the device (8 by default).
>
> -* max_nb_sessions: Specify the maximum number of sessions that can be created (2048 by default).
> -
> Example:
>
> .. code-block:: console
>
> - ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_aesni_mb,socket_id=0,max_nb_sessions=128" \
> + ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_aesni_mb,socket_id=0" \
> -- -p 1 --cdev SW --chain CIPHER_HASH --cipher_algo "aes-cbc" --auth_algo "sha1-hmac"
>
> Extra notes
> diff --git a/doc/guides/cryptodevs/armv8.rst b/doc/guides/cryptodevs/armv8.rst
> index 725398daf..4adf3cf40 100644
> --- a/doc/guides/cryptodevs/armv8.rst
> +++ b/doc/guides/cryptodevs/armv8.rst
> @@ -64,7 +64,6 @@ For performance test cryptodev_sw_armv8_perftest can be used.
> Limitations
> -----------
>
> -* Maximum number of sessions is 2048.
> * Only chained operations are supported.
> * AES-128-CBC is the only supported cipher variant.
> * Cipher input data has to be a multiple of 16 bytes.
> diff --git a/doc/guides/cryptodevs/ccp.rst b/doc/guides/cryptodevs/ccp.rst
> index 034d20367..d577d5a1c 100644
> --- a/doc/guides/cryptodevs/ccp.rst
> +++ b/doc/guides/cryptodevs/ccp.rst
> @@ -101,8 +101,6 @@ The following parameters (all optional) can be provided in the previous two call
>
> * max_nb_queue_pairs: Specify the maximum number of queue pairs in the device.
>
> -* max_nb_sessions: Specify the maximum number of sessions that can be created (2048 by default).
> -
> * ccp_auth_opt: Specify authentication operations to perform on CPU using openssl APIs.
>
> To validate ccp pmd, l2fwd-crypto example can be used with following command:
> diff --git a/doc/guides/cryptodevs/dpaa2_sec.rst b/doc/guides/cryptodevs/dpaa2_sec.rst
> index 3ea24c8aa..990befeb7 100644
> --- a/doc/guides/cryptodevs/dpaa2_sec.rst
> +++ b/doc/guides/cryptodevs/dpaa2_sec.rst
> @@ -200,11 +200,6 @@ Please note that enabling debugging options may affect system performance.
> By default it is only enabled in defconfig_arm64-dpaa2-* config.
> Toggle compilation of the ``librte_pmd_dpaa2_sec`` driver.
>
> -* ``CONFIG_RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS``
> - By default it is set as 2048 in defconfig_arm64-dpaa2-* config.
> - It indicates Number of sessions to create in the session memory pool
> - on a single DPAA2 SEC device.
> -
> Installations
> -------------
> To compile the DPAA2_SEC PMD for Linux arm64 gcc target, run the
> diff --git a/doc/guides/cryptodevs/dpaa_sec.rst b/doc/guides/cryptodevs/dpaa_sec.rst
> index c14d6d7b1..c5097a84f 100644
> --- a/doc/guides/cryptodevs/dpaa_sec.rst
> +++ b/doc/guides/cryptodevs/dpaa_sec.rst
> @@ -145,11 +145,6 @@ Please note that enabling debugging options may affect system performance.
> By default it is only enabled in defconfig_arm64-dpaa-* config.
> Toggle compilation of the ``librte_pmd_dpaa_sec`` driver.
>
> -* ``CONFIG_RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS``
> - By default it is set as 2048 in defconfig_arm64-dpaa-* config.
> - It indicates Number of sessions to create in the session memory pool
> - on a single DPAA SEC device.
> -
> Installations
> -------------
> To compile the DPAA_SEC PMD for Linux arm64 gcc target, run the
> diff --git a/doc/guides/cryptodevs/kasumi.rst b/doc/guides/cryptodevs/kasumi.rst
> index 2265eee4e..74bc4d840 100644
> --- a/doc/guides/cryptodevs/kasumi.rst
> +++ b/doc/guides/cryptodevs/kasumi.rst
> @@ -87,13 +87,11 @@ The following parameters (all optional) can be provided in the previous two call
>
> * max_nb_queue_pairs: Specify the maximum number of queue pairs in the device (8 by default).
>
> -* max_nb_sessions: Specify the maximum number of sessions that can be created (2048 by default).
> -
> Example:
>
> .. code-block:: console
>
> - ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_kasumi,socket_id=0,max_nb_sessions=128" \
> + ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_kasumi,socket_id=0" \
> -- -p 1 --cdev SW --chain CIPHER_ONLY --cipher_algo "kasumi-f8"
>
> Extra notes on KASUMI F9
> diff --git a/doc/guides/cryptodevs/mvsam.rst b/doc/guides/cryptodevs/mvsam.rst
> index fd418c264..b91bb0fb6 100644
> --- a/doc/guides/cryptodevs/mvsam.rst
> +++ b/doc/guides/cryptodevs/mvsam.rst
> @@ -115,7 +115,6 @@ loaded:
> The following parameters (all optional) are exported by the driver:
>
> * max_nb_queue_pairs: maximum number of queue pairs in the device (8 by default).
> -* max_nb_sessions: maximum number of sessions that can be created (2048 by default).
> * socket_id: socket on which to allocate the device resources on.
>
> l2fwd-crypto example application can be used to verify MVSAM CRYPTO PMD
> diff --git a/doc/guides/cryptodevs/null.rst b/doc/guides/cryptodevs/null.rst
> index c980e0ac8..ca39fe444 100644
> --- a/doc/guides/cryptodevs/null.rst
> +++ b/doc/guides/cryptodevs/null.rst
> @@ -61,11 +61,9 @@ The following parameters (all optional) can be provided in the previous two call
>
> * max_nb_queue_pairs: Specify the maximum number of queue pairs in the device (8 by default).
>
> -* max_nb_sessions: Specify the maximum number of sessions that can be created (2048 by default).
> -
> Example:
>
> .. code-block:: console
>
> - ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_null,socket_id=0,max_nb_sessions=128" \
> + ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_null,socket_id=0" \
> -- -p 1 --cdev SW --chain CIPHER_ONLY --cipher_algo "null"
> diff --git a/doc/guides/cryptodevs/openssl.rst b/doc/guides/cryptodevs/openssl.rst
> index 427fc807c..153ad0657 100644
> --- a/doc/guides/cryptodevs/openssl.rst
> +++ b/doc/guides/cryptodevs/openssl.rst
> @@ -98,7 +98,6 @@ To verify real traffic l2fwd-crypto example can be used with this command:
> Limitations
> -----------
>
> -* Maximum number of sessions is 2048.
> * Chained mbufs are supported only for source mbuf (destination must be
> contiguous).
> * Hash only is not supported for GCM and GMAC.
> diff --git a/doc/guides/cryptodevs/scheduler.rst b/doc/guides/cryptodevs/scheduler.rst
> index d67894d55..e266ec5a3 100644
> --- a/doc/guides/cryptodevs/scheduler.rst
> +++ b/doc/guides/cryptodevs/scheduler.rst
> @@ -58,10 +58,6 @@ two calls:
> to be allocated (by default, socket_id will be the socket where the core
> that is creating the PMD is running on).
>
> -* max_nb_sessions: Specify the maximum number of sessions that can be
> - created. This value may be overwritten internally if there are too
> - many devices are attached.
> -
> * slave: If a cryptodev has been initialized with specific name, it can be
> attached to the scheduler using this parameter, simply filling the name
> here. Multiple cryptodevs can be attached initially by presenting this
> diff --git a/doc/guides/cryptodevs/snow3g.rst b/doc/guides/cryptodevs/snow3g.rst
> index 7cba712c1..e0b9a73f7 100644
> --- a/doc/guides/cryptodevs/snow3g.rst
> +++ b/doc/guides/cryptodevs/snow3g.rst
> @@ -79,11 +79,9 @@ The following parameters (all optional) can be provided in the previous two call
>
> * max_nb_queue_pairs: Specify the maximum number of queue pairs in the device (8 by default).
>
> -* max_nb_sessions: Specify the maximum number of sessions that can be created (2048 by default).
> -
> Example:
>
> .. code-block:: console
>
> - ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_snow3g,socket_id=0,max_nb_sessions=128" \
> + ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_snow3g,socket_id=0" \
> -- -p 1 --cdev SW --chain CIPHER_ONLY --cipher_algo "snow3g-uea2"
> diff --git a/doc/guides/cryptodevs/zuc.rst b/doc/guides/cryptodevs/zuc.rst
> index e38989968..7bebbb48b 100644
> --- a/doc/guides/cryptodevs/zuc.rst
> +++ b/doc/guides/cryptodevs/zuc.rst
> @@ -79,11 +79,9 @@ The following parameters (all optional) can be provided in the previous two call
>
> * max_nb_queue_pairs: Specify the maximum number of queue pairs in the device (8 by default).
>
> -* max_nb_sessions: Specify the maximum number of sessions that can be created (2048 by default).
> -
> Example:
>
> .. code-block:: console
>
> - ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_zuc,socket_id=0,max_nb_sessions=128" \
> + ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_zuc,socket_id=0" \
> -- -p 1 --cdev SW --chain CIPHER_ONLY --cipher_algo "zuc-eea3"
> diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst
> index d02bb7514..c83184fe9 100644
> --- a/doc/guides/prog_guide/cryptodev_lib.rst
> +++ b/doc/guides/prog_guide/cryptodev_lib.rst
> @@ -41,7 +41,7 @@ From the command line using the --vdev EAL option
>
> .. code-block:: console
>
> - --vdev 'crypto_aesni_mb0,max_nb_queue_pairs=2,max_nb_sessions=1024,socket_id=0'
> + --vdev 'crypto_aesni_mb0,max_nb_queue_pairs=2,socket_id=0'
>
> .. Note::
>
> @@ -57,12 +57,11 @@ Our using the rte_vdev_init API within the application code.
> .. code-block:: c
>
> rte_vdev_init("crypto_aesni_mb",
> - "max_nb_queue_pairs=2,max_nb_sessions=1024,socket_id=0")
> + "max_nb_queue_pairs=2,socket_id=0")
>
> All virtual Crypto devices support the following initialization parameters:
>
> * ``max_nb_queue_pairs`` - maximum number of queue pairs supported by the device.
> -* ``max_nb_sessions`` - maximum number of sessions supported by the device
> * ``socket_id`` - socket on which to allocate the device resources on.
>
>
> @@ -276,10 +275,6 @@ relevant information for the device.
> const struct rte_cryptodev_capabilities *capabilities;
>
> unsigned max_nb_queue_pairs;
> -
> - struct {
> - unsigned max_nb_sessions;
> - } sym;
> };
>
>
> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> index b71080bb8..dc014da21 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -101,9 +101,6 @@ Deprecation Notices
> * cryptodev: The following changes will be made in the library
> for 18.08:
>
> - - Removal of ``sym`` structure in ``rte_cryptodev_info`` structure,
> - containing fields not relevant anymore since the session mempool
> - is not internal in the crypto device anymore.
> - Functions ``rte_cryptodev_queue_pair_attach_sym_session()`` and
> ``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
> 18.05 and removed in 18.08, as there are no drivers doing anything useful
> diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
> index ba710e845..a6f31713a 100644
> --- a/doc/guides/rel_notes/release_18_08.rst
> +++ b/doc/guides/rel_notes/release_18_08.rst
> @@ -56,7 +56,8 @@ API Changes
> =========================================================
>
> * cryptodev: In struct ``struct rte_cryptodev_info``, field ``rte_pci_device *pci_dev``
> - has been replaced with field ``struct rte_device *device``.
> + has been replaced with field ``struct rte_device *device`` and
> + field ``sym`` has been removed.
>
>
> ABI Changes
> diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
> index 80360dd9c..cd5b1952b 100644
> --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
> +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
> @@ -513,7 +513,6 @@ aesni_gcm_create(const char *name,
> internals->vector_mode = vector_mode;
>
> internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
> - internals->max_nb_sessions = init_params->max_nb_sessions;
>
> return 0;
> }
> @@ -525,8 +524,7 @@ aesni_gcm_probe(struct rte_vdev_device *vdev)
> "",
> sizeof(struct aesni_gcm_private),
> rte_socket_id(),
> - RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
> - RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
> + RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
> };
> const char *name;
> const char *input_args;
> @@ -568,7 +566,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_GCM_PMD, aesni_gcm_pmd_drv);
> RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_AESNI_GCM_PMD, cryptodev_aesni_gcm_pmd);
> RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_GCM_PMD,
> "max_nb_queue_pairs=<int> "
> - "max_nb_sessions=<int> "
> "socket_id=<int>");
> RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_gcm_crypto_drv, aesni_gcm_pmd_drv.driver,
> cryptodev_driver_id);
> diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
> index 6f542137c..b05122c1b 100644
> --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
> +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
> @@ -143,7 +143,6 @@ aesni_gcm_pmd_info_get(struct rte_cryptodev *dev,
> dev_info->capabilities = aesni_gcm_pmd_capabilities;
>
> dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
> - dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
> }
> }
>
> diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
> index 3d60583b0..b496377dd 100644
> --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
> +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
> @@ -39,8 +39,6 @@ struct aesni_gcm_private {
> /**< Vector mode */
> unsigned max_nb_queue_pairs;
> /**< Max number of queue pairs supported by device */
> - unsigned max_nb_sessions;
> - /**< Max number of sessions supported by device */
> };
>
> struct aesni_gcm_qp {
> diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
> index bb35c66ab..bb647f736 100644
> --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
> +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
> @@ -885,7 +885,6 @@ cryptodev_aesni_mb_create(const char *name,
>
> internals->vector_mode = vector_mode;
> internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
> - internals->max_nb_sessions = init_params->max_nb_sessions;
>
> return 0;
> }
> @@ -897,8 +896,7 @@ cryptodev_aesni_mb_probe(struct rte_vdev_device *vdev)
> "",
> sizeof(struct aesni_mb_private),
> rte_socket_id(),
> - RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
> - RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
> + RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
> };
> const char *name, *args;
> int retval;
> @@ -947,7 +945,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_MB_PMD, cryptodev_aesni_mb_pmd_drv);
> RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_AESNI_MB_PMD, cryptodev_aesni_mb_pmd);
> RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_MB_PMD,
> "max_nb_queue_pairs=<int> "
> - "max_nb_sessions=<int> "
> "socket_id=<int>");
> RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_mb_crypto_drv,
> cryptodev_aesni_mb_pmd_drv.driver,
> diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
> index 01530523f..7c735f5dc 100644
> --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
> +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
> @@ -387,7 +387,6 @@ aesni_mb_pmd_info_get(struct rte_cryptodev *dev,
> dev_info->feature_flags = dev->feature_flags;
> dev_info->capabilities = aesni_mb_pmd_capabilities;
> dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
> - dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
> }
> }
>
> diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h
> index a33b2f695..9520cdf9c 100644
> --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h
> +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h
> @@ -124,8 +124,6 @@ struct aesni_mb_private {
> /**< CPU vector instruction set mode */
> unsigned max_nb_queue_pairs;
> /**< Max number of queue pairs supported by device */
> - unsigned max_nb_sessions;
> - /**< Max number of sessions supported by device */
> };
>
> /** AESNI Multi buffer queue pair */
> diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
> index fbb08f729..db0d8a2a9 100644
> --- a/drivers/crypto/armv8/rte_armv8_pmd.c
> +++ b/drivers/crypto/armv8/rte_armv8_pmd.c
> @@ -779,7 +779,6 @@ cryptodev_armv8_crypto_create(const char *name,
> internals = dev->data->dev_private;
>
> internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
> - internals->max_nb_sessions = init_params->max_nb_sessions;
>
> return 0;
>
> @@ -800,8 +799,7 @@ cryptodev_armv8_crypto_init(struct rte_vdev_device *vdev)
> "",
> sizeof(struct armv8_crypto_private),
> rte_socket_id(),
> - RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
> - RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
> + RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
> };
> const char *name;
> const char *input_args;
> @@ -848,7 +846,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_ARMV8_PMD, armv8_crypto_pmd_drv);
> RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_ARMV8_PMD, cryptodev_armv8_pmd);
> RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ARMV8_PMD,
> "max_nb_queue_pairs=<int> "
> - "max_nb_sessions=<int> "
> "socket_id=<int>");
> RTE_PMD_REGISTER_CRYPTO_DRIVER(armv8_crypto_drv, armv8_crypto_pmd_drv.driver,
> cryptodev_driver_id);
> diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
> index c64aef09f..d31ef7d66 100644
> --- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
> +++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
> @@ -154,7 +154,6 @@ armv8_crypto_pmd_info_get(struct rte_cryptodev *dev,
> dev_info->feature_flags = dev->feature_flags;
> dev_info->capabilities = armv8_crypto_pmd_capabilities;
> dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
> - dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
> }
> }
>
> diff --git a/drivers/crypto/armv8/rte_armv8_pmd_private.h b/drivers/crypto/armv8/rte_armv8_pmd_private.h
> index b8966e934..7feb021db 100644
> --- a/drivers/crypto/armv8/rte_armv8_pmd_private.h
> +++ b/drivers/crypto/armv8/rte_armv8_pmd_private.h
> @@ -106,8 +106,6 @@ typedef void (*crypto_key_sched_t)(uint8_t *, const uint8_t *);
> struct armv8_crypto_private {
> unsigned int max_nb_qpairs;
> /**< Max number of queue pairs */
> - unsigned int max_nb_sessions;
> - /**< Max number of sessions */
> };
>
> /** ARMv8 crypto queue pair */
> diff --git a/drivers/crypto/ccp/ccp_pmd_ops.c b/drivers/crypto/ccp/ccp_pmd_ops.c
> index 80b75ccb0..7e383feed 100644
> --- a/drivers/crypto/ccp/ccp_pmd_ops.c
> +++ b/drivers/crypto/ccp/ccp_pmd_ops.c
> @@ -624,7 +624,6 @@ ccp_pmd_info_get(struct rte_cryptodev *dev,
> if (internals->auth_opt == 1)
> dev_info->capabilities = ccp_crypto_cap_complete;
> dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
> - dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
> }
> }
>
> diff --git a/drivers/crypto/ccp/ccp_pmd_private.h b/drivers/crypto/ccp/ccp_pmd_private.h
> index f4498048f..79752f687 100644
> --- a/drivers/crypto/ccp/ccp_pmd_private.h
> +++ b/drivers/crypto/ccp/ccp_pmd_private.h
> @@ -40,7 +40,6 @@
> /* private data structure for each CCP crypto device */
> struct ccp_private {
> unsigned int max_nb_qpairs; /**< Max number of queue pairs */
> - unsigned int max_nb_sessions; /**< Max number of sessions */
> uint8_t crypto_num_dev; /**< Number of working crypto devices */
> bool auth_opt; /**< Authentication offload option */
> struct ccp_device *last_dev; /**< Last working crypto device */
> diff --git a/drivers/crypto/ccp/rte_ccp_pmd.c b/drivers/crypto/ccp/rte_ccp_pmd.c
> index 2061f465e..d70640f6d 100644
> --- a/drivers/crypto/ccp/rte_ccp_pmd.c
> +++ b/drivers/crypto/ccp/rte_ccp_pmd.c
> @@ -30,14 +30,12 @@ struct ccp_pmd_init_params {
> #define CCP_CRYPTODEV_PARAM_NAME ("name")
> #define CCP_CRYPTODEV_PARAM_SOCKET_ID ("socket_id")
> #define CCP_CRYPTODEV_PARAM_MAX_NB_QP ("max_nb_queue_pairs")
> -#define CCP_CRYPTODEV_PARAM_MAX_NB_SESS ("max_nb_sessions")
> #define CCP_CRYPTODEV_PARAM_AUTH_OPT ("ccp_auth_opt")
>
> const char *ccp_pmd_valid_params[] = {
> CCP_CRYPTODEV_PARAM_NAME,
> CCP_CRYPTODEV_PARAM_SOCKET_ID,
> CCP_CRYPTODEV_PARAM_MAX_NB_QP,
> - CCP_CRYPTODEV_PARAM_MAX_NB_SESS,
> CCP_CRYPTODEV_PARAM_AUTH_OPT,
> };
>
> @@ -124,13 +122,6 @@ ccp_pmd_parse_input_args(struct ccp_pmd_init_params *params,
> if (ret < 0)
> goto free_kvlist;
>
> - ret = rte_kvargs_process(kvlist,
> - CCP_CRYPTODEV_PARAM_MAX_NB_SESS,
> - &parse_integer_arg,
> - ¶ms->def_p.max_nb_sessions);
> - if (ret < 0)
> - goto free_kvlist;
> -
> ret = rte_kvargs_process(kvlist,
> CCP_CRYPTODEV_PARAM_SOCKET_ID,
> &parse_integer_arg,
> @@ -334,7 +325,6 @@ cryptodev_ccp_create(const char *name,
> internals = dev->data->dev_private;
>
> internals->max_nb_qpairs = init_params->def_p.max_nb_queue_pairs;
> - internals->max_nb_sessions = init_params->def_p.max_nb_sessions;
> internals->auth_opt = init_params->auth_opt;
> internals->crypto_num_dev = cryptodev_cnt;
>
> @@ -359,8 +349,7 @@ cryptodev_ccp_probe(struct rte_vdev_device *vdev)
> "",
> sizeof(struct ccp_private),
> rte_socket_id(),
> - CCP_PMD_MAX_QUEUE_PAIRS,
> - RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
> + CCP_PMD_MAX_QUEUE_PAIRS
> },
> .auth_opt = CCP_PMD_AUTH_OPT_CCP,
> };
> @@ -382,8 +371,6 @@ cryptodev_ccp_probe(struct rte_vdev_device *vdev)
> init_params.def_p.socket_id);
> RTE_LOG(INFO, PMD, "Max number of queue pairs = %d\n",
> init_params.def_p.max_nb_queue_pairs);
> - RTE_LOG(INFO, PMD, "Max number of sessions = %d\n",
> - init_params.def_p.max_nb_sessions);
> RTE_LOG(INFO, PMD, "Authentication offload to %s\n",
> ((init_params.auth_opt == 0) ? "CCP" : "CPU"));
>
> @@ -404,7 +391,6 @@ static struct cryptodev_driver ccp_crypto_drv;
> RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_CCP_PMD, cryptodev_ccp_pmd_drv);
> RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_CCP_PMD,
> "max_nb_queue_pairs=<int> "
> - "max_nb_sessions=<int> "
> "socket_id=<int> "
> "ccp_auth_opt=<int>");
> RTE_PMD_REGISTER_CRYPTO_DRIVER(ccp_crypto_drv, cryptodev_ccp_pmd_drv.driver,
> diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
> index 56fa969d3..16ab0b6a6 100644
> --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
> +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
> @@ -55,6 +55,8 @@ typedef uint64_t dma_addr_t;
> #define SEC_FLC_DHR_OUTBOUND -114
> #define SEC_FLC_DHR_INBOUND 0
>
> +#define RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS 2048
> +
> enum rta_sec_era rta_sec_era = RTA_SEC_ERA_8;
>
> static uint8_t cryptodev_driver_id;
> @@ -2626,7 +2628,6 @@ dpaa2_sec_dev_infos_get(struct rte_cryptodev *dev,
> info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
> info->feature_flags = dev->feature_flags;
> info->capabilities = dpaa2_sec_capabilities;
> - info->sym.max_nb_sessions = internals->max_nb_sessions;
> info->driver_id = cryptodev_driver_id;
> }
> }
> diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
> index 73cae483b..909583bd0 100644
> --- a/drivers/crypto/dpaa_sec/dpaa_sec.c
> +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
> @@ -2214,7 +2214,6 @@ dpaa_sec_dev_infos_get(struct rte_cryptodev *dev,
> info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
> info->feature_flags = dev->feature_flags;
> info->capabilities = dpaa_sec_capabilities;
> - info->sym.max_nb_sessions = internals->max_nb_sessions;
> info->driver_id = cryptodev_driver_id;
> }
> }
> diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.h b/drivers/crypto/dpaa_sec/dpaa_sec.h
> index e15e373fd..91df68009 100644
> --- a/drivers/crypto/dpaa_sec/dpaa_sec.h
> +++ b/drivers/crypto/dpaa_sec/dpaa_sec.h
> @@ -137,6 +137,7 @@ struct dpaa_sec_qp {
> };
>
> #define RTE_DPAA_MAX_NB_SEC_QPS 8
> +#define RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS 2048
> #define RTE_DPAA_MAX_RX_QUEUE RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS
> #define DPAA_MAX_DEQUEUE_NUM_FRAMES 63
>
> diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c
> index 205dc1de7..65376b211 100644
> --- a/drivers/crypto/kasumi/rte_kasumi_pmd.c
> +++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c
> @@ -555,7 +555,6 @@ cryptodev_kasumi_create(const char *name,
> internals = dev->data->dev_private;
>
> internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
> - internals->max_nb_sessions = init_params->max_nb_sessions;
>
> return 0;
> init_error:
> @@ -573,8 +572,7 @@ cryptodev_kasumi_probe(struct rte_vdev_device *vdev)
> "",
> sizeof(struct kasumi_private),
> rte_socket_id(),
> - RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
> - RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
> + RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
> };
> const char *name;
> const char *input_args;
> @@ -617,7 +615,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_KASUMI_PMD, cryptodev_kasumi_pmd_drv);
> RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_KASUMI_PMD, cryptodev_kasumi_pmd);
> RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_KASUMI_PMD,
> "max_nb_queue_pairs=<int> "
> - "max_nb_sessions=<int> "
> "socket_id=<int>");
> RTE_PMD_REGISTER_CRYPTO_DRIVER(kasumi_crypto_drv,
> cryptodev_kasumi_pmd_drv.driver, cryptodev_driver_id);
> diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
> index a388dbb63..284669341 100644
> --- a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
> +++ b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
> @@ -126,7 +126,6 @@ kasumi_pmd_info_get(struct rte_cryptodev *dev,
> if (dev_info != NULL) {
> dev_info->driver_id = dev->driver_id;
> dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
> - dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
> dev_info->feature_flags = dev->feature_flags;
> dev_info->capabilities = kasumi_pmd_capabilities;
> }
> diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_private.h b/drivers/crypto/kasumi/rte_kasumi_pmd_private.h
> index a397bee65..2b12818bc 100644
> --- a/drivers/crypto/kasumi/rte_kasumi_pmd_private.h
> +++ b/drivers/crypto/kasumi/rte_kasumi_pmd_private.h
> @@ -36,8 +36,6 @@
> struct kasumi_private {
> unsigned max_nb_queue_pairs;
> /**< Max number of queue pairs supported by device */
> - unsigned max_nb_sessions;
> - /**< Max number of sessions supported by device */
> };
>
> /** KASUMI buffer queue pair */
> diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c
> index 1b6029a56..822b6cac7 100644
> --- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
> +++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
> @@ -719,7 +719,6 @@ cryptodev_mrvl_crypto_create(const char *name,
> internals = dev->data->dev_private;
>
> internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
> - internals->max_nb_sessions = init_params->max_nb_sessions;
>
> /*
> * ret == -EEXIST is correct, it means DMA
> @@ -734,8 +733,6 @@ cryptodev_mrvl_crypto_create(const char *name,
> "DMA memory has been already initialized by a different driver.");
> }
>
> - sam_params.max_num_sessions = internals->max_nb_sessions;
This will not fly since library maintains separate list of sessions.
We have to initialize this number to something sane. Since we cannot
get it from userspace perhaps make that compile-time configurable
by adding separate CONFIG_?
> -
> return sam_init(&sam_params);
>
> init_error:
> @@ -766,8 +763,6 @@ cryptodev_mrvl_crypto_init(struct rte_vdev_device *vdev)
>
> init_params.private_data_size = sizeof(struct mrvl_crypto_private);
> init_params.max_nb_queue_pairs = sam_get_num_inst() * SAM_HW_RING_NUM;
> - init_params.max_nb_sessions =
> - RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS;
> init_params.socket_id = rte_socket_id();
>
> ret = rte_cryptodev_pmd_parse_input_args(&init_params, args);
> @@ -823,7 +818,6 @@ static struct cryptodev_driver mrvl_crypto_drv;
> RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_MRVL_PMD, cryptodev_mrvl_pmd_drv);
> RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_MRVL_PMD,
> "max_nb_queue_pairs=<int> "
> - "max_nb_sessions=<int> "
> "socket_id=<int>");
> RTE_PMD_REGISTER_CRYPTO_DRIVER(mrvl_crypto_drv, cryptodev_mrvl_pmd_drv.driver,
> cryptodev_driver_id);
> diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
> index 3f8de37b7..944a415cf 100644
> --- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
> +++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
> @@ -471,7 +471,6 @@ mrvl_crypto_pmd_info_get(struct rte_cryptodev *dev,
> dev_info->feature_flags = dev->feature_flags;
> dev_info->capabilities = mrvl_crypto_pmd_capabilities;
> dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
> - dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
> }
> }
>
> diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_private.h b/drivers/crypto/mvsam/rte_mrvl_pmd_private.h
> index c16d95b46..bb528493a 100644
> --- a/drivers/crypto/mvsam/rte_mrvl_pmd_private.h
> +++ b/drivers/crypto/mvsam/rte_mrvl_pmd_private.h
> @@ -51,7 +51,6 @@ enum mrvl_crypto_chain_order {
> /** Private data structure for each crypto device. */
> struct mrvl_crypto_private {
> unsigned int max_nb_qpairs; /**< Max number of queue pairs */
> - unsigned int max_nb_sessions; /**< Max number of sessions */
> };
>
> /** MRVL crypto queue pair structure. */
> diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
> index 052b6546c..a8499cf94 100644
> --- a/drivers/crypto/null/null_crypto_pmd.c
> +++ b/drivers/crypto/null/null_crypto_pmd.c
> @@ -182,7 +182,6 @@ cryptodev_null_create(const char *name,
> internals = dev->data->dev_private;
>
> internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
> - internals->max_nb_sessions = init_params->max_nb_sessions;
>
> return 0;
> }
> @@ -196,7 +195,6 @@ cryptodev_null_probe(struct rte_vdev_device *dev)
> sizeof(struct null_crypto_private),
> rte_socket_id(),
> RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
> - RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
> };
> const char *name, *args;
> int retval;
> @@ -245,7 +243,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_NULL_PMD, cryptodev_null_pmd_drv);
> RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_NULL_PMD, cryptodev_null_pmd);
> RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_NULL_PMD,
> "max_nb_queue_pairs=<int> "
> - "max_nb_sessions=<int> "
> "socket_id=<int>");
> RTE_PMD_REGISTER_CRYPTO_DRIVER(null_crypto_drv, cryptodev_null_pmd_drv.driver,
> cryptodev_driver_id);
> diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
> index f8e5f61f1..3ca1370e8 100644
> --- a/drivers/crypto/null/null_crypto_pmd_ops.c
> +++ b/drivers/crypto/null/null_crypto_pmd_ops.c
> @@ -121,7 +121,6 @@ null_crypto_pmd_info_get(struct rte_cryptodev *dev,
> if (dev_info != NULL) {
> dev_info->driver_id = dev->driver_id;
> dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
> - dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
> dev_info->feature_flags = dev->feature_flags;
> dev_info->capabilities = null_crypto_pmd_capabilities;
> }
> diff --git a/drivers/crypto/null/null_crypto_pmd_private.h b/drivers/crypto/null/null_crypto_pmd_private.h
> index 0fd133625..d7d769f3d 100644
> --- a/drivers/crypto/null/null_crypto_pmd_private.h
> +++ b/drivers/crypto/null/null_crypto_pmd_private.h
> @@ -32,7 +32,6 @@
> /** private data structure for each NULL crypto device */
> struct null_crypto_private {
> unsigned max_nb_qpairs; /**< Max number of queue pairs */
> - unsigned max_nb_sessions; /**< Max number of sessions */
> };
>
> /** NULL crypto queue pair */
> diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
> index 93c6d7e5d..965cab9f2 100644
> --- a/drivers/crypto/openssl/rte_openssl_pmd.c
> +++ b/drivers/crypto/openssl/rte_openssl_pmd.c
> @@ -1666,7 +1666,6 @@ cryptodev_openssl_create(const char *name,
> internals = dev->data->dev_private;
>
> internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
> - internals->max_nb_sessions = init_params->max_nb_sessions;
>
> return 0;
>
> @@ -1687,7 +1686,6 @@ cryptodev_openssl_probe(struct rte_vdev_device *vdev)
> sizeof(struct openssl_private),
> rte_socket_id(),
> RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
> - RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
> };
> const char *name;
> const char *input_args;
> @@ -1731,7 +1729,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_OPENSSL_PMD,
> cryptodev_openssl_pmd_drv);
> RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_OPENSSL_PMD,
> "max_nb_queue_pairs=<int> "
> - "max_nb_sessions=<int> "
> "socket_id=<int>");
> RTE_PMD_REGISTER_CRYPTO_DRIVER(openssl_crypto_drv,
> cryptodev_openssl_pmd_drv.driver, cryptodev_driver_id);
> diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
> index 1cb87d59a..485c80e7f 100644
> --- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
> +++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
> @@ -547,7 +547,6 @@ openssl_pmd_info_get(struct rte_cryptodev *dev,
> dev_info->feature_flags = dev->feature_flags;
> dev_info->capabilities = openssl_pmd_capabilities;
> dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
> - dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
> }
> }
>
> diff --git a/drivers/crypto/openssl/rte_openssl_pmd_private.h b/drivers/crypto/openssl/rte_openssl_pmd_private.h
> index bc8dc7cdc..02ea81d5c 100644
> --- a/drivers/crypto/openssl/rte_openssl_pmd_private.h
> +++ b/drivers/crypto/openssl/rte_openssl_pmd_private.h
> @@ -62,8 +62,6 @@ enum openssl_auth_mode {
> struct openssl_private {
> unsigned int max_nb_qpairs;
> /**< Max number of queue pairs */
> - unsigned int max_nb_sessions;
> - /**< Max number of sessions */
> };
>
> /** OPENSSL crypto queue pair */
> diff --git a/drivers/crypto/qat/qat_crypto.c b/drivers/crypto/qat/qat_crypto.c
> index 768dcbae0..e89d3bc11 100644
> --- a/drivers/crypto/qat/qat_crypto.c
> +++ b/drivers/crypto/qat/qat_crypto.c
> @@ -1654,7 +1654,6 @@ void qat_dev_info_get(struct rte_cryptodev *dev,
> ADF_NUM_BUNDLES_PER_DEV;
> info->feature_flags = dev->feature_flags;
> info->capabilities = internals->qat_dev_capabilities;
> - info->sym.max_nb_sessions = internals->max_nb_sessions;
> info->driver_id = cryptodev_qat_driver_id;
> }
> }
> diff --git a/drivers/crypto/qat/qat_crypto.h b/drivers/crypto/qat/qat_crypto.h
> index 281a142b9..c84cf669f 100644
> --- a/drivers/crypto/qat/qat_crypto.h
> +++ b/drivers/crypto/qat/qat_crypto.h
> @@ -75,8 +75,6 @@ struct qat_qp {
> struct qat_pmd_private {
> unsigned max_nb_queue_pairs;
> /**< Max number of queue pairs supported by device */
> - unsigned max_nb_sessions;
> - /**< Max number of sessions supported by device */
> enum qat_device_gen qat_dev_gen;
> /**< QAT device generation */
> const struct rte_cryptodev_capabilities *qat_dev_capabilities;
> diff --git a/drivers/crypto/qat/rte_qat_cryptodev.c b/drivers/crypto/qat/rte_qat_cryptodev.c
> index c8da07af6..74a903d3a 100644
> --- a/drivers/crypto/qat/rte_qat_cryptodev.c
> +++ b/drivers/crypto/qat/rte_qat_cryptodev.c
> @@ -94,7 +94,6 @@ crypto_qat_create(const char *name, struct rte_pci_device *pci_dev,
> RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
>
> internals = cryptodev->data->dev_private;
> - internals->max_nb_sessions = init_params->max_nb_sessions;
> switch (pci_dev->id.device_id) {
> case 0x0443:
> internals->qat_dev_gen = QAT_GEN1;
> @@ -131,8 +130,7 @@ static int crypto_qat_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
> struct rte_cryptodev_pmd_init_params init_params = {
> .name = "",
> .socket_id = pci_dev->device.numa_node,
> - .private_data_size = sizeof(struct qat_pmd_private),
> - .max_nb_sessions = RTE_QAT_PMD_MAX_NB_SESSIONS
> + .private_data_size = sizeof(struct qat_pmd_private)
> };
> char name[RTE_CRYPTODEV_NAME_MAX_LEN];
>
> diff --git a/drivers/crypto/scheduler/scheduler_pmd.c b/drivers/crypto/scheduler/scheduler_pmd.c
> index 25d6409f3..32a19c106 100644
> --- a/drivers/crypto/scheduler/scheduler_pmd.c
> +++ b/drivers/crypto/scheduler/scheduler_pmd.c
> @@ -31,7 +31,6 @@ struct scheduler_init_params {
> #define RTE_CRYPTODEV_VDEV_MODE ("mode")
> #define RTE_CRYPTODEV_VDEV_ORDERING ("ordering")
> #define RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG ("max_nb_queue_pairs")
> -#define RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG ("max_nb_sessions")
> #define RTE_CRYPTODEV_VDEV_SOCKET_ID ("socket_id")
> #define RTE_CRYPTODEV_VDEV_COREMASK ("coremask")
> #define RTE_CRYPTODEV_VDEV_CORELIST ("corelist")
> @@ -42,7 +41,6 @@ const char *scheduler_valid_params[] = {
> RTE_CRYPTODEV_VDEV_MODE,
> RTE_CRYPTODEV_VDEV_ORDERING,
> RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG,
> - RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG,
> RTE_CRYPTODEV_VDEV_SOCKET_ID,
> RTE_CRYPTODEV_VDEV_COREMASK,
> RTE_CRYPTODEV_VDEV_CORELIST
> @@ -406,13 +404,6 @@ scheduler_parse_init_params(struct scheduler_init_params *params,
> if (ret < 0)
> goto free_kvlist;
>
> - ret = rte_kvargs_process(kvlist,
> - RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG,
> - &parse_integer_arg,
> - ¶ms->def_p.max_nb_sessions);
> - if (ret < 0)
> - goto free_kvlist;
> -
> ret = rte_kvargs_process(kvlist, RTE_CRYPTODEV_VDEV_SOCKET_ID,
> &parse_integer_arg,
> ¶ms->def_p.socket_id);
> @@ -466,8 +457,7 @@ cryptodev_scheduler_probe(struct rte_vdev_device *vdev)
> "",
> sizeof(struct scheduler_ctx),
> rte_socket_id(),
> - RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
> - RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
> + RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
> },
> .nb_slaves = 0,
> .mode = CDEV_SCHED_MODE_NOT_SET,
> @@ -500,7 +490,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_SCHEDULER_PMD,
> cryptodev_scheduler_pmd_drv);
> RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SCHEDULER_PMD,
> "max_nb_queue_pairs=<int> "
> - "max_nb_sessions=<int> "
> "socket_id=<int> "
> "slave=<name>");
> RTE_PMD_REGISTER_CRYPTO_DRIVER(scheduler_crypto_drv,
> diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
> index 147dc51e9..88be72a05 100644
> --- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
> +++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
> @@ -321,8 +321,6 @@ scheduler_pmd_info_get(struct rte_cryptodev *dev,
> struct rte_cryptodev_info *dev_info)
> {
> struct scheduler_ctx *sched_ctx = dev->data->dev_private;
> - uint32_t max_nb_sessions = sched_ctx->nb_slaves ?
> - UINT32_MAX : RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS;
> uint32_t i;
>
> if (!dev_info)
> @@ -338,17 +336,12 @@ scheduler_pmd_info_get(struct rte_cryptodev *dev,
> struct rte_cryptodev_info slave_info;
>
> rte_cryptodev_info_get(slave_dev_id, &slave_info);
> - max_nb_sessions = slave_info.sym.max_nb_sessions <
> - max_nb_sessions ?
> - slave_info.sym.max_nb_sessions :
> - max_nb_sessions;
> }
>
> dev_info->driver_id = dev->driver_id;
> dev_info->feature_flags = dev->feature_flags;
> dev_info->capabilities = sched_ctx->capabilities;
> dev_info->max_nb_queue_pairs = sched_ctx->max_nb_queue_pairs;
> - dev_info->sym.max_nb_sessions = max_nb_sessions;
> }
>
> /** Release queue pair */
> diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
> index 72751e35e..fe595abe1 100644
> --- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
> +++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
> @@ -555,7 +555,6 @@ cryptodev_snow3g_create(const char *name,
> internals = dev->data->dev_private;
>
> internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
> - internals->max_nb_sessions = init_params->max_nb_sessions;
>
> return 0;
> init_error:
> @@ -574,7 +573,6 @@ cryptodev_snow3g_probe(struct rte_vdev_device *vdev)
> sizeof(struct snow3g_private),
> rte_socket_id(),
> RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
> - RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
> };
> const char *name;
> const char *input_args;
> @@ -617,7 +615,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_SNOW3G_PMD, cryptodev_snow3g_pmd_drv);
> RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_SNOW3G_PMD, cryptodev_snow3g_pmd);
> RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SNOW3G_PMD,
> "max_nb_queue_pairs=<int> "
> - "max_nb_sessions=<int> "
> "socket_id=<int>");
> RTE_PMD_REGISTER_CRYPTO_DRIVER(snow3g_crypto_drv,
> cryptodev_snow3g_pmd_drv.driver, cryptodev_driver_id);
> diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
> index f60b47598..fff4644c0 100644
> --- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
> +++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
> @@ -130,7 +130,6 @@ snow3g_pmd_info_get(struct rte_cryptodev *dev,
> if (dev_info != NULL) {
> dev_info->driver_id = dev->driver_id;
> dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
> - dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
> dev_info->feature_flags = dev->feature_flags;
> dev_info->capabilities = snow3g_pmd_capabilities;
> }
> diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_private.h b/drivers/crypto/snow3g/rte_snow3g_pmd_private.h
> index eea900e0a..2c6e1a948 100644
> --- a/drivers/crypto/snow3g/rte_snow3g_pmd_private.h
> +++ b/drivers/crypto/snow3g/rte_snow3g_pmd_private.h
> @@ -36,8 +36,6 @@
> struct snow3g_private {
> unsigned max_nb_queue_pairs;
> /**< Max number of queue pairs supported by device */
> - unsigned max_nb_sessions;
> - /**< Max number of sessions supported by device */
> };
>
> /** SNOW 3G buffer queue pair */
> diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
> index 482edea1a..8395801a4 100644
> --- a/drivers/crypto/virtio/virtio_cryptodev.c
> +++ b/drivers/crypto/virtio/virtio_cryptodev.c
> @@ -1411,8 +1411,6 @@ virtio_crypto_dev_info_get(struct rte_cryptodev *dev,
> info->driver_id = cryptodev_virtio_driver_id;
> info->feature_flags = dev->feature_flags;
> info->max_nb_queue_pairs = hw->max_dataqueues;
> - info->sym.max_nb_sessions =
> - RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS;
> info->capabilities = hw->virtio_dev_capabilities;
> }
> }
> @@ -1426,7 +1424,6 @@ crypto_virtio_pci_probe(
> .name = "",
> .socket_id = rte_socket_id(),
> .private_data_size = sizeof(struct virtio_crypto_hw),
> - .max_nb_sessions = RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS
> };
> char name[RTE_CRYPTODEV_NAME_MAX_LEN];
>
> diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
> index a805b2278..396f25975 100644
> --- a/drivers/crypto/zuc/rte_zuc_pmd.c
> +++ b/drivers/crypto/zuc/rte_zuc_pmd.c
> @@ -479,7 +479,6 @@ cryptodev_zuc_create(const char *name,
> internals = dev->data->dev_private;
>
> internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
> - internals->max_nb_sessions = init_params->max_nb_sessions;
>
> return 0;
> init_error:
> @@ -497,8 +496,7 @@ cryptodev_zuc_probe(struct rte_vdev_device *vdev)
> "",
> sizeof(struct zuc_private),
> rte_socket_id(),
> - RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
> - RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
> + RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
> };
> const char *name;
> const char *input_args;
> @@ -541,7 +539,6 @@ static struct cryptodev_driver zuc_crypto_drv;
> RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_ZUC_PMD, cryptodev_zuc_pmd_drv);
> RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ZUC_PMD,
> "max_nb_queue_pairs=<int> "
> - "max_nb_sessions=<int> "
> "socket_id=<int>");
> RTE_PMD_REGISTER_CRYPTO_DRIVER(zuc_crypto_drv, cryptodev_zuc_pmd_drv.driver,
> cryptodev_driver_id);
> diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
> index 8abac8989..ac509e70d 100644
> --- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c
> +++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
> @@ -130,7 +130,6 @@ zuc_pmd_info_get(struct rte_cryptodev *dev,
> if (dev_info != NULL) {
> dev_info->driver_id = dev->driver_id;
> dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
> - dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
> dev_info->feature_flags = dev->feature_flags;
> dev_info->capabilities = zuc_pmd_capabilities;
> }
> diff --git a/drivers/crypto/zuc/rte_zuc_pmd_private.h b/drivers/crypto/zuc/rte_zuc_pmd_private.h
> index b83c4a047..2bd378ad6 100644
> --- a/drivers/crypto/zuc/rte_zuc_pmd_private.h
> +++ b/drivers/crypto/zuc/rte_zuc_pmd_private.h
> @@ -37,8 +37,6 @@
> struct zuc_private {
> unsigned max_nb_queue_pairs;
> /**< Max number of queue pairs supported by device */
> - unsigned max_nb_sessions;
> - /**< Max number of sessions supported by device */
> };
>
> /** ZUC buffer queue pair */
> diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
> index a4b8cccc2..78be5bdb8 100644
> --- a/lib/librte_cryptodev/rte_cryptodev.h
> +++ b/lib/librte_cryptodev/rte_cryptodev.h
> @@ -381,11 +381,6 @@ struct rte_cryptodev_info {
>
> unsigned max_nb_queue_pairs;
> /**< Maximum number of queues pairs supported by device. */
> -
> - struct {
> - unsigned max_nb_sessions;
> - /**< Maximum number of sessions supported by device. */
> - } sym;
> };
>
> #define RTE_CRYPTODEV_DETACHED (0)
> diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.c b/lib/librte_cryptodev/rte_cryptodev_pmd.c
> index f2aac24b7..2088ac3f3 100644
> --- a/lib/librte_cryptodev/rte_cryptodev_pmd.c
> +++ b/lib/librte_cryptodev/rte_cryptodev_pmd.c
> @@ -65,13 +65,6 @@ rte_cryptodev_pmd_parse_input_args(
> if (ret < 0)
> goto free_kvlist;
>
> - ret = rte_kvargs_process(kvlist,
> - RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG,
> - &rte_cryptodev_pmd_parse_uint_arg,
> - ¶ms->max_nb_sessions);
> - if (ret < 0)
> - goto free_kvlist;
> -
> ret = rte_kvargs_process(kvlist,
> RTE_CRYPTODEV_PMD_SOCKET_ID_ARG,
> &rte_cryptodev_pmd_parse_uint_arg,
> @@ -109,10 +102,9 @@ rte_cryptodev_pmd_create(const char *name,
> device->driver->name, name);
>
> CDEV_LOG_INFO("[%s] - Initialisation parameters - name: %s,"
> - "socket id: %d, max queue pairs: %u, max sessions: %u",
> + "socket id: %d, max queue pairs: %u",
> device->driver->name, name,
> - params->socket_id, params->max_nb_queue_pairs,
> - params->max_nb_sessions);
> + params->socket_id, params->max_nb_queue_pairs);
>
> /* allocate device structure */
> cryptodev = rte_cryptodev_pmd_allocate(name, params->socket_id);
> diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
> index 69d776934..0739ce065 100644
> --- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
> +++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
> @@ -59,18 +59,15 @@ extern "C" {
>
>
> #define RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS 8
> -#define RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS 2048
>
> #define RTE_CRYPTODEV_PMD_NAME_ARG ("name")
> #define RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG ("max_nb_queue_pairs")
> -#define RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG ("max_nb_sessions")
> #define RTE_CRYPTODEV_PMD_SOCKET_ID_ARG ("socket_id")
>
>
> static const char * const cryptodev_pmd_valid_params[] = {
> RTE_CRYPTODEV_PMD_NAME_ARG,
> RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG,
> - RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG,
> RTE_CRYPTODEV_PMD_SOCKET_ID_ARG
> };
>
> @@ -83,7 +80,6 @@ struct rte_cryptodev_pmd_init_params {
> size_t private_data_size;
> int socket_id;
> unsigned int max_nb_queue_pairs;
> - unsigned int max_nb_sessions;
> };
>
> /** Global structure used for maintaining state of allocated crypto devices */
> diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
> index 389f79677..2c687bd7c 100644
> --- a/test/test/test_cryptodev.c
> +++ b/test/test/test_cryptodev.c
> @@ -39,6 +39,7 @@
> #include "test_cryptodev_hmac_test_vectors.h"
>
> #define VDEV_ARGS_SIZE 100
> +#define MAX_NB_SESSIONS 4
>
> static int gbl_driver_id;
>
> @@ -437,7 +438,7 @@ testsuite_setup(void)
> */
> ts_params->session_mpool = rte_mempool_create(
> "test_sess_mp",
> - info.sym.max_nb_sessions * 2,
> + MAX_NB_SESSIONS * 2,
> session_size,
> 0, 0, NULL, NULL, NULL,
> NULL, SOCKET_ID_ANY,
> @@ -6499,10 +6500,10 @@ test_multi_session(void)
>
> sessions = rte_malloc(NULL,
> (sizeof(struct rte_cryptodev_sym_session *) *
> - dev_info.sym.max_nb_sessions) + 1, 0);
> + MAX_NB_SESSIONS) + 1, 0);
>
> /* Create multiple crypto sessions*/
> - for (i = 0; i < dev_info.sym.max_nb_sessions; i++) {
> + for (i = 0; i < MAX_NB_SESSIONS; i++) {
>
> sessions[i] = rte_cryptodev_sym_session_create(
> ts_params->session_mpool);
> @@ -6551,7 +6552,7 @@ test_multi_session(void)
> TEST_ASSERT_NULL(sessions[i],
> "Session creation succeeded unexpectedly!");
>
> - for (i = 0; i < dev_info.sym.max_nb_sessions; i++) {
> + for (i = 0; i < MAX_NB_SESSIONS; i++) {
> rte_cryptodev_sym_session_clear(ts_params->valid_devs[0],
> sessions[i]);
> rte_cryptodev_sym_session_free(sessions[i]);
> @@ -6610,7 +6611,7 @@ test_multi_session_random_usage(void)
>
> sessions = rte_malloc(NULL,
> (sizeof(struct rte_cryptodev_sym_session *)
> - * dev_info.sym.max_nb_sessions) + 1, 0);
> + * MAX_NB_SESSIONS) + 1, 0);
>
> for (i = 0; i < MB_SESSION_NUMBER; i++) {
> sessions[i] = rte_cryptodev_sym_session_create(
> @@ -8545,7 +8546,7 @@ test_scheduler_attach_slave_op(void)
> if (ts_params->session_mpool == NULL) {
> ts_params->session_mpool = rte_mempool_create(
> "test_sess_mp",
> - info.sym.max_nb_sessions * 2,
> + MAX_NB_SESSIONS * 2,
> session_size,
> 0, 0, NULL, NULL, NULL,
> NULL, SOCKET_ID_ANY,
> --
> 2.17.0
>
--
- Tomasz Duszyński
^ permalink raw reply [relevance 0%]
* [dpdk-dev] [PATCH 6/6] cryptodev: replace mbuf scatter gather flag
` (3 preceding siblings ...)
2018-06-08 22:02 4% ` [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session size functions Pablo de Lara
@ 2018-06-08 22:02 3% ` Pablo de Lara
` (3 subsequent siblings)
8 siblings, 0 replies; 200+ results
From: Pablo de Lara @ 2018-06-08 22:02 UTC (permalink / raw)
To: declan.doherty, akhil.goyal, ravi1.kumar, jerin.jacob,
roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
Cc: dev, Pablo de Lara
The current mbuf scatter gatter feature flag is
too ambiguous, as it is not clear if input and/or output
buffers can be scatter gather mbufs or not.
Therefore, two new flags will replace this flag:
RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_IN and
RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_OUT.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
doc/guides/rel_notes/deprecation.rst | 2 -
doc/guides/rel_notes/release_18_08.rst | 4 ++
drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 2 +-
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 2 +-
drivers/crypto/dpaa_sec/dpaa_sec.c | 3 +-
drivers/crypto/null/null_crypto_pmd.c | 3 +-
drivers/crypto/openssl/rte_openssl_pmd.c | 2 +-
drivers/crypto/qat/rte_qat_cryptodev.c | 3 +-
lib/librte_cryptodev/rte_cryptodev.c | 6 ++-
lib/librte_cryptodev/rte_cryptodev.h | 12 +++---
test/test/test_cryptodev.c | 41 ++++++++++++++-------
test/test/test_cryptodev_blockcipher.c | 11 ++++--
12 files changed, 59 insertions(+), 32 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 9a73b1d8e..62d635b74 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -105,5 +105,3 @@ Deprecation Notices
``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
18.05 and removed in 18.08, as there are no drivers doing anything useful
with them.
- - Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
- so some will be replaced by more explicit flags.
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 0624f3701..89b84846c 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -72,6 +72,10 @@ API Changes
- ``rte_cryptodev_get_private_session_size`` is replaced with
``rte_cryptodev_sym_get_private_session_size``
+* cryptodev: Feature flag ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` is
+ replaced with the more explicit``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_IN``
+ and ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_OUT`` flags.
+
ABI Changes
-----------
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index cd5b1952b..aa795cbbc 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -492,7 +492,7 @@ aesni_gcm_create(const char *name,
dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
RTE_CRYPTODEV_FF_CPU_AESNI |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_IN;
switch (vector_mode) {
case RTE_AESNI_GCM_SSE:
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 471ad1cbb..cadfeddeb 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -2762,7 +2762,7 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev)
RTE_CRYPTODEV_FF_HW_ACCELERATED |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
RTE_CRYPTODEV_FF_SECURITY |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_IN;
internals = cryptodev->data->dev_private;
internals->max_nb_sessions = RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS;
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index e7ae33c5e..54540d7f6 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -2270,7 +2270,8 @@ dpaa_sec_dev_init(struct rte_cryptodev *cryptodev)
RTE_CRYPTODEV_FF_HW_ACCELERATED |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
RTE_CRYPTODEV_FF_SECURITY |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_IN |
+ RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_OUT;
internals = cryptodev->data->dev_private;
internals->max_nb_queue_pairs = RTE_DPAA_MAX_NB_SEC_QPS;
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index a8499cf94..d9dc22e0f 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -177,7 +177,8 @@ cryptodev_null_create(const char *name,
dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_IN |
+ RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_OUT;
internals = dev->data->dev_private;
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 965cab9f2..6878baa4c 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -1660,7 +1660,7 @@ cryptodev_openssl_create(const char *name,
dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
RTE_CRYPTODEV_FF_CPU_AESNI |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_IN;
/* Set vector instructions mode supported */
internals = dev->data->dev_private;
diff --git a/drivers/crypto/qat/rte_qat_cryptodev.c b/drivers/crypto/qat/rte_qat_cryptodev.c
index bb109f8ba..4f1ba5f30 100644
--- a/drivers/crypto/qat/rte_qat_cryptodev.c
+++ b/drivers/crypto/qat/rte_qat_cryptodev.c
@@ -89,7 +89,8 @@ crypto_qat_create(const char *name, struct rte_pci_device *pci_dev,
cryptodev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
RTE_CRYPTODEV_FF_HW_ACCELERATED |
RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+ RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_IN |
+ RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_OUT;
internals = cryptodev->data->dev_private;
switch (pci_dev->id.device_id) {
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 40e249e79..b180d4c84 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -361,8 +361,10 @@ rte_cryptodev_get_feature_name(uint64_t flag)
return "CPU_AESNI";
case RTE_CRYPTODEV_FF_HW_ACCELERATED:
return "HW_ACCELERATED";
- case RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER:
- return "MBUF_SCATTER_GATHER";
+ case RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_IN:
+ return "MBUF_INPUT_SCATTER_GATHER";
+ case RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_OUT:
+ return "MBUF_OUTPUT_SCATTER_GATHER";
case RTE_CRYPTODEV_FF_CPU_NEON:
return "CPU_NEON";
case RTE_CRYPTODEV_FF_CPU_ARM_CE:
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 8e8a59522..bfb52e7f2 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -345,13 +345,15 @@ rte_cryptodev_get_aead_algo_enum(enum rte_crypto_aead_algorithm *algo_enum,
/**< Operations are off-loaded to an external hardware accelerator */
#define RTE_CRYPTODEV_FF_CPU_AVX512 (1ULL << 8)
/**< Utilises CPU SIMD AVX512 instructions */
-#define RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER (1ULL << 9)
-/**< Scatter-gather mbufs are supported */
-#define RTE_CRYPTODEV_FF_CPU_NEON (1ULL << 10)
+#define RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_IN (1ULL << 9)
+/**< Scatter-gather input mbufs are supported */
+#define RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_OUT (1ULL << 10)
+/**< Scatter-gather output mbufs are supported */
+#define RTE_CRYPTODEV_FF_CPU_NEON (1ULL << 11)
/**< Utilises CPU NEON instructions */
-#define RTE_CRYPTODEV_FF_CPU_ARM_CE (1ULL << 11)
+#define RTE_CRYPTODEV_FF_CPU_ARM_CE (1ULL << 12)
/**< Utilises ARM CPU Cryptographic Extensions */
-#define RTE_CRYPTODEV_FF_SECURITY (1ULL << 12)
+#define RTE_CRYPTODEV_FF_SECURITY (1ULL << 13)
/**< Support Security Protocol Processing */
diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 2c687bd7c..627c3b1b3 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -3152,9 +3152,13 @@ test_kasumi_encryption_sgl(const struct kasumi_test_data *tdata)
struct rte_cryptodev_info dev_info;
rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
- if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
- printf("Device doesn't support scatter-gather. "
- "Test Skipped.\n");
+
+ uint64_t feat_flags = dev_info.feature_flags;
+
+ if (!(feat_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_IN) ||
+ !(feat_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_OUT)) {
+ printf("Device doesn't support scatter-gather in both input "
+ "and output mbufs. Test Skipped.\n");
return 0;
}
@@ -3300,9 +3304,12 @@ test_kasumi_encryption_oop_sgl(const struct kasumi_test_data *tdata)
struct rte_cryptodev_info dev_info;
rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
- if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
- printf("Device doesn't support scatter-gather. "
- "Test Skipped.\n");
+
+ uint64_t feat_flags = dev_info.feature_flags;
+ if (!(feat_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_IN) ||
+ !(feat_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_OUT)) {
+ printf("Device doesn't support scatter-gather in both input "
+ "and output mbufs. Test Skipped.\n");
return 0;
}
@@ -3651,9 +3658,13 @@ test_snow3g_encryption_oop_sgl(const struct snow3g_test_data *tdata)
struct rte_cryptodev_info dev_info;
rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
- if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
- printf("Device doesn't support scatter-gather. "
- "Test Skipped.\n");
+
+ uint64_t feat_flags = dev_info.feature_flags;
+
+ if (!(feat_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_IN) ||
+ !(feat_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_OUT)) {
+ printf("Device doesn't support scatter-gather in both input "
+ "and output mbufs. Test Skipped.\n");
return 0;
}
@@ -4485,10 +4496,14 @@ test_zuc_encryption_sgl(const struct wireless_test_data *tdata)
return -ENOTSUP;
rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
- if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
- printf("Device doesn't support scatter-gather. "
- "Test Skipped.\n");
- return -ENOTSUP;
+
+ uint64_t feat_flags = dev_info.feature_flags;
+
+ if (!(feat_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_IN) ||
+ !(feat_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_OUT)) {
+ printf("Device doesn't support scatter-gather in both input "
+ "and output mbufs. Test Skipped.\n");
+ return 0;
}
plaintext_len = ceil_byte_length(tdata->plaintext.len);
diff --git a/test/test/test_cryptodev_blockcipher.c b/test/test/test_cryptodev_blockcipher.c
index 256a7daa2..7a56171e9 100644
--- a/test/test/test_cryptodev_blockcipher.c
+++ b/test/test/test_cryptodev_blockcipher.c
@@ -77,10 +77,13 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
if (t->feature_mask & BLOCKCIPHER_TEST_FEATURE_SG) {
rte_cryptodev_info_get(dev_id, &dev_info);
- if (!(dev_info.feature_flags &
- RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
- printf("Device doesn't support scatter-gather. "
- "Test Skipped.\n");
+ uint64_t feat_flags = dev_info.feature_flags;
+
+ if (!(feat_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_IN) ||
+ !(feat_flags &
+ RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_OUT)) {
+ printf("Device doesn't support scatter-gather in both input "
+ "and output mbufs. Test Skipped.\n");
return 0;
}
nb_segs = 3;
--
2.17.0
^ permalink raw reply [relevance 3%]
* [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session size functions
` (2 preceding siblings ...)
2018-06-08 22:02 2% ` [dpdk-dev] [PATCH 4/6] cryptodev: remove queue start/stop functions Pablo de Lara
@ 2018-06-08 22:02 4% ` Pablo de Lara
2018-06-21 12:59 0% ` Akhil Goyal
2018-06-08 22:02 3% ` [dpdk-dev] [PATCH 6/6] cryptodev: replace mbuf scatter gather flag Pablo de Lara
` (4 subsequent siblings)
8 siblings, 1 reply; 200+ results
From: Pablo de Lara @ 2018-06-08 22:02 UTC (permalink / raw)
To: declan.doherty, akhil.goyal, ravi1.kumar, jerin.jacob,
roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
Cc: dev, Pablo de Lara
Removed rte_cryptodev_get_header_session_size
and rte_cryptodev_get_private_session_size functions,
as they have been substituted with functions
specific for symmetric operations, with _sym_ word
after "rte_cryptodev_".
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
doc/guides/rel_notes/deprecation.rst | 6 ------
doc/guides/rel_notes/release_18_08.rst | 8 ++++++++
lib/librte_cryptodev/rte_cryptodev.c | 6 ------
lib/librte_cryptodev/rte_cryptodev.h | 11 -----------
lib/librte_cryptodev/rte_cryptodev_version.map | 2 --
5 files changed, 8 insertions(+), 25 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 91592534e..9a73b1d8e 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -107,9 +107,3 @@ Deprecation Notices
with them.
- Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
so some will be replaced by more explicit flags.
- - Function ``rte_cryptodev_get_header_session_size()`` will be deprecated
- in 18.05, and it gets replaced with ``rte_cryptodev_sym_get_header_session_size()``.
- It will be removed in 18.08.
- - Function ``rte_cryptodev_get_private_session_size()`` will be deprecated
- in 18.05, and it gets replaced with ``rte_cryptodev_sym_get_private_session_size()``.
- It will be removed in 18.08.
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 3fa9a6e68..0624f3701 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -64,6 +64,14 @@ API Changes
- ``rte_cryptodev_queue_pair_start``
- ``rte_cryptodev_queue_pair_stop``
+* cryptodev: Following functions were deprecated and are replaced by
+ other functions in 18.08:
+
+ - ``rte_cryptodev_get_header_session_size`` is replaced with
+ ``rte_cryptodev_sym_get_header_session_size``
+ - ``rte_cryptodev_get_private_session_size`` is replaced with
+ ``rte_cryptodev_sym_get_private_session_size``
+
ABI Changes
-----------
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index a07904fb9..40e249e79 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -1181,12 +1181,6 @@ rte_cryptodev_sym_session_free(struct rte_cryptodev_sym_session *sess)
return 0;
}
-unsigned int
-rte_cryptodev_get_header_session_size(void)
-{
- return rte_cryptodev_sym_get_header_session_size();
-}
-
unsigned int
rte_cryptodev_sym_get_header_session_size(void)
{
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 90487bffc..8e8a59522 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -925,17 +925,6 @@ int
rte_cryptodev_sym_session_clear(uint8_t dev_id,
struct rte_cryptodev_sym_session *sess);
-/**
- * @deprecated
- * Get the size of the header session, for all registered drivers.
- *
- * @return
- * Size of the header session.
- */
-__rte_deprecated
-unsigned int
-rte_cryptodev_get_header_session_size(void);
-
/**
* @deprecated
* Get the size of the private session data for a device.
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index 020b45754..0ab6d5195 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -63,8 +63,6 @@ DPDK_17.08 {
rte_cryptodev_driver_id_get;
rte_cryptodev_driver_name_get;
rte_cryptodev_get_aead_algo_enum;
- rte_cryptodev_get_header_session_size;
- rte_cryptodev_get_private_session_size;
rte_cryptodev_sym_capability_check_aead;
rte_cryptodev_sym_session_init;
rte_cryptodev_sym_session_clear;
--
2.17.0
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH 4/6] cryptodev: remove queue start/stop functions
2018-06-08 22:02 4% ` [dpdk-dev] [PATCH 1/6] cryptodev: replace bus specific struct with generic dev Pablo de Lara
2018-06-08 22:02 1% ` [dpdk-dev] [PATCH 3/6] cryptodev: remove max number of sessions Pablo de Lara
@ 2018-06-08 22:02 2% ` Pablo de Lara
2018-06-08 22:02 4% ` [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session size functions Pablo de Lara
` (5 subsequent siblings)
8 siblings, 0 replies; 200+ results
From: Pablo de Lara @ 2018-06-08 22:02 UTC (permalink / raw)
To: declan.doherty, akhil.goyal, ravi1.kumar, jerin.jacob,
roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
Cc: dev, Pablo de Lara
Removed cryptodev queue start/stop functions,
as they were marked deprecated in 18.05, since they
were not implemented by any driver.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
doc/guides/rel_notes/deprecation.rst | 4 --
doc/guides/rel_notes/release_18_08.rst | 5 +++
drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c | 18 --------
.../crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 18 --------
drivers/crypto/armv8/rte_armv8_pmd_ops.c | 18 --------
drivers/crypto/ccp/ccp_pmd_ops.c | 16 -------
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 22 ----------
drivers/crypto/dpaa_sec/dpaa_sec.c | 22 ----------
drivers/crypto/kasumi/rte_kasumi_pmd_ops.c | 18 --------
drivers/crypto/mvsam/rte_mrvl_pmd_ops.c | 28 ------------
drivers/crypto/null/null_crypto_pmd_ops.c | 18 --------
drivers/crypto/openssl/rte_openssl_pmd_ops.c | 18 --------
drivers/crypto/qat/rte_qat_cryptodev.c | 2 -
drivers/crypto/scheduler/scheduler_pmd_ops.c | 18 --------
drivers/crypto/snow3g/rte_snow3g_pmd_ops.c | 18 --------
drivers/crypto/virtio/virtio_cryptodev.c | 2 -
drivers/crypto/zuc/rte_zuc_pmd_ops.c | 18 --------
lib/librte_cryptodev/rte_cryptodev.c | 44 -------------------
lib/librte_cryptodev/rte_cryptodev.h | 37 ----------------
lib/librte_cryptodev/rte_cryptodev_pmd.h | 26 -----------
.../rte_cryptodev_version.map | 2 -
21 files changed, 5 insertions(+), 367 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index dc014da21..91592534e 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -105,10 +105,6 @@ Deprecation Notices
``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
18.05 and removed in 18.08, as there are no drivers doing anything useful
with them.
- - Functions ``rte_cryptodev_queue_pair_start()`` and
- ``rte_cryptodev_queue_pair_stop()`` will be deprecated from 18.05
- and removed in 18.08, as there are no drivers doing anything useful
- with them.
- Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
so some will be replaced by more explicit flags.
- Function ``rte_cryptodev_get_header_session_size()`` will be deprecated
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index a6f31713a..3fa9a6e68 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -59,6 +59,11 @@ API Changes
has been replaced with field ``struct rte_device *device`` and
field ``sym`` has been removed.
+* cryptodev: Following functions were deprecated and are removed in 18.08:
+
+ - ``rte_cryptodev_queue_pair_start``
+ - ``rte_cryptodev_queue_pair_stop``
+
ABI Changes
-----------
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
index b05122c1b..2a3ca4e26 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
@@ -241,22 +241,6 @@ aesni_gcm_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-aesni_gcm_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-aesni_gcm_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
aesni_gcm_pmd_qp_count(struct rte_cryptodev *dev)
@@ -338,8 +322,6 @@ struct rte_cryptodev_ops aesni_gcm_pmd_ops = {
.queue_pair_setup = aesni_gcm_pmd_qp_setup,
.queue_pair_release = aesni_gcm_pmd_qp_release,
- .queue_pair_start = aesni_gcm_pmd_qp_start,
- .queue_pair_stop = aesni_gcm_pmd_qp_stop,
.queue_pair_count = aesni_gcm_pmd_qp_count,
.session_get_size = aesni_gcm_pmd_session_get_size,
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
index 7c735f5dc..1044946ec 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -507,22 +507,6 @@ aesni_mb_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-aesni_mb_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-aesni_mb_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
aesni_mb_pmd_qp_count(struct rte_cryptodev *dev)
@@ -605,8 +589,6 @@ struct rte_cryptodev_ops aesni_mb_pmd_ops = {
.queue_pair_setup = aesni_mb_pmd_qp_setup,
.queue_pair_release = aesni_mb_pmd_qp_release,
- .queue_pair_start = aesni_mb_pmd_qp_start,
- .queue_pair_stop = aesni_mb_pmd_qp_stop,
.queue_pair_count = aesni_mb_pmd_qp_count,
.session_get_size = aesni_mb_pmd_session_get_size,
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
index d31ef7d66..05217a1a9 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
@@ -256,22 +256,6 @@ armv8_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-armv8_crypto_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-armv8_crypto_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
armv8_crypto_pmd_qp_count(struct rte_cryptodev *dev)
@@ -352,8 +336,6 @@ struct rte_cryptodev_ops armv8_crypto_pmd_ops = {
.queue_pair_setup = armv8_crypto_pmd_qp_setup,
.queue_pair_release = armv8_crypto_pmd_qp_release,
- .queue_pair_start = armv8_crypto_pmd_qp_start,
- .queue_pair_stop = armv8_crypto_pmd_qp_stop,
.queue_pair_count = armv8_crypto_pmd_qp_count,
.session_get_size = armv8_crypto_pmd_session_get_size,
diff --git a/drivers/crypto/ccp/ccp_pmd_ops.c b/drivers/crypto/ccp/ccp_pmd_ops.c
index 7e383feed..ff815f6ca 100644
--- a/drivers/crypto/ccp/ccp_pmd_ops.c
+++ b/drivers/crypto/ccp/ccp_pmd_ops.c
@@ -746,20 +746,6 @@ ccp_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-static int
-ccp_pmd_qp_start(struct rte_cryptodev *dev __rte_unused,
- uint16_t queue_pair_id __rte_unused)
-{
- return -ENOTSUP;
-}
-
-static int
-ccp_pmd_qp_stop(struct rte_cryptodev *dev __rte_unused,
- uint16_t queue_pair_id __rte_unused)
-{
- return -ENOTSUP;
-}
-
static uint32_t
ccp_pmd_qp_count(struct rte_cryptodev *dev)
{
@@ -835,8 +821,6 @@ struct rte_cryptodev_ops ccp_ops = {
.queue_pair_setup = ccp_pmd_qp_setup,
.queue_pair_release = ccp_pmd_qp_release,
- .queue_pair_start = ccp_pmd_qp_start,
- .queue_pair_stop = ccp_pmd_qp_stop,
.queue_pair_count = ccp_pmd_qp_count,
.session_get_size = ccp_pmd_session_get_size,
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 16ab0b6a6..471ad1cbb 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -1472,26 +1472,6 @@ dpaa2_sec_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return retcode;
}
-/** Start queue pair */
-static int
-dpaa2_sec_queue_pair_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- PMD_INIT_FUNC_TRACE();
-
- return 0;
-}
-
-/** Stop queue pair */
-static int
-dpaa2_sec_queue_pair_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- PMD_INIT_FUNC_TRACE();
-
- return 0;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
dpaa2_sec_queue_pair_count(struct rte_cryptodev *dev)
@@ -2716,8 +2696,6 @@ static struct rte_cryptodev_ops crypto_ops = {
.stats_reset = dpaa2_sec_stats_reset,
.queue_pair_setup = dpaa2_sec_queue_pair_setup,
.queue_pair_release = dpaa2_sec_queue_pair_release,
- .queue_pair_start = dpaa2_sec_queue_pair_start,
- .queue_pair_stop = dpaa2_sec_queue_pair_stop,
.queue_pair_count = dpaa2_sec_queue_pair_count,
.session_get_size = dpaa2_sec_session_get_size,
.session_configure = dpaa2_sec_session_configure,
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 909583bd0..e7ae33c5e 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -1585,26 +1585,6 @@ dpaa_sec_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return 0;
}
-/** Start queue pair */
-static int
-dpaa_sec_queue_pair_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- PMD_INIT_FUNC_TRACE();
-
- return 0;
-}
-
-/** Stop queue pair */
-static int
-dpaa_sec_queue_pair_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- PMD_INIT_FUNC_TRACE();
-
- return 0;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
dpaa_sec_queue_pair_count(struct rte_cryptodev *dev)
@@ -2226,8 +2206,6 @@ static struct rte_cryptodev_ops crypto_ops = {
.dev_infos_get = dpaa_sec_dev_infos_get,
.queue_pair_setup = dpaa_sec_queue_pair_setup,
.queue_pair_release = dpaa_sec_queue_pair_release,
- .queue_pair_start = dpaa_sec_queue_pair_start,
- .queue_pair_stop = dpaa_sec_queue_pair_stop,
.queue_pair_count = dpaa_sec_queue_pair_count,
.session_get_size = dpaa_sec_session_get_size,
.session_configure = dpaa_sec_session_configure,
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
index 284669341..64dba3024 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
@@ -227,22 +227,6 @@ kasumi_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-kasumi_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-kasumi_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
kasumi_pmd_qp_count(struct rte_cryptodev *dev)
@@ -323,8 +307,6 @@ struct rte_cryptodev_ops kasumi_pmd_ops = {
.queue_pair_setup = kasumi_pmd_qp_setup,
.queue_pair_release = kasumi_pmd_qp_release,
- .queue_pair_start = kasumi_pmd_qp_start,
- .queue_pair_stop = kasumi_pmd_qp_stop,
.queue_pair_count = kasumi_pmd_qp_count,
.session_get_size = kasumi_pmd_session_get_size,
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
index 944a415cf..c131b40e8 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
@@ -594,32 +594,6 @@ mrvl_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair (PMD ops callback) - not supported.
- *
- * @param dev Pointer to the device structure.
- * @param qp_id ID of the Queue Pair.
- * @returns -ENOTSUP. Always.
- */
-static int
-mrvl_crypto_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair (PMD ops callback) - not supported.
- *
- * @param dev Pointer to the device structure.
- * @param qp_id ID of the Queue Pair.
- * @returns -ENOTSUP. Always.
- */
-static int
-mrvl_crypto_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs (PMD ops callback).
*
* @param dev Pointer to the device structure.
@@ -737,8 +711,6 @@ static struct rte_cryptodev_ops mrvl_crypto_pmd_ops = {
.queue_pair_setup = mrvl_crypto_pmd_qp_setup,
.queue_pair_release = mrvl_crypto_pmd_qp_release,
- .queue_pair_start = mrvl_crypto_pmd_qp_start,
- .queue_pair_stop = mrvl_crypto_pmd_qp_stop,
.queue_pair_count = mrvl_crypto_pmd_qp_count,
.session_get_size = mrvl_crypto_pmd_session_get_size,
diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
index 3ca1370e8..769879136 100644
--- a/drivers/crypto/null/null_crypto_pmd_ops.c
+++ b/drivers/crypto/null/null_crypto_pmd_ops.c
@@ -238,22 +238,6 @@ null_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-null_crypto_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-null_crypto_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
null_crypto_pmd_qp_count(struct rte_cryptodev *dev)
@@ -334,8 +318,6 @@ struct rte_cryptodev_ops pmd_ops = {
.queue_pair_setup = null_crypto_pmd_qp_setup,
.queue_pair_release = null_crypto_pmd_qp_release,
- .queue_pair_start = null_crypto_pmd_qp_start,
- .queue_pair_stop = null_crypto_pmd_qp_stop,
.queue_pair_count = null_crypto_pmd_qp_count,
.session_get_size = null_crypto_pmd_session_get_size,
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index 485c80e7f..396a32d73 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -646,22 +646,6 @@ openssl_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-openssl_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-openssl_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
openssl_pmd_qp_count(struct rte_cryptodev *dev)
@@ -744,8 +728,6 @@ struct rte_cryptodev_ops openssl_pmd_ops = {
.queue_pair_setup = openssl_pmd_qp_setup,
.queue_pair_release = openssl_pmd_qp_release,
- .queue_pair_start = openssl_pmd_qp_start,
- .queue_pair_stop = openssl_pmd_qp_stop,
.queue_pair_count = openssl_pmd_qp_count,
.session_get_size = openssl_pmd_session_get_size,
diff --git a/drivers/crypto/qat/rte_qat_cryptodev.c b/drivers/crypto/qat/rte_qat_cryptodev.c
index 74a903d3a..bb109f8ba 100644
--- a/drivers/crypto/qat/rte_qat_cryptodev.c
+++ b/drivers/crypto/qat/rte_qat_cryptodev.c
@@ -38,8 +38,6 @@ static struct rte_cryptodev_ops crypto_qat_ops = {
.stats_reset = qat_crypto_sym_stats_reset,
.queue_pair_setup = qat_crypto_sym_qp_setup,
.queue_pair_release = qat_crypto_sym_qp_release,
- .queue_pair_start = NULL,
- .queue_pair_stop = NULL,
.queue_pair_count = NULL,
/* Crypto related operations */
diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index 88be72a05..c3ad364eb 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -432,22 +432,6 @@ scheduler_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return 0;
}
-/** Start queue pair */
-static int
-scheduler_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-scheduler_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
scheduler_pmd_qp_count(struct rte_cryptodev *dev)
@@ -528,8 +512,6 @@ struct rte_cryptodev_ops scheduler_pmd_ops = {
.queue_pair_setup = scheduler_pmd_qp_setup,
.queue_pair_release = scheduler_pmd_qp_release,
- .queue_pair_start = scheduler_pmd_qp_start,
- .queue_pair_stop = scheduler_pmd_qp_stop,
.queue_pair_count = scheduler_pmd_qp_count,
.session_get_size = scheduler_pmd_session_get_size,
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
index fff4644c0..63c2e245f 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
@@ -229,22 +229,6 @@ snow3g_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-snow3g_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-snow3g_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
snow3g_pmd_qp_count(struct rte_cryptodev *dev)
@@ -325,8 +309,6 @@ struct rte_cryptodev_ops snow3g_pmd_ops = {
.queue_pair_setup = snow3g_pmd_qp_setup,
.queue_pair_release = snow3g_pmd_qp_release,
- .queue_pair_start = snow3g_pmd_qp_start,
- .queue_pair_stop = snow3g_pmd_qp_stop,
.queue_pair_count = snow3g_pmd_qp_count,
.session_get_size = snow3g_pmd_session_get_size,
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 8395801a4..1e74f0485 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -515,8 +515,6 @@ static struct rte_cryptodev_ops virtio_crypto_dev_ops = {
.queue_pair_setup = virtio_crypto_qp_setup,
.queue_pair_release = virtio_crypto_qp_release,
- .queue_pair_start = NULL,
- .queue_pair_stop = NULL,
.queue_pair_count = NULL,
/* Crypto related operations */
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
index ac509e70d..5d0f057de 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
@@ -229,22 +229,6 @@ zuc_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -1;
}
-/** Start queue pair */
-static int
-zuc_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-zuc_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
- __rte_unused uint16_t queue_pair_id)
-{
- return -ENOTSUP;
-}
-
/** Return the number of allocated queue pairs */
static uint32_t
zuc_pmd_qp_count(struct rte_cryptodev *dev)
@@ -325,8 +309,6 @@ struct rte_cryptodev_ops zuc_pmd_ops = {
.queue_pair_setup = zuc_pmd_qp_setup,
.queue_pair_release = zuc_pmd_qp_release,
- .queue_pair_start = zuc_pmd_qp_start,
- .queue_pair_stop = zuc_pmd_qp_stop,
.queue_pair_count = zuc_pmd_qp_count,
.session_get_size = zuc_pmd_session_get_size,
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 457ac5670..a07904fb9 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -702,50 +702,6 @@ rte_cryptodev_queue_pairs_config(struct rte_cryptodev *dev, uint16_t nb_qpairs,
return 0;
}
-int
-rte_cryptodev_queue_pair_start(uint8_t dev_id, uint16_t queue_pair_id)
-{
- struct rte_cryptodev *dev;
-
- if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
- CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
- return -EINVAL;
- }
-
- dev = &rte_crypto_devices[dev_id];
- if (queue_pair_id >= dev->data->nb_queue_pairs) {
- CDEV_LOG_ERR("Invalid queue_pair_id=%d", queue_pair_id);
- return -EINVAL;
- }
-
- RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_pair_start, -ENOTSUP);
-
- return dev->dev_ops->queue_pair_start(dev, queue_pair_id);
-
-}
-
-int
-rte_cryptodev_queue_pair_stop(uint8_t dev_id, uint16_t queue_pair_id)
-{
- struct rte_cryptodev *dev;
-
- if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
- CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
- return -EINVAL;
- }
-
- dev = &rte_crypto_devices[dev_id];
- if (queue_pair_id >= dev->data->nb_queue_pairs) {
- CDEV_LOG_ERR("Invalid queue_pair_id=%d", queue_pair_id);
- return -EINVAL;
- }
-
- RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_pair_stop, -ENOTSUP);
-
- return dev->dev_ops->queue_pair_stop(dev, queue_pair_id);
-
-}
-
int
rte_cryptodev_configure(uint8_t dev_id, struct rte_cryptodev_config *config)
{
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 78be5bdb8..90487bffc 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -593,43 +593,6 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
const struct rte_cryptodev_qp_conf *qp_conf, int socket_id,
struct rte_mempool *session_pool);
-/**
- * @deprecated
- * Start a specified queue pair of a device. It is used
- * when deferred_start flag of the specified queue is true.
- *
- * @param dev_id The identifier of the device
- * @param queue_pair_id The index of the queue pair to start. The value
- * must be in the range [0, nb_queue_pair - 1]
- * previously supplied to
- * rte_crypto_dev_configure().
- * @return
- * - 0: Success, the transmit queue is correctly set up.
- * - -EINVAL: The dev_id or the queue_id out of range.
- * - -ENOTSUP: The function not supported in PMD driver.
- */
-__rte_deprecated
-extern int
-rte_cryptodev_queue_pair_start(uint8_t dev_id, uint16_t queue_pair_id);
-
-/**
- * @deprecated
- * Stop specified queue pair of a device
- *
- * @param dev_id The identifier of the device
- * @param queue_pair_id The index of the queue pair to stop. The value
- * must be in the range [0, nb_queue_pair - 1]
- * previously supplied to
- * rte_cryptodev_configure().
- * @return
- * - 0: Success, the transmit queue is correctly set up.
- * - -EINVAL: The dev_id or the queue_id out of range.
- * - -ENOTSUP: The function not supported in PMD driver.
- */
-__rte_deprecated
-extern int
-rte_cryptodev_queue_pair_stop(uint8_t dev_id, uint16_t queue_pair_id);
-
/**
* Get the number of queue pairs on a specific crypto device
*
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index 0739ce065..b47730eaf 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -211,28 +211,6 @@ typedef void (*cryptodev_stats_reset_t)(struct rte_cryptodev *dev);
typedef void (*cryptodev_info_get_t)(struct rte_cryptodev *dev,
struct rte_cryptodev_info *dev_info);
-/**
- * Start queue pair of a device.
- *
- * @param dev Crypto device pointer
- * @param qp_id Queue Pair Index
- *
- * @return Returns 0 on success.
- */
-typedef int (*cryptodev_queue_pair_start_t)(struct rte_cryptodev *dev,
- uint16_t qp_id);
-
-/**
- * Stop queue pair of a device.
- *
- * @param dev Crypto device pointer
- * @param qp_id Queue Pair Index
- *
- * @return Returns 0 on success.
- */
-typedef int (*cryptodev_queue_pair_stop_t)(struct rte_cryptodev *dev,
- uint16_t qp_id);
-
/**
* Setup a queue pair for a device.
*
@@ -371,10 +349,6 @@ struct rte_cryptodev_ops {
/**< Set up a device queue pair. */
cryptodev_queue_pair_release_t queue_pair_release;
/**< Release a queue pair. */
- cryptodev_queue_pair_start_t queue_pair_start;
- /**< Start a queue pair. */
- cryptodev_queue_pair_stop_t queue_pair_stop;
- /**< Stop a queue pair. */
cryptodev_queue_pair_count_t queue_pair_count;
/**< Get count of the queue pairs. */
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index be8f4c1a7..020b45754 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -22,8 +22,6 @@ DPDK_16.04 {
rte_cryptodev_stop;
rte_cryptodev_queue_pair_count;
rte_cryptodev_queue_pair_setup;
- rte_cryptodev_queue_pair_start;
- rte_cryptodev_queue_pair_stop;
rte_crypto_op_pool_create;
local: *;
--
2.17.0
^ permalink raw reply [relevance 2%]
* [dpdk-dev] [PATCH 3/6] cryptodev: remove max number of sessions
2018-06-08 22:02 4% ` [dpdk-dev] [PATCH 1/6] cryptodev: replace bus specific struct with generic dev Pablo de Lara
@ 2018-06-08 22:02 1% ` Pablo de Lara
2018-06-12 11:37 0% ` Tomasz Duszynski
2018-06-08 22:02 2% ` [dpdk-dev] [PATCH 4/6] cryptodev: remove queue start/stop functions Pablo de Lara
` (6 subsequent siblings)
8 siblings, 1 reply; 200+ results
From: Pablo de Lara @ 2018-06-08 22:02 UTC (permalink / raw)
To: declan.doherty, akhil.goyal, ravi1.kumar, jerin.jacob,
roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
Cc: dev, Pablo de Lara
Sessions are not created and stored in the crypto device
anymore, since now the session mempool is created
at the application level.
Therefore the limitation of the maximum number of sessions
that can be created should not be dependent of the crypto device.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
config/common_base | 12 ------------
config/rte_config.h | 14 --------------
doc/guides/cryptodevs/aesni_gcm.rst | 4 +---
doc/guides/cryptodevs/aesni_mb.rst | 4 +---
doc/guides/cryptodevs/armv8.rst | 1 -
doc/guides/cryptodevs/ccp.rst | 2 --
doc/guides/cryptodevs/dpaa2_sec.rst | 5 -----
doc/guides/cryptodevs/dpaa_sec.rst | 5 -----
doc/guides/cryptodevs/kasumi.rst | 4 +---
doc/guides/cryptodevs/mvsam.rst | 1 -
doc/guides/cryptodevs/null.rst | 4 +---
doc/guides/cryptodevs/openssl.rst | 1 -
doc/guides/cryptodevs/scheduler.rst | 4 ----
doc/guides/cryptodevs/snow3g.rst | 4 +---
doc/guides/cryptodevs/zuc.rst | 4 +---
doc/guides/prog_guide/cryptodev_lib.rst | 9 ++-------
doc/guides/rel_notes/deprecation.rst | 3 ---
doc/guides/rel_notes/release_18_08.rst | 3 ++-
drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 5 +----
drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c | 1 -
drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h | 2 --
drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 5 +----
drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 1 -
.../crypto/aesni_mb/rte_aesni_mb_pmd_private.h | 2 --
drivers/crypto/armv8/rte_armv8_pmd.c | 5 +----
drivers/crypto/armv8/rte_armv8_pmd_ops.c | 1 -
drivers/crypto/armv8/rte_armv8_pmd_private.h | 2 --
drivers/crypto/ccp/ccp_pmd_ops.c | 1 -
drivers/crypto/ccp/ccp_pmd_private.h | 1 -
drivers/crypto/ccp/rte_ccp_pmd.c | 16 +---------------
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 3 ++-
drivers/crypto/dpaa_sec/dpaa_sec.c | 1 -
drivers/crypto/dpaa_sec/dpaa_sec.h | 1 +
drivers/crypto/kasumi/rte_kasumi_pmd.c | 5 +----
drivers/crypto/kasumi/rte_kasumi_pmd_ops.c | 1 -
drivers/crypto/kasumi/rte_kasumi_pmd_private.h | 2 --
drivers/crypto/mvsam/rte_mrvl_pmd.c | 6 ------
drivers/crypto/mvsam/rte_mrvl_pmd_ops.c | 1 -
drivers/crypto/mvsam/rte_mrvl_pmd_private.h | 1 -
drivers/crypto/null/null_crypto_pmd.c | 3 ---
drivers/crypto/null/null_crypto_pmd_ops.c | 1 -
drivers/crypto/null/null_crypto_pmd_private.h | 1 -
drivers/crypto/openssl/rte_openssl_pmd.c | 3 ---
drivers/crypto/openssl/rte_openssl_pmd_ops.c | 1 -
drivers/crypto/openssl/rte_openssl_pmd_private.h | 2 --
drivers/crypto/qat/qat_crypto.c | 1 -
drivers/crypto/qat/qat_crypto.h | 2 --
drivers/crypto/qat/rte_qat_cryptodev.c | 4 +---
drivers/crypto/scheduler/scheduler_pmd.c | 13 +------------
drivers/crypto/scheduler/scheduler_pmd_ops.c | 7 -------
drivers/crypto/snow3g/rte_snow3g_pmd.c | 3 ---
drivers/crypto/snow3g/rte_snow3g_pmd_ops.c | 1 -
drivers/crypto/snow3g/rte_snow3g_pmd_private.h | 2 --
drivers/crypto/virtio/virtio_cryptodev.c | 3 ---
drivers/crypto/zuc/rte_zuc_pmd.c | 5 +----
drivers/crypto/zuc/rte_zuc_pmd_ops.c | 1 -
drivers/crypto/zuc/rte_zuc_pmd_private.h | 2 --
lib/librte_cryptodev/rte_cryptodev.h | 5 -----
lib/librte_cryptodev/rte_cryptodev_pmd.c | 12 ++----------
lib/librte_cryptodev/rte_cryptodev_pmd.h | 4 ----
test/test/test_cryptodev.c | 13 +++++++------
61 files changed, 30 insertions(+), 206 deletions(-)
diff --git a/config/common_base b/config/common_base
index 6b0d1cbbb..db6dec335 100644
--- a/config/common_base
+++ b/config/common_base
@@ -473,14 +473,12 @@ CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO_DEBUG=n
# Compile NXP DPAA2 crypto sec driver for CAAM HW
#
CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC=n
-CONFIG_RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS=2048
#
# NXP DPAA caam - crypto driver
#
CONFIG_RTE_LIBRTE_PMD_DPAA_SEC=n
CONFIG_RTE_LIBRTE_DPAA_MAX_CRYPTODEV=4
-CONFIG_RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS=2048
#
# Compile PMD for QuickAssist based devices
@@ -490,11 +488,6 @@ CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_INIT=n
CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_TX=n
CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_RX=n
CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_DRIVER=n
-#
-# Number of sessions to create in the session memory pool
-# on a single QuickAssist device.
-#
-CONFIG_RTE_QAT_PMD_MAX_NB_SESSIONS=2048
#
# Compile PMD for virtio crypto devices
@@ -504,11 +497,6 @@ CONFIG_RTE_LIBRTE_PMD_VIRTIO_CRYPTO=y
# Number of maximum virtio crypto devices
#
CONFIG_RTE_MAX_VIRTIO_CRYPTO=32
-#
-# Number of sessions to create in the session memory pool
-# on a single virtio crypto device.
-#
-CONFIG_RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS=1024
#
# Compile PMD for AESNI backed device
diff --git a/config/rte_config.h b/config/rte_config.h
index a1d01759e..7261d28d6 100644
--- a/config/rte_config.h
+++ b/config/rte_config.h
@@ -85,23 +85,9 @@
/****** driver defines ********/
-/*
- * Number of sessions to create in the session memory pool
- * on a single instance of crypto HW device.
- */
-/* QuickAssist device */
-#define RTE_QAT_PMD_MAX_NB_SESSIONS 2048
-
/* virtio crypto defines */
-#define RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS 1024
#define RTE_MAX_VIRTIO_CRYPTO 32
-/* DPAA2_SEC */
-#define RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS 2048
-
-/* DPAA_SEC */
-#define RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS 2048
-
/* DPAA SEC max cryptodev devices*/
#define RTE_LIBRTE_DPAA_MAX_CRYPTODEV 4
diff --git a/doc/guides/cryptodevs/aesni_gcm.rst b/doc/guides/cryptodevs/aesni_gcm.rst
index 01590e850..2cfd1e9f7 100644
--- a/doc/guides/cryptodevs/aesni_gcm.rst
+++ b/doc/guides/cryptodevs/aesni_gcm.rst
@@ -83,11 +83,9 @@ The following parameters (all optional) can be provided in the previous two call
* max_nb_queue_pairs: Specify the maximum number of queue pairs in the device (8 by default).
-* max_nb_sessions: Specify the maximum number of sessions that can be created (2048 by default).
-
Example:
.. code-block:: console
- ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_aesni_gcm,socket_id=0,max_nb_sessions=128" \
+ ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_aesni_gcm,socket_id=0" \
-- -p 1 --cdev SW --chain AEAD --aead_algo "aes-gcm"
diff --git a/doc/guides/cryptodevs/aesni_mb.rst b/doc/guides/cryptodevs/aesni_mb.rst
index 236828c0a..a0602a10d 100644
--- a/doc/guides/cryptodevs/aesni_mb.rst
+++ b/doc/guides/cryptodevs/aesni_mb.rst
@@ -106,13 +106,11 @@ The following parameters (all optional) can be provided in the previous two call
* max_nb_queue_pairs: Specify the maximum number of queue pairs in the device (8 by default).
-* max_nb_sessions: Specify the maximum number of sessions that can be created (2048 by default).
-
Example:
.. code-block:: console
- ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_aesni_mb,socket_id=0,max_nb_sessions=128" \
+ ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_aesni_mb,socket_id=0" \
-- -p 1 --cdev SW --chain CIPHER_HASH --cipher_algo "aes-cbc" --auth_algo "sha1-hmac"
Extra notes
diff --git a/doc/guides/cryptodevs/armv8.rst b/doc/guides/cryptodevs/armv8.rst
index 725398daf..4adf3cf40 100644
--- a/doc/guides/cryptodevs/armv8.rst
+++ b/doc/guides/cryptodevs/armv8.rst
@@ -64,7 +64,6 @@ For performance test cryptodev_sw_armv8_perftest can be used.
Limitations
-----------
-* Maximum number of sessions is 2048.
* Only chained operations are supported.
* AES-128-CBC is the only supported cipher variant.
* Cipher input data has to be a multiple of 16 bytes.
diff --git a/doc/guides/cryptodevs/ccp.rst b/doc/guides/cryptodevs/ccp.rst
index 034d20367..d577d5a1c 100644
--- a/doc/guides/cryptodevs/ccp.rst
+++ b/doc/guides/cryptodevs/ccp.rst
@@ -101,8 +101,6 @@ The following parameters (all optional) can be provided in the previous two call
* max_nb_queue_pairs: Specify the maximum number of queue pairs in the device.
-* max_nb_sessions: Specify the maximum number of sessions that can be created (2048 by default).
-
* ccp_auth_opt: Specify authentication operations to perform on CPU using openssl APIs.
To validate ccp pmd, l2fwd-crypto example can be used with following command:
diff --git a/doc/guides/cryptodevs/dpaa2_sec.rst b/doc/guides/cryptodevs/dpaa2_sec.rst
index 3ea24c8aa..990befeb7 100644
--- a/doc/guides/cryptodevs/dpaa2_sec.rst
+++ b/doc/guides/cryptodevs/dpaa2_sec.rst
@@ -200,11 +200,6 @@ Please note that enabling debugging options may affect system performance.
By default it is only enabled in defconfig_arm64-dpaa2-* config.
Toggle compilation of the ``librte_pmd_dpaa2_sec`` driver.
-* ``CONFIG_RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS``
- By default it is set as 2048 in defconfig_arm64-dpaa2-* config.
- It indicates Number of sessions to create in the session memory pool
- on a single DPAA2 SEC device.
-
Installations
-------------
To compile the DPAA2_SEC PMD for Linux arm64 gcc target, run the
diff --git a/doc/guides/cryptodevs/dpaa_sec.rst b/doc/guides/cryptodevs/dpaa_sec.rst
index c14d6d7b1..c5097a84f 100644
--- a/doc/guides/cryptodevs/dpaa_sec.rst
+++ b/doc/guides/cryptodevs/dpaa_sec.rst
@@ -145,11 +145,6 @@ Please note that enabling debugging options may affect system performance.
By default it is only enabled in defconfig_arm64-dpaa-* config.
Toggle compilation of the ``librte_pmd_dpaa_sec`` driver.
-* ``CONFIG_RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS``
- By default it is set as 2048 in defconfig_arm64-dpaa-* config.
- It indicates Number of sessions to create in the session memory pool
- on a single DPAA SEC device.
-
Installations
-------------
To compile the DPAA_SEC PMD for Linux arm64 gcc target, run the
diff --git a/doc/guides/cryptodevs/kasumi.rst b/doc/guides/cryptodevs/kasumi.rst
index 2265eee4e..74bc4d840 100644
--- a/doc/guides/cryptodevs/kasumi.rst
+++ b/doc/guides/cryptodevs/kasumi.rst
@@ -87,13 +87,11 @@ The following parameters (all optional) can be provided in the previous two call
* max_nb_queue_pairs: Specify the maximum number of queue pairs in the device (8 by default).
-* max_nb_sessions: Specify the maximum number of sessions that can be created (2048 by default).
-
Example:
.. code-block:: console
- ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_kasumi,socket_id=0,max_nb_sessions=128" \
+ ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_kasumi,socket_id=0" \
-- -p 1 --cdev SW --chain CIPHER_ONLY --cipher_algo "kasumi-f8"
Extra notes on KASUMI F9
diff --git a/doc/guides/cryptodevs/mvsam.rst b/doc/guides/cryptodevs/mvsam.rst
index fd418c264..b91bb0fb6 100644
--- a/doc/guides/cryptodevs/mvsam.rst
+++ b/doc/guides/cryptodevs/mvsam.rst
@@ -115,7 +115,6 @@ loaded:
The following parameters (all optional) are exported by the driver:
* max_nb_queue_pairs: maximum number of queue pairs in the device (8 by default).
-* max_nb_sessions: maximum number of sessions that can be created (2048 by default).
* socket_id: socket on which to allocate the device resources on.
l2fwd-crypto example application can be used to verify MVSAM CRYPTO PMD
diff --git a/doc/guides/cryptodevs/null.rst b/doc/guides/cryptodevs/null.rst
index c980e0ac8..ca39fe444 100644
--- a/doc/guides/cryptodevs/null.rst
+++ b/doc/guides/cryptodevs/null.rst
@@ -61,11 +61,9 @@ The following parameters (all optional) can be provided in the previous two call
* max_nb_queue_pairs: Specify the maximum number of queue pairs in the device (8 by default).
-* max_nb_sessions: Specify the maximum number of sessions that can be created (2048 by default).
-
Example:
.. code-block:: console
- ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_null,socket_id=0,max_nb_sessions=128" \
+ ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_null,socket_id=0" \
-- -p 1 --cdev SW --chain CIPHER_ONLY --cipher_algo "null"
diff --git a/doc/guides/cryptodevs/openssl.rst b/doc/guides/cryptodevs/openssl.rst
index 427fc807c..153ad0657 100644
--- a/doc/guides/cryptodevs/openssl.rst
+++ b/doc/guides/cryptodevs/openssl.rst
@@ -98,7 +98,6 @@ To verify real traffic l2fwd-crypto example can be used with this command:
Limitations
-----------
-* Maximum number of sessions is 2048.
* Chained mbufs are supported only for source mbuf (destination must be
contiguous).
* Hash only is not supported for GCM and GMAC.
diff --git a/doc/guides/cryptodevs/scheduler.rst b/doc/guides/cryptodevs/scheduler.rst
index d67894d55..e266ec5a3 100644
--- a/doc/guides/cryptodevs/scheduler.rst
+++ b/doc/guides/cryptodevs/scheduler.rst
@@ -58,10 +58,6 @@ two calls:
to be allocated (by default, socket_id will be the socket where the core
that is creating the PMD is running on).
-* max_nb_sessions: Specify the maximum number of sessions that can be
- created. This value may be overwritten internally if there are too
- many devices are attached.
-
* slave: If a cryptodev has been initialized with specific name, it can be
attached to the scheduler using this parameter, simply filling the name
here. Multiple cryptodevs can be attached initially by presenting this
diff --git a/doc/guides/cryptodevs/snow3g.rst b/doc/guides/cryptodevs/snow3g.rst
index 7cba712c1..e0b9a73f7 100644
--- a/doc/guides/cryptodevs/snow3g.rst
+++ b/doc/guides/cryptodevs/snow3g.rst
@@ -79,11 +79,9 @@ The following parameters (all optional) can be provided in the previous two call
* max_nb_queue_pairs: Specify the maximum number of queue pairs in the device (8 by default).
-* max_nb_sessions: Specify the maximum number of sessions that can be created (2048 by default).
-
Example:
.. code-block:: console
- ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_snow3g,socket_id=0,max_nb_sessions=128" \
+ ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_snow3g,socket_id=0" \
-- -p 1 --cdev SW --chain CIPHER_ONLY --cipher_algo "snow3g-uea2"
diff --git a/doc/guides/cryptodevs/zuc.rst b/doc/guides/cryptodevs/zuc.rst
index e38989968..7bebbb48b 100644
--- a/doc/guides/cryptodevs/zuc.rst
+++ b/doc/guides/cryptodevs/zuc.rst
@@ -79,11 +79,9 @@ The following parameters (all optional) can be provided in the previous two call
* max_nb_queue_pairs: Specify the maximum number of queue pairs in the device (8 by default).
-* max_nb_sessions: Specify the maximum number of sessions that can be created (2048 by default).
-
Example:
.. code-block:: console
- ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_zuc,socket_id=0,max_nb_sessions=128" \
+ ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_zuc,socket_id=0" \
-- -p 1 --cdev SW --chain CIPHER_ONLY --cipher_algo "zuc-eea3"
diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst
index d02bb7514..c83184fe9 100644
--- a/doc/guides/prog_guide/cryptodev_lib.rst
+++ b/doc/guides/prog_guide/cryptodev_lib.rst
@@ -41,7 +41,7 @@ From the command line using the --vdev EAL option
.. code-block:: console
- --vdev 'crypto_aesni_mb0,max_nb_queue_pairs=2,max_nb_sessions=1024,socket_id=0'
+ --vdev 'crypto_aesni_mb0,max_nb_queue_pairs=2,socket_id=0'
.. Note::
@@ -57,12 +57,11 @@ Our using the rte_vdev_init API within the application code.
.. code-block:: c
rte_vdev_init("crypto_aesni_mb",
- "max_nb_queue_pairs=2,max_nb_sessions=1024,socket_id=0")
+ "max_nb_queue_pairs=2,socket_id=0")
All virtual Crypto devices support the following initialization parameters:
* ``max_nb_queue_pairs`` - maximum number of queue pairs supported by the device.
-* ``max_nb_sessions`` - maximum number of sessions supported by the device
* ``socket_id`` - socket on which to allocate the device resources on.
@@ -276,10 +275,6 @@ relevant information for the device.
const struct rte_cryptodev_capabilities *capabilities;
unsigned max_nb_queue_pairs;
-
- struct {
- unsigned max_nb_sessions;
- } sym;
};
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index b71080bb8..dc014da21 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -101,9 +101,6 @@ Deprecation Notices
* cryptodev: The following changes will be made in the library
for 18.08:
- - Removal of ``sym`` structure in ``rte_cryptodev_info`` structure,
- containing fields not relevant anymore since the session mempool
- is not internal in the crypto device anymore.
- Functions ``rte_cryptodev_queue_pair_attach_sym_session()`` and
``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
18.05 and removed in 18.08, as there are no drivers doing anything useful
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index ba710e845..a6f31713a 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -56,7 +56,8 @@ API Changes
=========================================================
* cryptodev: In struct ``struct rte_cryptodev_info``, field ``rte_pci_device *pci_dev``
- has been replaced with field ``struct rte_device *device``.
+ has been replaced with field ``struct rte_device *device`` and
+ field ``sym`` has been removed.
ABI Changes
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index 80360dd9c..cd5b1952b 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -513,7 +513,6 @@ aesni_gcm_create(const char *name,
internals->vector_mode = vector_mode;
internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
- internals->max_nb_sessions = init_params->max_nb_sessions;
return 0;
}
@@ -525,8 +524,7 @@ aesni_gcm_probe(struct rte_vdev_device *vdev)
"",
sizeof(struct aesni_gcm_private),
rte_socket_id(),
- RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
- RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+ RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
};
const char *name;
const char *input_args;
@@ -568,7 +566,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_GCM_PMD, aesni_gcm_pmd_drv);
RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_AESNI_GCM_PMD, cryptodev_aesni_gcm_pmd);
RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_GCM_PMD,
"max_nb_queue_pairs=<int> "
- "max_nb_sessions=<int> "
"socket_id=<int>");
RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_gcm_crypto_drv, aesni_gcm_pmd_drv.driver,
cryptodev_driver_id);
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
index 6f542137c..b05122c1b 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
@@ -143,7 +143,6 @@ aesni_gcm_pmd_info_get(struct rte_cryptodev *dev,
dev_info->capabilities = aesni_gcm_pmd_capabilities;
dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
- dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
}
}
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
index 3d60583b0..b496377dd 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
@@ -39,8 +39,6 @@ struct aesni_gcm_private {
/**< Vector mode */
unsigned max_nb_queue_pairs;
/**< Max number of queue pairs supported by device */
- unsigned max_nb_sessions;
- /**< Max number of sessions supported by device */
};
struct aesni_gcm_qp {
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index bb35c66ab..bb647f736 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -885,7 +885,6 @@ cryptodev_aesni_mb_create(const char *name,
internals->vector_mode = vector_mode;
internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
- internals->max_nb_sessions = init_params->max_nb_sessions;
return 0;
}
@@ -897,8 +896,7 @@ cryptodev_aesni_mb_probe(struct rte_vdev_device *vdev)
"",
sizeof(struct aesni_mb_private),
rte_socket_id(),
- RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
- RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+ RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
};
const char *name, *args;
int retval;
@@ -947,7 +945,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_MB_PMD, cryptodev_aesni_mb_pmd_drv);
RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_AESNI_MB_PMD, cryptodev_aesni_mb_pmd);
RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_MB_PMD,
"max_nb_queue_pairs=<int> "
- "max_nb_sessions=<int> "
"socket_id=<int>");
RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_mb_crypto_drv,
cryptodev_aesni_mb_pmd_drv.driver,
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
index 01530523f..7c735f5dc 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -387,7 +387,6 @@ aesni_mb_pmd_info_get(struct rte_cryptodev *dev,
dev_info->feature_flags = dev->feature_flags;
dev_info->capabilities = aesni_mb_pmd_capabilities;
dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
- dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
}
}
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h
index a33b2f695..9520cdf9c 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h
@@ -124,8 +124,6 @@ struct aesni_mb_private {
/**< CPU vector instruction set mode */
unsigned max_nb_queue_pairs;
/**< Max number of queue pairs supported by device */
- unsigned max_nb_sessions;
- /**< Max number of sessions supported by device */
};
/** AESNI Multi buffer queue pair */
diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
index fbb08f729..db0d8a2a9 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
@@ -779,7 +779,6 @@ cryptodev_armv8_crypto_create(const char *name,
internals = dev->data->dev_private;
internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
- internals->max_nb_sessions = init_params->max_nb_sessions;
return 0;
@@ -800,8 +799,7 @@ cryptodev_armv8_crypto_init(struct rte_vdev_device *vdev)
"",
sizeof(struct armv8_crypto_private),
rte_socket_id(),
- RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
- RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+ RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
};
const char *name;
const char *input_args;
@@ -848,7 +846,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_ARMV8_PMD, armv8_crypto_pmd_drv);
RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_ARMV8_PMD, cryptodev_armv8_pmd);
RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ARMV8_PMD,
"max_nb_queue_pairs=<int> "
- "max_nb_sessions=<int> "
"socket_id=<int>");
RTE_PMD_REGISTER_CRYPTO_DRIVER(armv8_crypto_drv, armv8_crypto_pmd_drv.driver,
cryptodev_driver_id);
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
index c64aef09f..d31ef7d66 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
@@ -154,7 +154,6 @@ armv8_crypto_pmd_info_get(struct rte_cryptodev *dev,
dev_info->feature_flags = dev->feature_flags;
dev_info->capabilities = armv8_crypto_pmd_capabilities;
dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
- dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
}
}
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_private.h b/drivers/crypto/armv8/rte_armv8_pmd_private.h
index b8966e934..7feb021db 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_private.h
+++ b/drivers/crypto/armv8/rte_armv8_pmd_private.h
@@ -106,8 +106,6 @@ typedef void (*crypto_key_sched_t)(uint8_t *, const uint8_t *);
struct armv8_crypto_private {
unsigned int max_nb_qpairs;
/**< Max number of queue pairs */
- unsigned int max_nb_sessions;
- /**< Max number of sessions */
};
/** ARMv8 crypto queue pair */
diff --git a/drivers/crypto/ccp/ccp_pmd_ops.c b/drivers/crypto/ccp/ccp_pmd_ops.c
index 80b75ccb0..7e383feed 100644
--- a/drivers/crypto/ccp/ccp_pmd_ops.c
+++ b/drivers/crypto/ccp/ccp_pmd_ops.c
@@ -624,7 +624,6 @@ ccp_pmd_info_get(struct rte_cryptodev *dev,
if (internals->auth_opt == 1)
dev_info->capabilities = ccp_crypto_cap_complete;
dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
- dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
}
}
diff --git a/drivers/crypto/ccp/ccp_pmd_private.h b/drivers/crypto/ccp/ccp_pmd_private.h
index f4498048f..79752f687 100644
--- a/drivers/crypto/ccp/ccp_pmd_private.h
+++ b/drivers/crypto/ccp/ccp_pmd_private.h
@@ -40,7 +40,6 @@
/* private data structure for each CCP crypto device */
struct ccp_private {
unsigned int max_nb_qpairs; /**< Max number of queue pairs */
- unsigned int max_nb_sessions; /**< Max number of sessions */
uint8_t crypto_num_dev; /**< Number of working crypto devices */
bool auth_opt; /**< Authentication offload option */
struct ccp_device *last_dev; /**< Last working crypto device */
diff --git a/drivers/crypto/ccp/rte_ccp_pmd.c b/drivers/crypto/ccp/rte_ccp_pmd.c
index 2061f465e..d70640f6d 100644
--- a/drivers/crypto/ccp/rte_ccp_pmd.c
+++ b/drivers/crypto/ccp/rte_ccp_pmd.c
@@ -30,14 +30,12 @@ struct ccp_pmd_init_params {
#define CCP_CRYPTODEV_PARAM_NAME ("name")
#define CCP_CRYPTODEV_PARAM_SOCKET_ID ("socket_id")
#define CCP_CRYPTODEV_PARAM_MAX_NB_QP ("max_nb_queue_pairs")
-#define CCP_CRYPTODEV_PARAM_MAX_NB_SESS ("max_nb_sessions")
#define CCP_CRYPTODEV_PARAM_AUTH_OPT ("ccp_auth_opt")
const char *ccp_pmd_valid_params[] = {
CCP_CRYPTODEV_PARAM_NAME,
CCP_CRYPTODEV_PARAM_SOCKET_ID,
CCP_CRYPTODEV_PARAM_MAX_NB_QP,
- CCP_CRYPTODEV_PARAM_MAX_NB_SESS,
CCP_CRYPTODEV_PARAM_AUTH_OPT,
};
@@ -124,13 +122,6 @@ ccp_pmd_parse_input_args(struct ccp_pmd_init_params *params,
if (ret < 0)
goto free_kvlist;
- ret = rte_kvargs_process(kvlist,
- CCP_CRYPTODEV_PARAM_MAX_NB_SESS,
- &parse_integer_arg,
- ¶ms->def_p.max_nb_sessions);
- if (ret < 0)
- goto free_kvlist;
-
ret = rte_kvargs_process(kvlist,
CCP_CRYPTODEV_PARAM_SOCKET_ID,
&parse_integer_arg,
@@ -334,7 +325,6 @@ cryptodev_ccp_create(const char *name,
internals = dev->data->dev_private;
internals->max_nb_qpairs = init_params->def_p.max_nb_queue_pairs;
- internals->max_nb_sessions = init_params->def_p.max_nb_sessions;
internals->auth_opt = init_params->auth_opt;
internals->crypto_num_dev = cryptodev_cnt;
@@ -359,8 +349,7 @@ cryptodev_ccp_probe(struct rte_vdev_device *vdev)
"",
sizeof(struct ccp_private),
rte_socket_id(),
- CCP_PMD_MAX_QUEUE_PAIRS,
- RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+ CCP_PMD_MAX_QUEUE_PAIRS
},
.auth_opt = CCP_PMD_AUTH_OPT_CCP,
};
@@ -382,8 +371,6 @@ cryptodev_ccp_probe(struct rte_vdev_device *vdev)
init_params.def_p.socket_id);
RTE_LOG(INFO, PMD, "Max number of queue pairs = %d\n",
init_params.def_p.max_nb_queue_pairs);
- RTE_LOG(INFO, PMD, "Max number of sessions = %d\n",
- init_params.def_p.max_nb_sessions);
RTE_LOG(INFO, PMD, "Authentication offload to %s\n",
((init_params.auth_opt == 0) ? "CCP" : "CPU"));
@@ -404,7 +391,6 @@ static struct cryptodev_driver ccp_crypto_drv;
RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_CCP_PMD, cryptodev_ccp_pmd_drv);
RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_CCP_PMD,
"max_nb_queue_pairs=<int> "
- "max_nb_sessions=<int> "
"socket_id=<int> "
"ccp_auth_opt=<int>");
RTE_PMD_REGISTER_CRYPTO_DRIVER(ccp_crypto_drv, cryptodev_ccp_pmd_drv.driver,
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 56fa969d3..16ab0b6a6 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -55,6 +55,8 @@ typedef uint64_t dma_addr_t;
#define SEC_FLC_DHR_OUTBOUND -114
#define SEC_FLC_DHR_INBOUND 0
+#define RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS 2048
+
enum rta_sec_era rta_sec_era = RTA_SEC_ERA_8;
static uint8_t cryptodev_driver_id;
@@ -2626,7 +2628,6 @@ dpaa2_sec_dev_infos_get(struct rte_cryptodev *dev,
info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
info->feature_flags = dev->feature_flags;
info->capabilities = dpaa2_sec_capabilities;
- info->sym.max_nb_sessions = internals->max_nb_sessions;
info->driver_id = cryptodev_driver_id;
}
}
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 73cae483b..909583bd0 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -2214,7 +2214,6 @@ dpaa_sec_dev_infos_get(struct rte_cryptodev *dev,
info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
info->feature_flags = dev->feature_flags;
info->capabilities = dpaa_sec_capabilities;
- info->sym.max_nb_sessions = internals->max_nb_sessions;
info->driver_id = cryptodev_driver_id;
}
}
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.h b/drivers/crypto/dpaa_sec/dpaa_sec.h
index e15e373fd..91df68009 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.h
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.h
@@ -137,6 +137,7 @@ struct dpaa_sec_qp {
};
#define RTE_DPAA_MAX_NB_SEC_QPS 8
+#define RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS 2048
#define RTE_DPAA_MAX_RX_QUEUE RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS
#define DPAA_MAX_DEQUEUE_NUM_FRAMES 63
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c
index 205dc1de7..65376b211 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c
@@ -555,7 +555,6 @@ cryptodev_kasumi_create(const char *name,
internals = dev->data->dev_private;
internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
- internals->max_nb_sessions = init_params->max_nb_sessions;
return 0;
init_error:
@@ -573,8 +572,7 @@ cryptodev_kasumi_probe(struct rte_vdev_device *vdev)
"",
sizeof(struct kasumi_private),
rte_socket_id(),
- RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
- RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+ RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
};
const char *name;
const char *input_args;
@@ -617,7 +615,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_KASUMI_PMD, cryptodev_kasumi_pmd_drv);
RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_KASUMI_PMD, cryptodev_kasumi_pmd);
RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_KASUMI_PMD,
"max_nb_queue_pairs=<int> "
- "max_nb_sessions=<int> "
"socket_id=<int>");
RTE_PMD_REGISTER_CRYPTO_DRIVER(kasumi_crypto_drv,
cryptodev_kasumi_pmd_drv.driver, cryptodev_driver_id);
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
index a388dbb63..284669341 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
@@ -126,7 +126,6 @@ kasumi_pmd_info_get(struct rte_cryptodev *dev,
if (dev_info != NULL) {
dev_info->driver_id = dev->driver_id;
dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
- dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
dev_info->feature_flags = dev->feature_flags;
dev_info->capabilities = kasumi_pmd_capabilities;
}
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_private.h b/drivers/crypto/kasumi/rte_kasumi_pmd_private.h
index a397bee65..2b12818bc 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd_private.h
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd_private.h
@@ -36,8 +36,6 @@
struct kasumi_private {
unsigned max_nb_queue_pairs;
/**< Max number of queue pairs supported by device */
- unsigned max_nb_sessions;
- /**< Max number of sessions supported by device */
};
/** KASUMI buffer queue pair */
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c
index 1b6029a56..822b6cac7 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
@@ -719,7 +719,6 @@ cryptodev_mrvl_crypto_create(const char *name,
internals = dev->data->dev_private;
internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
- internals->max_nb_sessions = init_params->max_nb_sessions;
/*
* ret == -EEXIST is correct, it means DMA
@@ -734,8 +733,6 @@ cryptodev_mrvl_crypto_create(const char *name,
"DMA memory has been already initialized by a different driver.");
}
- sam_params.max_num_sessions = internals->max_nb_sessions;
-
return sam_init(&sam_params);
init_error:
@@ -766,8 +763,6 @@ cryptodev_mrvl_crypto_init(struct rte_vdev_device *vdev)
init_params.private_data_size = sizeof(struct mrvl_crypto_private);
init_params.max_nb_queue_pairs = sam_get_num_inst() * SAM_HW_RING_NUM;
- init_params.max_nb_sessions =
- RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS;
init_params.socket_id = rte_socket_id();
ret = rte_cryptodev_pmd_parse_input_args(&init_params, args);
@@ -823,7 +818,6 @@ static struct cryptodev_driver mrvl_crypto_drv;
RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_MRVL_PMD, cryptodev_mrvl_pmd_drv);
RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_MRVL_PMD,
"max_nb_queue_pairs=<int> "
- "max_nb_sessions=<int> "
"socket_id=<int>");
RTE_PMD_REGISTER_CRYPTO_DRIVER(mrvl_crypto_drv, cryptodev_mrvl_pmd_drv.driver,
cryptodev_driver_id);
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
index 3f8de37b7..944a415cf 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
@@ -471,7 +471,6 @@ mrvl_crypto_pmd_info_get(struct rte_cryptodev *dev,
dev_info->feature_flags = dev->feature_flags;
dev_info->capabilities = mrvl_crypto_pmd_capabilities;
dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
- dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
}
}
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_private.h b/drivers/crypto/mvsam/rte_mrvl_pmd_private.h
index c16d95b46..bb528493a 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd_private.h
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd_private.h
@@ -51,7 +51,6 @@ enum mrvl_crypto_chain_order {
/** Private data structure for each crypto device. */
struct mrvl_crypto_private {
unsigned int max_nb_qpairs; /**< Max number of queue pairs */
- unsigned int max_nb_sessions; /**< Max number of sessions */
};
/** MRVL crypto queue pair structure. */
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index 052b6546c..a8499cf94 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -182,7 +182,6 @@ cryptodev_null_create(const char *name,
internals = dev->data->dev_private;
internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
- internals->max_nb_sessions = init_params->max_nb_sessions;
return 0;
}
@@ -196,7 +195,6 @@ cryptodev_null_probe(struct rte_vdev_device *dev)
sizeof(struct null_crypto_private),
rte_socket_id(),
RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
- RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
};
const char *name, *args;
int retval;
@@ -245,7 +243,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_NULL_PMD, cryptodev_null_pmd_drv);
RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_NULL_PMD, cryptodev_null_pmd);
RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_NULL_PMD,
"max_nb_queue_pairs=<int> "
- "max_nb_sessions=<int> "
"socket_id=<int>");
RTE_PMD_REGISTER_CRYPTO_DRIVER(null_crypto_drv, cryptodev_null_pmd_drv.driver,
cryptodev_driver_id);
diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
index f8e5f61f1..3ca1370e8 100644
--- a/drivers/crypto/null/null_crypto_pmd_ops.c
+++ b/drivers/crypto/null/null_crypto_pmd_ops.c
@@ -121,7 +121,6 @@ null_crypto_pmd_info_get(struct rte_cryptodev *dev,
if (dev_info != NULL) {
dev_info->driver_id = dev->driver_id;
dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
- dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
dev_info->feature_flags = dev->feature_flags;
dev_info->capabilities = null_crypto_pmd_capabilities;
}
diff --git a/drivers/crypto/null/null_crypto_pmd_private.h b/drivers/crypto/null/null_crypto_pmd_private.h
index 0fd133625..d7d769f3d 100644
--- a/drivers/crypto/null/null_crypto_pmd_private.h
+++ b/drivers/crypto/null/null_crypto_pmd_private.h
@@ -32,7 +32,6 @@
/** private data structure for each NULL crypto device */
struct null_crypto_private {
unsigned max_nb_qpairs; /**< Max number of queue pairs */
- unsigned max_nb_sessions; /**< Max number of sessions */
};
/** NULL crypto queue pair */
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 93c6d7e5d..965cab9f2 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -1666,7 +1666,6 @@ cryptodev_openssl_create(const char *name,
internals = dev->data->dev_private;
internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
- internals->max_nb_sessions = init_params->max_nb_sessions;
return 0;
@@ -1687,7 +1686,6 @@ cryptodev_openssl_probe(struct rte_vdev_device *vdev)
sizeof(struct openssl_private),
rte_socket_id(),
RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
- RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
};
const char *name;
const char *input_args;
@@ -1731,7 +1729,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_OPENSSL_PMD,
cryptodev_openssl_pmd_drv);
RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_OPENSSL_PMD,
"max_nb_queue_pairs=<int> "
- "max_nb_sessions=<int> "
"socket_id=<int>");
RTE_PMD_REGISTER_CRYPTO_DRIVER(openssl_crypto_drv,
cryptodev_openssl_pmd_drv.driver, cryptodev_driver_id);
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index 1cb87d59a..485c80e7f 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -547,7 +547,6 @@ openssl_pmd_info_get(struct rte_cryptodev *dev,
dev_info->feature_flags = dev->feature_flags;
dev_info->capabilities = openssl_pmd_capabilities;
dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
- dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
}
}
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_private.h b/drivers/crypto/openssl/rte_openssl_pmd_private.h
index bc8dc7cdc..02ea81d5c 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_private.h
+++ b/drivers/crypto/openssl/rte_openssl_pmd_private.h
@@ -62,8 +62,6 @@ enum openssl_auth_mode {
struct openssl_private {
unsigned int max_nb_qpairs;
/**< Max number of queue pairs */
- unsigned int max_nb_sessions;
- /**< Max number of sessions */
};
/** OPENSSL crypto queue pair */
diff --git a/drivers/crypto/qat/qat_crypto.c b/drivers/crypto/qat/qat_crypto.c
index 768dcbae0..e89d3bc11 100644
--- a/drivers/crypto/qat/qat_crypto.c
+++ b/drivers/crypto/qat/qat_crypto.c
@@ -1654,7 +1654,6 @@ void qat_dev_info_get(struct rte_cryptodev *dev,
ADF_NUM_BUNDLES_PER_DEV;
info->feature_flags = dev->feature_flags;
info->capabilities = internals->qat_dev_capabilities;
- info->sym.max_nb_sessions = internals->max_nb_sessions;
info->driver_id = cryptodev_qat_driver_id;
}
}
diff --git a/drivers/crypto/qat/qat_crypto.h b/drivers/crypto/qat/qat_crypto.h
index 281a142b9..c84cf669f 100644
--- a/drivers/crypto/qat/qat_crypto.h
+++ b/drivers/crypto/qat/qat_crypto.h
@@ -75,8 +75,6 @@ struct qat_qp {
struct qat_pmd_private {
unsigned max_nb_queue_pairs;
/**< Max number of queue pairs supported by device */
- unsigned max_nb_sessions;
- /**< Max number of sessions supported by device */
enum qat_device_gen qat_dev_gen;
/**< QAT device generation */
const struct rte_cryptodev_capabilities *qat_dev_capabilities;
diff --git a/drivers/crypto/qat/rte_qat_cryptodev.c b/drivers/crypto/qat/rte_qat_cryptodev.c
index c8da07af6..74a903d3a 100644
--- a/drivers/crypto/qat/rte_qat_cryptodev.c
+++ b/drivers/crypto/qat/rte_qat_cryptodev.c
@@ -94,7 +94,6 @@ crypto_qat_create(const char *name, struct rte_pci_device *pci_dev,
RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
internals = cryptodev->data->dev_private;
- internals->max_nb_sessions = init_params->max_nb_sessions;
switch (pci_dev->id.device_id) {
case 0x0443:
internals->qat_dev_gen = QAT_GEN1;
@@ -131,8 +130,7 @@ static int crypto_qat_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
struct rte_cryptodev_pmd_init_params init_params = {
.name = "",
.socket_id = pci_dev->device.numa_node,
- .private_data_size = sizeof(struct qat_pmd_private),
- .max_nb_sessions = RTE_QAT_PMD_MAX_NB_SESSIONS
+ .private_data_size = sizeof(struct qat_pmd_private)
};
char name[RTE_CRYPTODEV_NAME_MAX_LEN];
diff --git a/drivers/crypto/scheduler/scheduler_pmd.c b/drivers/crypto/scheduler/scheduler_pmd.c
index 25d6409f3..32a19c106 100644
--- a/drivers/crypto/scheduler/scheduler_pmd.c
+++ b/drivers/crypto/scheduler/scheduler_pmd.c
@@ -31,7 +31,6 @@ struct scheduler_init_params {
#define RTE_CRYPTODEV_VDEV_MODE ("mode")
#define RTE_CRYPTODEV_VDEV_ORDERING ("ordering")
#define RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG ("max_nb_queue_pairs")
-#define RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG ("max_nb_sessions")
#define RTE_CRYPTODEV_VDEV_SOCKET_ID ("socket_id")
#define RTE_CRYPTODEV_VDEV_COREMASK ("coremask")
#define RTE_CRYPTODEV_VDEV_CORELIST ("corelist")
@@ -42,7 +41,6 @@ const char *scheduler_valid_params[] = {
RTE_CRYPTODEV_VDEV_MODE,
RTE_CRYPTODEV_VDEV_ORDERING,
RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG,
- RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG,
RTE_CRYPTODEV_VDEV_SOCKET_ID,
RTE_CRYPTODEV_VDEV_COREMASK,
RTE_CRYPTODEV_VDEV_CORELIST
@@ -406,13 +404,6 @@ scheduler_parse_init_params(struct scheduler_init_params *params,
if (ret < 0)
goto free_kvlist;
- ret = rte_kvargs_process(kvlist,
- RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG,
- &parse_integer_arg,
- ¶ms->def_p.max_nb_sessions);
- if (ret < 0)
- goto free_kvlist;
-
ret = rte_kvargs_process(kvlist, RTE_CRYPTODEV_VDEV_SOCKET_ID,
&parse_integer_arg,
¶ms->def_p.socket_id);
@@ -466,8 +457,7 @@ cryptodev_scheduler_probe(struct rte_vdev_device *vdev)
"",
sizeof(struct scheduler_ctx),
rte_socket_id(),
- RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
- RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+ RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
},
.nb_slaves = 0,
.mode = CDEV_SCHED_MODE_NOT_SET,
@@ -500,7 +490,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_SCHEDULER_PMD,
cryptodev_scheduler_pmd_drv);
RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SCHEDULER_PMD,
"max_nb_queue_pairs=<int> "
- "max_nb_sessions=<int> "
"socket_id=<int> "
"slave=<name>");
RTE_PMD_REGISTER_CRYPTO_DRIVER(scheduler_crypto_drv,
diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index 147dc51e9..88be72a05 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -321,8 +321,6 @@ scheduler_pmd_info_get(struct rte_cryptodev *dev,
struct rte_cryptodev_info *dev_info)
{
struct scheduler_ctx *sched_ctx = dev->data->dev_private;
- uint32_t max_nb_sessions = sched_ctx->nb_slaves ?
- UINT32_MAX : RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS;
uint32_t i;
if (!dev_info)
@@ -338,17 +336,12 @@ scheduler_pmd_info_get(struct rte_cryptodev *dev,
struct rte_cryptodev_info slave_info;
rte_cryptodev_info_get(slave_dev_id, &slave_info);
- max_nb_sessions = slave_info.sym.max_nb_sessions <
- max_nb_sessions ?
- slave_info.sym.max_nb_sessions :
- max_nb_sessions;
}
dev_info->driver_id = dev->driver_id;
dev_info->feature_flags = dev->feature_flags;
dev_info->capabilities = sched_ctx->capabilities;
dev_info->max_nb_queue_pairs = sched_ctx->max_nb_queue_pairs;
- dev_info->sym.max_nb_sessions = max_nb_sessions;
}
/** Release queue pair */
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
index 72751e35e..fe595abe1 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
@@ -555,7 +555,6 @@ cryptodev_snow3g_create(const char *name,
internals = dev->data->dev_private;
internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
- internals->max_nb_sessions = init_params->max_nb_sessions;
return 0;
init_error:
@@ -574,7 +573,6 @@ cryptodev_snow3g_probe(struct rte_vdev_device *vdev)
sizeof(struct snow3g_private),
rte_socket_id(),
RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
- RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
};
const char *name;
const char *input_args;
@@ -617,7 +615,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_SNOW3G_PMD, cryptodev_snow3g_pmd_drv);
RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_SNOW3G_PMD, cryptodev_snow3g_pmd);
RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SNOW3G_PMD,
"max_nb_queue_pairs=<int> "
- "max_nb_sessions=<int> "
"socket_id=<int>");
RTE_PMD_REGISTER_CRYPTO_DRIVER(snow3g_crypto_drv,
cryptodev_snow3g_pmd_drv.driver, cryptodev_driver_id);
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
index f60b47598..fff4644c0 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
@@ -130,7 +130,6 @@ snow3g_pmd_info_get(struct rte_cryptodev *dev,
if (dev_info != NULL) {
dev_info->driver_id = dev->driver_id;
dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
- dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
dev_info->feature_flags = dev->feature_flags;
dev_info->capabilities = snow3g_pmd_capabilities;
}
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_private.h b/drivers/crypto/snow3g/rte_snow3g_pmd_private.h
index eea900e0a..2c6e1a948 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_private.h
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_private.h
@@ -36,8 +36,6 @@
struct snow3g_private {
unsigned max_nb_queue_pairs;
/**< Max number of queue pairs supported by device */
- unsigned max_nb_sessions;
- /**< Max number of sessions supported by device */
};
/** SNOW 3G buffer queue pair */
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 482edea1a..8395801a4 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -1411,8 +1411,6 @@ virtio_crypto_dev_info_get(struct rte_cryptodev *dev,
info->driver_id = cryptodev_virtio_driver_id;
info->feature_flags = dev->feature_flags;
info->max_nb_queue_pairs = hw->max_dataqueues;
- info->sym.max_nb_sessions =
- RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS;
info->capabilities = hw->virtio_dev_capabilities;
}
}
@@ -1426,7 +1424,6 @@ crypto_virtio_pci_probe(
.name = "",
.socket_id = rte_socket_id(),
.private_data_size = sizeof(struct virtio_crypto_hw),
- .max_nb_sessions = RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS
};
char name[RTE_CRYPTODEV_NAME_MAX_LEN];
diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
index a805b2278..396f25975 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd.c
@@ -479,7 +479,6 @@ cryptodev_zuc_create(const char *name,
internals = dev->data->dev_private;
internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
- internals->max_nb_sessions = init_params->max_nb_sessions;
return 0;
init_error:
@@ -497,8 +496,7 @@ cryptodev_zuc_probe(struct rte_vdev_device *vdev)
"",
sizeof(struct zuc_private),
rte_socket_id(),
- RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
- RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+ RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
};
const char *name;
const char *input_args;
@@ -541,7 +539,6 @@ static struct cryptodev_driver zuc_crypto_drv;
RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_ZUC_PMD, cryptodev_zuc_pmd_drv);
RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ZUC_PMD,
"max_nb_queue_pairs=<int> "
- "max_nb_sessions=<int> "
"socket_id=<int>");
RTE_PMD_REGISTER_CRYPTO_DRIVER(zuc_crypto_drv, cryptodev_zuc_pmd_drv.driver,
cryptodev_driver_id);
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
index 8abac8989..ac509e70d 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
@@ -130,7 +130,6 @@ zuc_pmd_info_get(struct rte_cryptodev *dev,
if (dev_info != NULL) {
dev_info->driver_id = dev->driver_id;
dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
- dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
dev_info->feature_flags = dev->feature_flags;
dev_info->capabilities = zuc_pmd_capabilities;
}
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_private.h b/drivers/crypto/zuc/rte_zuc_pmd_private.h
index b83c4a047..2bd378ad6 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_private.h
+++ b/drivers/crypto/zuc/rte_zuc_pmd_private.h
@@ -37,8 +37,6 @@
struct zuc_private {
unsigned max_nb_queue_pairs;
/**< Max number of queue pairs supported by device */
- unsigned max_nb_sessions;
- /**< Max number of sessions supported by device */
};
/** ZUC buffer queue pair */
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index a4b8cccc2..78be5bdb8 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -381,11 +381,6 @@ struct rte_cryptodev_info {
unsigned max_nb_queue_pairs;
/**< Maximum number of queues pairs supported by device. */
-
- struct {
- unsigned max_nb_sessions;
- /**< Maximum number of sessions supported by device. */
- } sym;
};
#define RTE_CRYPTODEV_DETACHED (0)
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.c b/lib/librte_cryptodev/rte_cryptodev_pmd.c
index f2aac24b7..2088ac3f3 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.c
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.c
@@ -65,13 +65,6 @@ rte_cryptodev_pmd_parse_input_args(
if (ret < 0)
goto free_kvlist;
- ret = rte_kvargs_process(kvlist,
- RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG,
- &rte_cryptodev_pmd_parse_uint_arg,
- ¶ms->max_nb_sessions);
- if (ret < 0)
- goto free_kvlist;
-
ret = rte_kvargs_process(kvlist,
RTE_CRYPTODEV_PMD_SOCKET_ID_ARG,
&rte_cryptodev_pmd_parse_uint_arg,
@@ -109,10 +102,9 @@ rte_cryptodev_pmd_create(const char *name,
device->driver->name, name);
CDEV_LOG_INFO("[%s] - Initialisation parameters - name: %s,"
- "socket id: %d, max queue pairs: %u, max sessions: %u",
+ "socket id: %d, max queue pairs: %u",
device->driver->name, name,
- params->socket_id, params->max_nb_queue_pairs,
- params->max_nb_sessions);
+ params->socket_id, params->max_nb_queue_pairs);
/* allocate device structure */
cryptodev = rte_cryptodev_pmd_allocate(name, params->socket_id);
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index 69d776934..0739ce065 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -59,18 +59,15 @@ extern "C" {
#define RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS 8
-#define RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS 2048
#define RTE_CRYPTODEV_PMD_NAME_ARG ("name")
#define RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG ("max_nb_queue_pairs")
-#define RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG ("max_nb_sessions")
#define RTE_CRYPTODEV_PMD_SOCKET_ID_ARG ("socket_id")
static const char * const cryptodev_pmd_valid_params[] = {
RTE_CRYPTODEV_PMD_NAME_ARG,
RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG,
- RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG,
RTE_CRYPTODEV_PMD_SOCKET_ID_ARG
};
@@ -83,7 +80,6 @@ struct rte_cryptodev_pmd_init_params {
size_t private_data_size;
int socket_id;
unsigned int max_nb_queue_pairs;
- unsigned int max_nb_sessions;
};
/** Global structure used for maintaining state of allocated crypto devices */
diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 389f79677..2c687bd7c 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -39,6 +39,7 @@
#include "test_cryptodev_hmac_test_vectors.h"
#define VDEV_ARGS_SIZE 100
+#define MAX_NB_SESSIONS 4
static int gbl_driver_id;
@@ -437,7 +438,7 @@ testsuite_setup(void)
*/
ts_params->session_mpool = rte_mempool_create(
"test_sess_mp",
- info.sym.max_nb_sessions * 2,
+ MAX_NB_SESSIONS * 2,
session_size,
0, 0, NULL, NULL, NULL,
NULL, SOCKET_ID_ANY,
@@ -6499,10 +6500,10 @@ test_multi_session(void)
sessions = rte_malloc(NULL,
(sizeof(struct rte_cryptodev_sym_session *) *
- dev_info.sym.max_nb_sessions) + 1, 0);
+ MAX_NB_SESSIONS) + 1, 0);
/* Create multiple crypto sessions*/
- for (i = 0; i < dev_info.sym.max_nb_sessions; i++) {
+ for (i = 0; i < MAX_NB_SESSIONS; i++) {
sessions[i] = rte_cryptodev_sym_session_create(
ts_params->session_mpool);
@@ -6551,7 +6552,7 @@ test_multi_session(void)
TEST_ASSERT_NULL(sessions[i],
"Session creation succeeded unexpectedly!");
- for (i = 0; i < dev_info.sym.max_nb_sessions; i++) {
+ for (i = 0; i < MAX_NB_SESSIONS; i++) {
rte_cryptodev_sym_session_clear(ts_params->valid_devs[0],
sessions[i]);
rte_cryptodev_sym_session_free(sessions[i]);
@@ -6610,7 +6611,7 @@ test_multi_session_random_usage(void)
sessions = rte_malloc(NULL,
(sizeof(struct rte_cryptodev_sym_session *)
- * dev_info.sym.max_nb_sessions) + 1, 0);
+ * MAX_NB_SESSIONS) + 1, 0);
for (i = 0; i < MB_SESSION_NUMBER; i++) {
sessions[i] = rte_cryptodev_sym_session_create(
@@ -8545,7 +8546,7 @@ test_scheduler_attach_slave_op(void)
if (ts_params->session_mpool == NULL) {
ts_params->session_mpool = rte_mempool_create(
"test_sess_mp",
- info.sym.max_nb_sessions * 2,
+ MAX_NB_SESSIONS * 2,
session_size,
0, 0, NULL, NULL, NULL,
NULL, SOCKET_ID_ANY,
--
2.17.0
^ permalink raw reply [relevance 1%]
* [dpdk-dev] [PATCH 1/6] cryptodev: replace bus specific struct with generic dev
@ 2018-06-08 22:02 4% ` Pablo de Lara
2018-06-08 22:02 1% ` [dpdk-dev] [PATCH 3/6] cryptodev: remove max number of sessions Pablo de Lara
` (7 subsequent siblings)
8 siblings, 0 replies; 200+ results
From: Pablo de Lara @ 2018-06-08 22:02 UTC (permalink / raw)
To: declan.doherty, akhil.goyal, ravi1.kumar, jerin.jacob,
roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
Cc: dev, Pablo de Lara
Structure rte_cryptodev_info has currently PCI device
information ("struct rte_pci_device") in it.
This information is not generic to all devices,
so this gets replaced with the generic "rte_device" structure,
compatible with all crypto devices.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
doc/guides/prog_guide/cryptodev_lib.rst | 2 +-
doc/guides/rel_notes/deprecation.rst | 2 --
doc/guides/rel_notes/release_18_08.rst | 5 ++++-
drivers/crypto/qat/qat_crypto.c | 1 -
drivers/crypto/virtio/virtio_cryptodev.c | 1 -
lib/librte_cryptodev/rte_cryptodev.c | 1 +
lib/librte_cryptodev/rte_cryptodev.h | 2 +-
7 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst
index 30f0bcf7a..d02bb7514 100644
--- a/doc/guides/prog_guide/cryptodev_lib.rst
+++ b/doc/guides/prog_guide/cryptodev_lib.rst
@@ -269,7 +269,7 @@ relevant information for the device.
struct rte_cryptodev_info {
const char *driver_name;
uint8_t driver_id;
- struct rte_pci_device *pci_dev;
+ struct rte_device *device;
uint64_t feature_flags;
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 1ce692eac..b71080bb8 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -104,8 +104,6 @@ Deprecation Notices
- Removal of ``sym`` structure in ``rte_cryptodev_info`` structure,
containing fields not relevant anymore since the session mempool
is not internal in the crypto device anymore.
- - Replacement of ``pci_dev`` field with the more generic ``rte_device``
- structure.
- Functions ``rte_cryptodev_queue_pair_attach_sym_session()`` and
``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
18.05 and removed in 18.08, as there are no drivers doing anything useful
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 5bc23c537..ba710e845 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -55,6 +55,9 @@ API Changes
Also, make sure to start the actual text at the margin.
=========================================================
+* cryptodev: In struct ``struct rte_cryptodev_info``, field ``rte_pci_device *pci_dev``
+ has been replaced with field ``struct rte_device *device``.
+
ABI Changes
-----------
@@ -113,7 +116,7 @@ The libraries prepended with a plus sign were incremented in this version.
librte_cmdline.so.2
librte_common_octeontx.so.1
librte_compressdev.so.1
- librte_cryptodev.so.4
+ + librte_cryptodev.so.5
librte_distributor.so.1
librte_eal.so.7
librte_ethdev.so.9
diff --git a/drivers/crypto/qat/qat_crypto.c b/drivers/crypto/qat/qat_crypto.c
index d9ce2a136..768dcbae0 100644
--- a/drivers/crypto/qat/qat_crypto.c
+++ b/drivers/crypto/qat/qat_crypto.c
@@ -1656,7 +1656,6 @@ void qat_dev_info_get(struct rte_cryptodev *dev,
info->capabilities = internals->qat_dev_capabilities;
info->sym.max_nb_sessions = internals->max_nb_sessions;
info->driver_id = cryptodev_qat_driver_id;
- info->pci_dev = RTE_DEV_TO_PCI(dev->device);
}
}
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index df88953f6..482edea1a 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -1409,7 +1409,6 @@ virtio_crypto_dev_info_get(struct rte_cryptodev *dev,
if (info != NULL) {
info->driver_id = cryptodev_virtio_driver_id;
- info->pci_dev = RTE_DEV_TO_PCI(dev->device);
info->feature_flags = dev->feature_flags;
info->max_nb_queue_pairs = hw->max_dataqueues;
info->sym.max_nb_sessions =
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 7e5821246..457ac5670 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -966,6 +966,7 @@ rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info)
(*dev->dev_ops->dev_infos_get)(dev, dev_info);
dev_info->driver_name = dev->device->driver->name;
+ dev_info->device = dev->device;
}
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 92ce6d49a..80cd6b474 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -371,7 +371,7 @@ rte_cryptodev_get_feature_name(uint64_t flag);
struct rte_cryptodev_info {
const char *driver_name; /**< Driver name. */
uint8_t driver_id; /**< Driver identifier */
- struct rte_pci_device *pci_dev; /**< PCI information. */
+ struct rte_device *device; /**< Generic device information. */
uint64_t feature_flags;
/**< Feature flags exposes HW/SW features for the given device */
--
2.17.0
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH 1/3] bpf: add extra information for external symbol definitions
@ 2018-06-08 8:42 2% ` Konstantin Ananyev
0 siblings, 0 replies; 200+ results
From: Konstantin Ananyev @ 2018-06-08 8:42 UTC (permalink / raw)
To: dev, dev; +Cc: Konstantin Ananyev
Extend struct rte_bpf_xsym with new fields to provide information about:
- for variables - type and size
- for functions - number of arguments and type/size of each argument
and return value
Such information would allow validate code to perform
more extensive checking on input BPF program and catch
misbehaving BPF code.
That change would cause ABI/API breakage for librte_bpf.
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
app/test-pmd/bpf_cmd.c | 27 ++++++++++++++++++++++--
lib/librte_bpf/bpf_def.h | 5 +++++
lib/librte_bpf/bpf_exec.c | 2 +-
lib/librte_bpf/bpf_impl.h | 14 +++++++++++++
lib/librte_bpf/bpf_jit_x86.c | 17 ++-------------
lib/librte_bpf/bpf_load.c | 49 ++++++++++++++++++++++++++++++++++++++++++-
lib/librte_bpf/bpf_load_elf.c | 4 ++--
lib/librte_bpf/rte_bpf.h | 21 +++++++++++++++----
test/test/test_bpf.c | 19 ++++++++++++++++-
9 files changed, 132 insertions(+), 26 deletions(-)
diff --git a/app/test-pmd/bpf_cmd.c b/app/test-pmd/bpf_cmd.c
index 584fad908..830bfc13a 100644
--- a/app/test-pmd/bpf_cmd.c
+++ b/app/test-pmd/bpf_cmd.c
@@ -19,12 +19,35 @@ static const struct rte_bpf_xsym bpf_xsym[] = {
{
.name = RTE_STR(stdout),
.type = RTE_BPF_XTYPE_VAR,
- .var = &stdout,
+ .var = {
+ .val = &stdout,
+ .desc = {
+ .type = RTE_BPF_ARG_PTR,
+ .size = sizeof(stdout),
+ },
+ },
},
{
.name = RTE_STR(rte_pktmbuf_dump),
.type = RTE_BPF_XTYPE_FUNC,
- .func = (void *)rte_pktmbuf_dump,
+ .func = {
+ .val = (void *)rte_pktmbuf_dump,
+ .nb_args = 3,
+ .args = {
+ [0] = {
+ .type = RTE_BPF_ARG_RAW,
+ .size = sizeof(uintptr_t),
+ },
+ [1] = {
+ .type = RTE_BPF_ARG_PTR_MBUF,
+ .size = sizeof(struct rte_mbuf),
+ },
+ [2] = {
+ .type = RTE_BPF_ARG_RAW,
+ .size = sizeof(uint32_t),
+ },
+ },
+ },
},
};
diff --git a/lib/librte_bpf/bpf_def.h b/lib/librte_bpf/bpf_def.h
index 6b69de345..c10f3aec4 100644
--- a/lib/librte_bpf/bpf_def.h
+++ b/lib/librte_bpf/bpf_def.h
@@ -131,6 +131,11 @@ struct ebpf_insn {
int32_t imm;
};
+/*
+ * eBPF allows functions with R1-R5 as arguments.
+ */
+#define EBPF_FUNC_MAX_ARGS (EBPF_REG_6 - EBPF_REG_1)
+
#ifdef __cplusplus
}
#endif
diff --git a/lib/librte_bpf/bpf_exec.c b/lib/librte_bpf/bpf_exec.c
index e373b1f3d..6a79139c0 100644
--- a/lib/librte_bpf/bpf_exec.c
+++ b/lib/librte_bpf/bpf_exec.c
@@ -402,7 +402,7 @@ bpf_exec(const struct rte_bpf *bpf, uint64_t reg[EBPF_REG_NUM])
break;
/* call instructions */
case (BPF_JMP | EBPF_CALL):
- reg[EBPF_REG_0] = bpf->prm.xsym[ins->imm].func(
+ reg[EBPF_REG_0] = bpf->prm.xsym[ins->imm].func.val(
reg[EBPF_REG_1], reg[EBPF_REG_2],
reg[EBPF_REG_3], reg[EBPF_REG_4],
reg[EBPF_REG_5]);
diff --git a/lib/librte_bpf/bpf_impl.h b/lib/librte_bpf/bpf_impl.h
index 5d7e65c31..b577e2cbe 100644
--- a/lib/librte_bpf/bpf_impl.h
+++ b/lib/librte_bpf/bpf_impl.h
@@ -34,6 +34,20 @@ extern int rte_bpf_logtype;
#define RTE_BPF_LOG(lvl, fmt, args...) \
rte_log(RTE_LOG_## lvl, rte_bpf_logtype, fmt, ##args)
+static inline size_t
+bpf_size(uint32_t bpf_op_sz)
+{
+ if (bpf_op_sz == BPF_B)
+ return sizeof(uint8_t);
+ else if (bpf_op_sz == BPF_H)
+ return sizeof(uint16_t);
+ else if (bpf_op_sz == BPF_W)
+ return sizeof(uint32_t);
+ else if (bpf_op_sz == EBPF_DW)
+ return sizeof(uint64_t);
+ return 0;
+}
+
#ifdef __cplusplus
}
#endif
diff --git a/lib/librte_bpf/bpf_jit_x86.c b/lib/librte_bpf/bpf_jit_x86.c
index 111e028d2..68ea389f2 100644
--- a/lib/librte_bpf/bpf_jit_x86.c
+++ b/lib/librte_bpf/bpf_jit_x86.c
@@ -113,20 +113,6 @@ union bpf_jit_imm {
uint8_t u8[4];
};
-static size_t
-bpf_size(uint32_t bpf_op_sz)
-{
- if (bpf_op_sz == BPF_B)
- return sizeof(uint8_t);
- else if (bpf_op_sz == BPF_H)
- return sizeof(uint16_t);
- else if (bpf_op_sz == BPF_W)
- return sizeof(uint32_t);
- else if (bpf_op_sz == EBPF_DW)
- return sizeof(uint64_t);
- return 0;
-}
-
/*
* In many cases for imm8 we can produce shorter code.
*/
@@ -1294,7 +1280,8 @@ emit(struct bpf_jit_state *st, const struct rte_bpf *bpf)
break;
/* call instructions */
case (BPF_JMP | EBPF_CALL):
- emit_call(st, (uintptr_t)bpf->prm.xsym[ins->imm].func);
+ emit_call(st,
+ (uintptr_t)bpf->prm.xsym[ins->imm].func.val);
break;
/* return instruction */
case (BPF_JMP | EBPF_EXIT):
diff --git a/lib/librte_bpf/bpf_load.c b/lib/librte_bpf/bpf_load.c
index d1c9abd7f..2b84fe724 100644
--- a/lib/librte_bpf/bpf_load.c
+++ b/lib/librte_bpf/bpf_load.c
@@ -51,17 +51,64 @@ bpf_load(const struct rte_bpf_prm *prm)
return bpf;
}
+/*
+ * Check that user provided external symbol.
+ */
+static int
+bpf_check_xsym(const struct rte_bpf_xsym *xsym)
+{
+ uint32_t i;
+
+ if (xsym->name == NULL)
+ return -EINVAL;
+
+ if (xsym->type == RTE_BPF_XTYPE_VAR) {
+ if (xsym->var.desc.type == RTE_BPF_ARG_UNDEF)
+ return -EINVAL;
+ } else if (xsym->type == RTE_BPF_XTYPE_FUNC) {
+
+ if (xsym->func.nb_args > EBPF_FUNC_MAX_ARGS)
+ return -EINVAL;
+
+ /* check function arguments */
+ for (i = 0; i != xsym->func.nb_args; i++) {
+ if (xsym->func.args[i].type == RTE_BPF_ARG_UNDEF)
+ return -EINVAL;
+ }
+
+ /* check return value info */
+ if (xsym->func.ret.type != RTE_BPF_ARG_UNDEF &&
+ xsym->func.ret.size == 0)
+ return -EINVAL;
+ } else
+ return -EINVAL;
+
+ return 0;
+}
+
__rte_experimental struct rte_bpf *
rte_bpf_load(const struct rte_bpf_prm *prm)
{
struct rte_bpf *bpf;
int32_t rc;
+ uint32_t i;
- if (prm == NULL || prm->ins == NULL) {
+ if (prm == NULL || prm->ins == NULL ||
+ (prm->nb_xsym != 0 && prm->xsym == NULL)) {
rte_errno = EINVAL;
return NULL;
}
+ rc = 0;
+ for (i = 0; i != prm->nb_xsym && rc == 0; i++)
+ rc = bpf_check_xsym(prm->xsym + i);
+
+ if (rc != 0) {
+ rte_errno = -rc;
+ RTE_BPF_LOG(ERR, "%s: %d-th xsym is invalid\n", __func__, i);
+ return NULL;
+ }
+
bpf = bpf_load(prm);
if (bpf == NULL) {
rte_errno = ENOMEM;
diff --git a/lib/librte_bpf/bpf_load_elf.c b/lib/librte_bpf/bpf_load_elf.c
index 6ab03d86e..96d3630fe 100644
--- a/lib/librte_bpf/bpf_load_elf.c
+++ b/lib/librte_bpf/bpf_load_elf.c
@@ -81,9 +81,9 @@ resolve_xsym(const char *sn, size_t ofs, struct ebpf_insn *ins, size_t ins_sz,
ins[idx].imm = fidx;
/* for variable we need to store its absolute address */
else {
- ins[idx].imm = (uintptr_t)prm->xsym[fidx].var;
+ ins[idx].imm = (uintptr_t)prm->xsym[fidx].var.val;
ins[idx + 1].imm =
- (uint64_t)(uintptr_t)prm->xsym[fidx].var >> 32;
+ (uint64_t)(uintptr_t)prm->xsym[fidx].var.val >> 32;
}
return 0;
diff --git a/lib/librte_bpf/rte_bpf.h b/lib/librte_bpf/rte_bpf.h
index 1249a992c..ad62ef2c6 100644
--- a/lib/librte_bpf/rte_bpf.h
+++ b/lib/librte_bpf/rte_bpf.h
@@ -40,7 +40,11 @@ enum rte_bpf_arg_type {
*/
struct rte_bpf_arg {
enum rte_bpf_arg_type type;
- size_t size; /**< for pointer types, size of data it points to */
+ /**
+ * for ptr type - max size of data buffer it points to
+ * for raw type - the size (in bytes) of the value
+ */
+ size_t size;
size_t buf_size;
/**< for mbuf ptr type, max size of rte_mbuf data buffer */
};
@@ -66,10 +70,19 @@ struct rte_bpf_xsym {
const char *name; /**< name */
enum rte_bpf_xtype type; /**< type */
union {
- uint64_t (*func)(uint64_t, uint64_t, uint64_t,
+ struct {
+ uint64_t (*val)(uint64_t, uint64_t, uint64_t,
uint64_t, uint64_t);
- void *var;
- }; /**< value */
+ uint32_t nb_args;
+ struct rte_bpf_arg args[EBPF_FUNC_MAX_ARGS];
+ /**< Function arguments descriptions. */
+ struct rte_bpf_arg ret; /**< function return value. */
+ } func;
+ struct {
+ void *val; /**< actual memory location */
+ struct rte_bpf_arg desc; /**< type, size, etc. */
+ } var; /**< external variable */
+ };
};
/**
diff --git a/test/test/test_bpf.c b/test/test/test_bpf.c
index cbd6be63d..1e9caef95 100644
--- a/test/test/test_bpf.c
+++ b/test/test/test_bpf.c
@@ -1530,7 +1530,24 @@ static const struct rte_bpf_xsym test_call1_xsym[] = {
{
.name = RTE_STR(dummy_func1),
.type = RTE_BPF_XTYPE_FUNC,
- .func = (void *)dummy_func1,
+ .func = {
+ .val = (void *)dummy_func1,
+ .nb_args = 3,
+ .args = {
+ [0] = {
+ .type = RTE_BPF_ARG_PTR,
+ .size = sizeof(struct dummy_offset),
+ },
+ [1] = {
+ .type = RTE_BPF_ARG_PTR,
+ .size = sizeof(uint32_t),
+ },
+ [2] = {
+ .type = RTE_BPF_ARG_PTR,
+ .size = sizeof(uint64_t),
+ },
+ },
+ },
},
};
--
2.13.6
^ permalink raw reply [relevance 2%]
* Re: [dpdk-dev] [PATCH] eal: add request to map reserved physical memory
@ 2018-06-07 12:15 3% ` Burakov, Anatoly
2018-07-09 16:02 0% ` Burakov, Anatoly
0 siblings, 1 reply; 200+ results
From: Burakov, Anatoly @ 2018-06-07 12:15 UTC (permalink / raw)
To: Scott Branden, Srinath Mannam; +Cc: Ajit Khaparde, dev
On 06-Jun-18 1:18 AM, Scott Branden wrote:
> Hi Anatoly,
>
>
> On 18-04-27 09:49 AM, Burakov, Anatoly wrote:
>> On 27-Apr-18 5:30 PM, Scott Branden wrote:
>>> Hi Anatoly,
>>>
>>> We'd appreciate your input so we can come to a solution of supporting
>>> the necessary memory allocations?
>>>
>>
>> Hi Scott,
>>
>> I'm currently starting to work on a prototype that will be at least
>> RFC'd (if not v1'd) during 18.08 timeframe. Basically, the idea is to
>> create/destroy named malloc heaps dynamically, and allow user to
>> request memory from them. You may then mmap() whatever you want and
>> create a malloc heap out of it.
>>
>> Does that sound reasonable?
>>
> Is the plan still to have a patch for 18.08?
>
> Thanks,
> Scott
>
Hi Scott,
The plan is still to submit an RFC during 18.08 timeframe, but since it
will be an ABI break, it will only be integrated in the next (18.11)
release.
--
Thanks,
Anatoly
^ permalink raw reply [relevance 3%]
* [dpdk-dev] [PATCH v7] checkpatches.sh: Add checks for ABI symbol addition
@ 2018-06-05 12:21 6% ` Neil Horman
2018-06-14 13:30 6% ` [dpdk-dev] [PATCH v8] " Neil Horman
2018-06-27 18:01 6% ` [dpdk-dev] [PATCH v9] " Neil Horman
3 siblings, 0 replies; 200+ results
From: Neil Horman @ 2018-06-05 12:21 UTC (permalink / raw)
To: dev
Cc: Neil Horman, thomas, john.mcnamara, bruce.richardson,
Ferruh Yigit, Stephen Hemminger
Recently, some additional patches were added to allow for programmatic
marking of C symbols as experimental. The addition of these markers is
dependent on the manual addition of exported symbols to the EXPERIMENTAL
section of the corresponding libraries version map file. The consensus
on review is that, in addition to mandating the addition of symbols to
the EXPERIMENTAL version in the map, we need a mechanism to enforce our
documented process of mandating that addition when they are introduced.
To that end, I am proposing this change. It is an addition to the
checkpatches script, which scan incoming patches for additions and
removals of symbols to the map file, and warns the user appropriately
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: thomas@monjalon.net
CC: john.mcnamara@intel.com
CC: bruce.richardson@intel.com
CC: Ferruh Yigit <ferruh.yigit@intel.com>
CC: Stephen Hemminger <stephen@networkplumber.org>
---
Change notes
v2)
* Cleaned up and documented awk script (shemminger)
* fixed sort/uniq usage (shemminger)
* moved checking to new script (tmonjalon)
* added maintainer entry (tmonjalon)
* added license (tmonjalon)
v3)
* Changed symbol check script name (tmonjalon)
* Trapped exit to clean temp file (tmonjalon)
* Honored verbose command (tmonjalon)
* Cleaned left over debug bits (tmonjalon)
* Updated location in MAINTAINERS file (tmonjalon)
v4)
* Updated maintainers file (tmonjalon)
v5)
* undo V4 (tmojalon)
v6)
* Cleaning up more nits (tmonjalon)
* Combining some lines (tmonjalon)
* Fixing error print condition (tmonjalon)
* Redirect stdin to a file to allow rewinding for
Multiple passes on tools (nhorman)
v7)
* More nits (tmonjalon)
* consoloidating some common report lines (tmonjalon)
* move SPDX identifier to line 2 (nhorman)
* fix some checkpatch errors
---
MAINTAINERS | 1 +
devtools/check-symbol-change.sh | 145 ++++++++++++++++++++++++++++++++
devtools/checkpatches.sh | 50 +++++++++--
3 files changed, 189 insertions(+), 7 deletions(-)
create mode 100755 devtools/check-symbol-change.sh
diff --git a/MAINTAINERS b/MAINTAINERS
index 7398749d7..da4735c11 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -122,6 +122,7 @@ M: Neil Horman <nhorman@tuxdriver.com>
F: lib/librte_compat/
F: doc/guides/rel_notes/deprecation.rst
F: devtools/validate-abi.sh
+F: devtools/check-symbol-change.sh
F: buildtools/check-experimental-syms.sh
Driver information
diff --git a/devtools/check-symbol-change.sh b/devtools/check-symbol-change.sh
new file mode 100755
index 000000000..76d5562b6
--- /dev/null
+++ b/devtools/check-symbol-change.sh
@@ -0,0 +1,145 @@
+#!/bin/sh
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2018 Neil Horman <nhorman@tuxdriver.com>
+
+build_map_changes()
+{
+ local fname=$1
+ local mapdb=$2
+
+ cat $fname | filterdiff -i *.map | awk '
+ # Initialize our variables
+ BEGIN {map="";sym="";ar="";sec=""; in_sec=0}
+
+ # Anything that starts with + or -, followed by an a
+ # and ends in the string .map is the name of our map file
+ # This may appear multiple times in a patch if multiple
+ # map files are altered, and all section/symbol names
+ # appearing between a triggering of this rule and the
+ # next trigger of this rule are associated with this file
+ /[-+] a\/.*\.map/ {map=$2}
+
+ # Triggering this rule, which starts a line with a + and ends it
+ # with a { identifies a versioned section. The section name is
+ # the rest of the line with the + and { symbols remvoed.
+ # Triggering this rule sets in_sec to 1, which actives the
+ # symbol rule below
+ /+.*{/ {gsub("+","");sec=$1; in_sec=1}
+
+ # This rule idenfies the end of a section, and disables the
+ # symbol rule
+ /.*}/ {in_sec=0}
+
+ # This rule matches on a + followed by any characters except a :
+ # (which denotes a global vs local segment), and ends with a ;.
+ # The semicolon is removed and the symbol is printed with its
+ # association file name and version section, along with an
+ # indicator that the symbol is a new addition. Note this rule
+ # only works if we have found a version section in the rule
+ # above (hence the in_sec check). Otherwise we flag it as an
+ # unknown section
+ /^+[^}].*[^:*];/ {gsub(";","");sym=$2;
+ if (in_sec == 1) {
+ print map " " sym " " sec " add"
+ } else {
+ print map " " sym " unknown add"
+ }
+ }
+
+ # This is the same rule as above, but the rule matches on a
+ # leading - rather than a +, denoting that the symbol is being
+ # removed.
+ /^-[^}].*[^:*];/ {gsub(";","");sym=$2;
+ if (in_sec == 1) {
+ print map " " sym " " sec " del"
+ } else {
+ print map " " sym " unknown del"
+ }
+ }' > ./$mapdb
+
+ sort -u $mapdb > ./$mapdb.2
+ mv -f $mapdb.2 $mapdb
+
+}
+
+check_for_rule_violations()
+{
+ local mapdb=$1
+ local mname
+ local symname
+ local secname
+ local ar
+ local ret=0
+
+ while read mname symname secname ar
+ do
+ if [ "$ar" == "add" ]
+ then
+
+ if [ "$secname" == "unknown" ]
+ then
+ # Just inform the user of this occurrence, but
+ # don't flag it as an error
+ echo -n "INFO: symbol $syname is added but "
+ echo -n "patch has insuficient context "
+ echo -n "to determine the section name "
+ echo -n "please ensure the version is "
+ echo "EXPERIMENTAL"
+ continue
+ fi
+
+ if [ "$secname" != "EXPERIMENTAL" ]
+ then
+ # Symbols that are getting added in a section
+ # other ithan the experimental section
+ # to be moving from an already supported
+ # section or its a violation
+ grep -q \
+ "$mname $symname [^EXPERIMENTAL] del" $mapdb
+ if [ $? -ne 0 ]
+ then
+ echo -n "ERROR: symbol $symname "
+ echo -n "is added in a section "
+ echo -n "other than the EXPERIMENTAL "
+ echo "section of the version map"
+ ret=1
+ fi
+ fi
+ else
+
+ if [ "$secname" != "EXPERIMENTAL" ]
+ then
+ # Just inform users that non-experimenal
+ # symbols need to go through a deprecation
+ # process
+ echo -n "INFO: symbol $symname is being "
+ echo -n "removed, ensure that it has "
+ echo "gone through the deprecation process"
+ fi
+ fi
+ done < $mapdb
+
+ return $ret
+}
+
+trap clean_and_exit_on_sig EXIT
+
+mapfile=`mktemp mapdb.XXXXXX`
+patch=$1
+exit_code=1
+
+clean_and_exit_on_sig()
+{
+ rm -f $mapfile
+ exit $exit_code
+}
+
+build_map_changes $patch $mapfile
+check_for_rule_violations $mapfile
+exit_code=$?
+
+rm -f $mapfile
+
+exit $exit_code
+
+
diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index 245d5ab10..2e9f30cc8 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -7,6 +7,9 @@
# - DPDK_CHECKPATCH_LINE_LENGTH
. $(dirname $(readlink -e $0))/load-devel-config
+
+VALIDATE_NEW_API=$(dirname $(readlink -e $0))/check-symbol-change.sh
+
length=${DPDK_CHECKPATCH_LINE_LENGTH:-80}
# override default Linux options
@@ -21,6 +24,15 @@ SPLIT_STRING,LONG_LINE_STRING,\
LINE_SPACING,PARENTHESIS_ALIGNMENT,NETWORKING_BLOCK_COMMENT_STYLE,\
NEW_TYPEDEFS,COMPARISON_TO_NULL"
+clean_tmp_files() {
+ echo $TMPINPUT | grep -q checkpaches
+ if [ $? -eq 0 ]; then
+ rm -f $TMPINPUT
+ fi
+}
+
+trap "clean_tmp_files" SIGINT
+
print_usage () {
cat <<- END_OF_HELP
usage: $(basename $0) [-q] [-v] [-nX|patch1 [patch2] ...]]
@@ -58,19 +70,43 @@ total=0
status=0
check () { # <patch> <commit> <title>
+ local ret=0
+
total=$(($total + 1))
! $verbose || printf '\n### %s\n\n' "$3"
if [ -n "$1" ] ; then
- report=$($DPDK_CHECKPATCH_PATH $options "$1" 2>/dev/null)
+ TMPINPUT=$1
elif [ -n "$2" ] ; then
- report=$(git format-patch --find-renames --no-stat --stdout -1 $commit |
- $DPDK_CHECKPATCH_PATH $options - 2>/dev/null)
+ TMPINPUT=$(mktemp checkpatches.XXXXXX)
+ git format-patch --find-renames \
+ --no-stat --stdout -1 $commit > ./$TMPINPUT
else
- report=$($DPDK_CHECKPATCH_PATH $options - 2>/dev/null)
+ TMPINPUT=$(mktemp checkpatches.XXXXXX)
+ cat > ./$TMPINPUT
+ fi
+
+ report=$($DPDK_CHECKPATCH_PATH $options $TMPINPUT 2>/dev/null)
+
+ if [ $? -ne 0 ]
+ then
+ $verbose || printf '\n### %s\n\n' "$3"
+ printf '%s\n' "$report" | sed -n '1,/^total:.*lines checked$/p'
+ ret=1
+ fi
+
+ ! $verbose || printf '\nChecking API additions/removals:\n'
+
+ report=$($VALIDATE_NEW_API "$TMPINPUT")
+
+ if [ $? -ne 0 ]; then
+ printf '%s\n' "$report"
+ ret=1
+ fi
+
+ clean_tmp_files
+ if [ $ret -eq 0 ]; then
+ return 0
fi
- [ $? -ne 0 ] || return 0
- $verbose || printf '\n### %s\n\n' "$3"
- printf '%s\n' "$report" | sed -n '1,/^total:.*lines checked$/p'
status=$(($status + 1))
}
--
2.17.1
^ permalink raw reply [relevance 6%]
* [dpdk-dev] [PATCH] doc: add SPDX and copyright to contributing guide
2018-06-05 7:50 4% ` [dpdk-dev] [PATCH] doc: add SPDX and copyright to rel notes Hemant Agrawal
@ 2018-06-05 7:50 4% ` Hemant Agrawal
1 sibling, 0 replies; 200+ results
From: Hemant Agrawal @ 2018-06-05 7:50 UTC (permalink / raw)
To: dev; +Cc: thomas, john.mcnamara
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
doc/guides/contributing/cheatsheet.rst | 3 +++
doc/guides/contributing/coding_style.rst | 3 +++
doc/guides/contributing/design.rst | 3 +++
doc/guides/contributing/documentation.rst | 3 +++
doc/guides/contributing/index.rst | 3 +++
doc/guides/contributing/patches.rst | 3 +++
doc/guides/contributing/stable.rst | 3 +++
doc/guides/contributing/versioning.rst | 3 +++
8 files changed, 24 insertions(+)
diff --git a/doc/guides/contributing/cheatsheet.rst b/doc/guides/contributing/cheatsheet.rst
index 7bc0771..0debd11 100644
--- a/doc/guides/contributing/cheatsheet.rst
+++ b/doc/guides/contributing/cheatsheet.rst
@@ -1,3 +1,6 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2018 The DPDK contributors
+
Patch Cheatsheet
================
diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst
index 2587605..b1bf0d1 100644
--- a/doc/guides/contributing/coding_style.rst
+++ b/doc/guides/contributing/coding_style.rst
@@ -1,3 +1,6 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2018 The DPDK contributors
+
.. _coding_style:
DPDK Coding Style
diff --git a/doc/guides/contributing/design.rst b/doc/guides/contributing/design.rst
index 88d3a43..651fd22 100644
--- a/doc/guides/contributing/design.rst
+++ b/doc/guides/contributing/design.rst
@@ -1,3 +1,6 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2018 The DPDK contributors
+
Design
======
diff --git a/doc/guides/contributing/documentation.rst b/doc/guides/contributing/documentation.rst
index 82f2e1b..6a07555 100644
--- a/doc/guides/contributing/documentation.rst
+++ b/doc/guides/contributing/documentation.rst
@@ -1,3 +1,6 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2018 The DPDK contributors
+
.. _doc_guidelines:
DPDK Documentation Guidelines
diff --git a/doc/guides/contributing/index.rst b/doc/guides/contributing/index.rst
index 329b678..f90df45 100644
--- a/doc/guides/contributing/index.rst
+++ b/doc/guides/contributing/index.rst
@@ -1,3 +1,6 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2018 The DPDK contributors
+
Contributor's Guidelines
========================
diff --git a/doc/guides/contributing/patches.rst b/doc/guides/contributing/patches.rst
index e4e0cb5..a3d7880 100644
--- a/doc/guides/contributing/patches.rst
+++ b/doc/guides/contributing/patches.rst
@@ -1,3 +1,6 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2018 The DPDK contributors
+
.. submitting_patches:
Contributing Code to DPDK
diff --git a/doc/guides/contributing/stable.rst b/doc/guides/contributing/stable.rst
index 0f2f1f3..bfc9b10 100644
--- a/doc/guides/contributing/stable.rst
+++ b/doc/guides/contributing/stable.rst
@@ -1,3 +1,6 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2018 The DPDK contributors
+
.. stable_lts_releases:
DPDK Stable Releases and Long Term Support
diff --git a/doc/guides/contributing/versioning.rst b/doc/guides/contributing/versioning.rst
index c495294d..6bd34dd 100644
--- a/doc/guides/contributing/versioning.rst
+++ b/doc/guides/contributing/versioning.rst
@@ -1,3 +1,6 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2018 The DPDK contributors
+
Managing ABI updates
====================
--
2.7.4
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH] doc: add SPDX and copyright to rel notes
@ 2018-06-05 7:50 4% ` Hemant Agrawal
2018-07-27 4:54 4% ` [dpdk-dev] [PATCH v2] " Hemant Agrawal
2018-06-05 7:50 4% ` [dpdk-dev] [PATCH] doc: add SPDX and copyright to contributing guide Hemant Agrawal
1 sibling, 1 reply; 200+ results
From: Hemant Agrawal @ 2018-06-05 7:50 UTC (permalink / raw)
To: dev; +Cc: thomas, john.mcnamara
using "The DPDK Contributors" as decided by techboard.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
doc/guides/rel_notes/deprecation.rst | 3 +++
doc/guides/rel_notes/release_16_04.rst | 3 +++
doc/guides/rel_notes/release_16_07.rst | 3 +++
doc/guides/rel_notes/release_16_11.rst | 3 +++
doc/guides/rel_notes/release_17_02.rst | 3 +++
doc/guides/rel_notes/release_17_05.rst | 3 +++
doc/guides/rel_notes/release_17_08.rst | 3 +++
doc/guides/rel_notes/release_17_11.rst | 3 +++
doc/guides/rel_notes/release_18_02.rst | 3 +++
doc/guides/rel_notes/release_18_05.rst | 3 +++
doc/guides/rel_notes/release_18_08.rst | 3 +++
doc/guides/rel_notes/release_2_2.rst | 2 ++
12 files changed, 35 insertions(+)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 1ce692e..2f46b45 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -1,3 +1,6 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2018 The DPDK contributors
+
ABI and API Deprecation
=======================
diff --git a/doc/guides/rel_notes/release_16_04.rst b/doc/guides/rel_notes/release_16_04.rst
index d0a09ef..e9f1e6f 100644
--- a/doc/guides/rel_notes/release_16_04.rst
+++ b/doc/guides/rel_notes/release_16_04.rst
@@ -1,3 +1,6 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2016 The DPDK contributors
+
DPDK Release 16.04
==================
diff --git a/doc/guides/rel_notes/release_16_07.rst b/doc/guides/rel_notes/release_16_07.rst
index a8a3fc1..2904aac 100644
--- a/doc/guides/rel_notes/release_16_07.rst
+++ b/doc/guides/rel_notes/release_16_07.rst
@@ -1,3 +1,6 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2016 The DPDK contributors
+
DPDK Release 16.07
==================
diff --git a/doc/guides/rel_notes/release_16_11.rst b/doc/guides/rel_notes/release_16_11.rst
index 8c9ec65..92e0ec6 100644
--- a/doc/guides/rel_notes/release_16_11.rst
+++ b/doc/guides/rel_notes/release_16_11.rst
@@ -1,3 +1,6 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2016 The DPDK contributors
+
DPDK Release 16.11
==================
diff --git a/doc/guides/rel_notes/release_17_02.rst b/doc/guides/rel_notes/release_17_02.rst
index 357965a..d6c1c56 100644
--- a/doc/guides/rel_notes/release_17_02.rst
+++ b/doc/guides/rel_notes/release_17_02.rst
@@ -1,3 +1,6 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2017 The DPDK contributors
+
DPDK Release 17.02
==================
diff --git a/doc/guides/rel_notes/release_17_05.rst b/doc/guides/rel_notes/release_17_05.rst
index 6892284..6418240 100644
--- a/doc/guides/rel_notes/release_17_05.rst
+++ b/doc/guides/rel_notes/release_17_05.rst
@@ -1,3 +1,6 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2017 The DPDK contributors
+
DPDK Release 17.05
==================
diff --git a/doc/guides/rel_notes/release_17_08.rst b/doc/guides/rel_notes/release_17_08.rst
index 0bcdfb7..dc62240 100644
--- a/doc/guides/rel_notes/release_17_08.rst
+++ b/doc/guides/rel_notes/release_17_08.rst
@@ -1,3 +1,6 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2017 The DPDK contributors
+
DPDK Release 17.08
==================
diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index 5176d69..2a93af3 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -1,3 +1,6 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2017 The DPDK contributors
+
DPDK Release 17.11
==================
diff --git a/doc/guides/rel_notes/release_18_02.rst b/doc/guides/rel_notes/release_18_02.rst
index 44b7de5..8e40311 100644
--- a/doc/guides/rel_notes/release_18_02.rst
+++ b/doc/guides/rel_notes/release_18_02.rst
@@ -1,3 +1,6 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2018 The DPDK contributors
+
DPDK Release 18.02
==================
diff --git a/doc/guides/rel_notes/release_18_05.rst b/doc/guides/rel_notes/release_18_05.rst
index 6b36493..8dc22b0 100644
--- a/doc/guides/rel_notes/release_18_05.rst
+++ b/doc/guides/rel_notes/release_18_05.rst
@@ -1,3 +1,6 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2018 The DPDK contributors
+
DPDK Release 18.05
==================
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 5bc23c5..cee2121 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -1,3 +1,6 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright 2018 The DPDK contributors
+
DPDK Release 18.08
==================
diff --git a/doc/guides/rel_notes/release_2_2.rst b/doc/guides/rel_notes/release_2_2.rst
index bb7d15a..b8c750b 100644
--- a/doc/guides/rel_notes/release_2_2.rst
+++ b/doc/guides/rel_notes/release_2_2.rst
@@ -1,3 +1,5 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+
DPDK Release 2.2
================
--
2.7.4
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH 8/9] doc: add deprecation notice for EAL command line options
@ 2018-06-01 17:15 5% ` Anatoly Burakov
2018-07-13 10:27 5% ` [dpdk-dev] [PATCH v2 " Anatoly Burakov
1 sibling, 0 replies; 200+ results
From: Anatoly Burakov @ 2018-06-01 17:15 UTC (permalink / raw)
To: dev
Cc: Neil Horman, John McNamara, Marko Kovacevic, ray.kinsella,
kuralamudhan.ramakrishnan, louise.m.daly, bruce.richardson,
ferruh.yigit, konstantin.ananyev, thomas
Options --no-shconf and --huge-unlink will be removed, and
replaced with --in-memory option, which will be a superset
of these two, and an offially support method to run DPDK
entirely in memory.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
Notes:
RFC->v1:
- Add this patch
doc/guides/rel_notes/deprecation.rst | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 1ce692eac..c8344f42f 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -8,6 +8,11 @@ API and ABI deprecation notices are to be posted here.
Deprecation Notices
-------------------
+* eal: command-line options ``--no-shconf`` and ``--huge-unlink`` will be
+ removed, and replaced with a single option ``--in-memory``, which will
+ enable DPDK to operate entirely in memory, without creating any files on any
+ filesystems.
+
* eal: DPDK runtime configuration file (located at
``/var/run/.<prefix>_config``) will be moved. The new path will be as follows:
--
2.17.0
^ permalink raw reply [relevance 5%]
* [dpdk-dev] [PATCH] doc: add template release notes for 18.08
@ 2018-05-31 21:11 6% Thomas Monjalon
0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2018-05-31 21:11 UTC (permalink / raw)
To: dev; +Cc: john.mcnamara, marko.kovacevic
Add template release notes for DPDK 18.08 with inline
comments and explanations of the various sections.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
doc/guides/rel_notes/index.rst | 1 +
doc/guides/rel_notes/release_18_08.rst | 192 +++++++++++++++++++++++++
2 files changed, 193 insertions(+)
create mode 100644 doc/guides/rel_notes/release_18_08.rst
diff --git a/doc/guides/rel_notes/index.rst b/doc/guides/rel_notes/index.rst
index eb82a0e06..d125342c3 100644
--- a/doc/guides/rel_notes/index.rst
+++ b/doc/guides/rel_notes/index.rst
@@ -9,6 +9,7 @@ Release Notes
:numbered:
rel_description
+ release_18_08
release_18_05
release_18_02
release_17_11
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
new file mode 100644
index 000000000..5bc23c537
--- /dev/null
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -0,0 +1,192 @@
+DPDK Release 18.08
+==================
+
+.. **Read this first.**
+
+ The text in the sections below explains how to update the release notes.
+
+ Use proper spelling, capitalization and punctuation in all sections.
+
+ Variable and config names should be quoted as fixed width text:
+ ``LIKE_THIS``.
+
+ Build the docs and view the output file to ensure the changes are correct::
+
+ make doc-guides-html
+
+ xdg-open build/doc/html/guides/rel_notes/release_18_08.html
+
+
+New Features
+------------
+
+.. This section should contain new features added in this release.
+ Sample format:
+
+ * **Add a title in the past tense with a full stop.**
+
+ Add a short 1-2 sentence description in the past tense.
+ The description should be enough to allow someone scanning
+ the release notes to understand the new feature.
+
+ If the feature adds a lot of sub-features you can use a bullet list
+ like this:
+
+ * Added feature foo to do something.
+ * Enhanced feature bar to do something else.
+
+ Refer to the previous release notes for examples.
+
+ This section is a comment. Do not overwrite or remove it.
+ Also, make sure to start the actual text at the margin.
+ =========================================================
+
+
+API Changes
+-----------
+
+.. This section should contain API changes. Sample format:
+
+ * Add a short 1-2 sentence description of the API change.
+ Use fixed width quotes for ``function_names`` or ``struct_names``.
+ Use the past tense.
+
+ This section is a comment. Do not overwrite or remove it.
+ Also, make sure to start the actual text at the margin.
+ =========================================================
+
+
+ABI Changes
+-----------
+
+.. This section should contain ABI changes. Sample format:
+
+ * Add a short 1-2 sentence description of the ABI change
+ that was announced in the previous releases and made in this release.
+ Use fixed width quotes for ``function_names`` or ``struct_names``.
+ Use the past tense.
+
+ This section is a comment. Do not overwrite or remove it.
+ Also, make sure to start the actual text at the margin.
+ =========================================================
+
+
+Removed Items
+-------------
+
+.. This section should contain removed items in this release. Sample format:
+
+ * Add a short 1-2 sentence description of the removed item
+ in the past tense.
+
+ This section is a comment. Do not overwrite or remove it.
+ Also, make sure to start the actual text at the margin.
+ =========================================================
+
+
+Shared Library Versions
+-----------------------
+
+.. Update any library version updated in this release
+ and prepend with a ``+`` sign, like this:
+
+ librte_acl.so.2
+ + librte_cfgfile.so.2
+ librte_cmdline.so.2
+
+ This section is a comment. Do not overwrite or remove it.
+ =========================================================
+
+The libraries prepended with a plus sign were incremented in this version.
+
+.. code-block:: diff
+
+ librte_acl.so.2
+ librte_bbdev.so.1
+ librte_bitratestats.so.2
+ librte_bpf.so.1
+ librte_bus_dpaa.so.1
+ librte_bus_fslmc.so.1
+ librte_bus_pci.so.1
+ librte_bus_vdev.so.1
+ librte_cfgfile.so.2
+ librte_cmdline.so.2
+ librte_common_octeontx.so.1
+ librte_compressdev.so.1
+ librte_cryptodev.so.4
+ librte_distributor.so.1
+ librte_eal.so.7
+ librte_ethdev.so.9
+ librte_eventdev.so.4
+ librte_flow_classify.so.1
+ librte_gro.so.1
+ librte_gso.so.1
+ librte_hash.so.2
+ librte_ip_frag.so.1
+ librte_jobstats.so.1
+ librte_kni.so.2
+ librte_kvargs.so.1
+ librte_latencystats.so.1
+ librte_lpm.so.2
+ librte_mbuf.so.4
+ librte_mempool.so.4
+ librte_meter.so.2
+ librte_metrics.so.1
+ librte_net.so.1
+ librte_pci.so.1
+ librte_pdump.so.2
+ librte_pipeline.so.3
+ librte_pmd_bnxt.so.2
+ librte_pmd_bond.so.2
+ librte_pmd_i40e.so.2
+ librte_pmd_ixgbe.so.2
+ librte_pmd_dpaa2_cmdif.so.1
+ librte_pmd_dpaa2_qdma.so.1
+ librte_pmd_ring.so.2
+ librte_pmd_softnic.so.1
+ librte_pmd_vhost.so.2
+ librte_port.so.3
+ librte_power.so.1
+ librte_rawdev.so.1
+ librte_reorder.so.1
+ librte_ring.so.2
+ librte_sched.so.1
+ librte_security.so.1
+ librte_table.so.3
+ librte_timer.so.1
+ librte_vhost.so.3
+
+
+Known Issues
+------------
+
+.. This section should contain new known issues in this release. Sample format:
+
+ * **Add title in present tense with full stop.**
+
+ Add a short 1-2 sentence description of the known issue
+ in the present tense. Add information on any known workarounds.
+
+ This section is a comment. Do not overwrite or remove it.
+ Also, make sure to start the actual text at the margin.
+ =========================================================
+
+
+Tested Platforms
+----------------
+
+.. This section should contain a list of platforms that were tested
+ with this release.
+
+ The format is:
+
+ * <vendor> platform with <vendor> <type of devices> combinations
+
+ * List of CPU
+ * List of OS
+ * List of devices
+ * Other relevant details...
+
+ This section is a comment. Do not overwrite or remove it.
+ Also, make sure to start the actual text at the margin.
+ =========================================================
--
2.17.1
^ permalink raw reply [relevance 6%]
* [dpdk-dev] [PATCH] eal: move runtime config file to new location
@ 2018-05-31 15:35 5% Anatoly Burakov
2018-07-13 10:44 9% ` [dpdk-dev] [PATCH v2] " Anatoly Burakov
0 siblings, 1 reply; 200+ results
From: Anatoly Burakov @ 2018-05-31 15:35 UTC (permalink / raw)
To: dev
Cc: Neil Horman, John McNamara, Marko Kovacevic, thomas,
bruce.richardson, harry.van.haaren
As per deprecation notice [1], move DPDK runtime config to default
DPDK runtime data location. Also, remove the deprecation notice.
[1] http://dpdk.org/dev/patchwork/patch/40418/
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
doc/guides/rel_notes/deprecation.rst | 10 ----------
lib/librte_eal/common/eal_filesystem.h | 10 +++-------
2 files changed, 3 insertions(+), 17 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 1ce692eac..ff15baa3f 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -8,16 +8,6 @@ API and ABI deprecation notices are to be posted here.
Deprecation Notices
-------------------
-* eal: DPDK runtime configuration file (located at
- ``/var/run/.<prefix>_config``) will be moved. The new path will be as follows:
-
- - if DPDK is running as root, path will be set to
- ``/var/run/dpdk/<prefix>/config``
- - if DPDK is not running as root and $XDG_RUNTIME_DIR is set, path will be set
- to ``$XDG_RUNTIME_DIR/dpdk/<prefix>/config``
- - if DPDK is not running as root and $XDG_RUNTIME_DIR is not set, path will be
- set to ``/tmp/dpdk/<prefix>/config``
-
* eal: both declaring and identifying devices will be streamlined in v18.08.
New functions will appear to query a specific port from buses, classes of
device and device drivers. Device declaration will be made coherent with the
diff --git a/lib/librte_eal/common/eal_filesystem.h b/lib/librte_eal/common/eal_filesystem.h
index 364f38d13..de05febf4 100644
--- a/lib/librte_eal/common/eal_filesystem.h
+++ b/lib/librte_eal/common/eal_filesystem.h
@@ -12,7 +12,6 @@
#define EAL_FILESYSTEM_H
/** Path of rte config file. */
-#define RUNTIME_CONFIG_FMT "%s/.%s_config"
#include <stdint.h>
#include <limits.h>
@@ -30,17 +29,14 @@ eal_create_runtime_dir(void);
const char *
eal_get_runtime_dir(void);
+#define RUNTIME_CONFIG_FNAME "config"
static inline const char *
eal_runtime_config_path(void)
{
static char buffer[PATH_MAX]; /* static so auto-zeroed */
- const char *directory = "/var/run";
- const char *home_dir = getenv("HOME");
- if (getuid() != 0 && home_dir != NULL)
- directory = home_dir;
- snprintf(buffer, sizeof(buffer) - 1, RUNTIME_CONFIG_FMT, directory,
- internal_config.hugefile_prefix);
+ snprintf(buffer, sizeof(buffer) - 1, "%s/%s", eal_get_runtime_dir(),
+ RUNTIME_CONFIG_FNAME);
return buffer;
}
--
2.17.0
^ permalink raw reply [relevance 5%]
* Re: [dpdk-dev] Compilation of MLX5 driver
2018-05-31 9:53 0% ` Nélio Laranjeiro
@ 2018-05-31 11:44 0% ` Nitin Katiyar
2018-07-02 12:19 0% ` Asaf Sinai
0 siblings, 1 reply; 200+ results
From: Nitin Katiyar @ 2018-05-31 11:44 UTC (permalink / raw)
To: Nélio Laranjeiro; +Cc: Shahaf Shuler, dev
Thanks Shahaf, it worked after removing the options you specified.
Regards,
Nitin
-----Original Message-----
From: Nélio Laranjeiro [mailto:nelio.laranjeiro@6wind.com]
Sent: Thursday, May 31, 2018 3:23 PM
To: Nitin Katiyar <nitin.katiyar@ericsson.com>
Cc: Shahaf Shuler <shahafs@mellanox.com>; dev@dpdk.org
Subject: Re: [dpdk-dev] Compilation of MLX5 driver
On Thu, May 31, 2018 at 09:14:03AM +0000, Nitin Katiyar wrote:
> Yes,I installed it using --dpdk --upstream-libs. What is the way
> forward now?
In v17.05 MLX5 PMD is still relying on libibverbs and libmlx5, the way Those options you used are necessary to select in their package the installation of libverbs,libmlx5 or rdma-core.
Doing this you have selected rdma-core which is not supported in v17.05 DPDK version.
You need to install Mellanox OFED without those two options to select libibverbs, libmlx5 to make it work.
Regards,
> Regards,
> Nitin
>
> -----Original Message-----
> From: Nélio Laranjeiro [mailto:nelio.laranjeiro@6wind.com]
> Sent: Thursday, May 31, 2018 1:36 PM
> To: Nitin Katiyar <nitin.katiyar@ericsson.com>
> Cc: Shahaf Shuler <shahafs@mellanox.com>; dev@dpdk.org
> Subject: Re: [dpdk-dev] Compilation of MLX5 driver
>
> On Thu, May 31, 2018 at 07:01:17AM +0000, Nitin Katiyar wrote:
> > Hi,
> > It has following files:
> >
> > arch.h ib.h kern-abi.h mlx4dv.h mlx5dv.h opcode.h sa.h
> > sa-kern-abi.h verbs.h
> >
> > I tried with both MLNX_OFED_LINUX-4.2-1.0.0.0 and
> > MLNX_OFED_LINUX-4.2-1.2.0.0-ubuntu14.04-x86_64
>
> Did you installed Mellanox OFED with the --dpdk --upstream-libs arguments for the installation script?
>
> If it is the case, you should not add them for this version, those options are for DPDK v17.11 and higher.
>
> Regards,
>
> > Regards,
> > Nitin
> >
> > -----Original Message-----
> > From: Shahaf Shuler [mailto:shahafs@mellanox.com]
> > Sent: Thursday, May 31, 2018 10:51 AM
> > To: Nitin Katiyar <nitin.katiyar@ericsson.com>; Nélio Laranjeiro
> > <nelio.laranjeiro@6wind.com>
> > Cc: dev@dpdk.org
> > Subject: RE: [dpdk-dev] Compilation of MLX5 driver
> >
> > Wednesday, May 30, 2018 7:45 PM, Nitin Katiyar:
> > >
> > > Hi,
> > > I was compiling 17.05.02.
> > > Regards,
> > > Nitin
> > >
> > > -----Original Message-----
> > > From: Nélio Laranjeiro [mailto:nelio.laranjeiro@6wind.com]
> > > Sent: Wednesday, May 30, 2018 6:42 PM
> > > To: Nitin Katiyar <nitin.katiyar@ericsson.com>
> > > Cc: dev@dpdk.org
> > > Subject: Re: [dpdk-dev] Compilation of MLX5 driver
> > >
> > > Hi,
> > >
> > > On Wed, May 30, 2018 at 11:54:31AM +0000, Nitin Katiyar wrote:
> > > > Hi,
> > > > I am trying to compile MLX5 PMD driver by setting
> > > "CONFIG_RTE_LIBRTE_MLX5_PMD=y" and hitting following compilation
> > > error.
> > > >
> > > > fatal error: infiniband/mlx5_hw.h: No such file or directory
> >
> > Can you list the files you have under /usr/include/infiniband ?
> >
> > > >
> > > > I have installed MLNX_OFED _LINUX-4.2-1.2.0 on my Ubuntu 14.04
> > > > machine
> > > but still hitting the same error. Am I missing some other package?
> > >
> > > Which version of DPDK are you using (it is important to help)?
> > >
> > > Regards,
> > >
> > > --
> > > Nélio Laranjeiro
> > > 6WIND
>
> --
> Nélio Laranjeiro
> 6WIND
--
Nélio Laranjeiro
6WIND
^ permalink raw reply [relevance 0%]
* [dpdk-dev] [RFC 0/3] Make device mapping more reliable
@ 2018-05-31 10:57 3% Anatoly Burakov
0 siblings, 0 replies; 200+ results
From: Anatoly Burakov @ 2018-05-31 10:57 UTC (permalink / raw)
To: dev
Cc: thomas, hemant.agrawal, bruce.richardson, ferruh.yigit,
konstantin.ananyev, jerin.jacob, olivier.matz, stephen, nhorman,
david.marchand, gowrishankar.m
Currently, memory for device maps is allocated ad-hoc, by calculating
end of VA space allocated for hugepages and crossing fingers in hopes that
those addresses will be free in primary and secondary processes. This leads
to situations such as this:
EAL: Detected 88 lcore(s)
EAL: Detected 2 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket_178323_8af2229603de4
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: PCI device 0000:81:00.0 on NUMA socket 1
EAL: probe driver: 8086:1563 net_ixgbe
EAL: Cannot mmap device resource file /sys/bus/pci/devices/0000:81:00.0/resource0 to address: 0x7ff7f5800000
EAL: Requested device 0000:81:00.0 cannot be used
EAL: Error - exiting with code: 1
Cause: No Ethernet ports - bye
As can be seen from the above log, secondary process has initialized
successfully, but device BAR mapping has failed, which resulted in missing ports
in the secondary process.
This patchset is an attempt to fix this problem once and for all, by using
the same method we use for memory to do device mappings as well. That is,
by preallocating all of the device memory in advance, so that initialization
either succeeds and allows for device mappings, or it fails outright (whereas
currently we may be in an in-between kind of situation, where init has
succeeded but device mappings have failed).
This change breaks the ABI, so it is not for this release. However, i'd like
to hear feedback on the approach and whether there are potential problems with
other buses/use cases that i didn't think of.
Anatoly Burakov (3):
fbarray: allow zero-sized elements
mem: add device memory reserve/free API
bus/pci: use the new device memory API for BAR mapping
drivers/bus/pci/linux/pci_init.h | 1 -
drivers/bus/pci/linux/pci_uio.c | 11 +-
drivers/bus/pci/linux/pci_vfio.c | 27 +-
lib/librte_eal/common/eal_common_fbarray.c | 10 +-
lib/librte_eal/common/eal_common_memory.c | 270 ++++++++++++++++--
.../common/include/rte_eal_memconfig.h | 18 ++
lib/librte_eal/common/include/rte_memory.h | 40 +++
lib/librte_pci/Makefile | 1 +
lib/librte_pci/rte_pci.c | 20 +-
9 files changed, 350 insertions(+), 48 deletions(-)
--
2.17.0
^ permalink raw reply [relevance 3%]
* Re: [dpdk-dev] Compilation of MLX5 driver
2018-05-31 9:14 0% ` Nitin Katiyar
@ 2018-05-31 9:53 0% ` Nélio Laranjeiro
2018-05-31 11:44 0% ` Nitin Katiyar
0 siblings, 1 reply; 200+ results
From: Nélio Laranjeiro @ 2018-05-31 9:53 UTC (permalink / raw)
To: Nitin Katiyar; +Cc: Shahaf Shuler, dev
On Thu, May 31, 2018 at 09:14:03AM +0000, Nitin Katiyar wrote:
> Yes,I installed it using --dpdk --upstream-libs. What is the way
> forward now?
In v17.05 MLX5 PMD is still relying on libibverbs and libmlx5, the way
Those options you used are necessary to select in their package the
installation of libverbs,libmlx5 or rdma-core.
Doing this you have selected rdma-core which is not supported in v17.05
DPDK version.
You need to install Mellanox OFED without those two options to select
libibverbs, libmlx5 to make it work.
Regards,
> Regards,
> Nitin
>
> -----Original Message-----
> From: Nélio Laranjeiro [mailto:nelio.laranjeiro@6wind.com]
> Sent: Thursday, May 31, 2018 1:36 PM
> To: Nitin Katiyar <nitin.katiyar@ericsson.com>
> Cc: Shahaf Shuler <shahafs@mellanox.com>; dev@dpdk.org
> Subject: Re: [dpdk-dev] Compilation of MLX5 driver
>
> On Thu, May 31, 2018 at 07:01:17AM +0000, Nitin Katiyar wrote:
> > Hi,
> > It has following files:
> >
> > arch.h ib.h kern-abi.h mlx4dv.h mlx5dv.h opcode.h sa.h
> > sa-kern-abi.h verbs.h
> >
> > I tried with both MLNX_OFED_LINUX-4.2-1.0.0.0 and
> > MLNX_OFED_LINUX-4.2-1.2.0.0-ubuntu14.04-x86_64
>
> Did you installed Mellanox OFED with the --dpdk --upstream-libs arguments for the installation script?
>
> If it is the case, you should not add them for this version, those options are for DPDK v17.11 and higher.
>
> Regards,
>
> > Regards,
> > Nitin
> >
> > -----Original Message-----
> > From: Shahaf Shuler [mailto:shahafs@mellanox.com]
> > Sent: Thursday, May 31, 2018 10:51 AM
> > To: Nitin Katiyar <nitin.katiyar@ericsson.com>; Nélio Laranjeiro
> > <nelio.laranjeiro@6wind.com>
> > Cc: dev@dpdk.org
> > Subject: RE: [dpdk-dev] Compilation of MLX5 driver
> >
> > Wednesday, May 30, 2018 7:45 PM, Nitin Katiyar:
> > >
> > > Hi,
> > > I was compiling 17.05.02.
> > > Regards,
> > > Nitin
> > >
> > > -----Original Message-----
> > > From: Nélio Laranjeiro [mailto:nelio.laranjeiro@6wind.com]
> > > Sent: Wednesday, May 30, 2018 6:42 PM
> > > To: Nitin Katiyar <nitin.katiyar@ericsson.com>
> > > Cc: dev@dpdk.org
> > > Subject: Re: [dpdk-dev] Compilation of MLX5 driver
> > >
> > > Hi,
> > >
> > > On Wed, May 30, 2018 at 11:54:31AM +0000, Nitin Katiyar wrote:
> > > > Hi,
> > > > I am trying to compile MLX5 PMD driver by setting
> > > "CONFIG_RTE_LIBRTE_MLX5_PMD=y" and hitting following compilation
> > > error.
> > > >
> > > > fatal error: infiniband/mlx5_hw.h: No such file or directory
> >
> > Can you list the files you have under /usr/include/infiniband ?
> >
> > > >
> > > > I have installed MLNX_OFED _LINUX-4.2-1.2.0 on my Ubuntu 14.04
> > > > machine
> > > but still hitting the same error. Am I missing some other package?
> > >
> > > Which version of DPDK are you using (it is important to help)?
> > >
> > > Regards,
> > >
> > > --
> > > Nélio Laranjeiro
> > > 6WIND
>
> --
> Nélio Laranjeiro
> 6WIND
--
Nélio Laranjeiro
6WIND
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] Compilation of MLX5 driver
2018-05-31 8:05 0% ` Nélio Laranjeiro
@ 2018-05-31 9:14 0% ` Nitin Katiyar
2018-05-31 9:53 0% ` Nélio Laranjeiro
0 siblings, 1 reply; 200+ results
From: Nitin Katiyar @ 2018-05-31 9:14 UTC (permalink / raw)
To: Nélio Laranjeiro; +Cc: Shahaf Shuler, dev
Yes,I installed it using --dpdk --upstream-libs. What is the way forward now?
Regards,
Nitin
-----Original Message-----
From: Nélio Laranjeiro [mailto:nelio.laranjeiro@6wind.com]
Sent: Thursday, May 31, 2018 1:36 PM
To: Nitin Katiyar <nitin.katiyar@ericsson.com>
Cc: Shahaf Shuler <shahafs@mellanox.com>; dev@dpdk.org
Subject: Re: [dpdk-dev] Compilation of MLX5 driver
On Thu, May 31, 2018 at 07:01:17AM +0000, Nitin Katiyar wrote:
> Hi,
> It has following files:
>
> arch.h ib.h kern-abi.h mlx4dv.h mlx5dv.h opcode.h sa.h
> sa-kern-abi.h verbs.h
>
> I tried with both MLNX_OFED_LINUX-4.2-1.0.0.0 and
> MLNX_OFED_LINUX-4.2-1.2.0.0-ubuntu14.04-x86_64
Did you installed Mellanox OFED with the --dpdk --upstream-libs arguments for the installation script?
If it is the case, you should not add them for this version, those options are for DPDK v17.11 and higher.
Regards,
> Regards,
> Nitin
>
> -----Original Message-----
> From: Shahaf Shuler [mailto:shahafs@mellanox.com]
> Sent: Thursday, May 31, 2018 10:51 AM
> To: Nitin Katiyar <nitin.katiyar@ericsson.com>; Nélio Laranjeiro
> <nelio.laranjeiro@6wind.com>
> Cc: dev@dpdk.org
> Subject: RE: [dpdk-dev] Compilation of MLX5 driver
>
> Wednesday, May 30, 2018 7:45 PM, Nitin Katiyar:
> >
> > Hi,
> > I was compiling 17.05.02.
> > Regards,
> > Nitin
> >
> > -----Original Message-----
> > From: Nélio Laranjeiro [mailto:nelio.laranjeiro@6wind.com]
> > Sent: Wednesday, May 30, 2018 6:42 PM
> > To: Nitin Katiyar <nitin.katiyar@ericsson.com>
> > Cc: dev@dpdk.org
> > Subject: Re: [dpdk-dev] Compilation of MLX5 driver
> >
> > Hi,
> >
> > On Wed, May 30, 2018 at 11:54:31AM +0000, Nitin Katiyar wrote:
> > > Hi,
> > > I am trying to compile MLX5 PMD driver by setting
> > "CONFIG_RTE_LIBRTE_MLX5_PMD=y" and hitting following compilation
> > error.
> > >
> > > fatal error: infiniband/mlx5_hw.h: No such file or directory
>
> Can you list the files you have under /usr/include/infiniband ?
>
> > >
> > > I have installed MLNX_OFED _LINUX-4.2-1.2.0 on my Ubuntu 14.04
> > > machine
> > but still hitting the same error. Am I missing some other package?
> >
> > Which version of DPDK are you using (it is important to help)?
> >
> > Regards,
> >
> > --
> > Nélio Laranjeiro
> > 6WIND
--
Nélio Laranjeiro
6WIND
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] Compilation of MLX5 driver
2018-05-31 7:01 4% ` Nitin Katiyar
@ 2018-05-31 8:05 0% ` Nélio Laranjeiro
2018-05-31 9:14 0% ` Nitin Katiyar
0 siblings, 1 reply; 200+ results
From: Nélio Laranjeiro @ 2018-05-31 8:05 UTC (permalink / raw)
To: Nitin Katiyar; +Cc: Shahaf Shuler, dev
On Thu, May 31, 2018 at 07:01:17AM +0000, Nitin Katiyar wrote:
> Hi,
> It has following files:
>
> arch.h ib.h kern-abi.h mlx4dv.h mlx5dv.h opcode.h sa.h
> sa-kern-abi.h verbs.h
>
> I tried with both MLNX_OFED_LINUX-4.2-1.0.0.0 and
> MLNX_OFED_LINUX-4.2-1.2.0.0-ubuntu14.04-x86_64
Did you installed Mellanox OFED with the --dpdk --upstream-libs
arguments for the installation script?
If it is the case, you should not add them for this version, those
options are for DPDK v17.11 and higher.
Regards,
> Regards,
> Nitin
>
> -----Original Message-----
> From: Shahaf Shuler [mailto:shahafs@mellanox.com]
> Sent: Thursday, May 31, 2018 10:51 AM
> To: Nitin Katiyar <nitin.katiyar@ericsson.com>; Nélio Laranjeiro <nelio.laranjeiro@6wind.com>
> Cc: dev@dpdk.org
> Subject: RE: [dpdk-dev] Compilation of MLX5 driver
>
> Wednesday, May 30, 2018 7:45 PM, Nitin Katiyar:
> >
> > Hi,
> > I was compiling 17.05.02.
> > Regards,
> > Nitin
> >
> > -----Original Message-----
> > From: Nélio Laranjeiro [mailto:nelio.laranjeiro@6wind.com]
> > Sent: Wednesday, May 30, 2018 6:42 PM
> > To: Nitin Katiyar <nitin.katiyar@ericsson.com>
> > Cc: dev@dpdk.org
> > Subject: Re: [dpdk-dev] Compilation of MLX5 driver
> >
> > Hi,
> >
> > On Wed, May 30, 2018 at 11:54:31AM +0000, Nitin Katiyar wrote:
> > > Hi,
> > > I am trying to compile MLX5 PMD driver by setting
> > "CONFIG_RTE_LIBRTE_MLX5_PMD=y" and hitting following compilation
> > error.
> > >
> > > fatal error: infiniband/mlx5_hw.h: No such file or directory
>
> Can you list the files you have under /usr/include/infiniband ?
>
> > >
> > > I have installed MLNX_OFED _LINUX-4.2-1.2.0 on my Ubuntu 14.04
> > > machine
> > but still hitting the same error. Am I missing some other package?
> >
> > Which version of DPDK are you using (it is important to help)?
> >
> > Regards,
> >
> > --
> > Nélio Laranjeiro
> > 6WIND
--
Nélio Laranjeiro
6WIND
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] Compilation of MLX5 driver
@ 2018-05-31 7:01 4% ` Nitin Katiyar
2018-05-31 8:05 0% ` Nélio Laranjeiro
0 siblings, 1 reply; 200+ results
From: Nitin Katiyar @ 2018-05-31 7:01 UTC (permalink / raw)
To: Shahaf Shuler, Nélio Laranjeiro; +Cc: dev
Hi,
It has following files:
arch.h ib.h kern-abi.h mlx4dv.h mlx5dv.h opcode.h sa.h sa-kern-abi.h verbs.h
I tried with both MLNX_OFED_LINUX-4.2-1.0.0.0 and MLNX_OFED_LINUX-4.2-1.2.0.0-ubuntu14.04-x86_64
Regards,
Nitin
-----Original Message-----
From: Shahaf Shuler [mailto:shahafs@mellanox.com]
Sent: Thursday, May 31, 2018 10:51 AM
To: Nitin Katiyar <nitin.katiyar@ericsson.com>; Nélio Laranjeiro <nelio.laranjeiro@6wind.com>
Cc: dev@dpdk.org
Subject: RE: [dpdk-dev] Compilation of MLX5 driver
Wednesday, May 30, 2018 7:45 PM, Nitin Katiyar:
>
> Hi,
> I was compiling 17.05.02.
> Regards,
> Nitin
>
> -----Original Message-----
> From: Nélio Laranjeiro [mailto:nelio.laranjeiro@6wind.com]
> Sent: Wednesday, May 30, 2018 6:42 PM
> To: Nitin Katiyar <nitin.katiyar@ericsson.com>
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] Compilation of MLX5 driver
>
> Hi,
>
> On Wed, May 30, 2018 at 11:54:31AM +0000, Nitin Katiyar wrote:
> > Hi,
> > I am trying to compile MLX5 PMD driver by setting
> "CONFIG_RTE_LIBRTE_MLX5_PMD=y" and hitting following compilation
> error.
> >
> > fatal error: infiniband/mlx5_hw.h: No such file or directory
Can you list the files you have under /usr/include/infiniband ?
> >
> > I have installed MLNX_OFED _LINUX-4.2-1.2.0 on my Ubuntu 14.04
> > machine
> but still hitting the same error. Am I missing some other package?
>
> Which version of DPDK are you using (it is important to help)?
>
> Regards,
>
> --
> Nélio Laranjeiro
> 6WIND
^ permalink raw reply [relevance 4%]
* Re: [dpdk-dev] [PATCH v1] doc: update release notes for 18.05
2018-05-30 20:25 7% [dpdk-dev] [PATCH v1] doc: update release notes for 18.05 John McNamara
@ 2018-05-30 20:54 12% ` Thomas Monjalon
0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2018-05-30 20:54 UTC (permalink / raw)
To: John McNamara; +Cc: dev
30/05/2018 22:25, John McNamara:
> Fix grammar, spelling and formatting of DPDK 18.05 release notes.
>
> Signed-off-by: John McNamara <john.mcnamara@intel.com>
Applied with few more changes below, thanks.
--- b/doc/guides/rel_notes/release_18_05.rst
+++ a/doc/guides/rel_notes/release_18_05.rst
@@ -350,7 +350,7 @@ API Changes
Also, make sure to start the actual text at the margin.
=========================================================
-* service cores: Service cores no longer marked as experimental.
+* service cores: No longer marked as experimental.
The service cores functions are no longer marked as experimental, and have
become part of the normal DPDK API and ABI. Any future ABI changes will be
@@ -412,7 +412,7 @@ API Changes
* ethdev: In struct ``struct rte_eth_dev_info``, field ``rte_pci_device *pci_dev``
has been replaced with field ``struct rte_device *device``.
-* Changes to the semantics of ``rte_eth_dev_configure()`` parameters.
+* ethdev: Changes to the semantics of ``rte_eth_dev_configure()`` parameters.
If both the ``nb_rx_q`` and ``nb_tx_q`` parameters are zero,
``rte_eth_dev_configure()`` will now use PMD-recommended queue sizes, or if
@@ -420,7 +420,7 @@ API Changes
fall-back values. Previously setting both of the parameters to zero would
have resulted in ``-EINVAL`` being returned.
-* Changes to the semantics of ``rte_eth_rx_queue_setup()`` parameters.
+* ethdev: Changes to the semantics of ``rte_eth_rx_queue_setup()`` parameters.
If the ``nb_rx_desc`` parameter is zero, ``rte_eth_rx_queue_setup`` will
now use the PMD-recommended Rx ring size, or in the case where the PMD
@@ -428,7 +428,7 @@ API Changes
fall-back value. Previously, setting ``nb_rx_desc`` to zero would have
resulted in an error.
-* Changes to the semantics of ``rte_eth_tx_queue_setup()`` parameters.
+* ethdev: Changes to the semantics of ``rte_eth_tx_queue_setup()`` parameters.
If the ``nb_tx_desc`` parameter is zero, ``rte_eth_tx_queue_setup`` will
now use the PMD-recommended Tx ring size, or in the case where the PMD
@@ -436,7 +436,7 @@ API Changes
fall-back value. Previously, setting ``nb_tx_desc`` to zero would have
resulted in an error.
-* ethdev: several changes were made to the flow API.
+* ethdev: Several changes were made to the flow API.
* The unused DUP action was removed.
* Actions semantics in flow rules: list order now matters ("first
@@ -479,12 +479,12 @@ API Changes
* ``RTE_FLOW_ACTION_TYPE_MARK`` item type has been added to match a flow against
a previously marked flow.
-* ethdev: change flow APIs regarding count action:
+* ethdev: Change flow APIs regarding count action:
* ``rte_flow_create()`` API count action now requires the ``struct rte_flow_action_count``.
* ``rte_flow_query()`` API parameter changed from action type to action structure.
-* ethdev: changes to offload API
+* ethdev: Changes to offload API
A pure per-port offloading isn't requested to be repeated in [rt]x_conf->offloads to
``rte_eth_[rt]x_queue_setup()``. Now any offloading enabled in ``rte_eth_dev_configure()``
@@ -492,7 +492,7 @@ API Changes
not been enabled in ``rte_eth_dev_configure()`` and is requested to be enabled in
``rte_eth_[rt]x_queue_setup()`` must be per-queue type, or otherwise trigger an error log.
-* ethdev: runtime queue setup:
+* ethdev: Runtime queue setup
``rte_eth_rx_queue_setup`` and ``rte_eth_tx_queue_setup`` can be called after
``rte_eth_dev_start`` if the device supports runtime queue setup. The device driver can
@@ -520,7 +520,7 @@ ABI Changes
structure and the offset of the fields remains the same on platforms
with 64B cache line, but changes on other platforms.
-* mempool: Some Ops have changed.
+* mempool: Some ops have changed.
A new callback ``calc_mem_size`` has been added to ``rte_mempool_ops``
to allow customization of the required memory size calculation.
@@ -532,7 +532,7 @@ ABI Changes
Callback ``register_memory_area`` has been removed from ``rte_mempool_ops``
since the new callback ``populate`` may be used instead of it.
-* **Additional fields in rte_eth_dev_info.**
+* ethdev: Additional fields in rte_eth_dev_info.
The ``rte_eth_dev_info`` structure has had two extra entries appended to the
end of it: ``default_rxportconf`` and ``default_txportconf``. Each of these
@@ -553,32 +553,19 @@ ABI Changes
sanity fix in the VLAN pattern item (``struct rte_flow_item_vlan``) and
new transfer attribute (``struct rte_flow_attr``).
-**New parameter added to rte_bbdev_op_cap_turbo_dec.**
+* bbdev: New parameter added to rte_bbdev_op_cap_turbo_dec.
A new parameter ``max_llr_modulus`` has been added to
``rte_bbdev_op_cap_turbo_dec`` structure to specify maximal LLR (likelihood
ratio) absolute value.
-* **BBdev Queue Groups split into UL/DL Groups.**
+* bbdev: Queue Groups split into UL/DL Groups.
Queue Groups have been split into UL/DL Groups in the Turbo Software Driver.
They are independent for Decode/Encode. ``rte_bbdev_driver_info`` reflects
introduced changes.
-Removed Items
--------------
-
-.. This section should contain removed items in this release. Sample format:
-
- * Add a short 1-2 sentence description of the removed item in the past
- tense.
-
- This section is a comment. Do not overwrite or remove it.
- Also, make sure to start the actual text at the margin.
- =========================================================
-
-
Known Issues
------------
^ permalink raw reply [relevance 12%]
* [dpdk-dev] [PATCH v1] doc: update release notes for 18.05
@ 2018-05-30 20:25 7% John McNamara
2018-05-30 20:54 12% ` Thomas Monjalon
0 siblings, 1 reply; 200+ results
From: John McNamara @ 2018-05-30 20:25 UTC (permalink / raw)
To: dev; +Cc: John McNamara
Fix grammar, spelling and formatting of DPDK 18.05 release notes.
Signed-off-by: John McNamara <john.mcnamara@intel.com>
---
doc/guides/rel_notes/release_18_05.rst | 308 +++++++++++++++++----------------
1 file changed, 157 insertions(+), 151 deletions(-)
diff --git a/doc/guides/rel_notes/release_18_05.rst b/doc/guides/rel_notes/release_18_05.rst
index 42a5b37..b24217e 100644
--- a/doc/guides/rel_notes/release_18_05.rst
+++ b/doc/guides/rel_notes/release_18_05.rst
@@ -45,7 +45,7 @@ New Features
Memory subsystem has been reworked to support new functionality.
- On Linux, support for reserving/unreserving hugepage memory at runtime was
+ On Linux, support for reserving/unreserving hugepage memory at runtime has been
added, so applications no longer need to pre-reserve memory at startup. Due to
reorganized internal workings of memory subsystem, any memory allocated
through ``rte_malloc()`` or ``rte_memzone_reserve()`` is no longer guaranteed
@@ -53,64 +53,64 @@ New Features
This functionality has introduced the following changes:
- * ``rte_eal_get_physmem_layout()`` was removed
+ * ``rte_eal_get_physmem_layout()`` was removed.
* A new flag for memzone reservation (``RTE_MEMZONE_IOVA_CONTIG``) was added
to ensure reserved memory will be IOVA-contiguous, for use with device
- drivers and other cases requiring such memory
- * New callbacks for memory allocation/deallocation events, allowing user (or
+ drivers and other cases requiring such memory.
+ * New callbacks for memory allocation/deallocation events, allowing users (or
drivers) to be notified of new memory being allocated or deallocated
- * New callbacks for validating memory allocations above specified limit,
- allowing user to permit or deny memory allocations
+ * New callbacks for validating memory allocations above a specified limit,
+ allowing user to permit or deny memory allocations.
* A new command-line switch ``--legacy-mem`` to enable EAL behavior similar to
how older versions of DPDK worked (memory segments that are IOVA-contiguous,
- but hugepages are reserved at startup only, and can never be released)
+ but hugepages are reserved at startup only, and can never be released).
* A new command-line switch ``--single-file-segments`` to put all memory
- segments within a segment list in a single file
+ segments within a segment list in a single file.
* A set of convenience function calls to look up and iterate over allocated
- memory segments
+ memory segments.
* ``-m`` and ``--socket-mem`` command-line arguments now carry an additional
meaning and mark pre-reserved hugepages as "unfree-able", thereby acting as
a mechanism guaranteeing minimum availability of hugepage memory to the
- application
+ application.
Reserving/unreserving memory at runtime is not currently supported on FreeBSD.
* **Added bucket mempool driver.**
- Added bucket mempool driver which provides a way to allocate contiguous
+ Added a bucket mempool driver which provides a way to allocate contiguous
block of objects.
- Number of objects in the block depends on how many objects fit in
- RTE_DRIVER_MEMPOOL_BUCKET_SIZE_KB memory chunk which is build time option.
- The number may be obtained using rte_mempool_ops_get_info() API.
- Contiguous blocks may be allocated using rte_mempool_get_contig_blocks() API.
+ The number of objects in the block depends on how many objects fit in the
+ ``RTE_DRIVER_MEMPOOL_BUCKET_SIZE_KB`` memory chunk which is a build time option.
+ The number may be obtained using ``rte_mempool_ops_get_info()`` API.
+ Contiguous blocks may be allocated using ``rte_mempool_get_contig_blocks()`` API.
* **Added support for port representors.**
- The DPDK port representors (also known as "VF representors" in the specific
+ Added DPDK port representors (also known as "VF representors" in the specific
context of VFs), which are to DPDK what the Ethernet switch device driver
model (**switchdev**) is to Linux, and which can be thought as a software
"patch panel" front-end for applications. DPDK port representors are
implemented as additional virtual Ethernet device (**ethdev**) instances,
- spawned on an as needed basis through configuration parameters passed to the
+ spawned on an as-needed basis through configuration parameters passed to the
driver of the underlying device using devargs.
* **Added support for VXLAN and NVGRE tunnel endpoint.**
New actions types have been added to support encapsulation and decapsulation
operations for a tunnel endpoint. The new action types are
- RTE_FLOW_ACTION_TYPE_[VXLAN/NVGRE]_ENCAP, RTE_FLOW_ACTION_TYPE_[VXLAN/NVGRE]_DECAP,
- RTE_FLOW_ACTION_TYPE_JUMP. New item type RTE_FLOW_ACTION_TYPE_MARK has been
- added to match a flow against a previously marked flow. It also introduced shared
- counter to flow API to counte for a group of flows.
+ ``RTE_FLOW_ACTION_TYPE_[VXLAN/NVGRE]_ENCAP``, ``RTE_FLOW_ACTION_TYPE_[VXLAN/NVGRE]_DECAP``,
+ ``RTE_FLOW_ACTION_TYPE_JUMP``. A new item type ``RTE_FLOW_ACTION_TYPE_MARK`` has been
+ added to match a flow against a previously marked flow. A shared counter has also been
+ introduced to the flow API to count a group of flows.
-* **Added PMD-recommended Tx and Rx parameters**
+* **Added PMD-recommended Tx and Rx parameters.**
Applications can now query drivers for device-tuned values of
ring sizes, burst sizes, and number of queues.
* **Added RSS hash and key update to CXGBE PMD.**
- Support to update RSS hash and key has been added to CXGBE PMD.
+ Added support for updating the RSS hash and key to the CXGBE PMD.
* **Added CXGBE VF PMD.**
@@ -121,29 +121,29 @@ New Features
Updated the mlx5 driver including the following changes:
- * Introduced Multi-packet Rx. With it, achieved 100Gb/sec with 64B frames.
- * Supported to be run by non-root users given reduced set of capabilities
- CAP_NET_ADMIN, CAP_NET_RAW and CAP_IPC_LOCK.
- * Supported TSO and checksum for generic UDP and IP tunnels.
- * Supported inner checksum and RSS for GRE, VXLAN-GPE, MPLSoGRE
+ * Introduced Multi-packet Rx to enable 100Gb/sec with 64B frames.
+ * Support for being run by non-root users given a reduced set of capabilities
+ ``CAP_NET_ADMIN``, ``CAP_NET_RAW`` and ``CAP_IPC_LOCK``.
+ * Support for TSO and checksum for generic UDP and IP tunnels.
+ * Support for inner checksum and RSS for GRE, VXLAN-GPE, MPLSoGRE
and MPLSoUDP tunnels.
- * Accommodate to the new memory hotplug model.
- * Supported non virtually contiguous mempools.
- * Supported MAC adding along with allmulti and promiscuous modes from VF.
- * Supported Mellanox BlueField SoC device.
- * Supported PMD defaults for queue number and depth to improve the out
+ * Accommodate the new memory hotplug model.
+ * Support for non virtually contiguous mempools.
+ * Support for MAC adding along with allmulti and promiscuous modes from VF.
+ * Support for Mellanox BlueField SoC device.
+ * Support for PMD defaults for queue number and depth to improve the out
of the box performance.
* **Updated mlx4 driver.**
Updated the mlx4 driver including the following changes:
- * Supported to be run by non-root users given reduced set of capabilities
- CAP_NET_ADMIN, CAP_NET_RAW and CAP_IPC_LOCK.
+ * Support for to being run by non-root users given a reduced set of capabilities
+ ``CAP_NET_ADMIN``, ``CAP_NET_RAW`` and ``CAP_IPC_LOCK``.
* Supported CRC strip toggling.
- * Accommodate to the new memory hotplug model.
- * Supported non virtually contiguous mempools.
- * Dropped support in Mellanox OFED 4.2.
+ * Accommodate the new memory hotplug model.
+ * Support non virtually contiguous mempools.
+ * Dropped support for Mellanox OFED 4.2.
* **Updated Solarflare network PMD.**
@@ -164,58 +164,61 @@ New Features
* **Updated szedata2 PMD.**
Added support for new NFB-200G2QL card.
- New API was introduced in the libsze2 library which the szedata2 PMD depends
- on thus the new version of the library was needed.
+ A new API was introduced in the libsze2 library which the szedata2 PMD depends
+ on, thus the new version of the library was needed.
New versions of the packages are available and the minimum required version
is 4.4.1.
-* **Added support for Broadcom NetXtreme-S (BCM58800) family of controllers (aka Stingray)**
+* **Added support for Broadcom NetXtreme-S (BCM58800) family of controllers (aka Stingray).**
- The BCM58800 devices feature a NetXtreme E-Series advanced network controller, a high-performance
- ARM CPU block, PCI Express (PCIe) Gen3 interfaces, key accelerators for compute offload and a high-
- speed memory subsystem including L3 cache and DDR4 interfaces, all interconnected by a coherent
- Network-on-chip (NOC) fabric.
+ Added support for the Broadcom NetXtreme-S (BCM58800) family of controllers
+ (aka Stingray). The BCM58800 devices feature a NetXtreme E-Series advanced
+ network controller, a high-performance ARM CPU block, PCI Express (PCIe)
+ Gen3 interfaces, key accelerators for compute offload and a high-speed
+ memory subsystem including L3 cache and DDR4 interfaces, all interconnected
+ by a coherent Network-on-chip (NOC) fabric.
- The ARM CPU subsystem features eight ARMv8 Cortex-A72 CPUs at 3.0 GHz, arranged in a multi-cluster
- configuration.
+ The ARM CPU subsystem features eight ARMv8 Cortex-A72 CPUs at 3.0 GHz,
+ arranged in a multi-cluster configuration.
* **Added vDPA in vhost-user lib.**
- Added support for selective datapath in vhost-user lib. vDPA stands for vhost
+ Added support for selective datapath in the vhost-user lib. vDPA stands for vhost
Data Path Acceleration. It supports virtio ring compatible devices to serve
- virtio driver directly to enable datapath acceleration.
+ the virtio driver directly to enable datapath acceleration.
* **Added IFCVF vDPA driver.**
- Added IFCVF vDPA driver to support Intel FPGA 100G VF device. IFCVF works
+ Added IFCVF vDPA driver to support Intel FPGA 100G VF devices. IFCVF works
as a HW vhost data path accelerator, it supports live migration and is
- compatible with virtio 0.95 and 1.0. This driver registers ifcvf vDPA driver
- to vhost lib, when virtio connected, with the help of the registered vDPA
+ compatible with virtio 0.95 and 1.0. This driver registers the ifcvf vDPA driver
+ to vhost lib, when virtio connects. With the help of the registered vDPA
driver the assigned VF gets configured to Rx/Tx directly to VM's virtio
vrings.
* **Added support for vhost dequeue interrupt mode.**
- Added support for vhost dequeue interrupt mode to release cpus to others when
- no data to transmit. Applications could register an epoll event fd to associate
- Rx queues with interrupt vectors.
+ Added support for vhost dequeue interrupt mode to release CPUs to others
+ when there is no data to transmit. Applications can register an epoll event
+ file descriptor to associate Rx queues with interrupt vectors.
* **Added support for virtio-user server mode.**
+
In a container environment if the vhost-user backend restarts, there's no way
for it to reconnect to virtio-user. To address this, support for server mode
- is added. In this mode the socket file is created by virtio-user, which the
+ has been added. In this mode the socket file is created by virtio-user, which the
backend connects to. This means that if the backend restarts, it can reconnect
to virtio-user and continue communications.
* **Added crypto workload support to vhost library.**
- New APIs are introduced in vhost library to enable virtio crypto support
+ New APIs have been introduced in the vhost library to enable virtio crypto support
including session creation/deletion handling and translating virtio-crypto
- request into DPDK crypto operations. A sample application is also introduced.
+ requests into DPDK crypto operations. A sample application has also been introduced.
* **Added virtio crypto PMD.**
- Added a new poll mode driver for virtio crypto devices, which provides
+ Added a new Poll Mode Driver for virtio crypto devices, which provides
AES-CBC ciphering and AES-CBC with HMAC-SHA1 algorithm-chaining. See the
:doc:`../cryptodevs/virtio` crypto driver guide for more details on
this new driver.
@@ -232,9 +235,9 @@ New Features
* AES-CMAC (128-bit key).
-* **Added Compressdev Library, a generic compression service library.**
+* **Added the Compressdev Library, a generic compression service library.**
- The compressdev library provides an API for offload of compression and
+ Added the Compressdev library which provides an API for offload of compression and
decompression operations to hardware or software accelerator devices.
* **Added a new compression poll mode driver using Intels ISA-L.**
@@ -253,36 +256,36 @@ New Features
* **Added OcteonTx TIM Driver (Event timer adapter).**
The OcteonTx Timer block enables software to schedule events for a future
- time, it is exposed to an application via Event timer adapter library.
+ time, it is exposed to an application via the Event timer adapter library.
See the :doc:`../eventdevs/octeontx` guide for more details
* **Added Event Crypto Adapter Library.**
- Added the Event Crypto Adapter Library. This library extends the
- event-based model by introducing APIs that allow applications to
- enqueue/dequeue crypto operations to/from cryptodev as events scheduled
- by an event device.
+ Added the Event Crypto Adapter Library. This library extends the
+ event-based model by introducing APIs that allow applications to
+ enqueue/dequeue crypto operations to/from cryptodev as events scheduled
+ by an event device.
* **Added Ifpga Bus, a generic Intel FPGA Bus library.**
- The Ifpga Bus library provides support for integrating any Intel FPGA device with
- the DPDK framework. It provides Intel FPGA Partial Bit Stream AFU (Accelerated
- Function Unit) scan and drivers probe.
+ Added the Ifpga Bus library which provides support for integrating any Intel
+ FPGA device with the DPDK framework. It provides Intel FPGA Partial Bit
+ Stream AFU (Accelerated Function Unit) scan and drivers probe.
* **Added IFPGA (Intel FPGA) Rawdev Driver.**
- Added a new Rawdev driver called IFPGA(Intel FPGA) Rawdev Driver, which cooperates
- with OPAE (Open Programmable Acceleration Engine) share code provides common FPGA
+ Added a new Rawdev driver called IFPGA (Intel FPGA) Rawdev Driver, which cooperates
+ with OPAE (Open Programmable Acceleration Engine) shared code to provide common FPGA
management ops for FPGA operation.
See the :doc:`../rawdevs/ifpga_rawdev` programmer's guide for more details.
* **Added DPAA2 QDMA Driver (in rawdev).**
- The DPAA2 QDMA is an implementation of the rawdev API, that provide means
- to initiate a DMA transaction from CPU. The initiated DMA is performed
- without CPU being involved in the actual DMA transaction.
+ The DPAA2 QDMA is an implementation of the rawdev API, that provide a means
+ of initiating a DMA transaction from CPU. The initiated DMA is performed
+ without the CPU being involved in the actual DMA transaction.
See the :doc:`../rawdevs/dpaa2_qdma` guide for more details.
@@ -290,8 +293,8 @@ New Features
The DPAA2 CMDIF is an implementation of the rawdev API, that provides
communication between the GPP and NXP's QorIQ based AIOP Block (Firmware).
- Advanced IO Processor i.e. AIOP is clusters of programmable RISC engines
- optimised for flexible networking and I/O operations. The communication
+ Advanced IO Processor i.e. AIOP are clusters of programmable RISC engines
+ optimized for flexible networking and I/O operations. The communication
between GPP and AIOP is achieved via using DPCI devices exposed by MC for
GPP <--> AIOP interaction.
@@ -299,26 +302,27 @@ New Features
* **Added device event monitor framework.**
- Added a general device event monitor framework at EAL, for device dynamic management.
- Such as device hotplug awareness and actions adopted accordingly. The list of new APIs:
+ Added a general device event monitor framework to EAL, for device dynamic
+ management to facilitate device hotplug awareness and associated
+ actions. The list of new APIs is:
- * ``rte_dev_event_monitor_start`` and ``rte_dev_event_monitor_stop`` are for
- the event monitor enable and disable.
+ * ``rte_dev_event_monitor_start`` and ``rte_dev_event_monitor_stop`` for
+ the event monitor enabling and disabling.
* ``rte_dev_event_callback_register`` and ``rte_dev_event_callback_unregister``
- are for the user's callbacks register and unregister.
+ for registering and un-registering user callbacks.
- Linux uevent is supported as backend of this device event notification framework.
+ Linux uevent is supported as a backend of this device event notification framework.
* **Added support for procinfo and pdump on eth vdev.**
- For ethernet virtual devices (like tap, pcap, etc), with this feature, we can get
- stats/xstats on shared memory from secondary process, and also pdump packets on
+ For ethernet virtual devices (like TAP, PCAP, etc.), with this feature, we can get
+ stats/xstats on shared memory from a secondary process, and also pdump packets on
those virtual devices.
-* **Advancement to Packet Framework Library.**
+* **Enhancements to the Packet Framework Library.**
Design and development of new API functions for Packet Framework library that
- implements common set of actions such as traffic metering, packet
+ implement a common set of actions such as traffic metering, packet
encapsulation, network address translation, TTL update, etc., for pipeline
table and input ports to speed up application development. The API functions
includes creating action profiles, registering actions to the profiles,
@@ -327,10 +331,10 @@ New Features
* **Added the BPF Library.**
The BPF Library provides the ability to load and execute
- Enhanced Berkeley Packet Filter (eBPF) within user-space dpdk application.
- Also it introduces basic framework to load/unload BPF-based filters
- on eth devices (right now only via SW RX/TX callbacks).
- It also adds dependency on libelf.
+ Enhanced Berkeley Packet Filters (eBPF) within user-space DPDK applications.
+ It also introduces a basic framework to load/unload BPF-based filters
+ on Eth devices (right now only via SW RX/TX callbacks).
+ It also adds a dependency on libelf.
API Changes
@@ -346,28 +350,28 @@ API Changes
Also, make sure to start the actual text at the margin.
=========================================================
-* service cores: no longer marked as experimental.
+* service cores: Service cores no longer marked as experimental.
The service cores functions are no longer marked as experimental, and have
become part of the normal DPDK API and ABI. Any future ABI changes will be
announced at least one release before the ABI change is made. There are no
ABI breaking changes planned.
-* eal: ``rte_lcore_has_role()`` return value changed.
+* eal: The ``rte_lcore_has_role()`` return value changed.
This function now returns true or false, respectively,
- rather than 0 or <0 for success or failure.
+ rather than 0 or < 0 for success or failure.
It makes use of the function more intuitive.
-* mempool: capability flags and related functions have been removed.
+* mempool: The capability flags and related functions have been removed.
Flags ``MEMPOOL_F_CAPA_PHYS_CONTIG`` and
``MEMPOOL_F_CAPA_BLK_ALIGNED_OBJECTS`` were used by octeontx mempool
- driver to customize generic mempool library behaviour.
+ driver to customize generic mempool library behavior.
Now the new driver callbacks ``calc_mem_size`` and ``populate`` may be
used to achieve it without specific knowledge in the generic code.
-* mempool: xmem functions have been deprecated:
+* mempool: The following xmem functions have been deprecated:
- ``rte_mempool_xmem_create``
- ``rte_mempool_xmem_size``
@@ -387,59 +391,59 @@ API Changes
The packet mbuf API should be used as a replacement.
-* meter: updated to accommodate configuration profiles.
+* meter: API updated to accommodate configuration profiles.
- The meter API is changed to support meter configuration profiles. The
+ The meter API has been changed to support meter configuration profiles. The
configuration profile represents the set of configuration parameters
for a given meter object, such as the rates and sizes for the token
- buckets. These configuration parameters were previously the part of meter
- object internal data strcuture. The separation of the configuration
- parameters from meter object data structure results in reducing its
- memory footprint which helps in better cache utilization when large number
+ buckets. These configuration parameters were previously part of the meter
+ object internal data structure. The separation of the configuration
+ parameters from the meter object data structure results in reducing its
+ memory footprint which helps in better cache utilization when a large number
of meter objects are used.
-* ethdev: The function ``rte_eth_dev_count``, often mis-used to iterate
- over ports, is deprecated and replaced by ``rte_eth_dev_count_avail``.
- There is also a new function ``rte_eth_dev_count_total`` to get the
+* ethdev: The function ``rte_eth_dev_count()``, often mis-used to iterate
+ over ports, is deprecated and replaced by ``rte_eth_dev_count_avail()``.
+ There is also a new function ``rte_eth_dev_count_total()`` to get the
total number of allocated ports, available or not.
The hotplug-proof applications should use ``RTE_ETH_FOREACH_DEV`` or
``RTE_ETH_FOREACH_DEV_OWNED_BY`` as port iterators.
-* ethdev, in struct ``struct rte_eth_dev_info``, field ``rte_pci_device *pci_dev``
- replaced with field ``struct rte_device *device``.
+* ethdev: In struct ``struct rte_eth_dev_info``, field ``rte_pci_device *pci_dev``
+ has been replaced with field ``struct rte_device *device``.
-* **Changes to semantics of rte_eth_dev_configure() parameters.**
+* Changes to the semantics of ``rte_eth_dev_configure()`` parameters.
- If both the ``nb_rx_q`` and ``nb_tx_q`` parameters are zero,
- ``rte_eth_dev_configure`` will now use PMD-recommended queue sizes, or if
- recommendations are not provided by the PMD the function will use ethdev
- fall-back values. Previously setting both of the parameters to zero would
- have resulted in ``-EINVAL`` being returned.
+ If both the ``nb_rx_q`` and ``nb_tx_q`` parameters are zero,
+ ``rte_eth_dev_configure()`` will now use PMD-recommended queue sizes, or if
+ recommendations are not provided by the PMD the function will use ethdev
+ fall-back values. Previously setting both of the parameters to zero would
+ have resulted in ``-EINVAL`` being returned.
-* **Changes to semantics of rte_eth_rx_queue_setup() parameters.**
+* Changes to the semantics of ``rte_eth_rx_queue_setup()`` parameters.
- If the ``nb_rx_desc`` parameter is zero, ``rte_eth_rx_queue_setup`` will
- now use the PMD-recommended Rx ring size, or in the case where the PMD
- does not provide a recommendation, will use an ethdev-provided
- fall-back value. Previously, setting ``nb_rx_desc`` to zero would have
- resulted in an error.
+ If the ``nb_rx_desc`` parameter is zero, ``rte_eth_rx_queue_setup`` will
+ now use the PMD-recommended Rx ring size, or in the case where the PMD
+ does not provide a recommendation, will use an ethdev-provided
+ fall-back value. Previously, setting ``nb_rx_desc`` to zero would have
+ resulted in an error.
-* **Changes to semantics of rte_eth_tx_queue_setup() parameters.**
+* Changes to the semantics of ``rte_eth_tx_queue_setup()`` parameters.
If the ``nb_tx_desc`` parameter is zero, ``rte_eth_tx_queue_setup`` will
now use the PMD-recommended Tx ring size, or in the case where the PMD
- does not provide a recoomendation, will use an ethdev-provided
+ does not provide a recommendation, will use an ethdev-provided
fall-back value. Previously, setting ``nb_tx_desc`` to zero would have
resulted in an error.
* ethdev: several changes were made to the flow API.
- * Unused DUP action was removed.
+ * The unused DUP action was removed.
* Actions semantics in flow rules: list order now matters ("first
to last" instead of "all simultaneously"), repeated actions are now
all performed, and they do not individually have (non-)terminating
properties anymore.
- * Flow rules are now always terminating unless a PASSTHRU action is
+ * Flow rules are now always terminating unless a ``PASSTHRU`` action is
present.
* C99-style flexible arrays were replaced with standard pointers in RSS
action and in RAW pattern item structures due to compatibility issues.
@@ -458,7 +462,7 @@ API Changes
* A new transfer attribute was added to ``struct rte_flow_attr`` in order
to clarify the behavior of some pattern items.
* PF and VF pattern items are now only accepted by PMDs that implement
- them (bnxt and i40e) when the transfer attribute is also present for
+ them (bnxt and i40e) when the transfer attribute is also present, for
consistency.
* Pattern item PORT was renamed PHY_PORT to avoid confusion with DPDK port
IDs.
@@ -466,16 +470,17 @@ API Changes
redirect matching traffic to a specific physical port.
* PORT_ID pattern item and actions were added to match and target DPDK
port IDs at a higher level than PHY_PORT.
- * RTE_FLOW_ACTION_TYPE_[VXLAN/NVGRE]_ENCAP action items were added to support
+ * ``RTE_FLOW_ACTION_TYPE_[VXLAN/NVGRE]_ENCAP`` action items were added to support
tunnel encapsulation operation for VXLAN and NVGRE type tunnel endpoint.
- * RTE_FLOW_ACTION_TYPE_[VXLAN/NVGRE]_DECAP action items were added to support
+ * ``RTE_FLOW_ACTION_TYPE_[VXLAN/NVGRE]_DECAP`` action items were added to support
tunnel decapsulation operation for VXLAN and NVGRE type tunnel endpoint.
- * RTE_FLOW_ACTION_TYPE_JUMP action item was added to support a matched flow
+ * ``RTE_FLOW_ACTION_TYPE_JUMP`` action item was added to support a matched flow
to be redirected to the specific group.
- * RTE_FLOW_ACTION_TYPE_MARK item type has been added to match a flow against
+ * ``RTE_FLOW_ACTION_TYPE_MARK`` item type has been added to match a flow against
a previously marked flow.
* ethdev: change flow APIs regarding count action:
+
* ``rte_flow_create()`` API count action now requires the ``struct rte_flow_action_count``.
* ``rte_flow_query()`` API parameter changed from action type to action structure.
@@ -485,14 +490,14 @@ API Changes
``rte_eth_[rt]x_queue_setup()``. Now any offloading enabled in ``rte_eth_dev_configure()``
can't be disabled by ``rte_eth_[rt]x_queue_setup()``. Any new added offloading which has
not been enabled in ``rte_eth_dev_configure()`` and is requested to be enabled in
- ``rte_eth_[rt]x_queue_setup()`` must be per-queue type, otherwise trigger an error log.
+ ``rte_eth_[rt]x_queue_setup()`` must be per-queue type, or otherwise trigger an error log.
* ethdev: runtime queue setup:
``rte_eth_rx_queue_setup`` and ``rte_eth_tx_queue_setup`` can be called after
- ``rte_eth_dev_start`` if device support runtime queue setup. Device driver can
- expose this capability through ``rte_eth_dev_info_get``. A Rx or Tx queue be
- setup at runtime need to be started explicitly by ``rte_eth_dev_rx_queue_start``
+ ``rte_eth_dev_start`` if the device supports runtime queue setup. The device driver can
+ expose this capability through ``rte_eth_dev_info_get``. A Rx or Tx queue
+ set up at runtime need to be started explicitly by ``rte_eth_dev_rx_queue_start``
or ``rte_eth_dev_tx_queue_start``.
@@ -509,18 +514,18 @@ ABI Changes
Also, make sure to start the actual text at the margin.
=========================================================
-* ring: the alignment constraints on the ring structure has been relaxed
+* ring: The alignment constraints on the ring structure has been relaxed
to one cache line instead of two, and an empty cache line padding is
added between the producer and consumer structures. The size of the
structure and the offset of the fields remains the same on platforms
- with 64B cache line, but change on other platforms.
+ with 64B cache line, but changes on other platforms.
-* mempool: ops have changed.
+* mempool: Some Ops have changed.
A new callback ``calc_mem_size`` has been added to ``rte_mempool_ops``
- to allow to customize required memory size calculation.
+ to allow customization of the required memory size calculation.
A new callback ``populate`` has been added to ``rte_mempool_ops``
- to allow to customize objects population.
+ to allow customized object population.
Callback ``get_capabilities`` has been removed from ``rte_mempool_ops``
since its features are covered by ``calc_mem_size`` and ``populate``
callbacks.
@@ -554,9 +559,9 @@ ABI Changes
``rte_bbdev_op_cap_turbo_dec`` structure to specify maximal LLR (likelihood
ratio) absolute value.
-* **BBdev Queue Groups split into UL/DL Groups**
+* **BBdev Queue Groups split into UL/DL Groups.**
- Queue Groups have been split into UL/DL Groups in Turbo Software Driver.
+ Queue Groups have been split into UL/DL Groups in the Turbo Software Driver.
They are independent for Decode/Encode. ``rte_bbdev_driver_info`` reflects
introduced changes.
@@ -591,7 +596,7 @@ Known Issues
* **Secondary process launch is not reliable.**
Recent memory hotplug patches have made multiprocess startup less reliable
- than it was in the past. A number of workarounds are known to work depending
+ than it was in past releases. A number of workarounds are known to work depending
on the circumstances. As such it isn't recommended to use the secondary
process mechanism for critical systems. The underlying issues will be
addressed in upcoming releases.
@@ -603,29 +608,30 @@ Known Issues
* **pdump is not compatible with old applications.**
- As we changed to use generic multi-process communication for pdump negotiation
- instead of previous dedicated unix socket way, pdump applications, including
- dpdk-pdump example and any other applications using librte_pdump, cannot work
- with older version DPDK primary applications.
+ As we changed to use generic multi-process communication for pdump
+ negotiation instead of previous dedicated unix socket way, pdump
+ applications, including the dpdk-pdump example and any other applications
+ using ``librte_pdump``, will not work with older version DPDK primary
+ applications.
* **rte_abort takes a long time on FreeBSD.**
- DPDK processes now allocates a large area of virtual memory address space,
- with this change during rte_abort FreeBSD now dumps the contents of the
+ DPDK processes now allocates a large area of virtual memory address space.
+ As a result ``rte_abort`` on FreeBSD now dumps the contents of the
whole reserved memory range, not just the used portion, to a core dump file.
- Write this large core file can take a significant amount of time, causing
- processes to appear hung on the system.
+ Writing this large core file can take a significant amount of time, causing
+ processes to appear to hang on the system.
The work around for the issue is to set the system resource limits for core
- dumps before running any tests e.g."limit coredumpsize 0". This will
+ dumps before running any tests, e.g. ``limit coredumpsize 0``. This will
effectively disable core dumps on FreeBSD. If they are not to be completely
disabled, a suitable limit, e.g. 1G might be specified instead of 0. This
needs to be run per-shell session, or before every test run. This change
- can also be made persistent by adding "kern.coredump=0" to /etc/sysctl.conf
+ can also be made persistent by adding ``kern.coredump=0`` to ``/etc/sysctl.conf``.
Bugzilla entry: https://dpdk.org/tracker/show_bug.cgi?id=53
-* **Bonding PMD may fail to accept new slaves in certain conditions.**
+* **Bonding PMD may fail to accept new slaves ports in certain conditions.**
In certain conditions when using testpmd,
bonding may fail to register new slave ports.
--
2.7.5
^ permalink raw reply [relevance 7%]
* Re: [dpdk-dev] Stable ABI status of rte_meter_[t|s]rtcm_profile_config
2018-05-30 9:55 4% ` Singh, Jasvinder
@ 2018-05-30 10:13 4% ` Andy Green
0 siblings, 0 replies; 200+ results
From: Andy Green @ 2018-05-30 10:13 UTC (permalink / raw)
To: Singh, Jasvinder, dev; +Cc: Dumitrescu, Cristian
On 05/30/2018 05:55 PM, Singh, Jasvinder wrote:
> <snip>
>
>> On 05/28/2018 11:31 AM, Andy Green wrote:
>>> Hi -
>>>
>>> Between 18.02 and the putative 18.05 there were changes in the way the
>>> meter stuff deals with its config.
>>>
>>> I updated the related code in lagopus, but I get warnings about using
>>> the new APIs (it's the same for rte_meter_trtcm_profile_config())
>>>
>>> ./dpdk/meter.c: In function 'dpdk_register_meter':
>>> ./dpdk/meter.c:119:7: warning: 'rte_meter_srtcm_profile_config' is
>>> deprecated: Symbol is not yet part of stable ABI
>>> [-Wdeprecated-declarations]
>>> rte_meter_srtcm_profile_config(&lband->sp, ¶m);
>>> ^
>>> In file included from ./dpdk/meter.c:27:0:
>>> /home/agreen/lagopus/src/dpdk/build/include/rte_meter.h:86:1: note:
>>> declared here
>>> rte_meter_srtcm_profile_config(struct rte_meter_srtcm_profile *p,
>>> ^
>>> ./dpdk/meter.c:132:7: warning: 'rte_meter_srtcm_profile_config' is
>>> deprecated: Symbol is not yet part of stable ABI
>>> [-Wdeprecated-declarations]
>>> rte_meter_srtcm_profile_config(&lband->sp, ¶m);
>>> ^
>>> In file included from ./dpdk/meter.c:27:0:
>>> /home/agreen/lagopus/src/dpdk/build/include/rte_meter.h:86:1: note:
>>> declared here
>>> rte_meter_srtcm_profile_config(struct rte_meter_srtcm_profile *p,
>>>
>>>
>>> As far as I can see this api change is not optional, it changes the
>>> parameters for related apis to require a struct prepared with these
>>> new apis.
>>
>> IOW should these exports still be "experimental"
>>
>> EXPERIMENTAL {
>> global:
>>
>> rte_meter_srtcm_profile_config;
>> rte_meter_trtcm_profile_config; };
>>
>> ...when the changes also introduced in
>> c06ddf9698e0c2a9653cfa971f9ddc205065662c unconditionally modify the
>> existing APIs to require the new stuff?
>>
>> @@ -138,6 +187,7 @@ rte_meter_srtcm_color_aware_check(struct
>> rte_meter_srtcm *m,
>> */
>> static inline enum rte_meter_color
>> rte_meter_trtcm_color_blind_check(struct rte_meter_trtcm *m,
>> + struct rte_meter_trtcm_profile *p,
>> uint64_t time,
>> uint32_t pkt_len);
>>
>> etc
>
> The above meter APIs change has followed the deprecation procedure, therefore, IMO, should not be treated as experimental. In general, this is open question as nothing is specified in the docs.
Thanks.
Another way to ask the same question is: "after we changed the related,
pre-existing api to require this, why is it useful to want it to blow
warnings unless we enable EXPERIMENTAL"?
Before the patch, meter api itself wasn't experimental evidently.
Lagopus uses the old api without EXPERIMENTAL enabled for 18.02; then on
18.05, after the api it was previously using without EXPERIMENTAL
changed, it blows warnings after it was actually unconditionally forced
to adapt to use the new stuff.
Unless I misunderstood it, you can't meaningfully, retrospectively, mark
a public API EXPERIMENTAL after you changed it, and this is marking
EXPERIMENTAL a new unconditional dependency on a new type for an API
that was a previously available via a non-EXPERIMENTAL public api.
Effectively I think you just decided to change the public api (which is
normal enough for living projects...) and that's the end of it.
EXPERIMENTAL is only meaningful for stuff you can cleanly enable or
disable at build-time, this is not such a situation.
If so it should get un-experimentalized for export...
-Andy
^ permalink raw reply [relevance 4%]
* Re: [dpdk-dev] Stable ABI status of rte_meter_[t|s]rtcm_profile_config
2018-05-30 0:32 4% ` Andy Green
@ 2018-05-30 9:55 4% ` Singh, Jasvinder
2018-05-30 10:13 4% ` Andy Green
0 siblings, 1 reply; 200+ results
From: Singh, Jasvinder @ 2018-05-30 9:55 UTC (permalink / raw)
To: Andy Green, dev; +Cc: Dumitrescu, Cristian
<snip>
> On 05/28/2018 11:31 AM, Andy Green wrote:
> > Hi -
> >
> > Between 18.02 and the putative 18.05 there were changes in the way the
> > meter stuff deals with its config.
> >
> > I updated the related code in lagopus, but I get warnings about using
> > the new APIs (it's the same for rte_meter_trtcm_profile_config())
> >
> > ./dpdk/meter.c: In function 'dpdk_register_meter':
> > ./dpdk/meter.c:119:7: warning: 'rte_meter_srtcm_profile_config' is
> > deprecated: Symbol is not yet part of stable ABI
> > [-Wdeprecated-declarations]
> > rte_meter_srtcm_profile_config(&lband->sp, ¶m);
> > ^
> > In file included from ./dpdk/meter.c:27:0:
> > /home/agreen/lagopus/src/dpdk/build/include/rte_meter.h:86:1: note:
> > declared here
> > rte_meter_srtcm_profile_config(struct rte_meter_srtcm_profile *p,
> > ^
> > ./dpdk/meter.c:132:7: warning: 'rte_meter_srtcm_profile_config' is
> > deprecated: Symbol is not yet part of stable ABI
> > [-Wdeprecated-declarations]
> > rte_meter_srtcm_profile_config(&lband->sp, ¶m);
> > ^
> > In file included from ./dpdk/meter.c:27:0:
> > /home/agreen/lagopus/src/dpdk/build/include/rte_meter.h:86:1: note:
> > declared here
> > rte_meter_srtcm_profile_config(struct rte_meter_srtcm_profile *p,
> >
> >
> > As far as I can see this api change is not optional, it changes the
> > parameters for related apis to require a struct prepared with these
> > new apis.
>
> IOW should these exports still be "experimental"
>
> EXPERIMENTAL {
> global:
>
> rte_meter_srtcm_profile_config;
> rte_meter_trtcm_profile_config; };
>
> ...when the changes also introduced in
> c06ddf9698e0c2a9653cfa971f9ddc205065662c unconditionally modify the
> existing APIs to require the new stuff?
>
> @@ -138,6 +187,7 @@ rte_meter_srtcm_color_aware_check(struct
> rte_meter_srtcm *m,
> */
> static inline enum rte_meter_color
> rte_meter_trtcm_color_blind_check(struct rte_meter_trtcm *m,
> + struct rte_meter_trtcm_profile *p,
> uint64_t time,
> uint32_t pkt_len);
>
> etc
The above meter APIs change has followed the deprecation procedure, therefore, IMO, should not be treated as experimental. In general, this is open question as nothing is specified in the docs.
^ permalink raw reply [relevance 4%]
* Re: [dpdk-dev] Stable ABI status of rte_meter_[t|s]rtcm_profile_config
2018-05-28 3:31 8% [dpdk-dev] Stable ABI status of rte_meter_[t|s]rtcm_profile_config Andy Green
@ 2018-05-30 0:32 4% ` Andy Green
2018-05-30 9:55 4% ` Singh, Jasvinder
2018-08-01 10:47 4% ` Kevin Traynor
1 sibling, 1 reply; 200+ results
From: Andy Green @ 2018-05-30 0:32 UTC (permalink / raw)
To: dev; +Cc: Cristian Dumitrescu, Jasvinder Singh
On 05/28/2018 11:31 AM, Andy Green wrote:
> Hi -
>
> Between 18.02 and the putative 18.05 there were changes in the way the
> meter stuff deals with its config.
>
> I updated the related code in lagopus, but I get warnings about using
> the new APIs (it's the same for rte_meter_trtcm_profile_config())
>
> ./dpdk/meter.c: In function 'dpdk_register_meter':
> ./dpdk/meter.c:119:7: warning: 'rte_meter_srtcm_profile_config' is
> deprecated: Symbol is not yet part of stable ABI
> [-Wdeprecated-declarations]
> rte_meter_srtcm_profile_config(&lband->sp, ¶m);
> ^
> In file included from ./dpdk/meter.c:27:0:
> /home/agreen/lagopus/src/dpdk/build/include/rte_meter.h:86:1: note:
> declared here
> rte_meter_srtcm_profile_config(struct rte_meter_srtcm_profile *p,
> ^
> ./dpdk/meter.c:132:7: warning: 'rte_meter_srtcm_profile_config' is
> deprecated: Symbol is not yet part of stable ABI
> [-Wdeprecated-declarations]
> rte_meter_srtcm_profile_config(&lband->sp, ¶m);
> ^
> In file included from ./dpdk/meter.c:27:0:
> /home/agreen/lagopus/src/dpdk/build/include/rte_meter.h:86:1: note:
> declared here
> rte_meter_srtcm_profile_config(struct rte_meter_srtcm_profile *p,
>
>
> As far as I can see this api change is not optional, it changes the
> parameters for related apis to require a struct prepared with these new
> apis.
IOW should these exports still be "experimental"
EXPERIMENTAL {
global:
rte_meter_srtcm_profile_config;
rte_meter_trtcm_profile_config;
};
...when the changes also introduced in
c06ddf9698e0c2a9653cfa971f9ddc205065662c unconditionally modify the
existing APIs to require the new stuff?
@@ -138,6 +187,7 @@ rte_meter_srtcm_color_aware_check(struct
rte_meter_srtcm *m,
*/
static inline enum rte_meter_color
rte_meter_trtcm_color_blind_check(struct rte_meter_trtcm *m,
+ struct rte_meter_trtcm_profile *p,
uint64_t time,
uint32_t pkt_len);
etc
-Andy
> -Andy
^ permalink raw reply [relevance 4%]
* Re: [dpdk-dev] [PATCH v6] checkpatches.sh: Add checks for ABI symbol addition
2018-05-27 22:01 4% ` Thomas Monjalon
@ 2018-05-28 17:08 4% ` Neil Horman
0 siblings, 0 replies; 200+ results
From: Neil Horman @ 2018-05-28 17:08 UTC (permalink / raw)
To: Thomas Monjalon
Cc: dev, john.mcnamara, bruce.richardson, Ferruh Yigit, Stephen Hemminger
On Mon, May 28, 2018 at 12:01:15AM +0200, Thomas Monjalon wrote:
> 27/05/2018 23:00, Neil Horman:
> > On Sun, May 27, 2018 at 09:34:13PM +0200, Thomas Monjalon wrote:
> > > Hi Neil,
> > >
> > > Sorry, this patch has been forgotten during the whole release cycle.
> > >
> > Its ok, though that is frustrating, as we now need to re-familiarize ourselves
> > with how this patch works.
>
> I understand and apologize.
>
No worries.
> > > I see an issue about the dependency on filterdiff.
> > > Is there a way to avoid it?
> > >
> > I suppose, but to do so would require some awk magic. Is there any advantage to
> > having an awk dependency rather than a filterdiff dependency? filterdiff is a
> > pretty universal tool.
>
> filterdiff is not installed on my machine.
> I guess it is the same for a lot of people.
>
My guess is that awk is only installed on your machine because you needed it for
another script (possibly this one). Neither is commonly installed by default,
but both are readily available.
> I will check how we can replace it.
>
No need, I know how I can use awk to replace it, the only question is, do we
need to do it? I suppose there is an implicit advantage in just using ask, as
we already require it.
All thats needed is an awk program like the following:
awk 'BEGIN {startprint=0;} /.*diff.*map.*/ {startprint=1;} \
/.*diff.*[^map].*/ {startprint=0 /.*/ {if (startprint) {print $0}}'
its basically a state machine that prints every line in a file after hitting the
regex diff.*map (i.e. a map file), and stops when it hits the next diff block
that isn't for a map file. The above isn't exactly right, but its close.
> [...]
> > Fine, at this point, I don't know when I'll get to this though, its pretty busy
> > here at the moment.
>
> This delay is my fault, and I want to help.
> If I find a good solution, do you accept I send a version 7 of this patch?
Sure, if you have the time to take care of it, that would be great, thanks. And
thank you for asking. If I find time, I'll take a stab at it as well, but I
think given Red Hats schedule, it will be a few weeks before I'm able.
Best
Neil
>
>
>
^ permalink raw reply [relevance 4%]
* [dpdk-dev] Stable ABI status of rte_meter_[t|s]rtcm_profile_config
@ 2018-05-28 3:31 8% Andy Green
2018-05-30 0:32 4% ` Andy Green
2018-08-01 10:47 4% ` Kevin Traynor
0 siblings, 2 replies; 200+ results
From: Andy Green @ 2018-05-28 3:31 UTC (permalink / raw)
To: dev
Hi -
Between 18.02 and the putative 18.05 there were changes in the way the
meter stuff deals with its config.
I updated the related code in lagopus, but I get warnings about using
the new APIs (it's the same for rte_meter_trtcm_profile_config())
./dpdk/meter.c: In function 'dpdk_register_meter':
./dpdk/meter.c:119:7: warning: 'rte_meter_srtcm_profile_config' is
deprecated: Symbol is not yet part of stable ABI [-Wdeprecated-declarations]
rte_meter_srtcm_profile_config(&lband->sp, ¶m);
^
In file included from ./dpdk/meter.c:27:0:
/home/agreen/lagopus/src/dpdk/build/include/rte_meter.h:86:1: note:
declared here
rte_meter_srtcm_profile_config(struct rte_meter_srtcm_profile *p,
^
./dpdk/meter.c:132:7: warning: 'rte_meter_srtcm_profile_config' is
deprecated: Symbol is not yet part of stable ABI [-Wdeprecated-declarations]
rte_meter_srtcm_profile_config(&lband->sp, ¶m);
^
In file included from ./dpdk/meter.c:27:0:
/home/agreen/lagopus/src/dpdk/build/include/rte_meter.h:86:1: note:
declared here
rte_meter_srtcm_profile_config(struct rte_meter_srtcm_profile *p,
As far as I can see this api change is not optional, it changes the
parameters for related apis to require a struct prepared with these new
apis.
-Andy
^ permalink raw reply [relevance 8%]
* Re: [dpdk-dev] [PATCH v6] checkpatches.sh: Add checks for ABI symbol addition
2018-05-27 21:00 4% ` Neil Horman
@ 2018-05-27 22:01 4% ` Thomas Monjalon
2018-05-28 17:08 4% ` Neil Horman
0 siblings, 1 reply; 200+ results
From: Thomas Monjalon @ 2018-05-27 22:01 UTC (permalink / raw)
To: Neil Horman
Cc: dev, john.mcnamara, bruce.richardson, Ferruh Yigit, Stephen Hemminger
27/05/2018 23:00, Neil Horman:
> On Sun, May 27, 2018 at 09:34:13PM +0200, Thomas Monjalon wrote:
> > Hi Neil,
> >
> > Sorry, this patch has been forgotten during the whole release cycle.
> >
> Its ok, though that is frustrating, as we now need to re-familiarize ourselves
> with how this patch works.
I understand and apologize.
> > I see an issue about the dependency on filterdiff.
> > Is there a way to avoid it?
> >
> I suppose, but to do so would require some awk magic. Is there any advantage to
> having an awk dependency rather than a filterdiff dependency? filterdiff is a
> pretty universal tool.
filterdiff is not installed on my machine.
I guess it is the same for a lot of people.
I will check how we can replace it.
[...]
> Fine, at this point, I don't know when I'll get to this though, its pretty busy
> here at the moment.
This delay is my fault, and I want to help.
If I find a good solution, do you accept I send a version 7 of this patch?
^ permalink raw reply [relevance 4%]
* Re: [dpdk-dev] [PATCH v6] checkpatches.sh: Add checks for ABI symbol addition
2018-05-27 19:34 4% ` Thomas Monjalon
@ 2018-05-27 21:00 4% ` Neil Horman
2018-05-27 22:01 4% ` Thomas Monjalon
0 siblings, 1 reply; 200+ results
From: Neil Horman @ 2018-05-27 21:00 UTC (permalink / raw)
To: Thomas Monjalon
Cc: dev, john.mcnamara, bruce.richardson, Ferruh Yigit, Stephen Hemminger
On Sun, May 27, 2018 at 09:34:13PM +0200, Thomas Monjalon wrote:
> Hi Neil,
>
> Sorry, this patch has been forgotten during the whole release cycle.
>
Its ok, though that is frustrating, as we now need to re-familiarize ourselves
with how this patch works.
> I see an issue about the dependency on filterdiff.
> Is there a way to avoid it?
>
I suppose, but to do so would require some awk magic. Is there any advantage to
having an awk dependency rather than a filterdiff dependency? filterdiff is a
pretty universal tool.
> I have some minor comments below.
>
> 14/02/2018 20:19, Neil Horman:
> > @@ -61,6 +65,7 @@ print_usage () {
> > END_OF_HELP
> > }
> >
> > +
>
> This new blank line is probably a leftover.
Yeah, if I wind up respinning this, I'll remove it.
>
> > number=0
> > quiet=false
> > verbose=false
> > @@ -86,19 +91,50 @@ total=0
> > status=0
> >
> > check () { # <patch> <commit> <title>
> > + local ret=0
> > + TMPINPUT=`mktemp checkpatches.XXXXXX`
>
> It is preferred to use $() construct to be consistent in the file.
>
> > +
> > total=$(($total + 1))
> > ! $verbose || printf '\n### %s\n\n' "$3"
> > if [ -n "$1" ] ; then
> > report=$($DPDK_CHECKPATCH_PATH $options "$1" 2>/dev/null)
> > elif [ -n "$2" ] ; then
> > - report=$(git format-patch --find-renames --no-stat --stdout -1 $commit |
> > + git format-patch --find-renames --no-stat --stdout -1 $commit > ./$TMPINPUT
> > + report=$(cat ./$TMPINPUT |
> > $DPDK_CHECKPATCH_PATH $options - 2>/dev/null)
>
> No need to use cat here.
>
Actually, I vaguely recall with these changes I did encounter a problem with passing
output to checkpatch, but its been so long I can't recall now.
> > else
> > - report=$($DPDK_CHECKPATCH_PATH $options - 2>/dev/null)
> > + cat > ./$TMPINPUT
> > + report=$(cat ./$TMPINPUT | $DPDK_CHECKPATCH_PATH $options - 2>/dev/null)
> > + fi
>
> All calls to DPDK_CHECKPATCH_PATH can be moved to one call after the "fi".
> Just need to set TPMINPUT=$1 in first case (and not remove TPMINPUT
> in this case).
>
Sure.
> > + if [ $? -ne 0 ]
> > + then
>
> For consistency, the style in this file is:
> if [ $? -ne 0 ] ; then
>
> > + $verbose || printf '\n### %s\n\n' "$3"
> > + printf '%s\n' "$report" | sed -n '1,/^total:.*lines checked$/p'
> > + ret=1
> > + fi
> > +
> > + ! $verbose || printf '\nChecking API additions/removals:\n'
> > +
> > + if [ -n "$1" ] ; then
> > + report=$($VALIDATE_NEW_API "$1")
> > + elif [ -n "$2" ] ; then
> > + report=$( cat ./$TMPINPUT |
> > + $VALIDATE_NEW_API -)
> > + else
> > + report=$(cat ./$TMPINPUT | $VALIDATE_NEW_API -)
> > + fi
>
> Same as above, it can be simplified by only one line for all cases.
Fine, at this point, I don't know when I'll get to this though, its pretty busy
here at the moment.
>
>
>
>
^ permalink raw reply [relevance 4%]
* Re: [dpdk-dev] [PATCH v6] checkpatches.sh: Add checks for ABI symbol addition
@ 2018-05-27 19:34 4% ` Thomas Monjalon
2018-05-27 21:00 4% ` Neil Horman
0 siblings, 1 reply; 200+ results
From: Thomas Monjalon @ 2018-05-27 19:34 UTC (permalink / raw)
To: Neil Horman
Cc: dev, john.mcnamara, bruce.richardson, Ferruh Yigit, Stephen Hemminger
Hi Neil,
Sorry, this patch has been forgotten during the whole release cycle.
I see an issue about the dependency on filterdiff.
Is there a way to avoid it?
I have some minor comments below.
14/02/2018 20:19, Neil Horman:
> @@ -61,6 +65,7 @@ print_usage () {
> END_OF_HELP
> }
>
> +
This new blank line is probably a leftover.
> number=0
> quiet=false
> verbose=false
> @@ -86,19 +91,50 @@ total=0
> status=0
>
> check () { # <patch> <commit> <title>
> + local ret=0
> + TMPINPUT=`mktemp checkpatches.XXXXXX`
It is preferred to use $() construct to be consistent in the file.
> +
> total=$(($total + 1))
> ! $verbose || printf '\n### %s\n\n' "$3"
> if [ -n "$1" ] ; then
> report=$($DPDK_CHECKPATCH_PATH $options "$1" 2>/dev/null)
> elif [ -n "$2" ] ; then
> - report=$(git format-patch --find-renames --no-stat --stdout -1 $commit |
> + git format-patch --find-renames --no-stat --stdout -1 $commit > ./$TMPINPUT
> + report=$(cat ./$TMPINPUT |
> $DPDK_CHECKPATCH_PATH $options - 2>/dev/null)
No need to use cat here.
> else
> - report=$($DPDK_CHECKPATCH_PATH $options - 2>/dev/null)
> + cat > ./$TMPINPUT
> + report=$(cat ./$TMPINPUT | $DPDK_CHECKPATCH_PATH $options - 2>/dev/null)
> + fi
All calls to DPDK_CHECKPATCH_PATH can be moved to one call after the "fi".
Just need to set TPMINPUT=$1 in first case (and not remove TPMINPUT
in this case).
> + if [ $? -ne 0 ]
> + then
For consistency, the style in this file is:
if [ $? -ne 0 ] ; then
> + $verbose || printf '\n### %s\n\n' "$3"
> + printf '%s\n' "$report" | sed -n '1,/^total:.*lines checked$/p'
> + ret=1
> + fi
> +
> + ! $verbose || printf '\nChecking API additions/removals:\n'
> +
> + if [ -n "$1" ] ; then
> + report=$($VALIDATE_NEW_API "$1")
> + elif [ -n "$2" ] ; then
> + report=$( cat ./$TMPINPUT |
> + $VALIDATE_NEW_API -)
> + else
> + report=$(cat ./$TMPINPUT | $VALIDATE_NEW_API -)
> + fi
Same as above, it can be simplified by only one line for all cases.
^ permalink raw reply [relevance 4%]
* Re: [dpdk-dev] [PATCH] doc: move and update experimental API description
2018-05-25 12:22 0% ` Luca Boccassi
@ 2018-05-25 15:37 0% ` Ferruh Yigit
0 siblings, 0 replies; 200+ results
From: Ferruh Yigit @ 2018-05-25 15:37 UTC (permalink / raw)
To: Luca Boccassi, Shreyansh Jain, thomas, nhorman; +Cc: dev
On 5/25/2018 1:22 PM, Luca Boccassi wrote:
> On Fri, 2018-05-25 at 17:37 +0530, Shreyansh Jain wrote:
>> Experimental API text has been moved into a sub-section of ABI
>> Policy.
>> A paragraph has been added to explain the process for removal of an
>> experimental tag.
>>
>> Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
>>
>> ---
>> note:
>> The movement of text into a sub-section is relevant as the previous
>> position
>> was in middle of a continuous text explaining ABI policy - whereas,
>> experimental is not truly an ABI policy.
>> No change to the original text has been made, except appending a new
>> paragraph. Though, this does spoil the blame/praise.
>>
>> doc/guides/contributing/versioning.rst | 54 +++++++++++++++---------
>> --
>> 1 file changed, 31 insertions(+), 23 deletions(-)
>
> Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
^ permalink raw reply [relevance 0%]
* [dpdk-dev] [PATCH] doc: deprecation notice for EAL runtime path changes
@ 2018-05-25 13:38 5% Anatoly Burakov
0 siblings, 0 replies; 200+ results
From: Anatoly Burakov @ 2018-05-25 13:38 UTC (permalink / raw)
To: dev
Cc: Neil Horman, John McNamara, Marko Kovacevic, thomas,
bruce.richardson, harry.van.haaren
Most of this work was already done, but runtime config path is
considered to be part of public API because of high likelihood of
it being used by various tools in the DPDK ecosystem, and thus
requires a deprecation notice.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
doc/guides/rel_notes/deprecation.rst | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 1e2443c..36d2e23 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -8,6 +8,15 @@ API and ABI deprecation notices are to be posted here.
Deprecation Notices
-------------------
+* eal: DPDK runtime configuration file (located at
+ ``/var/run/.<prefix>_config``) will be moved. The new path will be as follows:
+ - if DPDK is running as root, path will be set to
+ ``/var/run/dpdk/<prefix>/config``
+ - if DPDK is not running as root and $XDG_RUNTIME_DIR is set, path will be set
+ to ``$XDG_RUNTIME_DIR/dpdk/<prefix>/config``
+ - if DPDK is not running as root and $XDG_RUNTIME_DIR is not set, path will be
+ set to ``/tmp/dpdk/<prefix>/config``
+
* eal: both declaring and identifying devices will be streamlined in v18.05.
New functions will appear to query a specific port from buses, classes of
device and device drivers. Device declaration will be made coherent with the
--
2.7.4
^ permalink raw reply [relevance 5%]
* Re: [dpdk-dev] [PATCH] doc: move and update experimental API description
2018-05-25 12:07 28% [dpdk-dev] [PATCH] doc: move and update experimental API description Shreyansh Jain
@ 2018-05-25 12:22 0% ` Luca Boccassi
2018-05-25 15:37 0% ` Ferruh Yigit
0 siblings, 1 reply; 200+ results
From: Luca Boccassi @ 2018-05-25 12:22 UTC (permalink / raw)
To: Shreyansh Jain, thomas, nhorman; +Cc: dev
On Fri, 2018-05-25 at 17:37 +0530, Shreyansh Jain wrote:
> Experimental API text has been moved into a sub-section of ABI
> Policy.
> A paragraph has been added to explain the process for removal of an
> experimental tag.
>
> Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
>
> ---
> note:
> The movement of text into a sub-section is relevant as the previous
> position
> was in middle of a continuous text explaining ABI policy - whereas,
> experimental is not truly an ABI policy.
> No change to the original text has been made, except appending a new
> paragraph. Though, this does spoil the blame/praise.
>
> doc/guides/contributing/versioning.rst | 54 +++++++++++++++---------
> --
> 1 file changed, 31 insertions(+), 23 deletions(-)
Acked-by: Luca Boccassi <bluca@debian.org>
--
Kind regards,
Luca Boccassi
^ permalink raw reply [relevance 0%]
* [dpdk-dev] [PATCH] doc: move and update experimental API description
@ 2018-05-25 12:07 28% Shreyansh Jain
2018-05-25 12:22 0% ` Luca Boccassi
0 siblings, 1 reply; 200+ results
From: Shreyansh Jain @ 2018-05-25 12:07 UTC (permalink / raw)
To: thomas, bluca, nhorman; +Cc: dev, Shreyansh Jain
Experimental API text has been moved into a sub-section of ABI Policy.
A paragraph has been added to explain the process for removal of an
experimental tag.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
note:
The movement of text into a sub-section is relevant as the previous position
was in middle of a continuous text explaining ABI policy - whereas,
experimental is not truly an ABI policy.
No change to the original text has been made, except appending a new
paragraph. Though, this does spoil the blame/praise.
doc/guides/contributing/versioning.rst | 54 +++++++++++++++-----------
1 file changed, 31 insertions(+), 23 deletions(-)
diff --git a/doc/guides/contributing/versioning.rst b/doc/guides/contributing/versioning.rst
index c495294db..7127d39ee 100644
--- a/doc/guides/contributing/versioning.rst
+++ b/doc/guides/contributing/versioning.rst
@@ -43,29 +43,6 @@ ABI versions are set at the time of major release labeling, and the ABI may
change multiple times, without warning, between the last release label and the
HEAD label of the git tree.
-APIs marked as ``experimental`` are not considered part of the ABI and may
-change without warning at any time. Since changes to APIs are most likely
-immediately after their introduction, as users begin to take advantage of
-those new APIs and start finding issues with them, new DPDK APIs will be
-automatically marked as ``experimental`` to allow for a period of stabilization
-before they become part of a tracked ABI.
-
-Note that marking an API as experimental is a multi step process.
-To mark an API as experimental, the symbols which are desired to be exported
-must be placed in an EXPERIMENTAL version block in the corresponding libraries'
-version map script.
-Secondly, the corresponding definitions of those exported functions, and
-their forward declarations (in the development header files), must be marked
-with the ``__rte_experimental`` tag (see ``rte_compat.h``).
-The DPDK build makefiles perform a check to ensure that the map file and the
-C code reflect the same list of symbols.
-This check can be circumvented by defining ``ALLOW_EXPERIMENTAL_API``
-during compilation in the corresponding library Makefile.
-
-In addition to tagging the code with ``__rte_experimental``,
-the doxygen markup must also contain the EXPERIMENTAL string,
-and the MAINTAINERS file should note the EXPERIMENTAL libraries.
-
ABI versions, once released, are available until such time as their
deprecation has been noted in the Release Notes for at least one major release
cycle. For example consider the case where the ABI for DPDK 2.0 has been
@@ -119,6 +96,37 @@ readability purposes should be avoided.
follow the relevant deprecation policy procedures as above: 3 acks and
announcement at least one release in advance.
+Experimental APIs
+~~~~~~~~~~~~~~~~~
+
+APIs marked as ``experimental`` are not considered part of the ABI and may
+change without warning at any time. Since changes to APIs are most likely
+immediately after their introduction, as users begin to take advantage of
+those new APIs and start finding issues with them, new DPDK APIs will be
+automatically marked as ``experimental`` to allow for a period of stabilization
+before they become part of a tracked ABI.
+
+Note that marking an API as experimental is a multi step process.
+To mark an API as experimental, the symbols which are desired to be exported
+must be placed in an EXPERIMENTAL version block in the corresponding libraries'
+version map script.
+Secondly, the corresponding definitions of those exported functions, and
+their forward declarations (in the development header files), must be marked
+with the ``__rte_experimental`` tag (see ``rte_compat.h``).
+The DPDK build makefiles perform a check to ensure that the map file and the
+C code reflect the same list of symbols.
+This check can be circumvented by defining ``ALLOW_EXPERIMENTAL_API``
+during compilation in the corresponding library Makefile.
+
+In addition to tagging the code with ``__rte_experimental``,
+the doxygen markup must also contain the EXPERIMENTAL string,
+and the MAINTAINERS file should note the EXPERIMENTAL libraries.
+
+For removing the experimental tag associated with an API, deprecation notice
+is not required. Though, an API should remain in experimental state for at least
+one release. Thereafter, normal process of posting patch for review to mailing
+list can be followed.
+
Examples of Deprecation Notices
-------------------------------
--
2.17.0
^ permalink raw reply [relevance 28%]
* Re: [dpdk-dev] Process for removing __rte_experimental
2018-05-25 9:35 4% [dpdk-dev] Process for removing __rte_experimental Shreyansh Jain
2018-05-25 9:49 0% ` Thomas Monjalon
@ 2018-05-25 11:23 3% ` Neil Horman
1 sibling, 0 replies; 200+ results
From: Neil Horman @ 2018-05-25 11:23 UTC (permalink / raw)
To: Shreyansh Jain; +Cc: dev, Ferruh Yigit, Thomas Monjalon, bluca
On Fri, May 25, 2018 at 03:05:34PM +0530, Shreyansh Jain wrote:
> While reading through [1], I couldn't understand if __rte_experimental and
> EXPERIMENTAL tag removed from code and map file, respectively, are
> categorized under ABI breakage or not. Thus, whether deprecation for them
> should be sent or not in a release cycle for removal in subsequent release.
>
> Logically, EXPERIMENTAL APIs are not part of stable APIs/ABIs and hence they
> don't really break an ABI. Thus, deprecation for them doesn't make sense.
> (or, as Luca noted on IRC, removing experimental is like de-deprecation :) )
>
> On IRC, Luca pointed out that in one of the Tech Board meeting minutes [2],
> this was recorded but that too has slight ambiguity to it.
>
> Any thoughts on this? Or, was this documented somewhere other than [1]?
>
> [1] http://dpdk.org/doc/guides/contributing/versioning.html
> [2] https://dpdk.org/ml/archives/dev/2017-October/079961.html (Section 2-b)
>
Concur with Thomas and Luca. Use of __rte_experimental denotes APIs that are
not bound by ABI requirements. Removing the experimental tag is,as you say
de-deprication.
^ permalink raw reply [relevance 3%]
* Re: [dpdk-dev] Process for removing __rte_experimental
2018-05-25 10:17 0% ` Luca Boccassi
@ 2018-05-25 11:16 0% ` Shreyansh Jain
0 siblings, 0 replies; 200+ results
From: Shreyansh Jain @ 2018-05-25 11:16 UTC (permalink / raw)
To: Luca Boccassi, Thomas Monjalon; +Cc: dev, Ferruh Yigit, nhorman
> -----Original Message-----
> From: Luca Boccassi [mailto:bluca@debian.org]
> Sent: Friday, May 25, 2018 3:47 PM
> To: Thomas Monjalon <thomas@monjalon.net>; Shreyansh Jain
> <shreyansh.jain@nxp.com>
> Cc: dev@dpdk.org; Ferruh Yigit <ferruh.yigit@intel.com>;
> nhorman@tuxdriver.com
> Subject: Re: Process for removing __rte_experimental
>
> On Fri, 2018-05-25 at 11:49 +0200, Thomas Monjalon wrote:
> > 25/05/2018 11:35, Shreyansh Jain:
> > > While reading through [1], I couldn't understand if
> > > __rte_experimental
> > > and EXPERIMENTAL tag removed from code and map file, respectively,
> > > are
> > > categorized under ABI breakage or not. Thus, whether deprecation
> > > for
> > > them should be sent or not in a release cycle for removal in
> > > subsequent
> > > release.
> > >
> > > Logically, EXPERIMENTAL APIs are not part of stable APIs/ABIs and
> > > hence
> > > they don't really break an ABI. Thus, deprecation for them doesn't
> > > make
> > > sense. (or, as Luca noted on IRC, removing experimental is like
> > > de-deprecation :) )
> >
> > I agree, no need for prior notice, in my opinion.
>
> Yeah that makes sense for me as well.
[...]
Ok. I will send across a small documentation edit for this clarification.
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] Process for removing __rte_experimental
2018-05-25 9:49 0% ` Thomas Monjalon
@ 2018-05-25 10:17 0% ` Luca Boccassi
2018-05-25 11:16 0% ` Shreyansh Jain
0 siblings, 1 reply; 200+ results
From: Luca Boccassi @ 2018-05-25 10:17 UTC (permalink / raw)
To: Thomas Monjalon, Shreyansh Jain; +Cc: dev, Ferruh Yigit, nhorman
On Fri, 2018-05-25 at 11:49 +0200, Thomas Monjalon wrote:
> 25/05/2018 11:35, Shreyansh Jain:
> > While reading through [1], I couldn't understand if
> > __rte_experimental
> > and EXPERIMENTAL tag removed from code and map file, respectively,
> > are
> > categorized under ABI breakage or not. Thus, whether deprecation
> > for
> > them should be sent or not in a release cycle for removal in
> > subsequent
> > release.
> >
> > Logically, EXPERIMENTAL APIs are not part of stable APIs/ABIs and
> > hence
> > they don't really break an ABI. Thus, deprecation for them doesn't
> > make
> > sense. (or, as Luca noted on IRC, removing experimental is like
> > de-deprecation :) )
>
> I agree, no need for prior notice, in my opinion.
Yeah that makes sense for me as well.
> > On IRC, Luca pointed out that in one of the Tech Board meeting
> > minutes
> > [2], this was recorded but that too has slight ambiguity to it.
> >
> > Any thoughts on this? Or, was this documented somewhere other than
> > [1]?
> >
> > [1] http://dpdk.org/doc/guides/contributing/versioning.html
> > [2] https://dpdk.org/ml/archives/dev/2017-October/079961.html
> > (Section 2-b)
--
Kind regards,
Luca Boccassi
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] Process for removing __rte_experimental
2018-05-25 9:35 4% [dpdk-dev] Process for removing __rte_experimental Shreyansh Jain
@ 2018-05-25 9:49 0% ` Thomas Monjalon
2018-05-25 10:17 0% ` Luca Boccassi
2018-05-25 11:23 3% ` Neil Horman
1 sibling, 1 reply; 200+ results
From: Thomas Monjalon @ 2018-05-25 9:49 UTC (permalink / raw)
To: Shreyansh Jain; +Cc: dev, Ferruh Yigit, bluca, nhorman
25/05/2018 11:35, Shreyansh Jain:
> While reading through [1], I couldn't understand if __rte_experimental
> and EXPERIMENTAL tag removed from code and map file, respectively, are
> categorized under ABI breakage or not. Thus, whether deprecation for
> them should be sent or not in a release cycle for removal in subsequent
> release.
>
> Logically, EXPERIMENTAL APIs are not part of stable APIs/ABIs and hence
> they don't really break an ABI. Thus, deprecation for them doesn't make
> sense. (or, as Luca noted on IRC, removing experimental is like
> de-deprecation :) )
I agree, no need for prior notice, in my opinion.
> On IRC, Luca pointed out that in one of the Tech Board meeting minutes
> [2], this was recorded but that too has slight ambiguity to it.
>
> Any thoughts on this? Or, was this documented somewhere other than [1]?
>
> [1] http://dpdk.org/doc/guides/contributing/versioning.html
> [2] https://dpdk.org/ml/archives/dev/2017-October/079961.html (Section 2-b)
>
^ permalink raw reply [relevance 0%]
* [dpdk-dev] Process for removing __rte_experimental
@ 2018-05-25 9:35 4% Shreyansh Jain
2018-05-25 9:49 0% ` Thomas Monjalon
2018-05-25 11:23 3% ` Neil Horman
0 siblings, 2 replies; 200+ results
From: Shreyansh Jain @ 2018-05-25 9:35 UTC (permalink / raw)
To: dev; +Cc: Ferruh Yigit, Thomas Monjalon, bluca, nhorman
While reading through [1], I couldn't understand if __rte_experimental
and EXPERIMENTAL tag removed from code and map file, respectively, are
categorized under ABI breakage or not. Thus, whether deprecation for
them should be sent or not in a release cycle for removal in subsequent
release.
Logically, EXPERIMENTAL APIs are not part of stable APIs/ABIs and hence
they don't really break an ABI. Thus, deprecation for them doesn't make
sense. (or, as Luca noted on IRC, removing experimental is like
de-deprecation :) )
On IRC, Luca pointed out that in one of the Tech Board meeting minutes
[2], this was recorded but that too has slight ambiguity to it.
Any thoughts on this? Or, was this documented somewhere other than [1]?
[1] http://dpdk.org/doc/guides/contributing/versioning.html
[2] https://dpdk.org/ml/archives/dev/2017-October/079961.html (Section 2-b)
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH] doc: remove old deprecation notice
@ 2018-05-25 9:17 5% Kirill Rybalchenko
0 siblings, 0 replies; 200+ results
From: Kirill Rybalchenko @ 2018-05-25 9:17 UTC (permalink / raw)
To: dev
Cc: kirill.rybalchenko, nhorman, john.mcnamara, marko.kovacevic,
beilei.xing, qi.z.zhang, stable
New default configuration without flexible payload
is implemented now.
Fixes: 09dd01ad9a68 ("doc: announce behaviour change to i40e RSS")
Cc: stable@dpdk.org
Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
---
doc/guides/rel_notes/deprecation.rst | 6 ------
1 file changed, 6 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 1e2443c..df54674 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -59,12 +59,6 @@ Deprecation Notices
Target release for removal of the legacy API will be defined once most
PMDs have switched to rte_flow.
-* i40e: The default flexible payload configuration which extracts the first 16
- bytes of the payload for RSS will be deprecated starting from 18.02. If
- required the previous behavior can be configured using existing flow
- director APIs. There is no ABI/API break. This change will just remove a
- global configuration setting and require explicit configuration.
-
* pdump: As we changed to use generic IPC, some changes in APIs and structure
are expected in subsequent release.
--
2.5.5
^ permalink raw reply [relevance 5%]
* Re: [dpdk-dev] [PATCH V2] librte_hash: new hash del abi to return stored value
2018-05-24 18:35 7% [dpdk-dev] [PATCH V2] librte_hash: new hash del abi to return stored value Guvva, Vijaya
@ 2018-05-25 1:58 8% ` Honnappa Nagarahalli
0 siblings, 0 replies; 200+ results
From: Honnappa Nagarahalli @ 2018-05-25 1:58 UTC (permalink / raw)
To: Guvva, Vijaya, Wang, Yipeng1, De Lara Guarch, Pablo, Richardson, Bruce
Cc: dev, nd
Hi Yipeng,
Can you please elaborate on the read-write concurrency changes you are making? I am looking at few changes myself, want to see how we can align.
Issues that I am looking at are:
1) The delete APIs are not multithread safe - from writers perspective
2) Memory ordering between writer and reader while adding the keys
3) Additional APIs to support RCU while deleting the entries
Thank you,
Honnappa
-----Original Message-----
From: dev <dev-bounces@dpdk.org> On Behalf Of Guvva, Vijaya
Sent: Thursday, May 24, 2018 1:35 PM
To: Wang, Yipeng1 <yipeng1.wang@intel.com>; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Richardson, Bruce <bruce.richardson@intel.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH V2] librte_hash: new hash del abi to return stored value
Hi Yipeng,
Sure, It will be great help if you can include these changes in the patches you are proposing with the necessary locks.
Thanks,
Vijay
-----Original Message-----
From: Wang, Yipeng1 <yipeng1.wang@intel.com>
Sent: Thursday, May 24, 2018 10:47 AM
To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Guvva, Vijaya <Vijaya.Guvva@cavium.com>; Richardson, Bruce <bruce.richardson@intel.com>
Cc: dev@dpdk.org
Subject: RE: [dpdk-dev] [PATCH V2] librte_hash: new hash del abi to return stored value
Hi, Vijaya,
Thanks for contributing the new API.
We actually have a patch to support read-write concurrency for rte_hash coming in a couple of weeks. The new del function you proposed may need to be protected under the new concurrency scheme as well. If you like, we could collaborate together to fit your del function under the new concurrency support.
Thanks
Yipeng
>-----Original Message-----
>From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of De Lara Guarch,
>Pablo
>Sent: Thursday, May 17, 2018 1:06 AM
>To: Vijaya Mohan Guvva <vguvva@caviumnetworks.com>; Richardson, Bruce
><bruce.richardson@intel.com>
>Cc: dev@dpdk.org
>Subject: Re: [dpdk-dev] [PATCH V2] librte_hash: new hash del abi to
>return stored value
>
>Hi Vijaya,
>
>> -----Original Message-----
>> From: Vijaya Mohan Guvva [mailto:vguvva@caviumnetworks.com]
>> Sent: Thursday, May 17, 2018 2:27 AM
>> To: Richardson, Bruce <bruce.richardson@intel.com>; De Lara Guarch,
>> Pablo <pablo.de.lara.guarch@intel.com>
>> Cc: dev@dpdk.org; Vijaya Mohan Guvva <vguvva@caviumnetworks.com>
>> Subject: [PATCH V2] librte_hash: new hash del abi to return stored
>> value
>>
>
>You are actually adding new API, not ABI, so I would reword the commit message.
>
>"hash: add API to return stored value at deletion" maybe?
>
>I would add some information in the commit message and move the
>changelog (V1, V2 notes) after the three dashes.
>
>> V2:
>> Adding another new interface rte_hash_del_key_data to delete key from
>> hash table and return stored data.
>>
>> V1:
>> Add a new key delete interface rte_hash_del_key_with_hash_data to
>> delete the key from hash and return the value stored. This is useful
>> for hash users to free the data stored in the table after key delete
>> and to avoid maintaining a user data array in the dpdk application.
>>
>> Signed-off-by: Vijaya Mohan Guvva <vguvva@caviumnetworks.com>
>> ---
>> lib/librte_hash/rte_cuckoo_hash.c | 30 +++++++++++++++++++++++---
>> lib/librte_hash/rte_hash.h | 45
>> +++++++++++++++++++++++++++++++++++++++
>> 2 files changed, 72 insertions(+), 3 deletions(-)
>
>...
>
>> +int32_t
>> +rte_hash_del_key_with_hash_data(const struct rte_hash *h, const void *key,
>> + hash_sig_t sig, void **data);
>> +
>> +/**
>> * Remove a key from an existing hash table.
>> * This operation is not multi-thread safe
>> * and should only be called from one thread.
>> --
>> 1.8.3.1
>
>You need to update the version.map file to add the two new functions
>(you might need to wait until 18.05 is released, so you can use the 18.08 tag).
^ permalink raw reply [relevance 8%]
* Re: [dpdk-dev] [PATCH V2] librte_hash: new hash del abi to return stored value
@ 2018-05-24 18:35 7% Guvva, Vijaya
2018-05-25 1:58 8% ` Honnappa Nagarahalli
0 siblings, 1 reply; 200+ results
From: Guvva, Vijaya @ 2018-05-24 18:35 UTC (permalink / raw)
To: Wang, Yipeng1, De Lara Guarch, Pablo, Richardson, Bruce; +Cc: dev
Hi Yipeng,
Sure, It will be great help if you can include these changes in the patches you are proposing with the necessary locks.
Thanks,
Vijay
-----Original Message-----
From: Wang, Yipeng1 <yipeng1.wang@intel.com>
Sent: Thursday, May 24, 2018 10:47 AM
To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Guvva, Vijaya <Vijaya.Guvva@cavium.com>; Richardson, Bruce <bruce.richardson@intel.com>
Cc: dev@dpdk.org
Subject: RE: [dpdk-dev] [PATCH V2] librte_hash: new hash del abi to return stored value
Hi, Vijaya,
Thanks for contributing the new API.
We actually have a patch to support read-write concurrency for rte_hash coming in a couple of weeks. The new del function you proposed may need to be protected under the new concurrency scheme as well. If you like, we could collaborate together to fit your del function under the new concurrency support.
Thanks
Yipeng
>-----Original Message-----
>From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of De Lara Guarch,
>Pablo
>Sent: Thursday, May 17, 2018 1:06 AM
>To: Vijaya Mohan Guvva <vguvva@caviumnetworks.com>; Richardson, Bruce
><bruce.richardson@intel.com>
>Cc: dev@dpdk.org
>Subject: Re: [dpdk-dev] [PATCH V2] librte_hash: new hash del abi to
>return stored value
>
>Hi Vijaya,
>
>> -----Original Message-----
>> From: Vijaya Mohan Guvva [mailto:vguvva@caviumnetworks.com]
>> Sent: Thursday, May 17, 2018 2:27 AM
>> To: Richardson, Bruce <bruce.richardson@intel.com>; De Lara Guarch,
>> Pablo <pablo.de.lara.guarch@intel.com>
>> Cc: dev@dpdk.org; Vijaya Mohan Guvva <vguvva@caviumnetworks.com>
>> Subject: [PATCH V2] librte_hash: new hash del abi to return stored
>> value
>>
>
>You are actually adding new API, not ABI, so I would reword the commit message.
>
>"hash: add API to return stored value at deletion" maybe?
>
>I would add some information in the commit message and move the
>changelog (V1, V2 notes) after the three dashes.
>
>> V2:
>> Adding another new interface rte_hash_del_key_data to delete key from
>> hash table and return stored data.
>>
>> V1:
>> Add a new key delete interface rte_hash_del_key_with_hash_data to
>> delete the key from hash and return the value stored. This is useful
>> for hash users to free the data stored in the table after key delete
>> and to avoid maintaining a user data array in the dpdk application.
>>
>> Signed-off-by: Vijaya Mohan Guvva <vguvva@caviumnetworks.com>
>> ---
>> lib/librte_hash/rte_cuckoo_hash.c | 30 +++++++++++++++++++++++---
>> lib/librte_hash/rte_hash.h | 45
>> +++++++++++++++++++++++++++++++++++++++
>> 2 files changed, 72 insertions(+), 3 deletions(-)
>
>...
>
>> +int32_t
>> +rte_hash_del_key_with_hash_data(const struct rte_hash *h, const void *key,
>> + hash_sig_t sig, void **data);
>> +
>> +/**
>> * Remove a key from an existing hash table.
>> * This operation is not multi-thread safe
>> * and should only be called from one thread.
>> --
>> 1.8.3.1
>
>You need to update the version.map file to add the two new functions
>(you might need to wait until 18.05 is released, so you can use the 18.08 tag).
^ permalink raw reply [relevance 7%]
* Re: [dpdk-dev] [PATCH V2] librte_hash: new hash del abi to return stored value
2018-05-17 8:06 7% ` De Lara Guarch, Pablo
@ 2018-05-24 17:47 4% ` Wang, Yipeng1
0 siblings, 0 replies; 200+ results
From: Wang, Yipeng1 @ 2018-05-24 17:47 UTC (permalink / raw)
To: De Lara Guarch, Pablo, Vijaya Mohan Guvva, Richardson, Bruce; +Cc: dev
Hi, Vijaya,
Thanks for contributing the new API.
We actually have a patch to support read-write concurrency for rte_hash coming in a couple of weeks. The new del function you proposed may need to be protected under the new concurrency scheme as well. If you like, we could collaborate together to fit your del function under the new concurrency support.
Thanks
Yipeng
>-----Original Message-----
>From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of De Lara Guarch, Pablo
>Sent: Thursday, May 17, 2018 1:06 AM
>To: Vijaya Mohan Guvva <vguvva@caviumnetworks.com>; Richardson, Bruce <bruce.richardson@intel.com>
>Cc: dev@dpdk.org
>Subject: Re: [dpdk-dev] [PATCH V2] librte_hash: new hash del abi to return stored value
>
>Hi Vijaya,
>
>> -----Original Message-----
>> From: Vijaya Mohan Guvva [mailto:vguvva@caviumnetworks.com]
>> Sent: Thursday, May 17, 2018 2:27 AM
>> To: Richardson, Bruce <bruce.richardson@intel.com>; De Lara Guarch, Pablo
>> <pablo.de.lara.guarch@intel.com>
>> Cc: dev@dpdk.org; Vijaya Mohan Guvva <vguvva@caviumnetworks.com>
>> Subject: [PATCH V2] librte_hash: new hash del abi to return stored value
>>
>
>You are actually adding new API, not ABI, so I would reword the commit message.
>
>"hash: add API to return stored value at deletion" maybe?
>
>I would add some information in the commit message and move the changelog (V1, V2 notes)
>after the three dashes.
>
>> V2:
>> Adding another new interface rte_hash_del_key_data to delete key from hash
>> table and return stored data.
>>
>> V1:
>> Add a new key delete interface rte_hash_del_key_with_hash_data to delete the
>> key from hash and return the value stored. This is useful for hash users to free
>> the data stored in the table after key delete and to avoid maintaining a user data
>> array in the dpdk application.
>>
>> Signed-off-by: Vijaya Mohan Guvva <vguvva@caviumnetworks.com>
>> ---
>> lib/librte_hash/rte_cuckoo_hash.c | 30 +++++++++++++++++++++++---
>> lib/librte_hash/rte_hash.h | 45
>> +++++++++++++++++++++++++++++++++++++++
>> 2 files changed, 72 insertions(+), 3 deletions(-)
>
>...
>
>> +int32_t
>> +rte_hash_del_key_with_hash_data(const struct rte_hash *h, const void *key,
>> + hash_sig_t sig, void **data);
>> +
>> +/**
>> * Remove a key from an existing hash table.
>> * This operation is not multi-thread safe
>> * and should only be called from one thread.
>> --
>> 1.8.3.1
>
>You need to update the version.map file to add the two new functions
>(you might need to wait until 18.05 is released, so you can use the 18.08 tag).
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [pull-request] next-crypto 18.05-rc5
@ 2018-05-22 14:38 4% Pablo de Lara
0 siblings, 0 replies; 200+ results
From: Pablo de Lara @ 2018-05-22 14:38 UTC (permalink / raw)
To: thomas; +Cc: dev
The following changes since commit 3291abb5a2a5f24c109ab74e6aad0545927333a7:
ethdev: fix type and scope of variables in Rx burst (2018-05-22 16:32:36 +0200)
are available in the Git repository at:
http://dpdk.org/git/next/dpdk-next-crypto
for you to fetch changes up to bbabaddd854f858477df32e7882ba848bd33317d:
doc/crypto: update ZUC installation section (2018-05-22 15:36:12 +0100)
----------------------------------------------------------------
Fan Zhang (1):
crypto/scheduler: fix possible duplicated ring names
Fiona Trahe (4):
doc/crypto: add clarification about chained mbuf feature
compressdev: clarify buffer size limitation
compressdev: clarify when private xform can be cleared
cryptodev: clarify when session can be cleared
Jerin Jacob (2):
app/crypto-perf: use strcpy for allocated string
app/crypto-perf: fix memcpy source
Kamil Chalupnik (1):
app/bbdev: fix unchecked return value
Kirill Rybalchenko (2):
crypto/scheduler: fix multicore rings re-use
crypto/scheduler: fix 64-bit mask of workers cores
Pablo de Lara (16):
crypto/aesni_mb: fix capabilities
crypto/aesni_gcm: remove unneeded cast
cryptodev: fix supported size check
cryptodev: extend feature flags description
cryptodev: add missing feature string
compressdev: remove unused driver id
compressdev: clarify mbuf offsets
doc: announce ABI change for crypto sym info struct
doc: announce ABI change for crypto info struct
doc: announce deprecation for attach/detach crypto session
doc: announce deprecation in crypto queue pair start/stop
doc: announce deprecation in crypto feature flags
cryptodev: rename get session size API
doc/crypto: update KASUMI installation section
doc/crypto: update SNOW3G installation section
doc/crypto: update ZUC installation section
app/test-bbdev/test_bbdev_perf.c | 8 ++-
app/test-crypto-perf/cperf_test_vector_parsing.c | 7 +--
app/test-crypto-perf/main.c | 2 +-
doc/guides/cryptodevs/kasumi.rst | 10 ++--
doc/guides/cryptodevs/overview.rst | 10 ++++
doc/guides/cryptodevs/snow3g.rst | 10 ++--
doc/guides/cryptodevs/zuc.rst | 10 ++--
doc/guides/prog_guide/cryptodev_lib.rst | 6 +-
doc/guides/rel_notes/deprecation.rst | 25 ++++++++
drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 4 +-
drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 2 +-
drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 23 +++++++-
drivers/crypto/armv8/rte_armv8_pmd.c | 2 +-
drivers/crypto/kasumi/rte_kasumi_pmd.c | 2 +-
drivers/crypto/openssl/rte_openssl_pmd.c | 2 +-
drivers/crypto/scheduler/rte_cryptodev_scheduler.h | 2 +-
drivers/crypto/scheduler/scheduler_multicore.c | 38 ++++++++----
drivers/crypto/scheduler/scheduler_pmd.c | 68 +++++++++++++++++-----
drivers/crypto/scheduler/scheduler_pmd_private.h | 2 +-
drivers/crypto/snow3g/rte_snow3g_pmd.c | 2 +-
drivers/crypto/zuc/rte_zuc_pmd.c | 2 +-
examples/ipsec-secgw/ipsec-secgw.c | 2 +-
examples/ipsec-secgw/ipsec.c | 12 ----
examples/l2fwd-crypto/main.c | 2 +-
examples/vhost_crypto/main.c | 2 +-
lib/librte_compressdev/rte_comp.h | 18 +++++-
lib/librte_compressdev/rte_compressdev.h | 3 +-
lib/librte_compressdev/rte_compressdev_internal.h | 3 -
lib/librte_cryptodev/rte_cryptodev.c | 59 +++++++++++++++----
lib/librte_cryptodev/rte_cryptodev.h | 44 +++++++++++++-
lib/librte_cryptodev/rte_cryptodev_version.map | 8 +++
test/test/test_cryptodev.c | 8 ++-
test/test/test_event_crypto_adapter.c | 2 +-
33 files changed, 294 insertions(+), 106 deletions(-)
^ permalink raw reply [relevance 4%]
* Re: [dpdk-dev] [PATCH v5 0/6] Cryptodev API/ABI deprecation notices
2018-05-22 14:30 4% ` [dpdk-dev] [PATCH v5 0/6] Cryptodev API/ABI deprecation notices Jain, Deepak K
@ 2018-05-22 14:35 4% ` De Lara Guarch, Pablo
0 siblings, 0 replies; 200+ results
From: De Lara Guarch, Pablo @ 2018-05-22 14:35 UTC (permalink / raw)
To: Jain, Deepak K, Doherty, Declan, akhil.goyal, shally.verma; +Cc: dev
> -----Original Message-----
> From: Jain, Deepak K
> Sent: Tuesday, May 22, 2018 3:30 PM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Doherty, Declan
> <declan.doherty@intel.com>; akhil.goyal@nxp.com; shally.verma@cavium.com
> Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Subject: RE: [dpdk-dev] [PATCH v5 0/6] Cryptodev API/ABI deprecation notices
>
>
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> > Sent: Monday, May 21, 2018 2:09 PM
> > To: Doherty, Declan <declan.doherty@intel.com>; akhil.goyal@nxp.com;
> > shally.verma@cavium.com
> > Cc: dev@dpdk.org; De Lara Guarch, Pablo
> > <pablo.de.lara.guarch@intel.com>
> > Subject: [dpdk-dev] [PATCH v5 0/6] Cryptodev API/ABI deprecation
> > notices
> >
> > v5:
> > - Renamed rte_cryptodev_get_header_session_size with
> > rte_cryptodev_sym_get_header_session_size, and
> > rte_cryptodev_get_private_session_size with
> > rte_cryptodev_sym_get_private_session_size.
> >
> > v4:
> > - Fixed DPDK versions called out to deprecate/remove API.
> > - Removed rte_cryptodev_queue_pair_attach_sym_session call
> > from the IPSec gw app, since the function is deprecated now.
> > - Added patch announcing a replacement of some of the crypto
> > feature flags
> > - Added patch renaming two symmetric specific functions
> > from *_session_* to *_sym_session_*.
> >
> > v3:
> > - Added an extra deprecation announcement (replacing rte_pci_device
> > with rte_device)
> > - Rebased against latest DPDK code
> >
> > v2:
> > - Added an extra deprecation announcement
> > - Bonded the other two deprecation notices with the new one in a
> > patchset
> >
> > Pablo de Lara (6):
> > doc: announce ABI change for crypto sym info struct
> > doc: announce ABI change for crypto info struct
> > doc: announce deprecation for attach/detach crypto session
> > doc: announce deprecation in crypto queue pair start/stop
> > doc: announce deprecation in crypto feature flags
> > cryptodev: rename get session size API
> >
> > app/test-crypto-perf/main.c | 2 +-
> > doc/guides/prog_guide/cryptodev_lib.rst | 6 ++--
> > doc/guides/rel_notes/deprecation.rst | 25 +++++++++++++
> > drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 2 +-
> > drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 2 +-
> > drivers/crypto/armv8/rte_armv8_pmd.c | 2 +-
> > drivers/crypto/kasumi/rte_kasumi_pmd.c | 2 +-
> > drivers/crypto/openssl/rte_openssl_pmd.c | 2 +-
> > drivers/crypto/snow3g/rte_snow3g_pmd.c | 2 +-
> > drivers/crypto/zuc/rte_zuc_pmd.c | 2 +-
> > examples/ipsec-secgw/ipsec-secgw.c | 2 +-
> > examples/ipsec-secgw/ipsec.c | 12 -------
> > examples/l2fwd-crypto/main.c | 2 +-
> > examples/vhost_crypto/main.c | 2 +-
> > lib/librte_cryptodev/rte_cryptodev.c | 12 +++++++
> > lib/librte_cryptodev/rte_cryptodev.h | 35 +++++++++++++++++++
> > .../rte_cryptodev_version.map | 8 +++++
> > test/test/test_cryptodev.c | 6 ++--
> > test/test/test_event_crypto_adapter.c | 2 +-
> > 19 files changed, 99 insertions(+), 29 deletions(-)
> >
> > --
> > 2.17.0
>
> Series Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Applied to dpdk-next-crypto.
Thanks,
Pablo
^ permalink raw reply [relevance 4%]
* Re: [dpdk-dev] [PATCH v5 0/6] Cryptodev API/ABI deprecation notices
2018-05-21 13:08 8% ` [dpdk-dev] [PATCH v5 0/6] Cryptodev API/ABI deprecation notices Pablo de Lara
2018-05-21 13:08 4% ` [dpdk-dev] [PATCH v5 1/6] doc: announce ABI change for crypto sym info struct Pablo de Lara
2018-05-21 13:08 4% ` [dpdk-dev] [PATCH v5 2/6] doc: announce ABI change for crypto " Pablo de Lara
@ 2018-05-22 14:30 4% ` Jain, Deepak K
2018-05-22 14:35 4% ` De Lara Guarch, Pablo
2 siblings, 1 reply; 200+ results
From: Jain, Deepak K @ 2018-05-22 14:30 UTC (permalink / raw)
To: De Lara Guarch, Pablo, Doherty, Declan, akhil.goyal, shally.verma
Cc: dev, De Lara Guarch, Pablo
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> Sent: Monday, May 21, 2018 2:09 PM
> To: Doherty, Declan <declan.doherty@intel.com>; akhil.goyal@nxp.com;
> shally.verma@cavium.com
> Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Subject: [dpdk-dev] [PATCH v5 0/6] Cryptodev API/ABI deprecation notices
>
> v5:
> - Renamed rte_cryptodev_get_header_session_size with
> rte_cryptodev_sym_get_header_session_size, and
> rte_cryptodev_get_private_session_size with
> rte_cryptodev_sym_get_private_session_size.
>
> v4:
> - Fixed DPDK versions called out to deprecate/remove API.
> - Removed rte_cryptodev_queue_pair_attach_sym_session call
> from the IPSec gw app, since the function is deprecated now.
> - Added patch announcing a replacement of some of the crypto
> feature flags
> - Added patch renaming two symmetric specific functions
> from *_session_* to *_sym_session_*.
>
> v3:
> - Added an extra deprecation announcement (replacing rte_pci_device
> with rte_device)
> - Rebased against latest DPDK code
>
> v2:
> - Added an extra deprecation announcement
> - Bonded the other two deprecation notices with the new one in a
> patchset
>
> Pablo de Lara (6):
> doc: announce ABI change for crypto sym info struct
> doc: announce ABI change for crypto info struct
> doc: announce deprecation for attach/detach crypto session
> doc: announce deprecation in crypto queue pair start/stop
> doc: announce deprecation in crypto feature flags
> cryptodev: rename get session size API
>
> app/test-crypto-perf/main.c | 2 +-
> doc/guides/prog_guide/cryptodev_lib.rst | 6 ++--
> doc/guides/rel_notes/deprecation.rst | 25 +++++++++++++
> drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 2 +-
> drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 2 +-
> drivers/crypto/armv8/rte_armv8_pmd.c | 2 +-
> drivers/crypto/kasumi/rte_kasumi_pmd.c | 2 +-
> drivers/crypto/openssl/rte_openssl_pmd.c | 2 +-
> drivers/crypto/snow3g/rte_snow3g_pmd.c | 2 +-
> drivers/crypto/zuc/rte_zuc_pmd.c | 2 +-
> examples/ipsec-secgw/ipsec-secgw.c | 2 +-
> examples/ipsec-secgw/ipsec.c | 12 -------
> examples/l2fwd-crypto/main.c | 2 +-
> examples/vhost_crypto/main.c | 2 +-
> lib/librte_cryptodev/rte_cryptodev.c | 12 +++++++
> lib/librte_cryptodev/rte_cryptodev.h | 35 +++++++++++++++++++
> .../rte_cryptodev_version.map | 8 +++++
> test/test/test_cryptodev.c | 6 ++--
> test/test/test_event_crypto_adapter.c | 2 +-
> 19 files changed, 99 insertions(+), 29 deletions(-)
>
> --
> 2.17.0
Series Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH v5 1/6] doc: announce ABI change for crypto sym info struct
2018-05-21 13:08 8% ` [dpdk-dev] [PATCH v5 0/6] Cryptodev API/ABI deprecation notices Pablo de Lara
@ 2018-05-21 13:08 4% ` Pablo de Lara
2018-05-21 13:08 4% ` [dpdk-dev] [PATCH v5 2/6] doc: announce ABI change for crypto " Pablo de Lara
2018-05-22 14:30 4% ` [dpdk-dev] [PATCH v5 0/6] Cryptodev API/ABI deprecation notices Jain, Deepak K
2 siblings, 0 replies; 200+ results
From: Pablo de Lara @ 2018-05-21 13:08 UTC (permalink / raw)
To: declan.doherty, akhil.goyal, shally.verma; +Cc: dev, Pablo de Lara
Since the API changes made in 17.08, the session mempool
is not created anymore in each crypto device.
Therefore, there is no need to have, in the cryptodev info
structure, the maximum number of sessions supported per device
and per queue pair.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
doc/guides/rel_notes/deprecation.rst | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index c3b79a22f..d6cccbfde 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -71,3 +71,10 @@ Deprecation Notices
- ``rte_pdump_set_socket_dir`` will be removed;
- The parameter, ``path``, of ``rte_pdump_init`` will be removed;
- The enum ``rte_pdump_socktype`` will be removed.
+
+* cryptodev: The following changes will be made in the library
+ for 18.08:
+
+ - Removal of ``sym`` structure in ``rte_cryptodev_info`` structure,
+ containing fields not relevant anymore since the session mempool
+ is not internal in the crypto device anymore.
--
2.17.0
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH v5 2/6] doc: announce ABI change for crypto info struct
2018-05-21 13:08 8% ` [dpdk-dev] [PATCH v5 0/6] Cryptodev API/ABI deprecation notices Pablo de Lara
2018-05-21 13:08 4% ` [dpdk-dev] [PATCH v5 1/6] doc: announce ABI change for crypto sym info struct Pablo de Lara
@ 2018-05-21 13:08 4% ` Pablo de Lara
2018-05-22 14:30 4% ` [dpdk-dev] [PATCH v5 0/6] Cryptodev API/ABI deprecation notices Jain, Deepak K
2 siblings, 0 replies; 200+ results
From: Pablo de Lara @ 2018-05-21 13:08 UTC (permalink / raw)
To: declan.doherty, akhil.goyal, shally.verma; +Cc: dev, Pablo de Lara
Cryptodev info structure currently contains
a pointer to an rte_pci_device structure.
This field depends on a specific bus type (PCI),
which is not following a bus independent design.
Following the same approach taken in ethdev, the field
will be replaced with a pointer to an rte_device structure.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
doc/guides/rel_notes/deprecation.rst | 2 ++
1 file changed, 2 insertions(+)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index d6cccbfde..85945ee72 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -78,3 +78,5 @@ Deprecation Notices
- Removal of ``sym`` structure in ``rte_cryptodev_info`` structure,
containing fields not relevant anymore since the session mempool
is not internal in the crypto device anymore.
+ - Replacement of ``pci_dev`` field with the more generic ``rte_device``
+ structure.
--
2.17.0
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH v5 0/6] Cryptodev API/ABI deprecation notices
2018-05-17 9:00 8% ` [dpdk-dev] [PATCH v3 0/4] Cryptodev API/ABI deprecation notices Pablo de Lara
2018-05-21 11:06 8% ` [dpdk-dev] [PATCH v4 0/6] Cryptodev API/ABI deprecation notices Pablo de Lara
@ 2018-05-21 13:08 8% ` Pablo de Lara
2018-05-21 13:08 4% ` [dpdk-dev] [PATCH v5 1/6] doc: announce ABI change for crypto sym info struct Pablo de Lara
` (2 more replies)
2 siblings, 3 replies; 200+ results
From: Pablo de Lara @ 2018-05-21 13:08 UTC (permalink / raw)
To: declan.doherty, akhil.goyal, shally.verma; +Cc: dev, Pablo de Lara
v5:
- Renamed rte_cryptodev_get_header_session_size with
rte_cryptodev_sym_get_header_session_size, and
rte_cryptodev_get_private_session_size with
rte_cryptodev_sym_get_private_session_size.
v4:
- Fixed DPDK versions called out to deprecate/remove API.
- Removed rte_cryptodev_queue_pair_attach_sym_session call
from the IPSec gw app, since the function is deprecated now.
- Added patch announcing a replacement of some of the crypto
feature flags
- Added patch renaming two symmetric specific functions
from *_session_* to *_sym_session_*.
v3:
- Added an extra deprecation announcement (replacing rte_pci_device
with rte_device)
- Rebased against latest DPDK code
v2:
- Added an extra deprecation announcement
- Bonded the other two deprecation notices with the new one in a
patchset
Pablo de Lara (6):
doc: announce ABI change for crypto sym info struct
doc: announce ABI change for crypto info struct
doc: announce deprecation for attach/detach crypto session
doc: announce deprecation in crypto queue pair start/stop
doc: announce deprecation in crypto feature flags
cryptodev: rename get session size API
app/test-crypto-perf/main.c | 2 +-
doc/guides/prog_guide/cryptodev_lib.rst | 6 ++--
doc/guides/rel_notes/deprecation.rst | 25 +++++++++++++
drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 2 +-
drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 2 +-
drivers/crypto/armv8/rte_armv8_pmd.c | 2 +-
drivers/crypto/kasumi/rte_kasumi_pmd.c | 2 +-
drivers/crypto/openssl/rte_openssl_pmd.c | 2 +-
drivers/crypto/snow3g/rte_snow3g_pmd.c | 2 +-
drivers/crypto/zuc/rte_zuc_pmd.c | 2 +-
examples/ipsec-secgw/ipsec-secgw.c | 2 +-
examples/ipsec-secgw/ipsec.c | 12 -------
examples/l2fwd-crypto/main.c | 2 +-
examples/vhost_crypto/main.c | 2 +-
lib/librte_cryptodev/rte_cryptodev.c | 12 +++++++
lib/librte_cryptodev/rte_cryptodev.h | 35 +++++++++++++++++++
.../rte_cryptodev_version.map | 8 +++++
test/test/test_cryptodev.c | 6 ++--
test/test/test_event_crypto_adapter.c | 2 +-
19 files changed, 99 insertions(+), 29 deletions(-)
--
2.17.0
^ permalink raw reply [relevance 8%]
* [dpdk-dev] [PATCH v4 2/6] doc: announce ABI change for crypto info struct
2018-05-21 11:06 8% ` [dpdk-dev] [PATCH v4 0/6] Cryptodev API/ABI deprecation notices Pablo de Lara
2018-05-21 11:06 4% ` [dpdk-dev] [PATCH v4 1/6] doc: announce ABI change for crypto sym info struct Pablo de Lara
@ 2018-05-21 11:06 4% ` Pablo de Lara
1 sibling, 0 replies; 200+ results
From: Pablo de Lara @ 2018-05-21 11:06 UTC (permalink / raw)
To: declan.doherty, akhil.goyal, shally.verma; +Cc: dev, Pablo de Lara
Cryptodev info structure currently contains
a pointer to an rte_pci_device structure.
This field depends on a specific bus type (PCI),
which is not following a bus independent design.
Following the same approach taken in ethdev, the field
will be replaced with a pointer to an rte_device structure.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
doc/guides/rel_notes/deprecation.rst | 2 ++
1 file changed, 2 insertions(+)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index d6cccbfde..85945ee72 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -78,3 +78,5 @@ Deprecation Notices
- Removal of ``sym`` structure in ``rte_cryptodev_info`` structure,
containing fields not relevant anymore since the session mempool
is not internal in the crypto device anymore.
+ - Replacement of ``pci_dev`` field with the more generic ``rte_device``
+ structure.
--
2.17.0
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH v4 1/6] doc: announce ABI change for crypto sym info struct
2018-05-21 11:06 8% ` [dpdk-dev] [PATCH v4 0/6] Cryptodev API/ABI deprecation notices Pablo de Lara
@ 2018-05-21 11:06 4% ` Pablo de Lara
2018-05-21 11:06 4% ` [dpdk-dev] [PATCH v4 2/6] doc: announce ABI change for crypto " Pablo de Lara
1 sibling, 0 replies; 200+ results
From: Pablo de Lara @ 2018-05-21 11:06 UTC (permalink / raw)
To: declan.doherty, akhil.goyal, shally.verma; +Cc: dev, Pablo de Lara
Since the API changes made in 17.08, the session mempool
is not created anymore in each crypto device.
Therefore, there is no need to have, in the cryptodev info
structure, the maximum number of sessions supported per device
and per queue pair.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
doc/guides/rel_notes/deprecation.rst | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index c3b79a22f..d6cccbfde 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -71,3 +71,10 @@ Deprecation Notices
- ``rte_pdump_set_socket_dir`` will be removed;
- The parameter, ``path``, of ``rte_pdump_init`` will be removed;
- The enum ``rte_pdump_socktype`` will be removed.
+
+* cryptodev: The following changes will be made in the library
+ for 18.08:
+
+ - Removal of ``sym`` structure in ``rte_cryptodev_info`` structure,
+ containing fields not relevant anymore since the session mempool
+ is not internal in the crypto device anymore.
--
2.17.0
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH v4 0/6] Cryptodev API/ABI deprecation notices
2018-05-17 9:00 8% ` [dpdk-dev] [PATCH v3 0/4] Cryptodev API/ABI deprecation notices Pablo de Lara
@ 2018-05-21 11:06 8% ` Pablo de Lara
2018-05-21 11:06 4% ` [dpdk-dev] [PATCH v4 1/6] doc: announce ABI change for crypto sym info struct Pablo de Lara
2018-05-21 11:06 4% ` [dpdk-dev] [PATCH v4 2/6] doc: announce ABI change for crypto " Pablo de Lara
2018-05-21 13:08 8% ` [dpdk-dev] [PATCH v5 0/6] Cryptodev API/ABI deprecation notices Pablo de Lara
2 siblings, 2 replies; 200+ results
From: Pablo de Lara @ 2018-05-21 11:06 UTC (permalink / raw)
To: declan.doherty, akhil.goyal, shally.verma; +Cc: dev, Pablo de Lara
v4:
- Fixed DPDK versions called out to deprecate/remove API.
- Removed rte_cryptodev_queue_pair_attach_sym_session call
from the IPSec gw app, since the function is deprecated now.
- Added patch announcing a replacement of some of the crypto
feature flags
- Added patch renaming two symmetric specific functions
from *_session_* to *_sym_session_*.
v3:
- Added an extra deprecation announcement (replacing rte_pci_device
with rte_device)
- Rebased against latest DPDK code
v2:
- Added an extra deprecation announcement
- Bonded the other two deprecation notices with the new one in a
patchset
Pablo de Lara (6):
doc: announce ABI change for crypto sym info struct
doc: announce ABI change for crypto info struct
doc: announce deprecation for attach/detach crypto session
doc: announce deprecation in crypto queue pair start/stop
doc: announce deprecation in crypto feature flags
cryptodev: rename get session size API
app/test-crypto-perf/main.c | 2 +-
doc/guides/prog_guide/cryptodev_lib.rst | 6 ++--
doc/guides/rel_notes/deprecation.rst | 25 +++++++++++++
drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 2 +-
drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 2 +-
drivers/crypto/armv8/rte_armv8_pmd.c | 2 +-
drivers/crypto/kasumi/rte_kasumi_pmd.c | 2 +-
drivers/crypto/openssl/rte_openssl_pmd.c | 2 +-
drivers/crypto/snow3g/rte_snow3g_pmd.c | 2 +-
drivers/crypto/zuc/rte_zuc_pmd.c | 2 +-
examples/ipsec-secgw/ipsec-secgw.c | 2 +-
examples/ipsec-secgw/ipsec.c | 12 -------
examples/l2fwd-crypto/main.c | 2 +-
examples/vhost_crypto/main.c | 2 +-
lib/librte_cryptodev/rte_cryptodev.c | 12 +++++++
lib/librte_cryptodev/rte_cryptodev.h | 35 +++++++++++++++++++
.../rte_cryptodev_version.map | 8 +++++
test/test/test_cryptodev.c | 6 ++--
test/test/test_event_crypto_adapter.c | 2 +-
19 files changed, 99 insertions(+), 29 deletions(-)
--
2.17.0
^ permalink raw reply [relevance 8%]
* Re: [dpdk-dev] [PATCH v3 1/4] doc: announce ABI change for crypto sym info struct
2018-05-17 9:00 4% ` [dpdk-dev] [PATCH v3 1/4] doc: announce ABI change for crypto sym info struct Pablo de Lara
@ 2018-05-18 11:42 4% ` Akhil Goyal
0 siblings, 0 replies; 200+ results
From: Akhil Goyal @ 2018-05-18 11:42 UTC (permalink / raw)
To: Pablo de Lara, declan.doherty, akhil.goyal; +Cc: dev
On 5/17/2018 2:30 PM, Pablo de Lara wrote:
> Since the API changes made in 17.08, the session mempool
> is not created anymore in each crypto device.
> Therefore, there is no need to have, in the cryptodev info
> structure, the maximum number of sessions supported per device
> and per queue pair.
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> Acked-by: Fiona Trahe <fiona.trahe@intel.com>
> ---
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
^ permalink raw reply [relevance 4%]
* Re: [dpdk-dev] [PATCH v3 2/4] doc: announce ABI change for crypto info struct
2018-05-17 9:00 4% ` [dpdk-dev] [PATCH v3 2/4] doc: announce ABI change for crypto " Pablo de Lara
2018-05-17 11:18 4% ` Trahe, Fiona
@ 2018-05-18 11:41 4% ` Akhil Goyal
1 sibling, 0 replies; 200+ results
From: Akhil Goyal @ 2018-05-18 11:41 UTC (permalink / raw)
To: Pablo de Lara, declan.doherty, akhil.goyal; +Cc: dev
On 5/17/2018 2:30 PM, Pablo de Lara wrote:
> Cryptodev info structure currently contains
> a pointer to an rte_pci_device structure.
> This field depends on a specific bus type (PCI),
> which is not following a bus independent design.
> Following the same approach taken in ethdev, the field
> will be replaced with a pointer to an rte_device structure.
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
^ permalink raw reply [relevance 4%]
* Re: [dpdk-dev] [PATCH v3 2/4] doc: announce ABI change for crypto info struct
2018-05-17 9:00 4% ` [dpdk-dev] [PATCH v3 2/4] doc: announce ABI change for crypto " Pablo de Lara
@ 2018-05-17 11:18 4% ` Trahe, Fiona
2018-05-18 11:41 4% ` Akhil Goyal
1 sibling, 0 replies; 200+ results
From: Trahe, Fiona @ 2018-05-17 11:18 UTC (permalink / raw)
To: De Lara Guarch, Pablo, Doherty, Declan, akhil.goyal; +Cc: dev, Trahe, Fiona
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> Sent: Thursday, May 17, 2018 10:01 AM
> To: Doherty, Declan <declan.doherty@intel.com>; akhil.goyal@nxp.com
> Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Subject: [dpdk-dev] [PATCH v3 2/4] doc: announce ABI change for crypto info struct
>
> Cryptodev info structure currently contains
> a pointer to an rte_pci_device structure.
> This field depends on a specific bus type (PCI),
> which is not following a bus independent design.
> Following the same approach taken in ethdev, the field
> will be replaced with a pointer to an rte_device structure.
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH v3 2/4] doc: announce ABI change for crypto info struct
2018-05-17 9:00 8% ` [dpdk-dev] [PATCH v3 0/4] Cryptodev API/ABI deprecation notices Pablo de Lara
2018-05-17 9:00 4% ` [dpdk-dev] [PATCH v3 1/4] doc: announce ABI change for crypto sym info struct Pablo de Lara
@ 2018-05-17 9:00 4% ` Pablo de Lara
2018-05-17 11:18 4% ` Trahe, Fiona
2018-05-18 11:41 4% ` Akhil Goyal
1 sibling, 2 replies; 200+ results
From: Pablo de Lara @ 2018-05-17 9:00 UTC (permalink / raw)
To: declan.doherty, akhil.goyal; +Cc: dev, Pablo de Lara
Cryptodev info structure currently contains
a pointer to an rte_pci_device structure.
This field depends on a specific bus type (PCI),
which is not following a bus independent design.
Following the same approach taken in ethdev, the field
will be replaced with a pointer to an rte_device structure.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
doc/guides/rel_notes/deprecation.rst | 2 ++
1 file changed, 2 insertions(+)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index d6cccbfde..85945ee72 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -78,3 +78,5 @@ Deprecation Notices
- Removal of ``sym`` structure in ``rte_cryptodev_info`` structure,
containing fields not relevant anymore since the session mempool
is not internal in the crypto device anymore.
+ - Replacement of ``pci_dev`` field with the more generic ``rte_device``
+ structure.
--
2.17.0
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH v3 1/4] doc: announce ABI change for crypto sym info struct
2018-05-17 9:00 8% ` [dpdk-dev] [PATCH v3 0/4] Cryptodev API/ABI deprecation notices Pablo de Lara
@ 2018-05-17 9:00 4% ` Pablo de Lara
2018-05-18 11:42 4% ` Akhil Goyal
2018-05-17 9:00 4% ` [dpdk-dev] [PATCH v3 2/4] doc: announce ABI change for crypto " Pablo de Lara
1 sibling, 1 reply; 200+ results
From: Pablo de Lara @ 2018-05-17 9:00 UTC (permalink / raw)
To: declan.doherty, akhil.goyal; +Cc: dev, Pablo de Lara
Since the API changes made in 17.08, the session mempool
is not created anymore in each crypto device.
Therefore, there is no need to have, in the cryptodev info
structure, the maximum number of sessions supported per device
and per queue pair.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
doc/guides/rel_notes/deprecation.rst | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index c3b79a22f..d6cccbfde 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -71,3 +71,10 @@ Deprecation Notices
- ``rte_pdump_set_socket_dir`` will be removed;
- The parameter, ``path``, of ``rte_pdump_init`` will be removed;
- The enum ``rte_pdump_socktype`` will be removed.
+
+* cryptodev: The following changes will be made in the library
+ for 18.08:
+
+ - Removal of ``sym`` structure in ``rte_cryptodev_info`` structure,
+ containing fields not relevant anymore since the session mempool
+ is not internal in the crypto device anymore.
--
2.17.0
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH v3 0/4] Cryptodev API/ABI deprecation notices
@ 2018-05-17 9:00 8% ` Pablo de Lara
2018-05-17 9:00 4% ` [dpdk-dev] [PATCH v3 1/4] doc: announce ABI change for crypto sym info struct Pablo de Lara
2018-05-17 9:00 4% ` [dpdk-dev] [PATCH v3 2/4] doc: announce ABI change for crypto " Pablo de Lara
2018-05-21 11:06 8% ` [dpdk-dev] [PATCH v4 0/6] Cryptodev API/ABI deprecation notices Pablo de Lara
2018-05-21 13:08 8% ` [dpdk-dev] [PATCH v5 0/6] Cryptodev API/ABI deprecation notices Pablo de Lara
2 siblings, 2 replies; 200+ results
From: Pablo de Lara @ 2018-05-17 9:00 UTC (permalink / raw)
To: declan.doherty, akhil.goyal; +Cc: dev, Pablo de Lara
v3:
- Added an extra deprecation announcement (replacing rte_pci_device
with rte_device)
- Rebased against latest DPDK code
v2:
- Added an extra deprecation announcement
- Bonded the other two deprecation notices with the new one in a
patchset
Pablo de Lara (4):
doc: announce ABI change for crypto sym info struct
doc: announce ABI change for crypto info struct
doc: announce deprecation for attach/detach crypto session
doc: announce deprecation in crypto queue pair start/stop
doc/guides/rel_notes/deprecation.rst | 17 +++++++++++++++++
lib/librte_cryptodev/rte_cryptodev.h | 4 ++++
2 files changed, 21 insertions(+)
--
2.17.0
^ permalink raw reply [relevance 8%]
* Re: [dpdk-dev] [PATCH V2] librte_hash: new hash del abi to return stored value
2018-05-17 1:26 3% [dpdk-dev] [PATCH V2] librte_hash: new hash del abi to return stored value Vijaya Mohan Guvva
@ 2018-05-17 8:06 7% ` De Lara Guarch, Pablo
2018-05-24 17:47 4% ` Wang, Yipeng1
0 siblings, 1 reply; 200+ results
From: De Lara Guarch, Pablo @ 2018-05-17 8:06 UTC (permalink / raw)
To: Vijaya Mohan Guvva, Richardson, Bruce; +Cc: dev
Hi Vijaya,
> -----Original Message-----
> From: Vijaya Mohan Guvva [mailto:vguvva@caviumnetworks.com]
> Sent: Thursday, May 17, 2018 2:27 AM
> To: Richardson, Bruce <bruce.richardson@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>
> Cc: dev@dpdk.org; Vijaya Mohan Guvva <vguvva@caviumnetworks.com>
> Subject: [PATCH V2] librte_hash: new hash del abi to return stored value
>
You are actually adding new API, not ABI, so I would reword the commit message.
"hash: add API to return stored value at deletion" maybe?
I would add some information in the commit message and move the changelog (V1, V2 notes)
after the three dashes.
> V2:
> Adding another new interface rte_hash_del_key_data to delete key from hash
> table and return stored data.
>
> V1:
> Add a new key delete interface rte_hash_del_key_with_hash_data to delete the
> key from hash and return the value stored. This is useful for hash users to free
> the data stored in the table after key delete and to avoid maintaining a user data
> array in the dpdk application.
>
> Signed-off-by: Vijaya Mohan Guvva <vguvva@caviumnetworks.com>
> ---
> lib/librte_hash/rte_cuckoo_hash.c | 30 +++++++++++++++++++++++---
> lib/librte_hash/rte_hash.h | 45
> +++++++++++++++++++++++++++++++++++++++
> 2 files changed, 72 insertions(+), 3 deletions(-)
...
> +int32_t
> +rte_hash_del_key_with_hash_data(const struct rte_hash *h, const void *key,
> + hash_sig_t sig, void **data);
> +
> +/**
> * Remove a key from an existing hash table.
> * This operation is not multi-thread safe
> * and should only be called from one thread.
> --
> 1.8.3.1
You need to update the version.map file to add the two new functions
(you might need to wait until 18.05 is released, so you can use the 18.08 tag).
^ permalink raw reply [relevance 7%]
* [dpdk-dev] [PATCH V2] librte_hash: new hash del abi to return stored value
@ 2018-05-17 1:26 3% Vijaya Mohan Guvva
2018-05-17 8:06 7% ` De Lara Guarch, Pablo
0 siblings, 1 reply; 200+ results
From: Vijaya Mohan Guvva @ 2018-05-17 1:26 UTC (permalink / raw)
To: Bruce Richardson, Pablo de Lara; +Cc: dev, Vijaya Mohan Guvva
V2:
Adding another new interface rte_hash_del_key_data to delete key
from hash table and return stored data.
V1:
Add a new key delete interface rte_hash_del_key_with_hash_data to
delete the key from hash and return the value stored. This is useful
for hash users to free the data stored in the table after key delete
and to avoid maintaining a user data array in the dpdk application.
Signed-off-by: Vijaya Mohan Guvva <vguvva@caviumnetworks.com>
---
lib/librte_hash/rte_cuckoo_hash.c | 30 +++++++++++++++++++++++---
lib/librte_hash/rte_hash.h | 45 +++++++++++++++++++++++++++++++++++++++
2 files changed, 72 insertions(+), 3 deletions(-)
diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c
index a07543a..6ea0ef0 100644
--- a/lib/librte_hash/rte_cuckoo_hash.c
+++ b/lib/librte_hash/rte_cuckoo_hash.c
@@ -808,7 +808,7 @@ struct rte_hash *
static inline int32_t
__rte_hash_del_key_with_hash(const struct rte_hash *h, const void *key,
- hash_sig_t sig)
+ hash_sig_t sig, void **data)
{
uint32_t bucket_idx;
hash_sig_t alt_hash;
@@ -827,6 +827,8 @@ struct rte_hash *
k = (struct rte_hash_key *) ((char *)keys +
bkt->key_idx[i] * h->key_entry_size);
if (rte_hash_cmp_eq(key, k->key, h) == 0) {
+ if (data != NULL)
+ *data = k->pdata;
remove_entry(h, bkt, i);
/*
@@ -852,6 +854,8 @@ struct rte_hash *
k = (struct rte_hash_key *) ((char *)keys +
bkt->key_idx[i] * h->key_entry_size);
if (rte_hash_cmp_eq(key, k->key, h) == 0) {
+ if (data != NULL)
+ *data = k->pdata;
remove_entry(h, bkt, i);
/*
@@ -869,18 +873,38 @@ struct rte_hash *
}
int32_t
+rte_hash_del_key_with_hash_data(const struct rte_hash *h,
+ const void *key, hash_sig_t sig, void **data)
+{
+ RETURN_IF_TRUE(((h == NULL) || (key == NULL) ||
+ (data == NULL)), -EINVAL);
+ return __rte_hash_del_key_with_hash(h, key, sig, data);
+}
+
+int32_t
rte_hash_del_key_with_hash(const struct rte_hash *h,
const void *key, hash_sig_t sig)
{
RETURN_IF_TRUE(((h == NULL) || (key == NULL)), -EINVAL);
- return __rte_hash_del_key_with_hash(h, key, sig);
+ return __rte_hash_del_key_with_hash(h, key, sig, NULL);
+}
+
+int32_t
+rte_hash_del_key_data(const struct rte_hash *h, const void *key,
+ void **data)
+{
+ RETURN_IF_TRUE(((h == NULL) || (key == NULL) ||
+ (data == NULL)), -EINVAL);
+ return __rte_hash_del_key_with_hash(h, key,
+ rte_hash_hash(h, key), data);
}
int32_t
rte_hash_del_key(const struct rte_hash *h, const void *key)
{
RETURN_IF_TRUE(((h == NULL) || (key == NULL)), -EINVAL);
- return __rte_hash_del_key_with_hash(h, key, rte_hash_hash(h, key));
+ return __rte_hash_del_key_with_hash(h, key,
+ rte_hash_hash(h, key), NULL);
}
int
diff --git a/lib/librte_hash/rte_hash.h b/lib/librte_hash/rte_hash.h
index f71ca9f..e0c08e3 100644
--- a/lib/librte_hash/rte_hash.h
+++ b/lib/librte_hash/rte_hash.h
@@ -222,6 +222,51 @@ struct rte_hash *
rte_hash_del_key(const struct rte_hash *h, const void *key);
/**
+ * Remove a key from an existing hash table and return data stored.
+ * This operation is not multi-thread safe
+ * and should only be called from one thread.
+ *
+ * @param h
+ * Hash table to remove the key from.
+ * @param key
+ * Key to remove from the hash table.
+ * @param data
+ * Output with pointer to data returned from the hash table.
+ * @return
+ * - -EINVAL if the parameters are invalid.
+ * - -ENOENT if the key is not found.
+ * - A positive value that can be used by the caller as an offset into an
+ * array of user data. This value is unique for this key, and is the same
+ * value that was returned when the key was added.
+ */
+int32_t
+rte_hash_del_key_data(const struct rte_hash *h, const void *key, void **data);
+
+/**
+ * Remove a key from an existing hash table and return data stored.
+ * This operation is not multi-thread safe
+ * and should only be called from one thread.
+ *
+ * @param h
+ * Hash table to remove the key from.
+ * @param key
+ * Key to remove from the hash table.
+ * @param sig
+ * Precomputed hash value for 'key'.
+ * @param data
+ * Output with pointer to data returned from the hash table.
+ * @return
+ * - -EINVAL if the parameters are invalid.
+ * - -ENOENT if the key is not found.
+ * - A positive value that can be used by the caller as an offset into an
+ * array of user data. This value is unique for this key, and is the same
+ * value that was returned when the key was added.
+ */
+int32_t
+rte_hash_del_key_with_hash_data(const struct rte_hash *h, const void *key,
+ hash_sig_t sig, void **data);
+
+/**
* Remove a key from an existing hash table.
* This operation is not multi-thread safe
* and should only be called from one thread.
--
1.8.3.1
^ permalink raw reply [relevance 3%]
Results 9401-9600 of ~18000 next (older) | prev (newer) | reverse | sort options + mbox downloads above
-- links below jump to the message on this page --
2018-01-15 19:05 [dpdk-dev] [PATCH] checkpatches.sh: Add checks for ABI symbol addition Neil Horman
2018-02-14 19:19 ` [dpdk-dev] [PATCH v6] " Neil Horman
2018-05-27 19:34 4% ` Thomas Monjalon
2018-05-27 21:00 4% ` Neil Horman
2018-05-27 22:01 4% ` Thomas Monjalon
2018-05-28 17:08 4% ` Neil Horman
2018-06-05 12:21 6% ` [dpdk-dev] [PATCH v7] " Neil Horman
2018-06-14 13:30 6% ` [dpdk-dev] [PATCH v8] " Neil Horman
2018-06-25 23:04 4% ` Thomas Monjalon
2018-06-27 17:58 4% ` Neil Horman
2018-06-27 18:01 6% ` [dpdk-dev] [PATCH v9] " Neil Horman
2018-07-15 23:12 4% ` Thomas Monjalon
2018-01-26 9:03 [dpdk-dev] [PATCH] doc: announce ABI change for crypto info struct Pablo de Lara
2018-05-17 9:00 8% ` [dpdk-dev] [PATCH v3 0/4] Cryptodev API/ABI deprecation notices Pablo de Lara
2018-05-17 9:00 4% ` [dpdk-dev] [PATCH v3 1/4] doc: announce ABI change for crypto sym info struct Pablo de Lara
2018-05-18 11:42 4% ` Akhil Goyal
2018-05-17 9:00 4% ` [dpdk-dev] [PATCH v3 2/4] doc: announce ABI change for crypto " Pablo de Lara
2018-05-17 11:18 4% ` Trahe, Fiona
2018-05-18 11:41 4% ` Akhil Goyal
2018-05-21 11:06 8% ` [dpdk-dev] [PATCH v4 0/6] Cryptodev API/ABI deprecation notices Pablo de Lara
2018-05-21 11:06 4% ` [dpdk-dev] [PATCH v4 1/6] doc: announce ABI change for crypto sym info struct Pablo de Lara
2018-05-21 11:06 4% ` [dpdk-dev] [PATCH v4 2/6] doc: announce ABI change for crypto " Pablo de Lara
2018-05-21 13:08 8% ` [dpdk-dev] [PATCH v5 0/6] Cryptodev API/ABI deprecation notices Pablo de Lara
2018-05-21 13:08 4% ` [dpdk-dev] [PATCH v5 1/6] doc: announce ABI change for crypto sym info struct Pablo de Lara
2018-05-21 13:08 4% ` [dpdk-dev] [PATCH v5 2/6] doc: announce ABI change for crypto " Pablo de Lara
2018-05-22 14:30 4% ` [dpdk-dev] [PATCH v5 0/6] Cryptodev API/ABI deprecation notices Jain, Deepak K
2018-05-22 14:35 4% ` De Lara Guarch, Pablo
2018-03-28 4:51 [dpdk-dev] [PATCH] eal: add request to map reserved physical memory Ajit Khaparde
2018-04-12 14:35 ` Burakov, Anatoly
2018-04-23 9:23 ` Srinath Mannam
2018-04-27 16:30 ` Scott Branden
2018-04-27 16:49 ` Burakov, Anatoly
2018-06-06 0:18 ` Scott Branden
2018-06-07 12:15 3% ` Burakov, Anatoly
2018-07-09 16:02 0% ` Burakov, Anatoly
2018-07-09 16:12 0% ` Srinath Mannam
2018-07-09 20:44 0% ` Scott Branden
2018-03-29 14:04 [dpdk-dev] [PATCH 0/2] support building ethtool example using meson Bruce Richardson
2018-03-29 14:04 ` [dpdk-dev] [PATCH 1/2] examples/ethtool: add to meson build Bruce Richardson
2018-07-12 7:54 3% ` Thomas Monjalon
2018-07-12 10:46 0% ` Bruce Richardson
2018-04-17 15:21 [dpdk-dev] [PATCH v1] cmdline: rework as a wrapper to libedit Adrien Mazarguil
2018-04-19 15:13 ` [dpdk-dev] [PATCH v2] " Adrien Mazarguil
2018-06-26 13:21 0% ` Olivier Matz
2018-06-27 10:36 0% ` Bruce Richardson
2018-06-27 11:35 0% ` Olivier Matz
2018-05-17 1:26 3% [dpdk-dev] [PATCH V2] librte_hash: new hash del abi to return stored value Vijaya Mohan Guvva
2018-05-17 8:06 7% ` De Lara Guarch, Pablo
2018-05-24 17:47 4% ` Wang, Yipeng1
2018-05-22 14:38 4% [dpdk-dev] [pull-request] next-crypto 18.05-rc5 Pablo de Lara
2018-05-24 18:35 7% [dpdk-dev] [PATCH V2] librte_hash: new hash del abi to return stored value Guvva, Vijaya
2018-05-25 1:58 8% ` Honnappa Nagarahalli
2018-05-25 9:17 5% [dpdk-dev] [PATCH] doc: remove old deprecation notice Kirill Rybalchenko
2018-05-25 9:35 4% [dpdk-dev] Process for removing __rte_experimental Shreyansh Jain
2018-05-25 9:49 0% ` Thomas Monjalon
2018-05-25 10:17 0% ` Luca Boccassi
2018-05-25 11:16 0% ` Shreyansh Jain
2018-05-25 11:23 3% ` Neil Horman
2018-05-25 12:07 28% [dpdk-dev] [PATCH] doc: move and update experimental API description Shreyansh Jain
2018-05-25 12:22 0% ` Luca Boccassi
2018-05-25 15:37 0% ` Ferruh Yigit
2018-05-25 13:38 5% [dpdk-dev] [PATCH] doc: deprecation notice for EAL runtime path changes Anatoly Burakov
2018-05-28 3:31 8% [dpdk-dev] Stable ABI status of rte_meter_[t|s]rtcm_profile_config Andy Green
2018-05-30 0:32 4% ` Andy Green
2018-05-30 9:55 4% ` Singh, Jasvinder
2018-05-30 10:13 4% ` Andy Green
2018-08-01 10:47 4% ` Kevin Traynor
2018-08-01 11:32 4% ` Andy Green
2018-08-01 14:30 4% ` Dumitrescu, Cristian
2018-08-01 14:36 4% ` Kevin Traynor
2018-05-30 11:54 [dpdk-dev] Compilation of MLX5 driver Nitin Katiyar
2018-05-30 13:11 ` Nélio Laranjeiro
2018-05-30 16:45 ` Nitin Katiyar
2018-05-31 5:21 ` Shahaf Shuler
2018-05-31 7:01 4% ` Nitin Katiyar
2018-05-31 8:05 0% ` Nélio Laranjeiro
2018-05-31 9:14 0% ` Nitin Katiyar
2018-05-31 9:53 0% ` Nélio Laranjeiro
2018-05-31 11:44 0% ` Nitin Katiyar
2018-07-02 12:19 0% ` Asaf Sinai
2018-07-02 12:46 0% ` Asaf Sinai
2018-07-02 14:10 0% ` Shahaf Shuler
2018-07-02 14:21 0% ` Asaf Sinai
2018-07-03 7:00 0% ` Asaf Sinai
2018-07-03 11:15 0% ` Shahaf Shuler
2018-07-08 4:57 0% ` Asaf Sinai
2018-05-30 20:25 7% [dpdk-dev] [PATCH v1] doc: update release notes for 18.05 John McNamara
2018-05-30 20:54 12% ` Thomas Monjalon
2018-05-31 10:57 3% [dpdk-dev] [RFC 0/3] Make device mapping more reliable Anatoly Burakov
2018-05-31 15:35 5% [dpdk-dev] [PATCH] eal: move runtime config file to new location Anatoly Burakov
2018-07-13 10:44 9% ` [dpdk-dev] [PATCH v2] " Anatoly Burakov
2018-05-31 21:11 6% [dpdk-dev] [PATCH] doc: add template release notes for 18.08 Thomas Monjalon
2018-06-05 7:50 [dpdk-dev] [PATCH] doc: change tools guide to SPDX license Hemant Agrawal
2018-06-05 7:50 4% ` [dpdk-dev] [PATCH] doc: add SPDX and copyright to rel notes Hemant Agrawal
2018-07-27 4:54 4% ` [dpdk-dev] [PATCH v2] " Hemant Agrawal
2018-06-05 7:50 4% ` [dpdk-dev] [PATCH] doc: add SPDX and copyright to contributing guide Hemant Agrawal
2018-06-07 12:38 [dpdk-dev] [PATCH 00/22] enable hotplug on multi-process Qi Zhang
2018-06-21 2:00 ` [dpdk-dev] [PATCH v2 " Qi Zhang
2018-06-21 2:00 ` [dpdk-dev] [PATCH v2 01/22] eal: introduce one device scan Qi Zhang
2018-06-21 7:56 3% ` Burakov, Anatoly
2018-06-21 2:00 ` [dpdk-dev] [PATCH v2 03/22] ethdev: add function to release port in local process Qi Zhang
2018-06-21 8:06 3% ` Burakov, Anatoly
2018-06-21 8:21 4% ` Thomas Monjalon
2018-06-21 8:21 0% ` Zhang, Qi Z
2018-06-26 7:08 ` [dpdk-dev] [PATCH v4 00/24] enable hotplug on multi-process Qi Zhang
2018-06-26 7:08 ` [dpdk-dev] [PATCH v4 01/24] eal: introduce one device scan Qi Zhang
2018-06-26 11:47 3% ` Burakov, Anatoly
2018-06-26 12:26 0% ` Zhang, Qi Z
2018-06-26 16:33 4% ` Gaëtan Rivet
2018-06-27 12:32 3% ` Zhang, Qi Z
2018-06-28 1:49 2% ` [dpdk-dev] [PATCH v5 00/24] enable hotplug on multi-process Qi Zhang
2018-06-28 1:50 4% ` [dpdk-dev] [PATCH v6 19/19] doc: update release notes for multi process hotplug Qi Zhang
2018-06-28 1:52 2% ` [dpdk-dev] [PATCH v6 00/19] enable hotplug on multi-process Qi Zhang
2018-06-28 1:52 4% ` [dpdk-dev] [PATCH v6 19/19] doc: update release notes for multi process hotplug Qi Zhang
2018-06-28 9:39 0% ` Burakov, Anatoly
2018-06-28 12:21 0% ` Zhang, Qi Z
2018-06-28 12:56 1% ` [dpdk-dev] [PATCH v7 00/19] enable hotplug on multi-process Qi Zhang
2018-06-28 12:57 4% ` [dpdk-dev] [PATCH v7 19/19] doc: update release notes for multi process hotplug Qi Zhang
2018-07-02 5:44 1% ` [dpdk-dev] [PATCH v8 00/19] enable hotplug on multi-process Qi Zhang
2018-07-02 5:44 4% ` [dpdk-dev] [PATCH v8 19/19] doc: update release notes for multi process hotplug Qi Zhang
2018-07-06 14:18 2% ` [dpdk-dev] [PATCH v9 00/19] enable hotplug on multi-process Qi Zhang
2018-07-06 14:18 4% ` [dpdk-dev] [PATCH v9 19/19] doc: update release notes for multi process hotplug Qi Zhang
2018-07-09 3:36 1% ` [dpdk-dev] [PATCH v10 00/19] enable hotplug on multi-process Qi Zhang
2018-07-09 3:36 ` [dpdk-dev] [PATCH v10 05/19] eal: " Qi Zhang
2018-07-10 14:00 ` Burakov, Anatoly
2018-07-11 1:25 ` Zhang, Qi Z
2018-07-11 2:11 ` Zhang, Qi Z
2018-07-11 8:39 3% ` Burakov, Anatoly
2018-07-09 3:37 4% ` [dpdk-dev] [PATCH v10 19/19] doc: update release notes for multi process hotplug Qi Zhang
2018-07-11 3:08 1% ` [dpdk-dev] [PATCH v11 00/19] enable hotplug on multi-process Qi Zhang
2018-07-11 3:09 4% ` [dpdk-dev] [PATCH v11 19/19] doc: update release notes for multi process hotplug Qi Zhang
2018-07-11 13:47 1% ` [dpdk-dev] [PATCH v12 00/19] enable hotplug on multi-process Qi Zhang
2018-07-11 13:48 4% ` [dpdk-dev] [PATCH v12 19/19] doc: update release notes for multi process hotplug Qi Zhang
2018-07-12 1:14 1% ` [dpdk-dev] [PATCH v12 00/19] enable hotplug on multi-process Qi Zhang
2018-07-12 1:15 4% ` [dpdk-dev] [PATCH v13 19/19] doc: update release notes for multi process hotplug Qi Zhang
2018-07-12 1:18 1% ` [dpdk-dev] [PATCH v12 00/19] enable hotplug on multi-process Qi Zhang
2018-07-12 1:18 1% ` [dpdk-dev] [PATCH v13 " Qi Zhang
2018-06-08 8:42 [dpdk-dev] [PATCH 0/3] bpf: extend validation of input BPF programs Konstantin Ananyev
2018-06-08 8:42 2% ` [dpdk-dev] [PATCH 1/3] bpf: add extra information for external symbol definitions Konstantin Ananyev
2018-06-08 22:02 [dpdk-dev] [PATCH 0/6] Cryptodev API changes Pablo de Lara
2018-06-08 22:02 4% ` [dpdk-dev] [PATCH 1/6] cryptodev: replace bus specific struct with generic dev Pablo de Lara
2018-06-08 22:02 1% ` [dpdk-dev] [PATCH 3/6] cryptodev: remove max number of sessions Pablo de Lara
2018-06-12 11:37 0% ` Tomasz Duszynski
2018-06-08 22:02 2% ` [dpdk-dev] [PATCH 4/6] cryptodev: remove queue start/stop functions Pablo de Lara
2018-06-08 22:02 4% ` [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session size functions Pablo de Lara
2018-06-21 12:59 0% ` Akhil Goyal
2018-06-22 17:02 0% ` Verma, Shally
2018-06-25 16:40 0% ` De Lara Guarch, Pablo
2018-06-26 5:28 0% ` Verma, Shally
2018-06-26 8:17 0% ` De Lara Guarch, Pablo
2018-06-08 22:02 3% ` [dpdk-dev] [PATCH 6/6] cryptodev: replace mbuf scatter gather flag Pablo de Lara
2018-06-25 8:48 ` [dpdk-dev] [PATCH v2 00/15] Cryptodev API changes for 18.08 Pablo de Lara
2018-06-25 8:48 4% ` [dpdk-dev] [PATCH v2 01/15] cryptodev: replace bus specific struct with generic dev Pablo de Lara
2018-06-25 8:48 4% ` [dpdk-dev] [PATCH v2 08/15] cryptodev: define value for unlimited sessions Pablo de Lara
2018-06-25 8:48 2% ` [dpdk-dev] [PATCH v2 11/15] cryptodev: remove queue start/stop functions Pablo de Lara
2018-06-25 8:48 4% ` [dpdk-dev] [PATCH v2 12/15] cryptodev: remove old get session size functions Pablo de Lara
2018-06-25 8:48 3% ` [dpdk-dev] [PATCH v2 13/15] cryptodev: replace mbuf scatter gather flag Pablo de Lara
2018-06-28 0:52 ` [dpdk-dev] [PATCH v3 00/16] Cryptodev API changes for 18.08 Pablo de Lara
2018-06-28 0:52 4% ` [dpdk-dev] [PATCH v3 01/16] cryptodev: replace bus specific struct with generic dev Pablo de Lara
2018-06-28 0:52 4% ` [dpdk-dev] [PATCH v3 08/16] cryptodev: define value for unlimited sessions Pablo de Lara
2018-06-28 0:52 2% ` [dpdk-dev] [PATCH v3 11/16] cryptodev: remove queue start/stop functions Pablo de Lara
2018-06-28 0:53 4% ` [dpdk-dev] [PATCH v3 12/16] cryptodev: remove old get session size functions Pablo de Lara
2018-06-28 0:53 3% ` [dpdk-dev] [PATCH v3 13/16] cryptodev: replace mbuf scatter gather flag Pablo de Lara
2018-07-04 12:57 0% ` Akhil Goyal
2018-07-04 8:51 ` [dpdk-dev] [PATCH v4 00/16] Cryptodev API changes Pablo de Lara
2018-07-04 8:51 4% ` [dpdk-dev] [PATCH v4 01/16] cryptodev: replace bus specific struct with generic dev Pablo de Lara
2018-07-04 8:51 4% ` [dpdk-dev] [PATCH v4 08/16] cryptodev: define value for unlimited sessions Pablo de Lara
2018-07-04 8:51 2% ` [dpdk-dev] [PATCH v4 11/16] cryptodev: remove queue start/stop functions Pablo de Lara
2018-07-04 8:51 4% ` [dpdk-dev] [PATCH v4 12/16] cryptodev: remove old get session size functions Pablo de Lara
2018-07-04 8:51 3% ` [dpdk-dev] [PATCH v4 13/16] cryptodev: replace mbuf scatter gather flag Pablo de Lara
2018-07-05 2:07 ` [dpdk-dev] [PATCH v5 00/16] Cryptodev API changes Pablo de Lara
2018-07-05 2:07 4% ` [dpdk-dev] [PATCH v5 01/16] cryptodev: replace bus specific struct with generic dev Pablo de Lara
2018-07-05 2:07 4% ` [dpdk-dev] [PATCH v5 08/16] cryptodev: define value for unlimited sessions Pablo de Lara
2018-07-05 2:08 2% ` [dpdk-dev] [PATCH v5 11/16] cryptodev: remove queue start/stop functions Pablo de Lara
2018-07-05 2:08 4% ` [dpdk-dev] [PATCH v5 12/16] cryptodev: remove old get session size functions Pablo de Lara
2018-07-05 2:08 2% ` [dpdk-dev] [PATCH v5 13/16] cryptodev: replace mbuf scatter gather flag Pablo de Lara
2018-06-13 9:36 8% [dpdk-dev] [PATCH] cryptodev: fix ABI breakage Pablo de Lara
2018-06-13 9:50 4% ` Ananyev, Konstantin
2018-06-13 10:00 4% ` Gujjar, Abhinandan S
2018-06-27 21:14 4% ` De Lara Guarch, Pablo
2018-06-17 3:13 [dpdk-dev] [PATCH v2 0/3] Support UDP/IPv4 GSO Jiayu Hu
2018-06-22 5:54 ` [dpdk-dev] [PATCH v3 " Jiayu Hu
2018-06-22 5:54 ` [dpdk-dev] [PATCH v3 1/3] gso: support UDP/IPv4 fragmentation Jiayu Hu
2018-06-26 23:58 ` Ophir Munk
2018-06-27 2:28 3% ` Hu, Jiayu
2018-06-27 5:05 3% ` Hu, Jiayu
2018-06-19 6:26 [dpdk-dev] [PATCH 0/2] add head/tailroom requirement for crypto PMDs Anoob Joseph
2018-06-19 6:26 ` [dpdk-dev] [PATCH 1/2] cryptodev: add min headroom and tailroom requirement Anoob Joseph
2018-06-21 14:24 ` Akhil Goyal
2018-06-22 6:52 3% ` Joseph, Anoob
2018-06-22 10:03 0% ` Akhil Goyal
2018-07-04 13:55 ` [dpdk-dev] [PATCH v1 0/3] add head/tailroom requirement for crypto PMDs Anoob Joseph
2018-07-04 13:55 5% ` [dpdk-dev] [PATCH v1 1/3] cryptodev: add min headroom and tailroom requirement Anoob Joseph
2018-07-10 10:26 0% ` De Lara Guarch, Pablo
2018-07-10 10:50 0% ` Anoob Joseph
2018-07-10 14:42 ` [dpdk-dev] [PATCH v2 0/4] add head/tailroom requirement for crypto PMDs Anoob Joseph
2018-07-10 14:42 5% ` [dpdk-dev] [PATCH v2 1/4] cryptodev: add min headroom and tailroom requirement Anoob Joseph
2018-06-22 16:37 [dpdk-dev] DPDK 18.05 only works with up to 4 NUMAs systems Kumar, Ravi1
2018-06-25 16:16 ` Burakov, Anatoly
2018-06-28 7:03 ` Kumar, Ravi1
2018-06-28 8:42 3% ` Burakov, Anatoly
2018-07-14 9:44 0% ` Kumar, Ravi1
2018-06-26 9:12 [dpdk-dev] [PATCH 1/2] eal: remove deprecated function returning mbuf pool ops name Olivier Matz
2018-06-26 9:56 ` [dpdk-dev] [PATCH v2 " Olivier Matz
2018-07-26 21:42 3% ` Thomas Monjalon
2018-06-27 5:50 4% [dpdk-dev] [PATCH 1/2] compressdev: replace mbuf scatter gather flag Pablo de Lara
2018-06-27 12:16 4% ` [dpdk-dev] [PATCH v2 " Pablo de Lara
2018-06-29 10:08 0% ` Trahe, Fiona
2018-07-04 14:10 ` [dpdk-dev] [PATCH v3 1/4] doc: cleanup ISA-L PMD feature matrix Pablo de Lara
2018-07-04 14:10 3% ` [dpdk-dev] [PATCH v3 3/4] compressdev: replace mbuf scatter gather flag Pablo de Lara
2018-07-05 8:38 0% ` Verma, Shally
2018-07-06 2:54 ` [dpdk-dev] [PATCH v4 1/4] doc: cleanup ISA-L PMD feature matrix Pablo de Lara
2018-07-06 2:54 3% ` [dpdk-dev] [PATCH v4 3/4] compressdev: replace mbuf scatter gather flag Pablo de Lara
2018-07-06 12:33 0% ` Verma, Shally
2018-07-06 5:27 ` [dpdk-dev] [PATCH v5 1/4] doc: cleanup ISA-L PMD feature matrix Pablo de Lara
2018-07-06 5:28 3% ` [dpdk-dev] [PATCH v5 3/4] compressdev: replace mbuf scatter gather flag Pablo de Lara
2018-07-04 7:54 11% [dpdk-dev] [PATCH] security: remove experimental tag from security APIs Hemant Agrawal
2018-07-04 9:05 11% ` [dpdk-dev] [PATCH v2] " Hemant Agrawal
2018-07-06 6:42 [dpdk-dev] [PATCH 1/4] eventdev: add eth Tx adapter APIs Nikhil Rao
2018-07-10 12:17 3% ` Jerin Jacob
2018-07-16 8:34 0% ` Rao, Nikhil
2018-07-06 13:17 [dpdk-dev] [RFC 00/11] Support externally allocated memory in DPDK Anatoly Burakov
2018-07-13 17:10 2% ` Burakov, Anatoly
2018-07-13 17:56 0% ` Wiles, Keith
2018-07-19 10:58 0% ` László Vadkerti
2018-07-26 13:48 0% ` Burakov, Anatoly
2018-07-06 13:39 3% [dpdk-dev] [PATCH] cryptodev: rename experimental private data APIs Fiona Trahe
2018-07-09 7:34 0% ` Gujjar, Abhinandan S
2018-07-10 6:29 0% ` Gujjar, Abhinandan S
2018-07-11 10:59 [dpdk-dev] [PATCH 1/2] mempool: remove deprecated functions Andrew Rybchenko
2018-07-26 21:34 3% ` Thomas Monjalon
2018-07-27 13:45 0% ` Andrew Rybchenko
2018-07-27 14:38 0% ` Thomas Monjalon
2018-07-13 10:27 [dpdk-dev] [PATCH v2 0/9] Support running DPDK without hugetlbfs mountpoint Anatoly Burakov
2018-06-01 17:15 ` [dpdk-dev] [PATCH " Anatoly Burakov
2018-06-01 17:15 5% ` [dpdk-dev] [PATCH 8/9] doc: add deprecation notice for EAL command line options Anatoly Burakov
2018-07-13 10:27 5% ` [dpdk-dev] [PATCH v2 " Anatoly Burakov
2018-07-18 21:06 3% [dpdk-dev] [PATCH] devtools: fix symbol check for filename with space Thomas Monjalon
2018-07-18 21:26 3% ` [dpdk-dev] [PATCH v2] " Thomas Monjalon
2018-07-19 11:14 0% ` Neil Horman
2018-07-19 12:09 0% ` Thomas Monjalon
2018-07-19 15:37 0% ` Neil Horman
2018-07-20 9:37 0% ` Thomas Monjalon
2018-07-20 11:41 3% [dpdk-dev] [PATCH] devtools: fix checkpatch " Thomas Monjalon
2018-07-20 18:25 0% ` Neil Horman
2018-07-20 20:56 0% ` Thomas Monjalon
2018-07-27 13:46 2% [dpdk-dev] [PATCH v2 1/2] mempool: remove deprecated functions Andrew Rybchenko
2018-07-31 15:14 3% [dpdk-dev] [PATCH] devtools: check_symbol_change requires bash Stephen Hemminger
2018-08-01 5:22 3% [dpdk-dev] [PATCH] devtools: trap SIGINT is not recognizable to dash Gavin Hu
2018-08-01 10:40 0% ` [dpdk-dev] [dpdk-stable] " Mcnamara, John
2018-08-01 13:09 0% ` Varghese, Vipin
2018-08-01 14:37 0% ` Thomas Monjalon
2018-08-01 12:07 13% [dpdk-dev] [PATCH] doc: add deprecation notice on external memory support Anatoly Burakov
2018-08-01 12:20 0% ` Wiles, Keith
2018-08-02 2:37 0% ` Wang, Zhihong
2018-08-02 3:38 0% ` Jerin Jacob
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).