From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 40CC7FB06 for ; Mon, 27 Mar 2017 16:54:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490626497; x=1522162497; h=from:to:cc:subject:date:message-id; bh=dsB9csjmj3tCg9uRqapxHUF5M4Z9Qsyb63SU/VFxcyo=; b=TGsGz+NEZIYjRwUBImUffwbQMf86NFhejYKk8qIHbQtIOtzIvoGTYHLf jOtqWsIRfW8EUQ+U80h5KYsaWuEUrA==; Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Mar 2017 07:54:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,231,1486454400"; d="scan'208";a="948631455" Received: from sivswdev01.ir.intel.com ([10.237.217.45]) by orsmga003.jf.intel.com with ESMTP; 27 Mar 2017 07:54:44 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Date: Mon, 27 Mar 2017 15:54:40 +0100 Message-Id: <20170327145440.9648-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.8.4 Subject: [dpdk-dev] [PATCH] drivers/crypto: fix drivers to use ring size function X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Mar 2017 14:54:57 -0000 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 --- drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c | 2 +- drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 2 +- drivers/crypto/armv8/rte_armv8_pmd_ops.c | 2 +- drivers/crypto/kasumi/rte_kasumi_pmd_ops.c | 2 +- drivers/crypto/openssl/rte_openssl_pmd_ops.c | 2 +- drivers/crypto/snow3g/rte_snow3g_pmd_ops.c | 2 +- drivers/crypto/zuc/rte_zuc_pmd_ops.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c index 2362006..afeb4fb 100644 --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c @@ -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; diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c index 3d49e2a..0f94919 100644 --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c @@ -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; diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c index 2bf6475..0815fcb 100644 --- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c +++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c @@ -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); diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c index b9285a4..e27bc5c 100644 --- a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c +++ b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c @@ -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); diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c index 875550c..1beba3a 100644 --- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c +++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c @@ -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); diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c index 4602dfd..e0fb3cc 100644 --- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c +++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c @@ -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); diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c index 2c886d5..0d98313 100644 --- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c +++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c @@ -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); -- 2.9.3