summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorPablo de Lara <pablo.de.lara.guarch@intel.com>2018-07-05 03:07:57 +0100
committerPablo de Lara <pablo.de.lara.guarch@intel.com>2018-07-11 03:57:24 +0200
commit2925e0c190f57dccf31b5b716f50a83fd469d123 (patch)
tree0edb3cc5e655863e12ac24b8d10561be31b366f3 /examples
parent25b05a1c806b0b2177cc71da3fa70e0d145fbc0a (diff)
downloaddpdk-2925e0c190f57dccf31b5b716f50a83fd469d123.zip
dpdk-2925e0c190f57dccf31b5b716f50a83fd469d123.tar.gz
dpdk-2925e0c190f57dccf31b5b716f50a83fd469d123.tar.xz
cryptodev: define value for unlimited sessions
Currently, the info structure contains the maximum number of sessions that a device can manage. This field was useful when the session mempool was created inside each device, but now it is created at the application level. Most PMDs do not have a limitation on the sessions managed, but a few do, therefore this field must remain in the structure. However, a new value, 0, can be used to indicate that a device does not have an actual maximum of sessions. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/ipsec-secgw/ipsec-secgw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 22249f3..ff576eb 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -1440,7 +1440,7 @@ cryptodevs_init(void)
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);