[dpdk-dev] doc: announce API change in crypto driver allocation
Checks
Commit Message
rte_cryptodev_allocate_driver() function gets one parameter
(rte_driver), as the cryptodev_driver structure is
allocated inside the function with rte_malloc.
This function is called from a constructor function,
when crypto PMDs are registered.
If malloc fails, there is no way to recover from it,
so it is better to allocate this structure
statically, in each PMD.
Therefore, it is required to add an extra parameter in
this function, to also get a pointer to this structure.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
doc/guides/rel_notes/deprecation.rst | 6 ++++++
1 file changed, 6 insertions(+)
Comments
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> Sent: Thursday, August 3, 2017 2:03 AM
> To: thomas@monjalon.net; jerin.jacob@caviumnetworks.com;
> akhil.goyal@nxp.com; hemant.agrawal@nxp.com; Trahe, Fiona
> <fiona.trahe@intel.com>; Jain, Deepak K <deepak.k.jain@intel.com>;
> Griffin, John <john.griffin@intel.com>; Doherty, Declan
> <declan.doherty@intel.com>
> Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Subject: [dpdk-dev] [PATCH] doc: announce API change in crypto driver
> allocation
>
> rte_cryptodev_allocate_driver() function gets one parameter (rte_driver),
> as the cryptodev_driver structure is allocated inside the function with
> rte_malloc.
>
> This function is called from a constructor function, when crypto PMDs are
> registered.
> If malloc fails, there is no way to recover from it, so it is better to
> allocate this structure statically, in each PMD.
>
> Therefore, it is required to add an extra parameter in this function, to
> also get a pointer to this structure.
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
On 8/3/2017 6:32 AM, Pablo de Lara wrote:
> rte_cryptodev_allocate_driver() function gets one parameter
> (rte_driver), as the cryptodev_driver structure is
> allocated inside the function with rte_malloc.
>
> This function is called from a constructor function,
> when crypto PMDs are registered.
> If malloc fails, there is no way to recover from it,
> so it is better to allocate this structure
> statically, in each PMD.
>
> Therefore, it is required to add an extra parameter in
> this function, to also get a pointer to this structure.
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
> doc/guides/rel_notes/deprecation.rst | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> index f6bd910..bd4aa89 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -69,3 +69,9 @@ Deprecation Notices
> be removed in 17.11:
>
> - ``rte_cryptodev_create_vdev``
> +
> +* cryptodev: the following function will have an extra parameter, passing a
> + statically allocated crypto driver structure, instead of calling malloc,
> + in 17.11:
> +
> + - ``rte_cryptodev_allocate_driver``
>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
> -----Original Message-----
> From: De Lara Guarch, Pablo
> Sent: Thursday, August 3, 2017 2:03 AM
> To: thomas@monjalon.net; jerin.jacob@caviumnetworks.com;
> akhil.goyal@nxp.com; hemant.agrawal@nxp.com; Trahe, Fiona
> <fiona.trahe@intel.com>; Jain, Deepak K <deepak.k.jain@intel.com>;
> Griffin, John <john.griffin@intel.com>; Doherty, Declan
> <declan.doherty@intel.com>
> Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Subject: [PATCH] doc: announce API change in crypto driver allocation
>
> rte_cryptodev_allocate_driver() function gets one parameter (rte_driver), as
> the cryptodev_driver structure is allocated inside the function with
> rte_malloc.
>
> This function is called from a constructor function, when crypto PMDs are
> registered.
> If malloc fails, there is no way to recover from it, so it is better to allocate this
> structure statically, in each PMD.
>
> Therefore, it is required to add an extra parameter in this function, to also
> get a pointer to this structure.
>
> - ``rte_cryptodev_create_vdev``
> +
> +* cryptodev: the following function will have an extra parameter,
> +passing a
> + statically allocated crypto driver structure, instead of calling
> +malloc,
> + in 17.11:
> +
> + - ``rte_cryptodev_allocate_driver``
> --
> 2.9.4
Acked-by: Deepak Kumar Jain <Deepak.k.jain@intel.com>
03/08/2017 12:43, Akhil Goyal:
> On 8/3/2017 6:32 AM, Pablo de Lara wrote:
> > rte_cryptodev_allocate_driver() function gets one parameter
> > (rte_driver), as the cryptodev_driver structure is
> > allocated inside the function with rte_malloc.
> >
> > This function is called from a constructor function,
> > when crypto PMDs are registered.
> > If malloc fails, there is no way to recover from it,
> > so it is better to allocate this structure
> > statically, in each PMD.
> >
> > Therefore, it is required to add an extra parameter in
> > this function, to also get a pointer to this structure.
> >
> > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> >
> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Applied, thanks
@@ -69,3 +69,9 @@ Deprecation Notices
be removed in 17.11:
- ``rte_cryptodev_create_vdev``
+
+* cryptodev: the following function will have an extra parameter, passing a
+ statically allocated crypto driver structure, instead of calling malloc,
+ in 17.11:
+
+ - ``rte_cryptodev_allocate_driver``