event/dlb2: add v2.5 start domain
[dpdk.git] / drivers / crypto / octeontx / otx_cryptodev_ops.c
index ba56b21..d75f4b5 100644 (file)
 #include "otx_cryptodev_ops.h"
 
 #include "cpt_pmd_logs.h"
+#include "cpt_pmd_ops_helper.h"
 #include "cpt_ucode.h"
 #include "cpt_ucode_asym.h"
 
+static uint64_t otx_fpm_iova[CPT_EC_ID_PMAX];
+
 /* Forward declarations */
 
 static int
@@ -52,11 +55,18 @@ otx_cpt_periodic_alarm_stop(void *arg)
 /* PMD ops */
 
 static int
-otx_cpt_dev_config(struct rte_cryptodev *dev __rte_unused,
+otx_cpt_dev_config(struct rte_cryptodev *dev,
                   struct rte_cryptodev_config *config __rte_unused)
 {
+       int ret = 0;
+
        CPT_PMD_INIT_FUNC_TRACE();
-       return 0;
+
+       if (dev->feature_flags & RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO)
+               /* Initialize shared FPM table */
+               ret = cpt_fpm_init(otx_fpm_iova);
+
+       return ret;
 }
 
 static int
@@ -76,6 +86,9 @@ otx_cpt_dev_stop(struct rte_cryptodev *c_dev)
 
        CPT_PMD_INIT_FUNC_TRACE();
 
+       if (c_dev->feature_flags & RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO)
+               cpt_fpm_clear();
+
        otx_cpt_stop_device(cptvf);
 }
 
@@ -114,19 +127,6 @@ otx_cpt_dev_info_get(struct rte_cryptodev *dev, struct rte_cryptodev_info *info)
        }
 }
 
-static void
-otx_cpt_stats_get(struct rte_cryptodev *dev __rte_unused,
-                 struct rte_cryptodev_stats *stats __rte_unused)
-{
-       CPT_PMD_INIT_FUNC_TRACE();
-}
-
-static void
-otx_cpt_stats_reset(struct rte_cryptodev *dev __rte_unused)
-{
-       CPT_PMD_INIT_FUNC_TRACE();
-}
-
 static int
 otx_cpt_que_pair_setup(struct rte_cryptodev *dev,
                       uint16_t que_pair_id,
@@ -199,91 +199,156 @@ otx_cpt_get_session_size(struct rte_cryptodev *dev __rte_unused)
        return cpt_get_session_size();
 }
 
-static void
-otx_cpt_session_init(void *sym_sess, uint8_t driver_id)
+static int
+sym_xform_verify(struct rte_crypto_sym_xform *xform)
 {
-       struct rte_cryptodev_sym_session *sess = sym_sess;
-       struct cpt_sess_misc *cpt_sess =
-        (struct cpt_sess_misc *) get_sym_session_private_data(sess, driver_id);
+       if (xform->next) {
+               if (xform->type == RTE_CRYPTO_SYM_XFORM_AUTH &&
+                   xform->next->type == RTE_CRYPTO_SYM_XFORM_CIPHER &&
+                   xform->next->cipher.op == RTE_CRYPTO_CIPHER_OP_ENCRYPT &&
+                   (xform->auth.algo != RTE_CRYPTO_AUTH_SHA1_HMAC ||
+                    xform->next->cipher.algo != RTE_CRYPTO_CIPHER_AES_CBC))
+                       return -ENOTSUP;
+
+               if (xform->type == RTE_CRYPTO_SYM_XFORM_CIPHER &&
+                   xform->cipher.op == RTE_CRYPTO_CIPHER_OP_DECRYPT &&
+                   xform->next->type == RTE_CRYPTO_SYM_XFORM_AUTH &&
+                   (xform->cipher.algo != RTE_CRYPTO_CIPHER_AES_CBC ||
+                    xform->next->auth.algo != RTE_CRYPTO_AUTH_SHA1_HMAC))
+                       return -ENOTSUP;
+
+               if (xform->type == RTE_CRYPTO_SYM_XFORM_CIPHER &&
+                   xform->cipher.algo == RTE_CRYPTO_CIPHER_3DES_CBC &&
+                   xform->next->type == RTE_CRYPTO_SYM_XFORM_AUTH &&
+                   xform->next->auth.algo == RTE_CRYPTO_AUTH_SHA1)
+                       return -ENOTSUP;
+
+               if (xform->type == RTE_CRYPTO_SYM_XFORM_AUTH &&
+                   xform->auth.algo == RTE_CRYPTO_AUTH_SHA1 &&
+                   xform->next->type == RTE_CRYPTO_SYM_XFORM_CIPHER &&
+                   xform->next->cipher.algo == RTE_CRYPTO_CIPHER_3DES_CBC)
+                       return -ENOTSUP;
 
-       CPT_PMD_INIT_FUNC_TRACE();
-       cpt_sess->ctx_dma_addr = rte_mempool_virt2iova(cpt_sess) +
-                       sizeof(struct cpt_sess_misc);
+       } else {
+               if (xform->type == RTE_CRYPTO_SYM_XFORM_AUTH &&
+                   xform->auth.algo == RTE_CRYPTO_AUTH_NULL &&
+                   xform->auth.op == RTE_CRYPTO_AUTH_OP_VERIFY)
+                       return -ENOTSUP;
+       }
+       return 0;
 }
 
 static int
-otx_cpt_session_cfg(struct rte_cryptodev *dev,
-                   struct rte_crypto_sym_xform *xform,
-                   struct rte_cryptodev_sym_session *sess,
-                   struct rte_mempool *mempool)
+sym_session_configure(int driver_id, struct rte_crypto_sym_xform *xform,
+                     struct rte_cryptodev_sym_session *sess,
+                     struct rte_mempool *pool)
 {
-       struct rte_crypto_sym_xform *chain;
-       void *sess_private_data = NULL;
-
-       CPT_PMD_INIT_FUNC_TRACE();
-
-       if (cpt_is_algo_supported(xform))
-               goto err;
+       struct rte_crypto_sym_xform *temp_xform = xform;
+       struct cpt_sess_misc *misc;
+       vq_cmd_word3_t vq_cmd_w3;
+       void *priv;
+       int ret;
 
-       if (unlikely(sess == NULL)) {
-               CPT_LOG_ERR("invalid session struct");
-               return -EINVAL;
-       }
+       ret = sym_xform_verify(xform);
+       if (unlikely(ret))
+               return ret;
 
-       if (rte_mempool_get(mempool, &sess_private_data)) {
-               CPT_LOG_ERR("Could not allocate sess_private_data");
+       if (unlikely(rte_mempool_get(pool, &priv))) {
+               CPT_LOG_ERR("Could not allocate session private data");
                return -ENOMEM;
        }
 
-       chain = xform;
-       while (chain) {
-               switch (chain->type) {
+       memset(priv, 0, sizeof(struct cpt_sess_misc) +
+                       offsetof(struct cpt_ctx, mc_ctx));
+
+       misc = priv;
+
+       for ( ; xform != NULL; xform = xform->next) {
+               switch (xform->type) {
                case RTE_CRYPTO_SYM_XFORM_AEAD:
-                       if (fill_sess_aead(chain, sess_private_data))
-                               goto err;
+                       ret = fill_sess_aead(xform, misc);
                        break;
                case RTE_CRYPTO_SYM_XFORM_CIPHER:
-                       if (fill_sess_cipher(chain, sess_private_data))
-                               goto err;
+                       ret = fill_sess_cipher(xform, misc);
                        break;
                case RTE_CRYPTO_SYM_XFORM_AUTH:
-                       if (chain->auth.algo == RTE_CRYPTO_AUTH_AES_GMAC) {
-                               if (fill_sess_gmac(chain, sess_private_data))
-                                       goto err;
-                       } else {
-                               if (fill_sess_auth(chain, sess_private_data))
-                                       goto err;
-                       }
+                       if (xform->auth.algo == RTE_CRYPTO_AUTH_AES_GMAC)
+                               ret = fill_sess_gmac(xform, misc);
+                       else
+                               ret = fill_sess_auth(xform, misc);
                        break;
                default:
-                       CPT_LOG_ERR("Invalid crypto xform type");
-                       break;
+                       ret = -1;
                }
-               chain = chain->next;
+
+               if (ret)
+                       goto priv_put;
        }
-       set_sym_session_private_data(sess, dev->driver_id, sess_private_data);
-       otx_cpt_session_init(sess, dev->driver_id);
+
+       if ((GET_SESS_FC_TYPE(misc) == HASH_HMAC) &&
+                       cpt_mac_len_verify(&temp_xform->auth)) {
+               CPT_LOG_ERR("MAC length is not supported");
+               ret = -ENOTSUP;
+               goto priv_put;
+       }
+
+       set_sym_session_private_data(sess, driver_id, priv);
+
+       misc->ctx_dma_addr = rte_mempool_virt2iova(misc) +
+                            sizeof(struct cpt_sess_misc);
+
+       vq_cmd_w3.u64 = 0;
+       vq_cmd_w3.s.grp = 0;
+       vq_cmd_w3.s.cptr = misc->ctx_dma_addr + offsetof(struct cpt_ctx,
+                                                        mc_ctx);
+
+       misc->cpt_inst_w7 = vq_cmd_w3.u64;
+
        return 0;
 
-err:
-       if (sess_private_data)
-               rte_mempool_put(mempool, sess_private_data);
-       return -EPERM;
+priv_put:
+       if (priv)
+               rte_mempool_put(pool, priv);
+       return -ENOTSUP;
 }
 
+static void
+sym_session_clear(int driver_id, struct rte_cryptodev_sym_session *sess)
+{
+       void *priv = get_sym_session_private_data(sess, driver_id);
+       struct rte_mempool *pool;
+
+       if (priv == NULL)
+               return;
+
+       memset(priv, 0, cpt_get_session_size());
+
+       pool = rte_mempool_from_obj(priv);
+
+       set_sym_session_private_data(sess, driver_id, NULL);
+
+       rte_mempool_put(pool, priv);
+}
+
+static int
+otx_cpt_session_cfg(struct rte_cryptodev *dev,
+                   struct rte_crypto_sym_xform *xform,
+                   struct rte_cryptodev_sym_session *sess,
+                   struct rte_mempool *pool)
+{
+       CPT_PMD_INIT_FUNC_TRACE();
+
+       return sym_session_configure(dev->driver_id, xform, sess, pool);
+}
+
+
 static void
 otx_cpt_session_clear(struct rte_cryptodev *dev,
                  struct rte_cryptodev_sym_session *sess)
 {
-       void *sess_priv = get_sym_session_private_data(sess, dev->driver_id);
-
        CPT_PMD_INIT_FUNC_TRACE();
-       if (sess_priv) {
-               memset(sess_priv, 0, otx_cpt_get_session_size(dev));
-               struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-               set_sym_session_private_data(sess, dev->driver_id, NULL);
-               rte_mempool_put(sess_mp, sess_priv);
-       }
+
+       return sym_session_clear(dev->driver_id, sess);
 }
 
 static unsigned int
@@ -319,6 +384,8 @@ otx_cpt_asym_session_cfg(struct rte_cryptodev *dev,
                return ret;
        }
 
+       priv->cpt_inst_w7 = 0;
+
        set_asym_session_private_data(sess, dev->driver_id, priv);
        return 0;
 }
@@ -345,17 +412,17 @@ otx_cpt_asym_session_clear(struct rte_cryptodev *dev,
        rte_mempool_put(sess_mp, priv);
 }
 
-static __rte_always_inline int32_t __hot
+static __rte_always_inline int32_t __rte_hot
 otx_cpt_request_enqueue(struct cpt_instance *instance,
                        struct pending_queue *pqueue,
-                       void *req)
+                       void *req, uint64_t cpt_inst_w7)
 {
        struct cpt_request_info *user_req = (struct cpt_request_info *)req;
 
        if (unlikely(pqueue->pending_count >= DEFAULT_CMD_QLEN))
                return -EAGAIN;
 
-       fill_cpt_inst(instance, req);
+       fill_cpt_inst(instance, req, cpt_inst_w7);
 
        CPT_LOG_DP_DEBUG("req: %p op: %p ", req, user_req->op);
 
@@ -367,7 +434,7 @@ otx_cpt_request_enqueue(struct cpt_instance *instance,
        /* Default mode of software queue */
        mark_cpt_inst(instance);
 
-       pqueue->rid_queue[pqueue->enq_tail].rid = (uintptr_t)user_req;
+       pqueue->req_queue[pqueue->enq_tail] = (uintptr_t)user_req;
 
        /* We will use soft queue length here to limit requests */
        MOD_INC(pqueue->enq_tail, DEFAULT_CMD_QLEN);
@@ -378,7 +445,7 @@ otx_cpt_request_enqueue(struct cpt_instance *instance,
        return 0;
 }
 
-static __rte_always_inline int __hot
+static __rte_always_inline int __rte_hot
 otx_cpt_enq_single_asym(struct cpt_instance *instance,
                        struct rte_crypto_op *op,
                        struct pending_queue *pqueue)
@@ -425,13 +492,26 @@ otx_cpt_enq_single_asym(struct cpt_instance *instance,
                if (unlikely(ret))
                        goto req_fail;
                break;
+       case RTE_CRYPTO_ASYM_XFORM_ECDSA:
+               ret = cpt_enqueue_ecdsa_op(op, &params, sess, otx_fpm_iova);
+               if (unlikely(ret))
+                       goto req_fail;
+               break;
+       case RTE_CRYPTO_ASYM_XFORM_ECPM:
+               ret = cpt_ecpm_prep(&asym_op->ecpm, &params,
+                                   sess->ec_ctx.curveid);
+               if (unlikely(ret))
+                       goto req_fail;
+               break;
+
        default:
                op->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
                ret = -EINVAL;
                goto req_fail;
        }
 
-       ret = otx_cpt_request_enqueue(instance, pqueue, params.req);
+       ret = otx_cpt_request_enqueue(instance, pqueue, params.req,
+                                     sess->cpt_inst_w7);
 
        if (unlikely(ret)) {
                CPT_LOG_DP_ERR("Could not enqueue crypto req");
@@ -446,14 +526,15 @@ req_fail:
        return ret;
 }
 
-static __rte_always_inline int __hot
+static __rte_always_inline int __rte_hot
 otx_cpt_enq_single_sym(struct cpt_instance *instance,
                       struct rte_crypto_op *op,
                       struct pending_queue *pqueue)
 {
        struct cpt_sess_misc *sess;
        struct rte_crypto_sym_op *sym_op = op->sym;
-       void *prep_req, *mdata = NULL;
+       struct cpt_request_info *prep_req;
+       void *mdata = NULL;
        int ret = 0;
        uint64_t cpt_op;
 
@@ -465,10 +546,10 @@ otx_cpt_enq_single_sym(struct cpt_instance *instance,
 
        if (likely(cpt_op & CPT_OP_CIPHER_MASK))
                ret = fill_fc_params(op, sess, &instance->meta_info, &mdata,
-                                    &prep_req);
+                                    (void **)&prep_req);
        else
                ret = fill_digest_params(op, sess, &instance->meta_info,
-                                        &mdata, &prep_req);
+                                        &mdata, (void **)&prep_req);
 
        if (unlikely(ret)) {
                CPT_LOG_DP_ERR("prep cryto req : op %p, cpt_op 0x%x "
@@ -477,7 +558,8 @@ otx_cpt_enq_single_sym(struct cpt_instance *instance,
        }
 
        /* Enqueue prepared instruction to h/w */
-       ret = otx_cpt_request_enqueue(instance, pqueue, prep_req);
+       ret = otx_cpt_request_enqueue(instance, pqueue, prep_req,
+                                     sess->cpt_inst_w7);
 
        if (unlikely(ret)) {
                /* Buffer allocated for request preparation need to be freed */
@@ -488,67 +570,46 @@ otx_cpt_enq_single_sym(struct cpt_instance *instance,
        return 0;
 }
 
-static __rte_always_inline int __hot
+static __rte_always_inline int __rte_hot
 otx_cpt_enq_single_sym_sessless(struct cpt_instance *instance,
                                struct rte_crypto_op *op,
-                               struct pending_queue *pqueue)
+                               struct pending_queue *pend_q)
 {
-       struct cpt_sess_misc *sess;
+       const int driver_id = otx_cryptodev_driver_id;
        struct rte_crypto_sym_op *sym_op = op->sym;
+       struct rte_cryptodev_sym_session *sess;
        int ret;
-       void *sess_t = NULL;
-       void *sess_private_data_t = NULL;
-
-       /* Create tmp session */
-
-       if (rte_mempool_get(instance->sess_mp, (void **)&sess_t)) {
-               ret = -ENOMEM;
-               goto exit;
-       }
-
-       if (rte_mempool_get(instance->sess_mp_priv,
-                       (void **)&sess_private_data_t)) {
-               ret = -ENOMEM;
-               goto free_sess;
-       }
-
-       sess = (struct cpt_sess_misc *)sess_private_data_t;
 
-       sess->ctx_dma_addr = rte_mempool_virt2iova(sess) +
-                       sizeof(struct cpt_sess_misc);
-
-       ret = instance_session_cfg(sym_op->xform, (void *)sess);
-       if (unlikely(ret)) {
-               ret = -EINVAL;
-               goto free_sess_priv;
-       }
+       /* Create temporary session */
+       sess = rte_cryptodev_sym_session_create(instance->sess_mp);
+       if (sess == NULL)
+               return -ENOMEM;
 
-       /* Save tmp session in op */
+       ret = sym_session_configure(driver_id, sym_op->xform, sess,
+                                   instance->sess_mp_priv);
+       if (ret)
+               goto sess_put;
 
-       sym_op->session = (struct rte_cryptodev_sym_session *)sess_t;
-       set_sym_session_private_data(sym_op->session, otx_cryptodev_driver_id,
-                                    sess_private_data_t);
+       sym_op->session = sess;
 
-       /* Enqueue op with the tmp session set */
-       ret = otx_cpt_enq_single_sym(instance, op, pqueue);
+       ret = otx_cpt_enq_single_sym(instance, op, pend_q);
 
        if (unlikely(ret))
-               goto free_sess_priv;
+               goto priv_put;
 
        return 0;
 
-free_sess_priv:
-       rte_mempool_put(instance->sess_mp_priv, sess_private_data_t);
-free_sess:
-       rte_mempool_put(instance->sess_mp, sess_t);
-exit:
+priv_put:
+       sym_session_clear(driver_id, sess);
+sess_put:
+       rte_mempool_put(instance->sess_mp, sess);
        return ret;
 }
 
 #define OP_TYPE_SYM            0
 #define OP_TYPE_ASYM           1
 
-static __rte_always_inline int __hot
+static __rte_always_inline int __rte_hot
 otx_cpt_enq_single(struct cpt_instance *inst,
                   struct rte_crypto_op *op,
                   struct pending_queue *pqueue,
@@ -573,7 +634,7 @@ otx_cpt_enq_single(struct cpt_instance *inst,
        return -ENOTSUP;
 }
 
-static  __rte_always_inline uint16_t __hot
+static  __rte_always_inline uint16_t __rte_hot
 otx_cpt_pkt_enqueue(void *qptr, struct rte_crypto_op **ops, uint16_t nb_ops,
                    const uint8_t op_type)
 {
@@ -668,7 +729,40 @@ otx_cpt_asym_rsa_op(struct rte_crypto_op *cop, struct cpt_request_info *req,
        }
 }
 
-static __rte_always_inline void __hot
+static __rte_always_inline void
+otx_cpt_asym_dequeue_ecdsa_op(struct rte_crypto_ecdsa_op_param *ecdsa,
+                           struct cpt_request_info *req,
+                           struct cpt_asym_ec_ctx *ec)
+
+{
+       int prime_len = ec_grp[ec->curveid].prime.length;
+
+       if (ecdsa->op_type == RTE_CRYPTO_ASYM_OP_VERIFY)
+               return;
+
+       /* Separate out sign r and s components */
+       memcpy(ecdsa->r.data, req->rptr, prime_len);
+       memcpy(ecdsa->s.data, req->rptr + RTE_ALIGN_CEIL(prime_len, 8),
+              prime_len);
+       ecdsa->r.length = prime_len;
+       ecdsa->s.length = prime_len;
+}
+
+static __rte_always_inline void
+otx_cpt_asym_dequeue_ecpm_op(struct rte_crypto_ecpm_op_param *ecpm,
+                            struct cpt_request_info *req,
+                            struct cpt_asym_ec_ctx *ec)
+{
+       int prime_len = ec_grp[ec->curveid].prime.length;
+
+       memcpy(ecpm->r.x.data, req->rptr, prime_len);
+       memcpy(ecpm->r.y.data, req->rptr + RTE_ALIGN_CEIL(prime_len, 8),
+              prime_len);
+       ecpm->r.x.length = prime_len;
+       ecpm->r.y.length = prime_len;
+}
+
+static __rte_always_inline void __rte_hot
 otx_cpt_asym_post_process(struct rte_crypto_op *cop,
                          struct cpt_request_info *req)
 {
@@ -687,6 +781,12 @@ otx_cpt_asym_post_process(struct rte_crypto_op *cop,
                memcpy(op->modex.result.data, req->rptr,
                       op->modex.result.length);
                break;
+       case RTE_CRYPTO_ASYM_XFORM_ECDSA:
+               otx_cpt_asym_dequeue_ecdsa_op(&op->ecdsa, req, &sess->ec_ctx);
+               break;
+       case RTE_CRYPTO_ASYM_XFORM_ECPM:
+               otx_cpt_asym_dequeue_ecpm_op(&op->ecpm, req, &sess->ec_ctx);
+               break;
        default:
                CPT_LOG_DP_DEBUG("Invalid crypto xform type");
                cop->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
@@ -694,7 +794,7 @@ otx_cpt_asym_post_process(struct rte_crypto_op *cop,
        }
 }
 
-static __rte_always_inline void __hot
+static __rte_always_inline void __rte_hot
 otx_cpt_dequeue_post_process(struct rte_crypto_op *cop, uintptr_t *rsp,
                             const uint8_t op_type)
 {
@@ -720,14 +820,13 @@ otx_cpt_dequeue_post_process(struct rte_crypto_op *cop, uintptr_t *rsp,
        return;
 }
 
-static __rte_always_inline uint16_t __hot
+static __rte_always_inline uint16_t __rte_hot
 otx_cpt_pkt_dequeue(void *qptr, struct rte_crypto_op **ops, uint16_t nb_ops,
                    const uint8_t op_type)
 {
        struct cpt_instance *instance = (struct cpt_instance *)qptr;
        struct cpt_request_info *user_req;
        struct cpt_vf *cptvf = (struct cpt_vf *)instance;
-       struct rid *rid_e;
        uint8_t cc[nb_ops];
        int i, count, pcount;
        uint8_t ret;
@@ -741,11 +840,13 @@ otx_cpt_pkt_dequeue(void *qptr, struct rte_crypto_op **ops, uint16_t nb_ops,
        count = (nb_ops > pcount) ? pcount : nb_ops;
 
        for (i = 0; i < count; i++) {
-               rid_e = &pqueue->rid_queue[pqueue->deq_head];
-               user_req = (struct cpt_request_info *)(rid_e->rid);
+               user_req = (struct cpt_request_info *)
+                               pqueue->req_queue[pqueue->deq_head];
 
-               if (likely((i+1) < count))
-                       rte_prefetch_non_temporal((void *)rid_e[1].rid);
+               if (likely((i+1) < count)) {
+                       rte_prefetch_non_temporal(
+                               (void *)pqueue->req_queue[i+1]);
+               }
 
                ret = check_nb_command_id(user_req, instance);
 
@@ -832,11 +933,10 @@ static struct rte_cryptodev_ops cptvf_ops = {
        .dev_close = otx_cpt_dev_close,
        .dev_infos_get = otx_cpt_dev_info_get,
 
-       .stats_get = otx_cpt_stats_get,
-       .stats_reset = otx_cpt_stats_reset,
+       .stats_get = NULL,
+       .stats_reset = NULL,
        .queue_pair_setup = otx_cpt_que_pair_setup,
        .queue_pair_release = otx_cpt_que_pair_release,
-       .queue_pair_count = NULL,
 
        /* Crypto related operations */
        .sym_session_get_size = otx_cpt_get_session_size,
@@ -905,8 +1005,11 @@ otx_cpt_dev_create(struct rte_cryptodev *c_dev)
                                RTE_CRYPTODEV_FF_HW_ACCELERATED |
                                RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
                                RTE_CRYPTODEV_FF_IN_PLACE_SGL |
+                               RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT |
                                RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT |
-                               RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT;
+                               RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT |
+                               RTE_CRYPTODEV_FF_SYM_SESSIONLESS |
+                               RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED;
                break;
        default:
                /* Feature not supported. Abort */