* 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);
 
 
 * 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.
 
 * compressdev: Feature flag ``RTE_COMP_FF_MBUF_SCATTER_GATHER`` is
   replaced with the following more explicit flags:
 
                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);
 
 
        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;
 };
 
 
         * 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);
                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",