From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140070.outbound.protection.outlook.com [40.107.14.70]) by dpdk.org (Postfix) with ESMTP id 3B7481B209 for ; Wed, 27 Mar 2019 12:53:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6hEMOSb9bDgvMlBYJxSscfyVJAjsOdOJXerBSKzX0rg=; b=En04LLwIgwsGBRIl54oe4KyuJ1N1lhCWlneld1o1eqgt9a/agYCpEaIGCRIOHBFfnXD3smTLPuYu8qoAtSNHsJ1RFjZ6kGSZdGtGjsR0PUMKelchncbFhYRF6GRAVH+LQIUR/KI3UOz5AFU3AciRrXx/187ITELpZF7zSm5aTi8= Received: from VI1PR04MB4893.eurprd04.prod.outlook.com (20.177.49.154) by VI1PR04MB3261.eurprd04.prod.outlook.com (10.170.231.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1730.19; Wed, 27 Mar 2019 11:53:37 +0000 Received: from VI1PR04MB4893.eurprd04.prod.outlook.com ([fe80::d81a:c2cb:6bce:30bb]) by VI1PR04MB4893.eurprd04.prod.outlook.com ([fe80::d81a:c2cb:6bce:30bb%4]) with mapi id 15.20.1750.014; Wed, 27 Mar 2019 11:53:37 +0000 From: Akhil Goyal To: "dev@dpdk.org" CC: Hemant Agrawal , Akhil Goyal Thread-Topic: [PATCH 6/6] crypto/dpaa2_sec: support multi process Thread-Index: AQHU5JO2FaQJvqqTfEuN0CsU8d7VfA== Date: Wed, 27 Mar 2019 11:53:37 +0000 Message-ID: <20190327114407.13697-7-akhil.goyal@nxp.com> References: <20190327114407.13697-1-akhil.goyal@nxp.com> In-Reply-To: <20190327114407.13697-1-akhil.goyal@nxp.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BMXPR01CA0061.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:2c::25) To VI1PR04MB4893.eurprd04.prod.outlook.com (2603:10a6:803:56::26) x-mailer: git-send-email 2.17.1 authentication-results: spf=none (sender IP is ) smtp.mailfrom=akhil.goyal@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [92.120.1.68] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7fc7d817-d5e4-46fe-5772-08d6b2aad8ba x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600127)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:VI1PR04MB3261; x-ms-traffictypediagnostic: VI1PR04MB3261: x-microsoft-antispam-prvs: x-forefront-prvs: 0989A7979C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(376002)(396003)(346002)(39860400002)(136003)(189003)(199004)(478600001)(6512007)(1076003)(52116002)(76176011)(44832011)(6486002)(50226002)(2501003)(14454004)(6916009)(36756003)(6436002)(305945005)(99286004)(7736002)(186003)(3846002)(2906002)(6116002)(97736004)(102836004)(14444005)(25786009)(386003)(6506007)(26005)(4326008)(446003)(71190400001)(1730700003)(256004)(68736007)(8676002)(71200400001)(5660300002)(2616005)(476003)(316002)(11346002)(81156014)(486006)(8936002)(5640700003)(86362001)(2351001)(53936002)(66066001)(105586002)(106356001)(81166006)(54906003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB3261; H:VI1PR04MB4893.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: XSR4u6i9Sh98eRCU5Zy8OjZRsRkH5Zrqqsv1cOKiL9M1+ZiAo6mKd3LQ0i1SAeadupgVwjZTpYdFqYwklbnGgx9cT2lkxq9og4k0ekDbz7u8S9h5Ns8d80N5snSAiy31J2Seq84uo7UFni7MuiGUaATpevJWTDoY1L3qa+D4kRR39FdJhHDkzl1GesrDAA9vp9wMb0lEfrnhy3qMr681W5DNpNSvJ13o8SVhnsBc5yMMcOb7U29nxEUmG524vCt8NHqRXNwyx2Bph4JQiiiCVEQqlhgbu076zBwulb0r9rjNvHwLRG/eHcTxtQgSEvFsD71fIEjsfTAsHqV7BXUaxxu9/y8YPFMOu7x/e0Y6fpfFPsSUuCdy+o84hrH85nR8LH2zrdCJ19/hmqLGxLQAu3sN1Hstl/AJuFoZ7pu8dcc= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7fc7d817-d5e4-46fe-5772-08d6b2aad8ba X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Mar 2019 11:53:37.2430 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB3261 Subject: [dpdk-dev] [PATCH 6/6] crypto/dpaa2_sec: support multi process X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 11:53:38 -0000 - fle pool allocations should be done for each process. - cryptodev->data is shared across muliple processes but cryptodev itself is allocated for each process. So any information which needs to be shared between processes, should be kept in cryptodev->data. Signed-off-by: Akhil Goyal --- drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 2 +- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 26 ++++++++++----------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/po= rtal/dpaa2_hw_pvt.h index 4679e9340..0cbde8a9b 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h +++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h @@ -152,7 +152,7 @@ struct dpaa2_queue { struct rte_mempool *mb_pool; /**< mbuf pool to populate RX ring. */ union { struct rte_eth_dev_data *eth_data; - void *dev; + struct rte_cryptodev_data *crypto_data; }; int32_t eventfd; /*!< Event Fd of this queue */ uint32_t fqid; /*!< Unique ID of this queue */ diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/d= paa2_sec/dpaa2_sec_dpseci.c index 31b7de679..5b72b9ee4 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -7,6 +7,7 @@ =20 #include #include +#include =20 #include #include @@ -1297,7 +1298,7 @@ dpaa2_sec_enqueue_burst(void *qp, struct rte_crypto_o= p **ops, } =20 static inline struct rte_crypto_op * -sec_simple_fd_to_mbuf(const struct qbman_fd *fd, __rte_unused uint8_t id) +sec_simple_fd_to_mbuf(const struct qbman_fd *fd) { struct rte_crypto_op *op; uint16_t len =3D DPAA2_GET_FD_LEN(fd); @@ -1326,7 +1327,7 @@ sec_simple_fd_to_mbuf(const struct qbman_fd *fd, __rt= e_unused uint8_t id) } =20 static inline struct rte_crypto_op * -sec_fd_to_mbuf(const struct qbman_fd *fd, uint8_t driver_id) +sec_fd_to_mbuf(const struct qbman_fd *fd) { struct qbman_fle *fle; struct rte_crypto_op *op; @@ -1334,7 +1335,7 @@ sec_fd_to_mbuf(const struct qbman_fd *fd, uint8_t dri= ver_id) struct rte_mbuf *dst, *src; =20 if (DPAA2_FD_GET_FORMAT(fd) =3D=3D qbman_fd_single) - return sec_simple_fd_to_mbuf(fd, driver_id); + return sec_simple_fd_to_mbuf(fd); =20 fle =3D (struct qbman_fle *)DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd)); =20 @@ -1401,8 +1402,6 @@ dpaa2_sec_dequeue_burst(void *qp, struct rte_crypto_o= p **ops, { /* Function is responsible to receive frames for a given device and VQ*/ struct dpaa2_sec_qp *dpaa2_qp =3D (struct dpaa2_sec_qp *)qp; - struct rte_cryptodev *dev =3D - (struct rte_cryptodev *)(dpaa2_qp->rx_vq.dev); struct qbman_result *dq_storage; uint32_t fqid =3D dpaa2_qp->rx_vq.fqid; int ret, num_rx =3D 0; @@ -1472,7 +1471,7 @@ dpaa2_sec_dequeue_burst(void *qp, struct rte_crypto_o= p **ops, } =20 fd =3D qbman_result_DQ_fd(dq_storage); - ops[num_rx] =3D sec_fd_to_mbuf(fd, dev->driver_id); + ops[num_rx] =3D sec_fd_to_mbuf(fd); =20 if (unlikely(fd->simple.frc)) { /* TODO Parse SEC errors */ @@ -1546,8 +1545,8 @@ dpaa2_sec_queue_pair_setup(struct rte_cryptodev *dev,= uint16_t qp_id, return -1; } =20 - qp->rx_vq.dev =3D dev; - qp->tx_vq.dev =3D dev; + qp->rx_vq.crypto_data =3D dev->data; + qp->tx_vq.crypto_data =3D dev->data; qp->rx_vq.q_storage =3D rte_malloc("sec dq storage", sizeof(struct queue_storage_info_t), RTE_CACHE_LINE_SIZE); @@ -3116,8 +3115,7 @@ dpaa2_sec_process_parallel_event(struct qbman_swp *sw= p, ev->sched_type =3D rxq->ev.sched_type; ev->queue_id =3D rxq->ev.queue_id; ev->priority =3D rxq->ev.priority; - ev->event_ptr =3D sec_fd_to_mbuf(fd, ((struct rte_cryptodev *) - (rxq->dev))->driver_id); + ev->event_ptr =3D sec_fd_to_mbuf(fd); =20 qbman_swp_dqrr_consume(swp, dq); } @@ -3145,8 +3143,7 @@ dpaa2_sec_process_atomic_event(struct qbman_swp *swp = __attribute__((unused)), ev->queue_id =3D rxq->ev.queue_id; ev->priority =3D rxq->ev.priority; =20 - ev->event_ptr =3D sec_fd_to_mbuf(fd, ((struct rte_cryptodev *) - (rxq->dev))->driver_id); + ev->event_ptr =3D sec_fd_to_mbuf(fd); dqrr_index =3D qbman_get_dqrr_idx(dq); crypto_op->sym->m_src->seqn =3D dqrr_index + 1; DPAA2_PER_LCORE_DQRR_SIZE++; @@ -3275,7 +3272,7 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev) uint16_t token; struct dpseci_attr attr; int retcode, hw_id; - char str[20]; + char str[30]; =20 PMD_INIT_FUNC_TRACE(); dpaa2_dev =3D container_of(dev, struct rte_dpaa2_device, device); @@ -3353,7 +3350,8 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev) internals->hw =3D dpseci; internals->token =3D token; =20 - snprintf(str, sizeof(str), "fle_pool_%d", cryptodev->data->dev_id); + snprintf(str, sizeof(str), "sec_fle_pool_p%d_%d", + getpid(), cryptodev->data->dev_id); internals->fle_pool =3D rte_mempool_create((const char *)str, FLE_POOL_NUM_BUFS, FLE_POOL_BUF_SIZE, --=20 2.17.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 63A54A05D3 for ; Wed, 27 Mar 2019 12:54:27 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6E3B21B3B5; Wed, 27 Mar 2019 12:53:50 +0100 (CET) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140070.outbound.protection.outlook.com [40.107.14.70]) by dpdk.org (Postfix) with ESMTP id 3B7481B209 for ; Wed, 27 Mar 2019 12:53:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6hEMOSb9bDgvMlBYJxSscfyVJAjsOdOJXerBSKzX0rg=; b=En04LLwIgwsGBRIl54oe4KyuJ1N1lhCWlneld1o1eqgt9a/agYCpEaIGCRIOHBFfnXD3smTLPuYu8qoAtSNHsJ1RFjZ6kGSZdGtGjsR0PUMKelchncbFhYRF6GRAVH+LQIUR/KI3UOz5AFU3AciRrXx/187ITELpZF7zSm5aTi8= Received: from VI1PR04MB4893.eurprd04.prod.outlook.com (20.177.49.154) by VI1PR04MB3261.eurprd04.prod.outlook.com (10.170.231.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1730.19; Wed, 27 Mar 2019 11:53:37 +0000 Received: from VI1PR04MB4893.eurprd04.prod.outlook.com ([fe80::d81a:c2cb:6bce:30bb]) by VI1PR04MB4893.eurprd04.prod.outlook.com ([fe80::d81a:c2cb:6bce:30bb%4]) with mapi id 15.20.1750.014; Wed, 27 Mar 2019 11:53:37 +0000 From: Akhil Goyal To: "dev@dpdk.org" CC: Hemant Agrawal , Akhil Goyal Thread-Topic: [PATCH 6/6] crypto/dpaa2_sec: support multi process Thread-Index: AQHU5JO2FaQJvqqTfEuN0CsU8d7VfA== Date: Wed, 27 Mar 2019 11:53:37 +0000 Message-ID: <20190327114407.13697-7-akhil.goyal@nxp.com> References: <20190327114407.13697-1-akhil.goyal@nxp.com> In-Reply-To: <20190327114407.13697-1-akhil.goyal@nxp.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BMXPR01CA0061.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:2c::25) To VI1PR04MB4893.eurprd04.prod.outlook.com (2603:10a6:803:56::26) x-mailer: git-send-email 2.17.1 authentication-results: spf=none (sender IP is ) smtp.mailfrom=akhil.goyal@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [92.120.1.68] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7fc7d817-d5e4-46fe-5772-08d6b2aad8ba x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600127)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:VI1PR04MB3261; x-ms-traffictypediagnostic: VI1PR04MB3261: x-microsoft-antispam-prvs: x-forefront-prvs: 0989A7979C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(376002)(396003)(346002)(39860400002)(136003)(189003)(199004)(478600001)(6512007)(1076003)(52116002)(76176011)(44832011)(6486002)(50226002)(2501003)(14454004)(6916009)(36756003)(6436002)(305945005)(99286004)(7736002)(186003)(3846002)(2906002)(6116002)(97736004)(102836004)(14444005)(25786009)(386003)(6506007)(26005)(4326008)(446003)(71190400001)(1730700003)(256004)(68736007)(8676002)(71200400001)(5660300002)(2616005)(476003)(316002)(11346002)(81156014)(486006)(8936002)(5640700003)(86362001)(2351001)(53936002)(66066001)(105586002)(106356001)(81166006)(54906003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB3261; H:VI1PR04MB4893.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: XSR4u6i9Sh98eRCU5Zy8OjZRsRkH5Zrqqsv1cOKiL9M1+ZiAo6mKd3LQ0i1SAeadupgVwjZTpYdFqYwklbnGgx9cT2lkxq9og4k0ekDbz7u8S9h5Ns8d80N5snSAiy31J2Seq84uo7UFni7MuiGUaATpevJWTDoY1L3qa+D4kRR39FdJhHDkzl1GesrDAA9vp9wMb0lEfrnhy3qMr681W5DNpNSvJ13o8SVhnsBc5yMMcOb7U29nxEUmG524vCt8NHqRXNwyx2Bph4JQiiiCVEQqlhgbu076zBwulb0r9rjNvHwLRG/eHcTxtQgSEvFsD71fIEjsfTAsHqV7BXUaxxu9/y8YPFMOu7x/e0Y6fpfFPsSUuCdy+o84hrH85nR8LH2zrdCJ19/hmqLGxLQAu3sN1Hstl/AJuFoZ7pu8dcc= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7fc7d817-d5e4-46fe-5772-08d6b2aad8ba X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Mar 2019 11:53:37.2430 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB3261 Subject: [dpdk-dev] [PATCH 6/6] crypto/dpaa2_sec: support multi process X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190327115337.MAfqHi4H9Usu26ac6yzCsoaaaa7W0avWCpKsgOAaDFc@z> - fle pool allocations should be done for each process. - cryptodev->data is shared across muliple processes but cryptodev itself is allocated for each process. So any information which needs to be shared between processes, should be kept in cryptodev->data. Signed-off-by: Akhil Goyal --- drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 2 +- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 26 ++++++++++----------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/po= rtal/dpaa2_hw_pvt.h index 4679e9340..0cbde8a9b 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h +++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h @@ -152,7 +152,7 @@ struct dpaa2_queue { struct rte_mempool *mb_pool; /**< mbuf pool to populate RX ring. */ union { struct rte_eth_dev_data *eth_data; - void *dev; + struct rte_cryptodev_data *crypto_data; }; int32_t eventfd; /*!< Event Fd of this queue */ uint32_t fqid; /*!< Unique ID of this queue */ diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/d= paa2_sec/dpaa2_sec_dpseci.c index 31b7de679..5b72b9ee4 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -7,6 +7,7 @@ =20 #include #include +#include =20 #include #include @@ -1297,7 +1298,7 @@ dpaa2_sec_enqueue_burst(void *qp, struct rte_crypto_o= p **ops, } =20 static inline struct rte_crypto_op * -sec_simple_fd_to_mbuf(const struct qbman_fd *fd, __rte_unused uint8_t id) +sec_simple_fd_to_mbuf(const struct qbman_fd *fd) { struct rte_crypto_op *op; uint16_t len =3D DPAA2_GET_FD_LEN(fd); @@ -1326,7 +1327,7 @@ sec_simple_fd_to_mbuf(const struct qbman_fd *fd, __rt= e_unused uint8_t id) } =20 static inline struct rte_crypto_op * -sec_fd_to_mbuf(const struct qbman_fd *fd, uint8_t driver_id) +sec_fd_to_mbuf(const struct qbman_fd *fd) { struct qbman_fle *fle; struct rte_crypto_op *op; @@ -1334,7 +1335,7 @@ sec_fd_to_mbuf(const struct qbman_fd *fd, uint8_t dri= ver_id) struct rte_mbuf *dst, *src; =20 if (DPAA2_FD_GET_FORMAT(fd) =3D=3D qbman_fd_single) - return sec_simple_fd_to_mbuf(fd, driver_id); + return sec_simple_fd_to_mbuf(fd); =20 fle =3D (struct qbman_fle *)DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd)); =20 @@ -1401,8 +1402,6 @@ dpaa2_sec_dequeue_burst(void *qp, struct rte_crypto_o= p **ops, { /* Function is responsible to receive frames for a given device and VQ*/ struct dpaa2_sec_qp *dpaa2_qp =3D (struct dpaa2_sec_qp *)qp; - struct rte_cryptodev *dev =3D - (struct rte_cryptodev *)(dpaa2_qp->rx_vq.dev); struct qbman_result *dq_storage; uint32_t fqid =3D dpaa2_qp->rx_vq.fqid; int ret, num_rx =3D 0; @@ -1472,7 +1471,7 @@ dpaa2_sec_dequeue_burst(void *qp, struct rte_crypto_o= p **ops, } =20 fd =3D qbman_result_DQ_fd(dq_storage); - ops[num_rx] =3D sec_fd_to_mbuf(fd, dev->driver_id); + ops[num_rx] =3D sec_fd_to_mbuf(fd); =20 if (unlikely(fd->simple.frc)) { /* TODO Parse SEC errors */ @@ -1546,8 +1545,8 @@ dpaa2_sec_queue_pair_setup(struct rte_cryptodev *dev,= uint16_t qp_id, return -1; } =20 - qp->rx_vq.dev =3D dev; - qp->tx_vq.dev =3D dev; + qp->rx_vq.crypto_data =3D dev->data; + qp->tx_vq.crypto_data =3D dev->data; qp->rx_vq.q_storage =3D rte_malloc("sec dq storage", sizeof(struct queue_storage_info_t), RTE_CACHE_LINE_SIZE); @@ -3116,8 +3115,7 @@ dpaa2_sec_process_parallel_event(struct qbman_swp *sw= p, ev->sched_type =3D rxq->ev.sched_type; ev->queue_id =3D rxq->ev.queue_id; ev->priority =3D rxq->ev.priority; - ev->event_ptr =3D sec_fd_to_mbuf(fd, ((struct rte_cryptodev *) - (rxq->dev))->driver_id); + ev->event_ptr =3D sec_fd_to_mbuf(fd); =20 qbman_swp_dqrr_consume(swp, dq); } @@ -3145,8 +3143,7 @@ dpaa2_sec_process_atomic_event(struct qbman_swp *swp = __attribute__((unused)), ev->queue_id =3D rxq->ev.queue_id; ev->priority =3D rxq->ev.priority; =20 - ev->event_ptr =3D sec_fd_to_mbuf(fd, ((struct rte_cryptodev *) - (rxq->dev))->driver_id); + ev->event_ptr =3D sec_fd_to_mbuf(fd); dqrr_index =3D qbman_get_dqrr_idx(dq); crypto_op->sym->m_src->seqn =3D dqrr_index + 1; DPAA2_PER_LCORE_DQRR_SIZE++; @@ -3275,7 +3272,7 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev) uint16_t token; struct dpseci_attr attr; int retcode, hw_id; - char str[20]; + char str[30]; =20 PMD_INIT_FUNC_TRACE(); dpaa2_dev =3D container_of(dev, struct rte_dpaa2_device, device); @@ -3353,7 +3350,8 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev) internals->hw =3D dpseci; internals->token =3D token; =20 - snprintf(str, sizeof(str), "fle_pool_%d", cryptodev->data->dev_id); + snprintf(str, sizeof(str), "sec_fle_pool_p%d_%d", + getpid(), cryptodev->data->dev_id); internals->fle_pool =3D rte_mempool_create((const char *)str, FLE_POOL_NUM_BUFS, FLE_POOL_BUF_SIZE, --=20 2.17.1