drivers/crypto: use ring size function
authorBruce Richardson <bruce.richardson@intel.com>
Mon, 27 Mar 2017 14:54:40 +0000 (15:54 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 27 Mar 2017 21:56:58 +0000 (23:56 +0200)
Rather than reading the size directly from the ring structure, use the
dedicated ring function for that purpose.
Previous commits to do this only did so for the null crypto driver which
was the only one compiled in by default, but all other drivers need to be
similarly updated.

Fixes: b11c78a2e0c6 ("crypto/null: use ring size function")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
drivers/crypto/armv8/rte_armv8_pmd_ops.c
drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
drivers/crypto/openssl/rte_openssl_pmd_ops.c
drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
drivers/crypto/zuc/rte_zuc_pmd_ops.c

index 2362006..afeb4fb 100644 (file)
@@ -224,7 +224,7 @@ aesni_gcm_pmd_qp_create_processed_pkts_ring(struct aesni_gcm_qp *qp,
 
        r = rte_ring_lookup(qp->name);
        if (r) {
-               if (r->prod.size >= ring_size) {
+               if (rte_ring_get_size(r) >= ring_size) {
                        GCM_LOG_INFO("Reusing existing ring %s for processed"
                                        " packets", qp->name);
                        return r;
index 3d49e2a..0f94919 100644 (file)
@@ -348,7 +348,7 @@ aesni_mb_pmd_qp_create_processed_ops_ring(struct aesni_mb_qp *qp,
 
        r = rte_ring_lookup(qp->name);
        if (r) {
-               if (r->prod.size >= ring_size) {
+               if (rte_ring_get_size(r) >= ring_size) {
                        MB_LOG_INFO("Reusing existing ring %s for processed ops",
                                         qp->name);
                        return r;
index 2bf6475..0815fcb 100644 (file)
@@ -224,7 +224,7 @@ armv8_crypto_pmd_qp_create_processed_ops_ring(struct armv8_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) {
                        ARMV8_CRYPTO_LOG_INFO(
                                "Reusing existing ring %s for processed ops",
                                 qp->name);
index b9285a4..e27bc5c 100644 (file)
@@ -201,7 +201,7 @@ kasumi_pmd_qp_create_processed_ops_ring(struct kasumi_qp *qp,
 
        r = rte_ring_lookup(qp->name);
        if (r) {
-               if (r->prod.size == ring_size) {
+               if (rte_ring_get_size(r) == ring_size) {
                        KASUMI_LOG_INFO("Reusing existing ring %s"
                                        " for processed packets",
                                         qp->name);
index 875550c..1beba3a 100644 (file)
@@ -559,7 +559,7 @@ openssl_pmd_qp_create_processed_ops_ring(struct openssl_qp *qp,
 
        r = rte_ring_lookup(qp->name);
        if (r) {
-               if (r->prod.size >= ring_size) {
+               if (rte_ring_get_size(r) >= ring_size) {
                        OPENSSL_LOG_INFO(
                                "Reusing existing ring %s for processed ops",
                                 qp->name);
index 4602dfd..e0fb3cc 100644 (file)
@@ -198,7 +198,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);
index 2c886d5..0d98313 100644 (file)
@@ -198,7 +198,7 @@ zuc_pmd_qp_create_processed_ops_ring(struct zuc_qp *qp,
 
        r = rte_ring_lookup(qp->name);
        if (r) {
-               if (r->prod.size >= ring_size) {
+               if (rte_ring_get_size(r) >= ring_size) {
                        ZUC_LOG_INFO("Reusing existing ring %s"
                                        " for processed packets",
                                         qp->name);