cryptodev: add auth IV
[dpdk.git] / drivers / crypto / snow3g / rte_snow3g_pmd_ops.c
index 6f00b06..9e44242 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
@@ -39,7 +39,7 @@
 #include "rte_snow3g_pmd_private.h"
 
 static const struct rte_cryptodev_capabilities snow3g_pmd_capabilities[] = {
-       {       /* SNOW3G (UIA2) */
+       {       /* SNOW 3G (UIA2) */
                .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
                {.sym = {
                        .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
@@ -60,11 +60,12 @@ static const struct rte_cryptodev_capabilities snow3g_pmd_capabilities[] = {
                                        .min = 16,
                                        .max = 16,
                                        .increment = 0
-                               }
+                               },
+                               .iv_size = { 0 },
                        }, }
                }, }
        },
-       {       /* SNOW3G (UEA2) */
+       {       /* SNOW 3G (UEA2) */
                .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
                {.sym = {
                        .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,
@@ -89,7 +90,8 @@ static const struct rte_cryptodev_capabilities snow3g_pmd_capabilities[] = {
 
 /** Configure device */
 static int
-snow3g_pmd_config(__rte_unused struct rte_cryptodev *dev)
+snow3g_pmd_config(__rte_unused struct rte_cryptodev *dev,
+               __rte_unused struct rte_cryptodev_config *config)
 {
        return 0;
 }
@@ -198,7 +200,7 @@ snow3g_pmd_qp_create_processed_ops_ring(struct snow3g_qp *qp,
 
        r = rte_ring_lookup(qp->name);
        if (r) {
-               if (r->prod.size >= ring_size) {
+               if (rte_ring_get_size(r) >= ring_size) {
                        SNOW3G_LOG_INFO("Reusing existing ring %s"
                                        " for processed packets",
                                         qp->name);
@@ -228,7 +230,7 @@ snow3g_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
                snow3g_pmd_qp_release(dev, qp_id);
 
        /* Allocate the queue pair data structure. */
-       qp = rte_zmalloc_socket("SNOW3G PMD Queue Pair", sizeof(*qp),
+       qp = rte_zmalloc_socket("SNOW 3G PMD Queue Pair", sizeof(*qp),
                                        RTE_CACHE_LINE_SIZE, socket_id);
        if (qp == NULL)
                return (-ENOMEM);