DPDK patches and discussions
 help / color / mirror / Atom feed
From: Akhil Goyal <gakhil@marvell.com>
To: Fan Zhang <roy.fan.zhang@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "maxime.coquelin@redhat.com" <maxime.coquelin@redhat.com>,
	"chandu@amd.com" <chandu@amd.com>,
	"ruifeng.wang@arm.com" <ruifeng.wang@arm.com>,
	"ajit.khaparde@broadcom.com" <ajit.khaparde@broadcom.com>,
	Anoob Joseph <anoobj@marvell.com>,
	"pablo.de.lara.guarch@intel.com" <pablo.de.lara.guarch@intel.com>,
	"matan@nvidia.com" <matan@nvidia.com>,
	"g.singh@nxp.com" <g.singh@nxp.com>,
	"jianjay.zhou@huawei.com" <jianjay.zhou@huawei.com>
Subject: RE: [EXT] [PATCH 2/3] crypto/scheduler: use unified session
Date: Thu, 15 Sep 2022 07:23:33 +0000	[thread overview]
Message-ID: <CO6PR18MB4484C1FFAB559A8AA6D460E4D8499@CO6PR18MB4484.namprd18.prod.outlook.com> (raw)
In-Reply-To: <CO6PR18MB44844EF8C44ABE611F954C3ED8499@CO6PR18MB4484.namprd18.prod.outlook.com>

> 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	other threads:[~2022-09-15  7:23 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-29 16:06 [PATCH 0/3] cryptodev: sym session framework rework Fan Zhang
2022-08-29 16:06 ` [PATCH 1/3] cryptodev: rework session framework Fan Zhang
2022-09-15  7:07   ` [EXT] " Akhil Goyal
2022-09-15  7:26     ` Akhil Goyal
2022-08-29 16:06 ` [PATCH 2/3] crypto/scheduler: use unified session Fan Zhang
2022-09-15  7:06   ` [EXT] " Akhil Goyal
2022-09-15  7:23     ` Akhil Goyal [this message]
2022-09-18 13:01   ` Akhil Goyal
2022-08-29 16:06 ` [PATCH 3/3] cryptodev: hide sym session structure Fan Zhang
2022-09-18 13:19   ` [EXT] " Akhil Goyal
2022-09-21 15:02 ` [PATCH v2 0/6] crypto/security session framework rework Akhil Goyal
2022-09-21 15:02   ` [PATCH v2 1/6] cryptodev: rework session framework Akhil Goyal
2022-09-22 14:06     ` Ji, Kai
2022-09-21 15:02   ` [PATCH v2 2/6] crypto/scheduler: use unified session Akhil Goyal
2022-09-22 14:04     ` Ji, Kai
2022-09-21 15:02   ` [PATCH v2 3/6] cryptodev: hide sym session structure Akhil Goyal
2022-09-22 13:49     ` Ji, Kai
2022-09-21 15:02   ` [PATCH v2 4/6] security: remove priv mempool usage Akhil Goyal
2022-09-21 15:02   ` [PATCH v2 5/6] drivers/crypto: support security session get size op Akhil Goyal
2022-09-22 13:52     ` Ji, Kai
2022-09-21 15:02   ` [PATCH v2 6/6] security: hide session structure Akhil Goyal
2022-09-21 15:11   ` [PATCH v2 0/6] crypto/security session framework rework Akhil Goyal
2022-09-23 13:00     ` Coyle, David
2022-09-23  9:29   ` Gagandeep Singh
2022-09-24 16:35   ` [PATCH v3 " Akhil Goyal
2022-09-24 16:35     ` [PATCH v3 1/6] cryptodev: rework session framework Akhil Goyal
2022-09-24 16:35     ` [PATCH v3 2/6] crypto/scheduler: use unified session Akhil Goyal
2022-09-24 16:35     ` [PATCH v3 3/6] cryptodev: hide sym session structure Akhil Goyal
2022-09-24 16:35     ` [PATCH v3 4/6] security: remove priv mempool usage Akhil Goyal
2022-09-24 16:35     ` [PATCH v3 5/6] drivers/crypto: support security session get size op Akhil Goyal
2022-09-24 16:35     ` [PATCH v3 6/6] security: hide session structure Akhil Goyal
2022-09-24 16:39     ` [PATCH v3 0/6] crypto/security session framework rework Akhil Goyal
2022-09-26 10:09     ` Ruifeng Wang
2022-09-26 10:12       ` Akhil Goyal
2022-09-26 19:14     ` [PATCH v4 " Akhil Goyal
2022-09-26 19:14       ` [PATCH v4 1/6] cryptodev: rework session framework Akhil Goyal
2022-09-26 19:14       ` [PATCH v4 2/6] crypto/scheduler: use unified session Akhil Goyal
2022-09-27 11:03         ` Ji, Kai
2022-09-27 19:25           ` Akhil Goyal
2022-09-28 12:56             ` Akhil Goyal
2022-09-28 15:29               ` Ji, Kai
2022-09-26 19:14       ` [PATCH v4 3/6] cryptodev: hide sym session structure Akhil Goyal
2022-09-26 19:14       ` [PATCH v4 4/6] security: remove priv mempool usage Akhil Goyal
2022-09-26 19:14       ` [PATCH v4 5/6] drivers/crypto: support security session get size op Akhil Goyal
2022-09-26 19:14       ` [PATCH v4 6/6] security: hide session structure Akhil Goyal
2022-09-26 19:23       ` [PATCH v4 0/6] crypto/security session framework rework Akhil Goyal
2022-09-27  3:27       ` Ruifeng Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CO6PR18MB4484C1FFAB559A8AA6D460E4D8499@CO6PR18MB4484.namprd18.prod.outlook.com \
    --to=gakhil@marvell.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=anoobj@marvell.com \
    --cc=chandu@amd.com \
    --cc=dev@dpdk.org \
    --cc=g.singh@nxp.com \
    --cc=jianjay.zhou@huawei.com \
    --cc=matan@nvidia.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=roy.fan.zhang@intel.com \
    --cc=ruifeng.wang@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).