cryptodev: move session type to generic crypto op
[dpdk.git] / drivers / crypto / snow3g / rte_snow3g_pmd.c
index 7151c21..a8bcd9d 100644 (file)
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  *
- *   Copyright(c) 2016 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2016-2017 Intel Corporation. All rights reserved.
  *
  *   Redistribution and use in source and binary forms, with or without
  *   modification, are permitted provided that the following conditions
@@ -143,7 +143,7 @@ snow3g_get_session(struct snow3g_qp *qp, struct rte_crypto_op *op)
 {
        struct snow3g_session *sess;
 
-       if (op->sym->sess_type == RTE_CRYPTO_SYM_OP_WITH_SESSION) {
+       if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
                if (unlikely(op->sym->session->dev_type !=
                                RTE_CRYPTODEV_SNOW3G_PMD))
                        return NULL;
@@ -357,7 +357,7 @@ process_ops(struct rte_crypto_op **ops, struct snow3g_session *session,
                if (ops[i]->status == RTE_CRYPTO_OP_STATUS_NOT_PROCESSED)
                        ops[i]->status = RTE_CRYPTO_OP_STATUS_SUCCESS;
                /* Free session if a session-less crypto op. */
-               if (ops[i]->sym->sess_type == RTE_CRYPTO_SYM_OP_SESSIONLESS) {
+               if (ops[i]->sess_type == RTE_CRYPTO_OP_SESSIONLESS) {
                        rte_mempool_put(qp->sess_mp, ops[i]->sym->session);
                        ops[i]->sym->session = NULL;
                }
@@ -409,7 +409,7 @@ process_op_bit(struct rte_crypto_op *op, struct snow3g_session *session,
                op->status = RTE_CRYPTO_OP_STATUS_SUCCESS;
 
        /* Free session if a session-less crypto op. */
-       if (op->sym->sess_type == RTE_CRYPTO_SYM_OP_SESSIONLESS) {
+       if (op->sess_type == RTE_CRYPTO_OP_SESSIONLESS) {
                rte_mempool_put(qp->sess_mp, op->sym->session);
                op->sym->session = NULL;
        }