From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f65.google.com (mail-lf0-f65.google.com [209.85.215.65]) by dpdk.org (Postfix) with ESMTP id 242945B40 for ; Fri, 29 Jun 2018 10:04:15 +0200 (CEST) Received: by mail-lf0-f65.google.com with SMTP id j26-v6so6142850lfb.11 for ; Fri, 29 Jun 2018 01:04:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=ayMQduxJ+DB7Bn+sqtPuiFLb7Y15G1TgtiOlRR/xAxI=; b=Cbt1Ei6X6S5z6acqBa2FS0BiiqvGZh6kBPfMfsfg5Iyd03ZMBkVtJ5neRI0HMOIKtL TIGrsKE0STsLRFpQBVPUtldiBvfWgN5uhAifiZKR3t1YfGUWxLwSN14unsgrPmSynqnt 5+zBmUVrpSH1IvWhh9gF+FqfXBanoZHSTApLo3OmZwyCd44dOU0xt54PMzidWncwKbiu 3pZWI92Hrp0Kuf4XlKiKLfsXI5ff4q+v9NuPy661EtOmjWD0ojP9RvorQyY6cwLBg8hl lM/UZnTEJz6WwGIjWGs21I7xoNPgbS2flsA4kLc+BgowLRooR7aBRPGwoX4sBoZNvCpf wSXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=ayMQduxJ+DB7Bn+sqtPuiFLb7Y15G1TgtiOlRR/xAxI=; b=faW5KKBp61PSM9buMahyDw+hAl9zJHditSmzrdh/WjWIJ6W4xehUADM6l2UaRGohIZ r+Jye0+Jc4NxX347cwI/iegQPT3G1g0u4C/J28BP2tPrB0bLmM+RrJUexbFyLwulRD+9 +seGXR/bdp2SNYzPLfma78quhikkk9YBncY7AC0RHaG2lxq9I/Fza+1yvUZOUVbyA9sQ phUhfBBAeI4RIqAgkzyfVrGC4Ir2lJQIj2XhQJgiwwbhCAzQmFYajU53SdmG11IHYrAm z8DEmjr00qmMNSJdpN2s/Wz4V9by/UMLyLgCqftcEn+fRFKNXujAmFweMq/SVqeUdyII VNJQ== X-Gm-Message-State: APt69E3M74+bZus6UlX6VvbN2G0ytW+PljKdLYCoZqVvFHf/jJ5bIpYv NZwziHmZCU3q+OWMaTFrh7/uHg== X-Google-Smtp-Source: AAOMgpd/B7H3HlB5aUtJadYKVzwYCVRJm1nbxEWPrTP8xJv1AM5yijcI8OBrOb38SBnUPzh36dQHgw== X-Received: by 2002:a19:5d54:: with SMTP id p20-v6mr8773506lfj.143.1530259454691; Fri, 29 Jun 2018 01:04:14 -0700 (PDT) Received: from localhost (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id r75-v6sm1624014lfr.78.2018.06.29.01.04.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Jun 2018 01:04:13 -0700 (PDT) Date: Fri, 29 Jun 2018 10:04:13 +0200 From: Tomasz Duszynski To: Pablo de Lara 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 Message-ID: <20180629080413.GB23243@sh> References: <20180608220234.10170-1-pablo.de.lara.guarch@intel.com> <20180628005304.26544-1-pablo.de.lara.guarch@intel.com> <20180628005304.26544-10-pablo.de.lara.guarch@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20180628005304.26544-10-pablo.de.lara.guarch@intel.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH v3 09/16] cryptodev: remove max number of sessions parameter X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jun 2018 08:04:15 -0000 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/mvs= am/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 =3D dev->feature_flags; > dev_info->capabilities =3D mrvl_crypto_pmd_capabilities; > dev_info->max_nb_queue_pairs =3D internals->max_nb_qpairs; > - dev_info->sym.max_nb_sessions =3D internals->max_nb_sessions; > + /* No limit of number of sessions */ > + dev_info->sym.max_nb_sessions =3D 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 =3D dev->data->dev_private; > > internals->max_nb_qpairs =3D init_params->max_nb_queue_pairs; > - internals->max_nb_sessions =3D 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, crypto= dev_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=3D " > - "max_nb_sessions=3D " > "socket_id=3D"); > RTE_PMD_REGISTER_CRYPTO_DRIVER(null_crypto_drv, cryptodev_null_pmd_drv.d= river, > cryptodev_driver_id); > diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/n= ull/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 !=3D NULL) { > dev_info->driver_id =3D dev->driver_id; > dev_info->max_nb_queue_pairs =3D internals->max_nb_qpairs; > - dev_info->sym.max_nb_sessions =3D internals->max_nb_sessions; > + /* No limit of number of sessions */ > + dev_info->sym.max_nb_sessions =3D 0; > dev_info->feature_flags =3D dev->feature_flags; > dev_info->capabilities =3D null_crypto_pmd_capabilities; > } > diff --git a/drivers/crypto/null/null_crypto_pmd_private.h b/drivers/cryp= to/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/op= enssl/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 =3D dev->data->dev_private; > > internals->max_nb_qpairs =3D init_params->max_nb_queue_pairs; > - internals->max_nb_sessions =3D init_params->max_nb_sessions; > > return 0; > > @@ -1686,8 +1685,7 @@ cryptodev_openssl_probe(struct rte_vdev_device *vde= v) > "", > 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=3D " > - "max_nb_sessions=3D " > "socket_id=3D"); > 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/crypt= o/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 =3D dev->feature_flags; > dev_info->capabilities =3D openssl_pmd_capabilities; > dev_info->max_nb_queue_pairs =3D internals->max_nb_qpairs; > - dev_info->sym.max_nb_sessions =3D internals->max_nb_sessions; > + /* No limit of number of sessions */ > + dev_info->sym.max_nb_sessions =3D 0; > } > } > > diff --git a/drivers/crypto/openssl/rte_openssl_pmd_private.h b/drivers/c= rypto/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_sy= m_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 =3D dev->feature_flags; > info->capabilities =3D internals->qat_dev_capabilities; > - info->sym.max_nb_sessions =3D QAT_SYM_PMD_MAX_NB_SESSIONS; > info->driver_id =3D cryptodev_qat_driver_id; > + /* No limit of number of sessions */ > + info->sym.max_nb_sessions =3D 0; > } > } > > @@ -243,8 +244,7 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev) > struct rte_cryptodev_pmd_init_params init_params =3D { > .name =3D "", > .socket_id =3D qat_pci_dev->pci_dev->device.numa_node, > - .private_data_size =3D sizeof(struct qat_sym_dev_private), > - .max_nb_sessions =3D QAT_SYM_PMD_MAX_NB_SESSIONS > + .private_data_size =3D 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_sy= m_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/sc= heduler/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[] =3D { > 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_pa= rams *params, > if (ret < 0) > goto free_kvlist; > > - ret =3D 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 =3D 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 *vde= v) > "", > 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 =3D 0, > .mode =3D 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=3D " > - "max_nb_sessions=3D " > "socket_id=3D " > "slave=3D"); > RTE_PMD_REGISTER_CRYPTO_DRIVER(scheduler_crypto_drv, > diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypt= o/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 =3D dev->data->dev_private; > - uint32_t max_nb_sessions =3D sched_ctx->nb_slaves ? > - UINT32_MAX : RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS; > + uint32_t max_nb_sess =3D 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 =3D slave_info.sym.max_nb_sessions < > - max_nb_sessions ? > - slave_info.sym.max_nb_sessions : > - max_nb_sessions; > + uint32_t dev_max_sess =3D slave_info.sym.max_nb_sessions; > + if (dev_max_sess !=3D 0) { > + if (max_nb_sess =3D=3D 0 || dev_max_sess < max_nb_sess) > + max_nb_sess =3D slave_info.sym.max_nb_sessions; > + } > } > > dev_info->driver_id =3D dev->driver_id; > dev_info->feature_flags =3D dev->feature_flags; > dev_info->capabilities =3D sched_ctx->capabilities; > dev_info->max_nb_queue_pairs =3D sched_ctx->max_nb_queue_pairs; > - dev_info->sym.max_nb_sessions =3D max_nb_sessions; > + dev_info->sym.max_nb_sessions =3D max_nb_sess; > } > > /** Release queue pair */ > diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow= 3g/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 =3D dev->data->dev_private; > > internals->max_nb_queue_pairs =3D init_params->max_nb_queue_pairs; > - internals->max_nb_sessions =3D 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, cryp= todev_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=3D " > - "max_nb_sessions=3D " > "socket_id=3D"); > 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 !=3D NULL) { > dev_info->driver_id =3D dev->driver_id; > dev_info->max_nb_queue_pairs =3D internals->max_nb_queue_pairs; > - dev_info->sym.max_nb_sessions =3D internals->max_nb_sessions; > + /* No limit of number of sessions */ > + dev_info->sym.max_nb_sessions =3D 0; > dev_info->feature_flags =3D dev->feature_flags; > dev_info->capabilities =3D snow3g_pmd_capabilities; > } > diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_private.h b/drivers/cry= pto/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/vi= rtio/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 *de= v, > info->driver_id =3D cryptodev_virtio_driver_id; > info->feature_flags =3D dev->feature_flags; > info->max_nb_queue_pairs =3D hw->max_dataqueues; > - info->sym.max_nb_sessions =3D > - RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS; > + /* No limit of number of sessions */ > + info->sym.max_nb_sessions =3D 0; > info->capabilities =3D hw->virtio_dev_capabilities; > } > } > @@ -1425,8 +1425,7 @@ crypto_virtio_pci_probe( > struct rte_cryptodev_pmd_init_params init_params =3D { > .name =3D "", > .socket_id =3D rte_socket_id(), > - .private_data_size =3D sizeof(struct virtio_crypto_hw), > - .max_nb_sessions =3D RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS > + .private_data_size =3D 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_zu= c_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 =3D dev->data->dev_private; > > internals->max_nb_queue_pairs =3D init_params->max_nb_queue_pairs; > - internals->max_nb_sessions =3D 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=3D " > - "max_nb_sessions=3D " > "socket_id=3D"); > RTE_PMD_REGISTER_CRYPTO_DRIVER(zuc_crypto_drv, cryptodev_zuc_pmd_drv.dri= ver, > cryptodev_driver_id); > diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rt= e_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 !=3D NULL) { > dev_info->driver_id =3D dev->driver_id; > dev_info->max_nb_queue_pairs =3D internals->max_nb_queue_pairs; > - dev_info->sym.max_nb_sessions =3D internals->max_nb_sessions; > + /* No limit of number of sessions */ > + dev_info->sym.max_nb_sessions =3D 0; > dev_info->feature_flags =3D dev->feature_flags; > dev_info->capabilities =3D zuc_pmd_capabilities; > } > diff --git a/drivers/crypto/zuc/rte_zuc_pmd_private.h b/drivers/crypto/zu= c/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_crypto= dev/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 =3D 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 =3D 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 =3D rte_cryptodev_pmd_allocate(name, params->socket_id); > diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_crypto= dev/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[] =3D { > 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 devi= ces */ > -- > 2.14.4 > -- - Tomasz Duszy=C5=84ski