[v1] eventdev/crypto: wrong crypto enqueue count stats

Message ID 20221130151159.1678917-1-ganapati.kundapura@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Jerin Jacob
Headers
Series [v1] eventdev/crypto: wrong crypto enqueue count stats |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/intel-Testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/github-robot: build success github build: passed
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-abi-testing warning Testing issues
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS

Commit Message

Ganapati Kundapura Nov. 30, 2022, 3:11 p.m. UTC
  crypto_enq_count is updated on failure to enqueue ops to cryptodev.

Updated crypto_enq_count on successful enqueue of ops to cryptodev.

Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
  

Comments

Zhang, Fan Feb. 24, 2023, 2:41 p.m. UTC | #1
On 11/30/2022 3:11 PM, Ganapati Kundapura wrote:
> crypto_enq_count is updated on failure to enqueue ops to cryptodev.
>
> Updated crypto_enq_count on successful enqueue of ops to cryptodev.
>
> Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
>
> diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c
> index c293a62..e1a0367 100644
> --- a/lib/eventdev/rte_event_crypto_adapter.c
> +++ b/lib/eventdev/rte_event_crypto_adapter.c
> @@ -485,6 +485,9 @@ eca_enq_to_cryptodev(struct event_crypto_adapter *adapter, struct rte_event *ev,
>   								cdev_id,
>   								qp_id,
>   								&nb_enqueued);
> +			stats->crypto_enq_count += nb_enqueued;
> +			n += nb_enqueued;
> +
>   			/**
>   			 * If some crypto ops failed to flush to cdev and
>   			 * space for another batch is not available, stop
> @@ -495,9 +498,6 @@ eca_enq_to_cryptodev(struct event_crypto_adapter *adapter, struct rte_event *ev,
>   							&qp_info->cbuf)))
>   				adapter->stop_enq_to_cryptodev = true;
>   		}
> -
> -		stats->crypto_enq_count += nb_enqueued;
> -		n += nb_enqueued;
>   	}
>   
>   	return n;
Acked-by: Fan Zhang <fanzhang.oss@gmail.com>
  

Patch

diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c
index c293a62..e1a0367 100644
--- a/lib/eventdev/rte_event_crypto_adapter.c
+++ b/lib/eventdev/rte_event_crypto_adapter.c
@@ -485,6 +485,9 @@  eca_enq_to_cryptodev(struct event_crypto_adapter *adapter, struct rte_event *ev,
 								cdev_id,
 								qp_id,
 								&nb_enqueued);
+			stats->crypto_enq_count += nb_enqueued;
+			n += nb_enqueued;
+
 			/**
 			 * If some crypto ops failed to flush to cdev and
 			 * space for another batch is not available, stop
@@ -495,9 +498,6 @@  eca_enq_to_cryptodev(struct event_crypto_adapter *adapter, struct rte_event *ev,
 							&qp_info->cbuf)))
 				adapter->stop_enq_to_cryptodev = true;
 		}
-
-		stats->crypto_enq_count += nb_enqueued;
-		n += nb_enqueued;
 	}
 
 	return n;