diff mbox series

[v8,06/16] crypto/mlx5: add dev stop and start operations

Message ID 20210715164126.54073-7-shirik@nvidia.com (mailing list archive)
State Changes Requested, archived
Delegated to: akhil goyal
Headers show
Series drivers: introduce mlx5 crypto PMD | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Shiri Kuzin July 15, 2021, 4:41 p.m. UTC
Add the dev_start function that is used to start a configured device.
Add the dev_stop function that is used to stop a configured device.

Both functions set the dev parameter as used and return 0.

Signed-off-by: Shiri Kuzin <shirik@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/crypto/mlx5/mlx5_crypto.c | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

Comments

Akhil Goyal July 16, 2021, 7:44 p.m. UTC | #1
> Add the dev_start function that is used to start a configured device.
> Add the dev_stop function that is used to stop a configured device.
> 
> Both functions set the dev parameter as used and return 0.
> 
> Signed-off-by: Shiri Kuzin <shirik@nvidia.com>
> Acked-by: Matan Azrad <matan@nvidia.com>
> ---
>  drivers/crypto/mlx5/mlx5_crypto.c | 17 +++++++++++++++--
>  1 file changed, 15 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/crypto/mlx5/mlx5_crypto.c
> b/drivers/crypto/mlx5/mlx5_crypto.c
> index ebaa65c7a9..37e66cf57b 100644
> --- a/drivers/crypto/mlx5/mlx5_crypto.c
> +++ b/drivers/crypto/mlx5/mlx5_crypto.c
> @@ -131,6 +131,19 @@ mlx5_crypto_dev_configure(struct rte_cryptodev
> *dev,
>  	return 0;
>  }
> 
> +static void
> +mlx5_crypto_dev_stop(struct rte_cryptodev *dev)
> +{
> +	RTE_SET_USED(dev);
> +}
> +
> +static int
> +mlx5_crypto_dev_start(struct rte_cryptodev *dev)
> +{
> +	RTE_SET_USED(dev);
> +	return 0;
> +}
> +
>  static int
>  mlx5_crypto_dev_close(struct rte_cryptodev *dev)
>  {
> @@ -360,8 +373,8 @@ mlx5_crypto_queue_pair_setup(struct rte_cryptodev
> *dev, uint16_t qp_id,
> 
>  static struct rte_cryptodev_ops mlx5_crypto_ops = {
>  	.dev_configure			= mlx5_crypto_dev_configure,
> -	.dev_start			= NULL,
> -	.dev_stop			= NULL,
> +	.dev_start			= mlx5_crypto_dev_start,
> +	.dev_stop			= mlx5_crypto_dev_stop,
>  	.dev_close			= mlx5_crypto_dev_close,
>  	.dev_infos_get			= mlx5_crypto_dev_infos_get,
>  	.stats_get			= NULL,


This patch could be squashed in your basic operations patch as these ops are not doing 
Anything.
Suanming Mou July 20, 2021, 9:08 a.m. UTC | #2
> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Saturday, July 17, 2021 3:45 AM
> To: Shiri Kuzin <shirik@nvidia.com>; dev@dpdk.org
> Cc: Matan Azrad <matan@nvidia.com>; Suanming Mou
> <suanmingm@nvidia.com>; david.marchand@redhat.com
> Subject: RE: [EXT] [PATCH v8 06/16] crypto/mlx5: add dev stop and start
> operations
> 
> > Add the dev_start function that is used to start a configured device.
> > Add the dev_stop function that is used to stop a configured device.
> >
> > Both functions set the dev parameter as used and return 0.
> >
> > Signed-off-by: Shiri Kuzin <shirik@nvidia.com>
> > Acked-by: Matan Azrad <matan@nvidia.com>
> > ---
> >  drivers/crypto/mlx5/mlx5_crypto.c | 17 +++++++++++++++--
> >  1 file changed, 15 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/crypto/mlx5/mlx5_crypto.c
> > b/drivers/crypto/mlx5/mlx5_crypto.c
> > index ebaa65c7a9..37e66cf57b 100644
> > --- a/drivers/crypto/mlx5/mlx5_crypto.c
> > +++ b/drivers/crypto/mlx5/mlx5_crypto.c
> > @@ -131,6 +131,19 @@ mlx5_crypto_dev_configure(struct rte_cryptodev
> > *dev,
> >  	return 0;
> >  }
> >
> > +static void
> > +mlx5_crypto_dev_stop(struct rte_cryptodev *dev) {
> > +	RTE_SET_USED(dev);
> > +}
> > +
> > +static int
> > +mlx5_crypto_dev_start(struct rte_cryptodev *dev) {
> > +	RTE_SET_USED(dev);
> > +	return 0;
> > +}
> > +
> >  static int
> >  mlx5_crypto_dev_close(struct rte_cryptodev *dev)  { @@ -360,8 +373,8
> > @@ mlx5_crypto_queue_pair_setup(struct rte_cryptodev *dev, uint16_t
> > qp_id,
> >
> >  static struct rte_cryptodev_ops mlx5_crypto_ops = {
> >  	.dev_configure			= mlx5_crypto_dev_configure,
> > -	.dev_start			= NULL,
> > -	.dev_stop			= NULL,
> > +	.dev_start			= mlx5_crypto_dev_start,
> > +	.dev_stop			= mlx5_crypto_dev_stop,
> >  	.dev_close			= mlx5_crypto_dev_close,
> >  	.dev_infos_get			= mlx5_crypto_dev_infos_get,
> >  	.stats_get			= NULL,
> 
> 
> This patch could be squashed in your basic operations patch as these ops are not
> doing Anything.

OK, good suggestion.
diff mbox series

Patch

diff --git a/drivers/crypto/mlx5/mlx5_crypto.c b/drivers/crypto/mlx5/mlx5_crypto.c
index ebaa65c7a9..37e66cf57b 100644
--- a/drivers/crypto/mlx5/mlx5_crypto.c
+++ b/drivers/crypto/mlx5/mlx5_crypto.c
@@ -131,6 +131,19 @@  mlx5_crypto_dev_configure(struct rte_cryptodev *dev,
 	return 0;
 }
 
+static void
+mlx5_crypto_dev_stop(struct rte_cryptodev *dev)
+{
+	RTE_SET_USED(dev);
+}
+
+static int
+mlx5_crypto_dev_start(struct rte_cryptodev *dev)
+{
+	RTE_SET_USED(dev);
+	return 0;
+}
+
 static int
 mlx5_crypto_dev_close(struct rte_cryptodev *dev)
 {
@@ -360,8 +373,8 @@  mlx5_crypto_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 
 static struct rte_cryptodev_ops mlx5_crypto_ops = {
 	.dev_configure			= mlx5_crypto_dev_configure,
-	.dev_start			= NULL,
-	.dev_stop			= NULL,
+	.dev_start			= mlx5_crypto_dev_start,
+	.dev_stop			= mlx5_crypto_dev_stop,
 	.dev_close			= mlx5_crypto_dev_close,
 	.dev_infos_get			= mlx5_crypto_dev_infos_get,
 	.stats_get			= NULL,