DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] drivers/crypto: fix drivers to use ring size function
@ 2017-03-27 14:54 Bruce Richardson
  2017-03-27 21:58 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Bruce Richardson @ 2017-03-27 14:54 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

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   | 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-27 21:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-27 14:54 [dpdk-dev] [PATCH] drivers/crypto: fix drivers to use ring size function Bruce Richardson
2017-03-27 21:58 ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).