[dpdk-dev] drivers/crypto: fix drivers to use ring size function
Checks
Commit Message
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(-)
Comments
2017-03-27 15:54, 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>
Applied, thanks
Next step: merge your ring rework :)
@@ -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;
@@ -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;
@@ -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);
@@ -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);
@@ -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);
@@ -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);
@@ -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);