> Hi Fan,
> 
> Are these patches getting compiled at your end? Are these a working patchset
> on Intel platform?
> For me it is failing for each of the patch
> 
> 'drivers/a715181@@tmp_rte_crypto_scheduler@sta/crypto_scheduler_schedul
> er_pmd_ops.c.o' -MF
> 'drivers/a715181@@tmp_rte_crypto_scheduler@sta/crypto_scheduler_schedul
> er_pmd_ops.c.o.d' -o
> 'drivers/a715181@@tmp_rte_crypto_scheduler@sta/crypto_scheduler_schedul
> er_pmd_ops.c.o' -c ../drivers/crypto/scheduler/scheduler_pmd_ops.c
> ../drivers/crypto/scheduler/scheduler_pmd_ops.c: In function
> 'scheduler_pmd_sym_session_configure':
> ../drivers/crypto/scheduler/scheduler_pmd_ops.c:525:1: error: label at end of
> compound statement
>   525 | next_worker:
>       | ^~~~~~~~~~~
> ../drivers/crypto/scheduler/scheduler_pmd_ops.c: In function
> 'scheduler_pmd_sym_session_clear':
> ../drivers/crypto/scheduler/scheduler_pmd_ops.c:569:1: error: label at end of
> compound statement
>   569 | next_worker:
>       | ^~~~~~~~~~~

You can try this fix    

diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c 
b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index f8aa10af64..2bc3f5dd27 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -493,15 +493,19 @@ scheduler_pmd_sym_session_configure(struct rte_cryptodev 
*dev,
        for (i = 0; i < sched_ctx->nb_workers; i++) {
                struct scheduler_worker *worker = &sched_ctx->workers[i];
                struct rte_cryptodev_sym_session *worker_sess;
+               uint8_t next_worker = 0;

                for (j = 0; j < n_configured_sess; j++) {
                        if (configured_sess[j].driver_id ==
                                        worker->driver_id) {
                                sess_ctx->worker_sess[i] =
                                        configured_sess[j].sess;
-                               goto next_worker;
+                               next_worker = 1;
+                               break;
                        }
                }
+               if (next_worker)
+                       continue;

                if (rte_mempool_avail_count(mp) == 0) {
                        ret = -ENOMEM;
@@ -522,7 +526,6 @@ scheduler_pmd_sym_session_configure(struct rte_cryptodev 
*dev,
                configured_sess[n_configured_sess].dev_id = worker->dev_id;
                configured_sess[n_configured_sess].sess = worker_sess;
                n_configured_sess++;
-next_worker:
        }

        return 0;
@@ -553,20 +556,23 @@ scheduler_pmd_sym_session_clear(struct rte_cryptodev *dev,

        for (i = 0; i < sched_ctx->nb_workers; i++) {
                struct scheduler_worker *worker = &sched_ctx->workers[i];
+               uint8_t next_worker = 0;

                for (j = 0; j < n_deleted_sess; j++) {
                        if (deleted_sess[j].driver_id == worker->driver_id) {
                                sess_ctx->worker_sess[i] = NULL;
-                               goto next_worker;
+                               next_worker = 1;
+                               break;
                        }
                }
+               if (next_worker)
+                       continue;

                rte_cryptodev_sym_session_free(worker->dev_id,
                        sess_ctx->worker_sess[i]);

                deleted_sess[n_deleted_sess++].driver_id = worker->driver_id;
                sess_ctx->worker_sess[i] = NULL;
-next_worker:
        }
 }

Reply via email to