cryptodev: add auth IV
[dpdk.git] / drivers / crypto / null / null_crypto_pmd_ops.c
index 26ff631..3c943ee 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
@@ -56,7 +56,8 @@ static const struct rte_cryptodev_capabilities null_crypto_pmd_capabilities[] =
                                        .max = 0,
                                        .increment = 0
                                },
-                               .aad_size = { 0 }
+                               .aad_size = { 0 },
+                               .iv_size = { 0 }
                        }, },
                }, },
        },
@@ -72,11 +73,7 @@ static const struct rte_cryptodev_capabilities null_crypto_pmd_capabilities[] =
                                        .max = 0,
                                        .increment = 0
                                },
-                               .iv_size = {
-                                       .min = 0,
-                                       .max = 0,
-                                       .increment = 0
-                               }
+                               .iv_size = { 0 }
                        }, },
                }, }
        },
@@ -85,7 +82,8 @@ static const struct rte_cryptodev_capabilities null_crypto_pmd_capabilities[] =
 
 /** Configure device */
 static int
-null_crypto_pmd_config(__rte_unused struct rte_cryptodev *dev)
+null_crypto_pmd_config(__rte_unused struct rte_cryptodev *dev,
+               __rte_unused struct rte_cryptodev_config *config)
 {
        return 0;
 }
@@ -193,7 +191,7 @@ null_crypto_pmd_qp_create_processed_pkts_ring(struct null_crypto_qp *qp,
 
        r = rte_ring_lookup(qp->name);
        if (r) {
-               if (r->prod.size >= ring_size) {
+               if (rte_ring_get_size(r) >= ring_size) {
                        NULL_CRYPTO_LOG_INFO(
                                "Reusing existing ring %s for processed packets",
                                qp->name);