From patchwork Wed Aug 25 07:14:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 502232 Delivered-To: patch@linaro.org Received: by 2002:a02:6f15:0:0:0:0:0 with SMTP id x21csp345184jab; Wed, 25 Aug 2021 00:18:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjRZJw+t8FxK8AlTckorh9fGpltobTbW1BmAKzxS2xLRUCuIvA3UMcuzx8NwLmBIJojcds X-Received: by 2002:a05:6402:430d:: with SMTP id m13mr46627005edc.372.1629875934188; Wed, 25 Aug 2021 00:18:54 -0700 (PDT) Return-Path: Received: from mails.dpdk.org (mails.dpdk.org. [217.70.189.124]) by mx.google.com with ESMTP id dp5si5379454ejc.132.2021.08.25.00.18.53; Wed, 25 Aug 2021 00:18:54 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) client-ip=217.70.189.124; Authentication-Results: mx.google.com; dkim=fail header.i=@nxp.com header.s=selector2 header.b=H1Cmkyak; arc=fail (signature failed); spf=pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 543724003D; Wed, 25 Aug 2021 09:18:49 +0200 (CEST) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20053.outbound.protection.outlook.com [40.107.2.53]) by mails.dpdk.org (Postfix) with ESMTP id B142241199 for ; Wed, 25 Aug 2021 09:18:47 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mtzZVOcvkttPztWGs68cVqBqJtYEWr1+d5zQiESL1t8uP20eLf9j/LF0FGl5DNkKElDyoenCCfxnzDjC/h07BjkhFq2qrg6JZcOZJdi8t34pIrxBzYoPeGa6mmGQ7j0/BrTKLkaK732bpojPukLoledGSMSrfTEnO8Q0NhRw8lOSh47mubBe9K02718oAtRPInZJFU9i/vsQRUg3wzcDmlcsvxqQWqnM3CS6FVER5cZ78gIr+ZKgiplafMItzNwYZ9zN5m6J2Pk+z3HO8HPvUIjXMZq6F+KajpFiIlNqsHzAKrgzp4pLsEVTCQN8CVz/gGeAqRfrO/EXRU0AsEWx8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mf2gSP1Yp+yuvDItU1E7AOMM1arbJICSFEG33hTJ15k=; b=cFPa3/8lx5umZEasF9N96wdxyN8tKTPtutLGse43t1zFLXnrCnNR8M6oRNBRAdbOoxIQLTOJLETYaj0hNosDcWQSiOKc3EQkBErDhscuAiT438uMUjtteR+0EtWvLHL8wwKnxnAAeLZgHZAXH1N6xdU4WQ6f2Eo9muxAfWIWjv+6djYEstvXLNEel5H8NugtS6UzpDXhl7YTj4Ztyj92kSUxLUItw3nDBlVoslQYs7xYVTqa+x5/l+lfPsdaEQbOlHO+PUYEt/ZSN6u4HNbFnjsIwI6vEdc7lLZSGX3+3jU9qG8BJHvCSH+IdxC0+cspVjNW+J/ogNX8FkNvA/asxQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mf2gSP1Yp+yuvDItU1E7AOMM1arbJICSFEG33hTJ15k=; b=H1CmkyakwyNhjLNNcAPG2aw+m4S8MBIq19xK7itn7fSszWDnjo76igXiH2RzCUChdUThDmu+Ng21BwjcSQqhp1zua+1Nlasfv8PccV/0CXm0sM7vAtKriZcUC9G5gSwW+d46lPbl+BEL2OKV1n4Oy6HSXrG8QtvLYt5agBPWY8g= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=nxp.com; Received: from DU2PR04MB8630.eurprd04.prod.outlook.com (2603:10a6:10:2dd::15) by DU2PR04MB8614.eurprd04.prod.outlook.com (2603:10a6:10:2d9::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4436.19; Wed, 25 Aug 2021 07:18:46 +0000 Received: from DU2PR04MB8630.eurprd04.prod.outlook.com ([fe80::2590:514a:df1f:a793]) by DU2PR04MB8630.eurprd04.prod.outlook.com ([fe80::2590:514a:df1f:a793%8]) with mapi id 15.20.4436.025; Wed, 25 Aug 2021 07:18:46 +0000 From: Hemant Agrawal To: dev@dpdk.org, gakhil@marvell.com Cc: konstantin.ananyev@intel.com, roy.fan.zhang@intel.com Date: Wed, 25 Aug 2021 12:44:56 +0530 Message-Id: <20210825071510.7913-2-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210825071510.7913-1-hemant.agrawal@nxp.com> References: <20210812071244.28799-1-hemant.agrawal@nxp.com> <20210825071510.7913-1-hemant.agrawal@nxp.com> X-ClientProxiedBy: SG2PR01CA0126.apcprd01.prod.exchangelabs.com (2603:1096:4:40::30) To DU2PR04MB8630.eurprd04.prod.outlook.com (2603:10a6:10:2dd::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from dpdk-xeon.ap.freescale.net (92.120.0.67) by SG2PR01CA0126.apcprd01.prod.exchangelabs.com (2603:1096:4:40::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4436.19 via Frontend Transport; Wed, 25 Aug 2021 07:18:44 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a53d8231-b70d-4798-5011-08d9679893c6 X-MS-TrafficTypeDiagnostic: DU2PR04MB8614: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4303; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6ApCIJidEtRh+yFQYwSzwsIZz9jNmT4ok0roLANDzwa0hnQGRIyTljH3eqx+lhRfCORzwrTabZYMWp5CCj4QkQjcS0JMEyf1zCxYLe5cLHRLbUfz915SBfiT7OozO0reRAWkPITuszBeQXOhoShrm62/Wiag/nNjQyh/f42ioSQv5zmSARftC4PRy9mthXXww0gD519UlaD6n2+LX4+Vo6iu/mwEHKI2dZX7VUPFyTftuixWOYjHmVp0bV6TCnZW9LvOAg29jKJxTSEoVUjv5WDd/Xh4TkSPmO8EmZrGOHF8GYXs7UEemE/5msI86WWO1cQB5v+mViS+BprAT1gvzAx9W89xWkoCTaw+qK1T8aN98i9lN4GQ5PBkNsbMTEe+uBjdG7lJfjJWLX1qhWgzfINAC0aka8qu0aq9oBdPt9QuulOzgoh10543Iy7cGW35I4dqabp415V0y4nLEOkSlCQXTZKS7ysb+0NSnouAUyVwyrAchMzH51El5+xZiohgXkqjznIVT5+Yl5hxV/co+9RswrUzRO9JMxabfFSi+hp/hMA+RdHVmIT4wz1xmcWpYmpc8qFIjLBGYZ2DFd4tUOWw4DjAnn7xlwlprIDyfUl3DZDtjgLMb86qosYMqrWU65U7JSs2Fh8DlMp17QQ7PL37AF/DzoCurL/DhaYiriTy5oaboUQA/FKO5I8AoMApBrvwAF+wzJFrUMUSssxJcQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU2PR04MB8630.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(376002)(366004)(346002)(396003)(39860400002)(186003)(83380400001)(6512007)(66476007)(66556008)(4326008)(86362001)(38100700002)(38350700002)(36756003)(316002)(6506007)(66946007)(1076003)(8676002)(26005)(2906002)(52116002)(2616005)(956004)(6666004)(5660300002)(44832011)(478600001)(8936002)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 5erO53KsCPUrJiJ6bQ8BszL39vSGShE+e5R6Iwa3c4nMtuW8PvSUN90xMV6S5e3++OznvVsWZ+kOW0HaRxDOyYmqyb57r9KHZ3CUj46jfy+OmScUl4nHku3Jj5ZvE0faweItJ0lpKbQ1O9rI1fNw8qewS2U5MD74iU3ElvLQaWJ1azjuxT/BeSyDDHrY5eLwQJxGaMLKWSPgTUjjSCKZNaFCEfaTS9njG8B4ImrUvvIwWzmGUakcXKWlspwqNUzns/DH3TGr5YMz/bNdKzGmg8AzoiYOUt8iinx4QZrMHBkr81TYAVk6G63GML6V9YPxvZYkDQV2ekr6S4uZSYaRajXglNFW+qPocCKA3puqRdTMm0+myE12ZUpe+iOAkMxD5VJSWfsAulzhH0P7PNMCpaCIY9JHzp6s3FqUHGPEc+tMeYZzX3lPQY3hTJDsCTyhsferpwnD3NE38uZQARpjPbkG8w8talDNnot+4uBXCpDXDNUgrYnZpEVUDaDAOuCvRuMJqmbvmZeArr4zKzOm2JFPE4mzhNCmQFxgwyOuWcikyx0mhG0RpdGTSH5qXVWQ52xgPFAunHbMzJoBBZEBusGAKFyAVtEIPfKEg9vwg9RwMn09V6KJ2xZzY2O9jSbE30i0IWgJ8wBzuwlzjKzc0ScECiUFYRIiHjeGi6dcSrrhWxszSRImLZw4L08nNCNvJlhimB9unDD8VVI06O3CxyDonrjafrKHtgr6Ce1NxaVXXO6jqwcwOG/XfI7IO5dMlaQ5iO+nE4CZ8Kaw1tEt4lmpmb6euMLYarVetVhHxVvmUklc79nB0qkCh0FKKXwEDzTIOxBEquds0G0xhFREyVjQw8kfPjdkqqvPBIXe1dRjGLFCz7HIvt2x6N8MA18Y3to7/24wnp2yqt5BIUysvDk9qyYPEK/YdKT4T2YqnBxDsnwvMXyWcZ8XWfcNYjujZA4btKzq8HNI4jpwaijcwkZyxUUQu10+rJAEWaPMXlBNiRkKjnIQ00hkKqbfxdvpysCVNM3VZuqCx+PiWVRGzdRrQUOwbNB/9HAKOJEHbiQndEjW0wIPpRjNePAaJeV4tDsa0UFLkOKP4XdcgnEtJo/8lq1k4kffVatw2qJoNY6usQGZvmdQl9lU82fIS0m8EqS79m6MLELwB5TGvN7UAzDiy5PFrI0rIgy4yoojkrRlk/l1t+OhRDM5xx3NYMm8wEKFXWuJ/vyVRunUP0G1vrEegUQioodsONMINBjTf3TBj8grWacXOvxX/5ddSPpy7Zk20b50ASbx7SI+LnMd+4WMNEx6Xo57gebgc1jja8xfmXhbZxZ0UEB5xFc3xNlB X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a53d8231-b70d-4798-5011-08d9679893c6 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8630.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2021 07:18:46.4370 (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-CrossTenant-UserPrincipalName: KodxMjsWDFZn7vYOU4pIFnnVxTwOSrdCb3UednrMIb4aYGjsPTjExmbpLk1cPUjcs3jKDC2suvTZ6k9ClMb+wg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8614 Subject: [dpdk-dev] [PATCH 01/15] crypto: change sgl to src_sgl in vector X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" This patch renames the sgl to src_sgl to help differentiating between source and destination sgl. Signed-off-by: Hemant Agrawal --- app/test/test_cryptodev.c | 6 +++--- drivers/crypto/qat/qat_sym_hw_dp.c | 27 ++++++++++++++++----------- lib/cryptodev/rte_crypto_sym.h | 2 +- lib/ipsec/misc.h | 4 ++-- 4 files changed, 22 insertions(+), 17 deletions(-) -- 2.17.1 Acked-by: Akhil Goyal diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 9ad0b37473..aecd507fa1 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -221,7 +221,7 @@ process_sym_raw_dp_op(uint8_t dev_id, uint16_t qp_id, digest.va = NULL; sgl.vec = data_vec; vec.num = 1; - vec.sgl = &sgl; + vec.src_sgl = &sgl; vec.iv = &cipher_iv; vec.digest = &digest; vec.aad = &aad_auth_iv; @@ -385,7 +385,7 @@ process_cpu_aead_op(uint8_t dev_id, struct rte_crypto_op *op) sgl.vec = vec; sgl.num = n; - symvec.sgl = &sgl; + symvec.src_sgl = &sgl; symvec.iv = &iv_ptr; symvec.digest = &digest_ptr; symvec.aad = &aad_ptr; @@ -431,7 +431,7 @@ process_cpu_crypt_auth_op(uint8_t dev_id, struct rte_crypto_op *op) sgl.vec = vec; sgl.num = n; - symvec.sgl = &sgl; + symvec.src_sgl = &sgl; symvec.iv = &iv_ptr; symvec.digest = &digest_ptr; symvec.status = &st; diff --git a/drivers/crypto/qat/qat_sym_hw_dp.c b/drivers/crypto/qat/qat_sym_hw_dp.c index ac9ac05363..4870ebf66a 100644 --- a/drivers/crypto/qat/qat_sym_hw_dp.c +++ b/drivers/crypto/qat/qat_sym_hw_dp.c @@ -181,8 +181,9 @@ qat_sym_dp_enqueue_cipher_jobs(void *qp_data, uint8_t *drv_ctx, (uint8_t *)tx_queue->base_addr + tail); rte_mov128((uint8_t *)req, (const uint8_t *)&(ctx->fw_req)); - data_len = qat_sym_dp_parse_data_vec(qp, req, vec->sgl[i].vec, - vec->sgl[i].num); + data_len = qat_sym_dp_parse_data_vec(qp, req, + vec->src_sgl[i].vec, + vec->src_sgl[i].num); if (unlikely(data_len < 0)) break; req->comn_mid.opaque_data = (uint64_t)(uintptr_t)user_data[i]; @@ -302,8 +303,9 @@ qat_sym_dp_enqueue_auth_jobs(void *qp_data, uint8_t *drv_ctx, (uint8_t *)tx_queue->base_addr + tail); rte_mov128((uint8_t *)req, (const uint8_t *)&(ctx->fw_req)); - data_len = qat_sym_dp_parse_data_vec(qp, req, vec->sgl[i].vec, - vec->sgl[i].num); + data_len = qat_sym_dp_parse_data_vec(qp, req, + vec->src_sgl[i].vec, + vec->src_sgl[i].num); if (unlikely(data_len < 0)) break; req->comn_mid.opaque_data = (uint64_t)(uintptr_t)user_data[i]; @@ -484,14 +486,16 @@ qat_sym_dp_enqueue_chain_jobs(void *qp_data, uint8_t *drv_ctx, (uint8_t *)tx_queue->base_addr + tail); rte_mov128((uint8_t *)req, (const uint8_t *)&(ctx->fw_req)); - data_len = qat_sym_dp_parse_data_vec(qp, req, vec->sgl[i].vec, - vec->sgl[i].num); + data_len = qat_sym_dp_parse_data_vec(qp, req, + vec->src_sgl[i].vec, + vec->src_sgl[i].num); if (unlikely(data_len < 0)) break; req->comn_mid.opaque_data = (uint64_t)(uintptr_t)user_data[i]; - if (unlikely(enqueue_one_chain_job(ctx, req, vec->sgl[i].vec, - vec->sgl[i].num, &vec->iv[i], &vec->digest[i], - &vec->auth_iv[i], ofs, (uint32_t)data_len))) + if (unlikely(enqueue_one_chain_job(ctx, req, + vec->src_sgl[i].vec, vec->src_sgl[i].num, + &vec->iv[i], &vec->digest[i], + &vec->auth_iv[i], ofs, (uint32_t)data_len))) break; tail = (tail + tx_queue->msg_size) & tx_queue->modulo_mask; @@ -688,8 +692,9 @@ qat_sym_dp_enqueue_aead_jobs(void *qp_data, uint8_t *drv_ctx, (uint8_t *)tx_queue->base_addr + tail); rte_mov128((uint8_t *)req, (const uint8_t *)&(ctx->fw_req)); - data_len = qat_sym_dp_parse_data_vec(qp, req, vec->sgl[i].vec, - vec->sgl[i].num); + data_len = qat_sym_dp_parse_data_vec(qp, req, + vec->src_sgl[i].vec, + vec->src_sgl[i].num); if (unlikely(data_len < 0)) break; req->comn_mid.opaque_data = (uint64_t)(uintptr_t)user_data[i]; diff --git a/lib/cryptodev/rte_crypto_sym.h b/lib/cryptodev/rte_crypto_sym.h index 58c0724743..dcc0bd5933 100644 --- a/lib/cryptodev/rte_crypto_sym.h +++ b/lib/cryptodev/rte_crypto_sym.h @@ -69,7 +69,7 @@ struct rte_crypto_sym_vec { /** number of operations to perform */ uint32_t num; /** array of SGL vectors */ - struct rte_crypto_sgl *sgl; + struct rte_crypto_sgl *src_sgl; /** array of pointers to cipher IV */ struct rte_crypto_va_iova_ptr *iv; /** array of pointers to digest */ diff --git a/lib/ipsec/misc.h b/lib/ipsec/misc.h index 79b9a20762..58ff538141 100644 --- a/lib/ipsec/misc.h +++ b/lib/ipsec/misc.h @@ -136,7 +136,7 @@ cpu_crypto_bulk(const struct rte_ipsec_session *ss, /* not enough space in vec[] to hold all segments */ if (vcnt < 0) { /* fill the request structure */ - symvec.sgl = &vecpkt[j]; + symvec.src_sgl = &vecpkt[j]; symvec.iv = &iv[j]; symvec.digest = &dgst[j]; symvec.aad = &aad[j]; @@ -160,7 +160,7 @@ cpu_crypto_bulk(const struct rte_ipsec_session *ss, } /* fill the request structure */ - symvec.sgl = &vecpkt[j]; + symvec.src_sgl = &vecpkt[j]; symvec.iv = &iv[j]; symvec.aad = &aad[j]; symvec.digest = &dgst[j];