From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 30DE0A0C52; Thu, 12 Aug 2021 09:16:15 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C5053411FA; Thu, 12 Aug 2021 09:16:08 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2085.outbound.protection.outlook.com [40.107.21.85]) by mails.dpdk.org (Postfix) with ESMTP id 5675740042 for ; Thu, 12 Aug 2021 09:16:06 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nEJNwHOStSV7vKjEbPtci8J2o9HAXck9NsYgU5oFDQ8YcKM98lVCzyQeGBQ7iaGoKMjn+Lf9uP/aZNEfMENyPzFgna/kSkz+VY1Hq0fvQW69753hYnXCxI3DukBXLx9beG4nqzpdTKtxfjAbdPiP0dAQpNcFDkAz081DHRU5QKzhDIeA9ygoSqU/Du2/Di360f8nE42k81wHqmokeufZSwC/NsLMwGiLakOCQ4nUTijzVADD9GzybDorqOb40i1fMDhj4NwVDt+MM75fvu4V72T2lluwcOihWDRRAQBQL559kCzTE/u+XOLAadPmmBPG9Ap7JCVJEcz5xjSY37P02g== 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=TM4yYZZfrVoAAnapzzEv6f55Rl0tUSAnkfn8T/pktwKBUL6SfwgZgUZL065484OBJCXL1uBU6QgK3VHNg4CzvGDQrDxMgCBA9vDdPvwcvzDMwBnb/hGyqx66DfCX0PGSrDmmOiNa0NS0kY/vTEv1gz385JAU8Hz8ED8Gz8yvsljeLFVG/+a6O+xiclQb3JeOLei5CmrmdQbEwO5a9EolIDV9ULnC1Nfi5Uw0N5c49dSU8OuOLsZovLmj6mpnJmVeOpdASV6DkAlvZL11VbY3m02HBQcytQD1y31jhdqtIzCZs9HpCxO31b5YlvbG4CoLCvUcMcgnYyzfkS3CTXngNg== 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=Zfycsb7jBz+gLGf/dHtkE5rb49Vi+V3o/a+g3yWRp2aFA5TrxeGxqx3hc8JzEcHSLXXbdN/csohAWJQzQAQ3fL27FBje/FFqMdu2+8hbOEw0xUJ2riWCNLzf+AqmGCnO7epY9y7ip1LGxcHb76tmBf2M7tT2Uki6NHB/BIZprss= 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 DB9PR04MB8493.eurprd04.prod.outlook.com (2603:10a6:10:2c5::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.17; Thu, 12 Aug 2021 07:16:05 +0000 Received: from DU2PR04MB8630.eurprd04.prod.outlook.com ([fe80::2590:514a:df1f:a793]) by DU2PR04MB8630.eurprd04.prod.outlook.com ([fe80::2590:514a:df1f:a793%9]) with mapi id 15.20.4415.016; Thu, 12 Aug 2021 07:16:05 +0000 From: Hemant Agrawal To: dev@dpdk.org, gakhil@marvell.com Date: Thu, 12 Aug 2021 12:42:29 +0530 Message-Id: <20210812071244.28799-2-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210812071244.28799-1-hemant.agrawal@nxp.com> References: <20210812071244.28799-1-hemant.agrawal@nxp.com> Content-Type: text/plain X-ClientProxiedBy: SG2PR02CA0105.apcprd02.prod.outlook.com (2603:1096:4:92::21) 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 SG2PR02CA0105.apcprd02.prod.outlook.com (2603:1096:4:92::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.14 via Frontend Transport; Thu, 12 Aug 2021 07:16:04 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f729ccfc-4a45-45fe-4606-08d95d610c95 X-MS-TrafficTypeDiagnostic: DB9PR04MB8493: 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: EMaxMRBoQljWNga4ELVOYJjbAv/EDaPTWdzNQZyWATSo+lykoeWVsrl6feRzqF7NZa0TGvl/SPsA8v9Ql2++A6hlK+8MkoGTw7R+Pk9CbYTrU7sLObpPL8h5+qclytu/Y14HZAqCqyK7iW6VFPlk0683TpbHao0huZ64jIQTHekSTy9EU8a67IhXNBJT7aXhPkZ5BMtUkSkIlc0WPo+HYXjOKwCK7TfsMhBlAzuj+Rlrd7O6ozFPPYNkvoJo6AbFxQEB/dt5ZP45BLEHQH3X9pZb/YSOqQyBNNAoH/kgbMVfoDTH6Zi3w9HEv3C0EQzS/OzoiAMc//DocM1TrxLYK142RoEUXVZphTsrr6U22rvolne0Mh9OUilQqdcz36348qBhWyXDv6r60LqVwiyTFLR5IWfaaU1XB9UkbO60vKbQ2UmFKuMGQzdsqriPRyPsS/YqV3VyKga6q+7UDchXEhB2ox7RI5sGLhoMhDEIur8HFSJxL9VuTrAAhgJEDQaRahN8C/ig3eyNyC5QCnEXoDcjQE7yXJucq3ajpYllKFOp1zY0xLUdiQTUiL075sa6pH//SP4UXsYeX3FEijadDE1yy2JQqz4DGM0fWXLXreUuY4Rmpxu8Bvb5EONAALp6bqT6wQMAR1fz6bUEweZabgUmau1wZCvBDZIgQZqhIGkeG+hBsugNUqb5276azQX1rteAeytYOFkYPtv9WmnBBQ== 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)(396003)(366004)(346002)(136003)(376002)(39860400002)(6506007)(52116002)(86362001)(316002)(6666004)(8676002)(26005)(8936002)(36756003)(66476007)(38350700002)(66556008)(66946007)(38100700002)(478600001)(186003)(2616005)(6512007)(1076003)(44832011)(956004)(2906002)(5660300002)(6486002)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?ZSV8stFmgBZxYjeZooh1Iwdtt++mPz4HuaPMTM/jvleprrRo3zYktZGqx2C+?= =?us-ascii?Q?J/ebtjVXoQMaYfviDBHYigdaCR+JZumpJtPPV2usQpdaPZAgxLCykfJQM+Zi?= =?us-ascii?Q?wWrVqxaIyKRf+H1nb5pZDoHk+Kep9Ji13f8xaTHZIMhqODZ3kEor2n4cywOe?= =?us-ascii?Q?SCEbjoljceczwAMKsTajsAcw7Vr9TNL4zV2TwFfF/xczHKA1HeSlOHOnlD/t?= =?us-ascii?Q?y/T+E28vdifbiu2WjNI8L6DTG1GGLuJC/ik2P5SyAjhj57M1oVbPIBqPNUir?= =?us-ascii?Q?pCNOv0xeJwFaP2A1TjroX7TR8lr0hRhZddcVoagTpuVks+DksfN011t+zshX?= =?us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/HeoG9m2ZcZ+OiaKdUj?= =?us-ascii?Q?QAqJN/2Dr/+8sb0bt1ALP+vb4Y86Ykl0Jw+7EPQl/hzZtEAyiCsJee7Jwehh?= =?us-ascii?Q?eqROB2qsRz/OQrrlXBK6RkGo?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f729ccfc-4a45-45fe-4606-08d95d610c95 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8630.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Aug 2021 07:16:05.6017 (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: Dg+Y+gmiFMFkRG1jFPx2dmMqxrNsFO+q9jPtXS0lxZJ78jx4q/nlkH0x7pf0/sWoJaUjF2PziGtx8igcdQnGSA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8493 Subject: [dpdk-dev] [RFC 01/16] 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(-) 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]; -- 2.17.1