DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tomasz Duszynski <tdu@semihalf.com>
To: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Cc: declan.doherty@intel.com, akhil.goyal@nxp.com,
	shally.verma@caviumnetworks.com, ravi1.kumar@amd.com,
	jerin.jacob@caviumnetworks.com, roy.fan.zhang@intel.com,
	fiona.trahe@intel.com, tdu@semihalf.com, jianjay.zhou@huawei.com,
	dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v3 09/16] cryptodev: remove max number of sessions parameter
Date: Fri, 29 Jun 2018 10:04:13 +0200	[thread overview]
Message-ID: <20180629080413.GB23243@sh> (raw)
In-Reply-To: <20180628005304.26544-10-pablo.de.lara.guarch@intel.com>

Hello Pablo,

On Thu, Jun 28, 2018 at 01:52:57AM +0100, Pablo de Lara wrote:
> Most crypto PMDs do not have a limitation
> of the number of the sessions that can be handled
> internally. The value that was set before was not
> actually used at all, since the sessions are created
> at the application level.
> Therefore, this value is not parsed from the initial
> crypto parameters anymore and it is set to 0,
> meaning that there is no actual limit.
>

[...]

> diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
> index 3f8de37b7..07850098b 100644
> --- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
> +++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
> @@ -471,7 +471,8 @@ 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;
> +		/* No limit of number of sessions */
> +		dev_info->sym.max_nb_sessions = 0;

In this case we want to set a limit, right?

>  	}
>  }
>
> diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
> index 052b6546c..478ac0b62 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;
>  }
> @@ -195,8 +194,7 @@ 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
> +		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
>  	};
>  	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..2842498af 100644
> --- a/drivers/crypto/null/null_crypto_pmd_ops.c
> +++ b/drivers/crypto/null/null_crypto_pmd_ops.c
> @@ -121,7 +121,8 @@ 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;
> +		/* No limit of number of sessions */
> +		dev_info->sym.max_nb_sessions = 0;
>  		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..972e2adfe 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;
>
> @@ -1686,8 +1685,7 @@ 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
> +		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
>  	};
>  	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..d194e3657 100644
> --- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
> +++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
> @@ -547,7 +547,8 @@ 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;
> +		/* No limit of number of sessions */
> +		dev_info->sym.max_nb_sessions = 0;
>  	}
>  }
>
> 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_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
> index 0bc042a75..84dd5bec8 100644
> --- a/drivers/crypto/qat/qat_sym_pmd.c
> +++ b/drivers/crypto/qat/qat_sym_pmd.c
> @@ -72,8 +72,9 @@ static void qat_sym_dev_info_get(struct rte_cryptodev *dev,
>  			qat_qps_per_service(sym_hw_qps, QAT_SERVICE_SYMMETRIC);
>  		info->feature_flags = dev->feature_flags;
>  		info->capabilities = internals->qat_dev_capabilities;
> -		info->sym.max_nb_sessions = QAT_SYM_PMD_MAX_NB_SESSIONS;
>  		info->driver_id = cryptodev_qat_driver_id;
> +		/* No limit of number of sessions */
> +		info->sym.max_nb_sessions = 0;
>  	}
>  }
>
> @@ -243,8 +244,7 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev)
>  	struct rte_cryptodev_pmd_init_params init_params = {
>  			.name = "",
>  			.socket_id = qat_pci_dev->pci_dev->device.numa_node,
> -			.private_data_size = sizeof(struct qat_sym_dev_private),
> -			.max_nb_sessions = QAT_SYM_PMD_MAX_NB_SESSIONS
> +			.private_data_size = sizeof(struct qat_sym_dev_private)
>  	};
>  	char name[RTE_CRYPTODEV_NAME_MAX_LEN];
>  	struct rte_cryptodev *cryptodev;
> diff --git a/drivers/crypto/qat/qat_sym_pmd.h b/drivers/crypto/qat/qat_sym_pmd.h
> index 439aeb98a..d34328544 100644
> --- a/drivers/crypto/qat/qat_sym_pmd.h
> +++ b/drivers/crypto/qat/qat_sym_pmd.h
> @@ -14,7 +14,6 @@
>
>  /**< Intel(R) QAT Symmetric Crypto PMD device name */
>  #define CRYPTODEV_NAME_QAT_SYM_PMD	crypto_qat
> -#define QAT_SYM_PMD_MAX_NB_SESSIONS	2048
>
>  extern uint8_t cryptodev_qat_driver_id;
>
> 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,
> -				&params->def_p.max_nb_sessions);
> -		if (ret < 0)
> -			goto free_kvlist;
> -
>  		ret = rte_kvargs_process(kvlist, RTE_CRYPTODEV_VDEV_SOCKET_ID,
>  				&parse_integer_arg,
>  				&params->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..16a8021c8 100644
> --- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
> +++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
> @@ -321,8 +321,7 @@ 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 max_nb_sess = 0;
>  	uint32_t i;
>
>  	if (!dev_info)
> @@ -338,17 +337,18 @@ 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;
> +		uint32_t dev_max_sess = slave_info.sym.max_nb_sessions;
> +		if (dev_max_sess != 0) {
> +			if (max_nb_sess == 0 ||	dev_max_sess < max_nb_sess)
> +				max_nb_sess = slave_info.sym.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;
> +	dev_info->sym.max_nb_sessions = max_nb_sess;
>  }
>
>  /** Release queue pair */
> diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
> index 72751e35e..26dfbbc38 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:
> @@ -573,8 +572,7 @@ 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
> +		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_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..6f8b9e2c6 100644
> --- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
> +++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
> @@ -130,7 +130,8 @@ 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;
> +		/* No limit of number of sessions */
> +		dev_info->sym.max_nb_sessions = 0;
>  		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..1da4ae871 100644
> --- a/drivers/crypto/virtio/virtio_cryptodev.c
> +++ b/drivers/crypto/virtio/virtio_cryptodev.c
> @@ -1411,8 +1411,8 @@ 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;
> +		/* No limit of number of sessions */
> +		info->sym.max_nb_sessions = 0;
>  		info->capabilities = hw->virtio_dev_capabilities;
>  	}
>  }
> @@ -1425,8 +1425,7 @@ crypto_virtio_pci_probe(
>  	struct rte_cryptodev_pmd_init_params init_params = {
>  		.name = "",
>  		.socket_id = rte_socket_id(),
> -		.private_data_size = sizeof(struct virtio_crypto_hw),
> -		.max_nb_sessions = RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS
> +		.private_data_size = sizeof(struct virtio_crypto_hw)
>  	};
>  	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..b39e35b9f 100644
> --- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c
> +++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
> @@ -130,7 +130,8 @@ 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;
> +		/* No limit of number of sessions */
> +		dev_info->sym.max_nb_sessions = 0;
>  		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_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,
> -				&params->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 db8b97665..1fb7e7d5e 100644
> --- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
> +++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
> @@ -32,18 +32,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
>  };
>
> @@ -56,7 +53,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 */
> --
> 2.14.4
>

--
- Tomasz Duszyński

  reply	other threads:[~2018-06-29  8:04 UTC|newest]

Thread overview: 135+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-08 22:02 [dpdk-dev] [PATCH 0/6] Cryptodev API changes Pablo de Lara
2018-06-08 22:02 ` [dpdk-dev] [PATCH 1/6] cryptodev: replace bus specific struct with generic dev Pablo de Lara
2018-06-21 12:43   ` Akhil Goyal
2018-06-08 22:02 ` [dpdk-dev] [PATCH 2/6] cryptodev: remove max number of sessions per queue Pablo de Lara
2018-06-21 13:03   ` Akhil Goyal
2018-06-08 22:02 ` [dpdk-dev] [PATCH 3/6] cryptodev: remove max number of sessions Pablo de Lara
2018-06-12 11:37   ` Tomasz Duszynski
2018-06-12 13:53     ` De Lara Guarch, Pablo
2018-06-13  6:11       ` Tomasz Duszynski
2018-06-13  8:23         ` De Lara Guarch, Pablo
2018-06-13 10:11           ` Tomasz Duszynski
2018-06-19 13:20             ` Trahe, Fiona
2018-06-25 16:42               ` De Lara Guarch, Pablo
2018-06-08 22:02 ` [dpdk-dev] [PATCH 4/6] cryptodev: remove queue start/stop functions Pablo de Lara
2018-06-21 12:50   ` Akhil Goyal
2018-06-08 22:02 ` [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session size functions Pablo de Lara
2018-06-21 12:59   ` Akhil Goyal
2018-06-22 17:02     ` Verma, Shally
2018-06-25 16:40       ` De Lara Guarch, Pablo
2018-06-26  5:28         ` Verma, Shally
2018-06-26  8:17           ` De Lara Guarch, Pablo
2018-06-08 22:02 ` [dpdk-dev] [PATCH 6/6] cryptodev: replace mbuf scatter gather flag Pablo de Lara
2018-06-18  6:29   ` Akhil Goyal
2018-06-25 16:43     ` De Lara Guarch, Pablo
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   ` [dpdk-dev] [PATCH v2 01/15] cryptodev: replace bus specific struct with generic dev Pablo de Lara
2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 02/15] cryptodev: remove max number of sessions per queue Pablo de Lara
2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 03/15] app/crypto-perf: limit number of sessions Pablo de Lara
2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 04/15] test/crypto: " Pablo de Lara
2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 05/15] examples/l2fwd-crypto: " Pablo de Lara
2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 06/15] examples/ipsec-secgw: check for max supported sessions Pablo de Lara
2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 07/15] crypto/mvsam: parse max number of sessions Pablo de Lara
2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 08/15] cryptodev: define value for unlimited sessions Pablo de Lara
2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 09/15] cryptodev: remove max number of sessions parameter Pablo de Lara
2018-06-29  8:02     ` Tomasz Duszynski
2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 10/15] doc: remove unneeded deprecation notice Pablo de Lara
2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 11/15] cryptodev: remove queue start/stop functions Pablo de Lara
2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 12/15] cryptodev: remove old get session size functions Pablo de Lara
2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 13/15] cryptodev: replace mbuf scatter gather flag Pablo de Lara
2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 14/15] cryptodev: remove attach/detach session API Pablo de Lara
2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 15/15] cryptodev: rename PMD symmetric " 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   ` [dpdk-dev] [PATCH v3 01/16] cryptodev: replace bus specific struct with generic dev Pablo de Lara
2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 02/16] cryptodev: remove max number of sessions per queue Pablo de Lara
2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 03/16] app/crypto-perf: limit number of sessions Pablo de Lara
2018-07-04 12:13     ` Akhil Goyal
2018-07-04 12:15     ` Akhil Goyal
2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 04/16] test/crypto: " Pablo de Lara
2018-07-04 12:21     ` Akhil Goyal
2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 05/16] examples/l2fwd-crypto: " Pablo de Lara
2018-07-04 12:04     ` Akhil Goyal
2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 06/16] examples/ipsec-secgw: check for max supported sessions Pablo de Lara
2018-07-04 12:30     ` Akhil Goyal
2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 07/16] crypto/mvsam: parse max number of sessions Pablo de Lara
2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 08/16] cryptodev: define value for unlimited sessions Pablo de Lara
2018-07-04 12:40     ` Akhil Goyal
2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 09/16] cryptodev: remove max number of sessions parameter Pablo de Lara
2018-06-29  8:04     ` Tomasz Duszynski [this message]
2018-07-02 10:58       ` De Lara Guarch, Pablo
2018-07-04 12:42     ` Akhil Goyal
2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 10/16] doc: remove unneeded deprecation notice Pablo de Lara
2018-07-04 11:29     ` Akhil Goyal
2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 11/16] cryptodev: remove queue start/stop functions Pablo de Lara
2018-06-28  0:53   ` [dpdk-dev] [PATCH v3 12/16] cryptodev: remove old get session size functions Pablo de Lara
2018-07-04 11:31     ` Akhil Goyal
2018-06-28  0:53   ` [dpdk-dev] [PATCH v3 13/16] cryptodev: replace mbuf scatter gather flag Pablo de Lara
2018-07-04 12:57     ` Akhil Goyal
2018-07-04 15:53       ` De Lara Guarch, Pablo
2018-06-28  0:53   ` [dpdk-dev] [PATCH v3 14/16] cryptodev: remove attach/detach session API Pablo de Lara
2018-07-04 11:33     ` Akhil Goyal
2018-06-28  0:53   ` [dpdk-dev] [PATCH v3 15/16] cryptodev: rename PMD symmetric " Pablo de Lara
2018-07-04 11:36     ` Akhil Goyal
2018-06-28  0:53   ` [dpdk-dev] [PATCH v3 16/16] cryptodev: check if symmetric sessions are supported Pablo de Lara
2018-06-28 13:40     ` Verma, Shally
2018-06-28 14:15       ` De Lara Guarch, Pablo
2018-07-04 12:27     ` Akhil Goyal
2018-07-04  8:51 ` [dpdk-dev] [PATCH v4 00/16] Cryptodev API changes Pablo de Lara
2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 01/16] cryptodev: replace bus specific struct with generic dev Pablo de Lara
2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 02/16] cryptodev: remove max number of sessions per queue Pablo de Lara
2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 03/16] app/crypto-perf: limit number of sessions Pablo de Lara
2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 04/16] test/crypto: " Pablo de Lara
2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 05/16] examples/l2fwd-crypto: " Pablo de Lara
2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 06/16] examples/ipsec-secgw: check for max supported sessions Pablo de Lara
2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 07/16] crypto/mvsam: parse max number of sessions Pablo de Lara
2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 08/16] cryptodev: define value for unlimited sessions Pablo de Lara
2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 09/16] cryptodev: remove max number of sessions parameter Pablo de Lara
2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 10/16] doc: remove unneeded deprecation notice Pablo de Lara
2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 11/16] cryptodev: remove queue start/stop functions Pablo de Lara
2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 12/16] cryptodev: remove old get session size functions Pablo de Lara
2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 13/16] cryptodev: replace mbuf scatter gather flag Pablo de Lara
2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 14/16] cryptodev: remove attach/detach session API Pablo de Lara
2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 15/16] cryptodev: rename PMD symmetric " Pablo de Lara
2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 16/16] cryptodev: check if symmetric sessions are supported 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   ` [dpdk-dev] [PATCH v5 01/16] cryptodev: replace bus specific struct with generic dev Pablo de Lara
2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 02/16] cryptodev: remove max number of sessions per queue Pablo de Lara
2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 03/16] app/crypto-perf: limit number of sessions Pablo de Lara
2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 04/16] test/crypto: " Pablo de Lara
2018-07-05 11:27     ` Verma, Shally
2018-07-05 11:30       ` Akhil Goyal
2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 05/16] examples/l2fwd-crypto: " Pablo de Lara
2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 06/16] examples/ipsec-secgw: check for max supported sessions Pablo de Lara
2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 07/16] crypto/mvsam: parse max number of sessions Pablo de Lara
2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 08/16] cryptodev: define value for unlimited sessions Pablo de Lara
2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 09/16] cryptodev: remove max number of sessions parameter Pablo de Lara
2018-07-09 10:53     ` De Lara Guarch, Pablo
2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 10/16] doc: remove unneeded deprecation notice Pablo de Lara
2018-07-05  2:08   ` [dpdk-dev] [PATCH v5 11/16] cryptodev: remove queue start/stop functions Pablo de Lara
2018-07-05  2:08   ` [dpdk-dev] [PATCH v5 12/16] cryptodev: remove old get session size functions Pablo de Lara
2018-07-05  2:08   ` [dpdk-dev] [PATCH v5 13/16] cryptodev: replace mbuf scatter gather flag Pablo de Lara
2018-07-05 11:35     ` Akhil Goyal
2018-07-05  2:08   ` [dpdk-dev] [PATCH v5 14/16] cryptodev: remove attach/detach session API Pablo de Lara
2018-07-05  2:08   ` [dpdk-dev] [PATCH v5 15/16] cryptodev: rename PMD symmetric " Pablo de Lara
2018-07-05  2:08   ` [dpdk-dev] [PATCH v5 16/16] cryptodev: check if symmetric sessions are supported Pablo de Lara
2018-07-10  0:36 ` [dpdk-dev] [PATCH v6 00/16] Cryptodev API changes Pablo de Lara
2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 01/16] cryptodev: replace bus specific struct with generic dev Pablo de Lara
2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 02/16] cryptodev: remove max number of sessions per queue Pablo de Lara
2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 03/16] app/crypto-perf: limit number of sessions Pablo de Lara
2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 04/16] test/crypto: " Pablo de Lara
2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 05/16] examples/l2fwd-crypto: " Pablo de Lara
2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 06/16] examples/ipsec-secgw: check for max supported sessions Pablo de Lara
2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 07/16] crypto/mvsam: parse max number of sessions Pablo de Lara
2018-07-10 10:42     ` Tomasz Duszynski
2018-07-10 10:45       ` De Lara Guarch, Pablo
2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 08/16] cryptodev: define value for unlimited sessions Pablo de Lara
2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 09/16] cryptodev: remove max number of sessions parameter Pablo de Lara
2018-07-10  8:46     ` Akhil Goyal
2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 10/16] doc: remove unneeded deprecation notice Pablo de Lara
2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 11/16] cryptodev: remove queue start/stop functions Pablo de Lara
2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 12/16] cryptodev: remove old get session size functions Pablo de Lara
2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 13/16] cryptodev: replace mbuf scatter gather flag Pablo de Lara
2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 14/16] cryptodev: remove attach/detach session API Pablo de Lara
2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 15/16] cryptodev: rename PMD symmetric " Pablo de Lara
2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 16/16] cryptodev: check if symmetric sessions are supported Pablo de Lara
2018-07-10 11:00   ` [dpdk-dev] [PATCH v6 00/16] Cryptodev API changes De Lara Guarch, Pablo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180629080413.GB23243@sh \
    --to=tdu@semihalf.com \
    --cc=akhil.goyal@nxp.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=fiona.trahe@intel.com \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=jianjay.zhou@huawei.com \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=ravi1.kumar@amd.com \
    --cc=roy.fan.zhang@intel.com \
    --cc=shally.verma@caviumnetworks.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).