From patchwork Mon Sep 17 10:36:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shreyansh Jain X-Patchwork-Id: 146845 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3603046ljw; Mon, 17 Sep 2018 03:38:27 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYjaDxBjvODmIsgMfj2SbbK9UgaFg5WPcygvM9L25lmGWEIZYjgIcjdUHqc3GGKhOja1T0x X-Received: by 2002:a50:f419:: with SMTP id r25-v6mr40867271edm.226.1537180706950; Mon, 17 Sep 2018 03:38:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537180706; cv=none; d=google.com; s=arc-20160816; b=GJDkJ+4+UNq+jdwT1yNQ6Q3X4zI4pG826795K3YMFd27HY+HvCvDmPrioWMW/C5ne4 tUPaMT7nNmJOEcdJN4vRVR/ODWyRydiAV4tklH5U3M+TGvDOdZOc6xz2fREEkhxBSFbW T7E3IdFvm0UJKWdu63mfJQoB5ioS80DKmS4xTVidhJ6s9Jc/EaRUyvSly1RCD/y3DkHm cY0D2X47lZHZxTwMTvEz43rdJ0qcmwj4y5/8FR4nhnKvKxMpd8boUeOc+rRQLIRTJ1QB LgyHC31QAJ0QtS7ki0BG6RVRvQ/oc08+kdtbPB2qQsZ8niF7Yt4sMOf4Vgnm36Xt8Diy ccew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:cc:to:from:dkim-signature; bh=znX2fWlSFOiwhQtMTtOsTfL9I+enghH4BX/agzpx/Mo=; b=qwlZZZL64lmuc0qW5etDQ6KOrOMd0uljClRVEPnEckz6oDinPsjl+PhmUySkVNa1YJ om091uMWj9Q1BQZVIuuXg9kDOSHn5O5E4XeJ6GyEFJo07+kygqZcH5K87CY2ffaertif utCnGnIyWte+erHFv1eWiISTQ1jc8n+fqxrXE1kkOjkSLmWm0AtsAuhC57WGYpvdsOZR PEYCc/qbFc0lnwwBfAUC5NU6Ng7vdkjOtG+zL+n+kr3lLkOE61C2+VAs2v8u9u3lNoVi FhvDKGWhcgbv8W63tUduzfjMXxKgrTTtRgbbnjXMf1ozj2g8otIkdfIgMJ+XlXu7lLxU c3nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=PjpAFN+n; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id f12-v6si4103403edn.275.2018.09.17.03.38.26; Mon, 17 Sep 2018 03:38:26 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=PjpAFN+n; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8168A5920; Mon, 17 Sep 2018 12:37:57 +0200 (CEST) Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40071.outbound.protection.outlook.com [40.107.4.71]) by dpdk.org (Postfix) with ESMTP id 0EFA44F93 for ; Mon, 17 Sep 2018 12:37:52 +0200 (CEST) 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=znX2fWlSFOiwhQtMTtOsTfL9I+enghH4BX/agzpx/Mo=; b=PjpAFN+nQZTa3LKQ+yA/IiC3PngScHqHZBRDSA2BzRUv3Y4E8S6j7UznQohIz8dNnRiy3ojwWK4v7yZ5tF4MqzYkLk9WGr2OHNky7+xRPVRHvmb4fPkazcCKDVAXo0QitxZYjex1pkL0xumC2A35x0dFzn8mjlSo0r3Kk2QPcGQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shreyansh.jain@nxp.com; Received: from Tophie.ap.freescale.net (14.142.187.166) by AM0PR04MB4673.eurprd04.prod.outlook.com (2603:10a6:208:75::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.18; Mon, 17 Sep 2018 10:37:50 +0000 From: Shreyansh Jain To: dev@dpdk.org, ferruh.yigit@intel.com Cc: Hemant Agrawal Date: Mon, 17 Sep 2018 16:06:24 +0530 Message-Id: <20180917103631.32304-5-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180917103631.32304-1-shreyansh.jain@nxp.com> References: <20180917103631.32304-1-shreyansh.jain@nxp.com> MIME-Version: 1.0 X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: BM1PR01CA0092.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1::32) To AM0PR04MB4673.eurprd04.prod.outlook.com (2603:10a6:208:75::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 00fa9145-a74e-4a58-9def-08d61c899e4d X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM0PR04MB4673; X-Microsoft-Exchange-Diagnostics: 1; AM0PR04MB4673; 3:wM5AABtq9HD9mzoS56ij18rovqh4uW8Vi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53Rsp/+WJhqBMhCX3NxLMrlutORcW7LPRBNZ9iJIIrOajoFlV0bhDphBcMK82pm8j8pW2JZnCilCAINQOb/6+a++ywtLUzQm5t3FfWxzq6ygPhP+xht4myhbfbiaZLyQl61Nqa8ORmnDvpvRpUEM6MKlRhBkHyyEwaVnr1qboC0aaUxX7iwSZtzCM4Qv8aN4rOTxZhkEAOriLVSpgynUZGwclU/sU4H1Swm3DBd8yaEoMvn4JZLx/sB3FTv/dSvnUHqbaGMW1iz6MjoRKA99UOFFKKRWfBfEOBim4xLEuOrwi; 4:dP43Z3AtDmu0xZc8egW6dC9JUc1UWWSwA4XNykrKo+jzOAM+eTPW/BOVJCIfvEUaB/OJi/yP9250q8ckp2/7w5uMe5Eeexh++NgOoT4tWaLi1nZ3Y5VkPGNx7QjAP6DDp24sXSC7kfrLMHOyeK8ClHvJGrfiEw77PkIdT81fp7cY1hIfftulcfSgr3IUTzOzGcON6BJjbojBEno5h0krChJQuPstzM/Twor5vO7lgOfBNBD/fWtNgyaXn3pSg5N275WIhs/7N4r42ZpKVL9yuwkXXRz94mfGSQeIMBt9/lRuGIeulKqnP22C/KDTG9RITJYrq05gtigTwiN34REo+0h9GyxX6FC6gOiv/W7zK64= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231355)(944501410)(52105095)(10201501046)(3002001)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123564045)(20161123558120)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699050); SRVR:AM0PR04MB4673; BCL:0; PCL:0; RULEID:; SRVR:AM0PR04MB4673; X-Forefront-PRVS: 0798146F16 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(136003)(396003)(346002)(366004)(376002)(39860400002)(199004)(189003)(16526019)(48376002)(186003)(1076002)(3846002)(5660300001)(486006)(6506007)(386003)(16586007)(316002)(36756003)(14444005)(44832011)(5009440100003)(52116002)(6116002)(2616005)(76176011)(446003)(51416003)(11346002)(956004)(476003)(6512007)(47776003)(106356001)(25786009)(50226002)(2906002)(68736007)(105586002)(81156014)(81166006)(7736002)(6666003)(305945005)(8676002)(8936002)(4326008)(575784001)(86362001)(97736004)(6486002)(478600001)(50466002)(66066001)(26005)(53936002)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR04MB4673; H:Tophie.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM0PR04MB4673; 23:gUAE/4la5ZIwX09UjtfPRubc3CS/TP2Rx4S9H/6Pd?= W/Rjm1zMvsUtjV8+7Iggbueux9StoW7oDkjUGMS7K1JxxZmfuzBZPHK/79n9TxCKaT2WeP7stFerRMKtPmU2Y80RcT4EyAN83sbajeJJwJvCsfWonzd7eVRPL2K7DPti4fkzl6Tok1ah3wCgJ3cMjT6PVl+JfvgB8UiaUF8ooWs7LbP+cK5PGqBGib3M9jnXc2RnhWBKsZQkSePQjOvc/lGJR1ZzqOEIGslsUnBfdJG+cP1QZGz5UWUM+ig2eYI+b91fTGdfUoxXAxGDhrIKvAohHNREd7Wv0XXiOtkeZG67RiRzs8WJcp5Ha47LZwvrCqFvMmkE93HRC2QmUWtQhOq3cEnomRk/UHyxY+pNMlfLMBMDzubaNlxybAVRae8X2RrU1e2sT4oamDIK8e0SUEVW7guiunVBM42hueiUS/VhzzbpGFypdgRwnjrFWmTg9M7q7P/ppTzWxThum2gOAb2OfILoYRAmCp4zAByBOuxjoQajtt+WvMKNXwFNkFvKyU0xHmIQJSk4a9XjzPxWMuMGk3XUT2UylkdMvMiwIATMCTYfwb3v6sQd5uCB0EoNaooLd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M0PR04MB4673; 6:ZONPkuMLYN9CmH5etkk3uEyzBxNhfUjZFTIKBPF3SFdmbtHuf6l/a4Kd6nQD+iQGsj7JhWGpFic7C+dkdvxRo3Nd6YLOjFnYDEfP6WsVkU1WdV9QdKIA2q4xBsDCoT0Xvpp+sxs2MYss5hsv+uxRCaUP5Q+S8YL792vonPBc4KCYIx+R4MZE70s4lr4Ft5rGlAV2MPQTQOyX2rnBN6mJjGUlu23aWxfLASn4iDw7wWTPehRDjJHZP5i9Pu2+XWk/jvr1QIQfQQ7HSZCHtoHzJXuZXUi+h4PtToC5WGNSBYUJ6yp4lXrFyRgdWdOTBZNaghc1k5k4KXJf7ASmQS30j812TCI7FxJIh2Tg8D+0YmRYy7zbo7S45k08JiGudwF29PqeLnYM7TuqIX8G4ME63QlgDj7Hpnj4GSidkN57ZFqxFqFew6Kq11X6U7CRrLmO6wG0kgSJnO2ehozL3j24Xg==; 5:bloW45B1uWYyd9W9vqxb1He/N3F/s06a3CkjXSZsTQGVJQyOU1dZe45E9R3Lt5qMagAY8XqLA707vESaHzSKnEMFrgRpuSDKcRH8gE3S+/b554qvpcu+q9EJlxSeM5/LOkH2o45ObzNLXu5nB1lhfDNraK7D20yq8p1c8XtL+SI=; 7:NcWnMkhhCknTc+xHfJjIMJNmOmO9MNeY9l8t5AqHtvD96jHgI/X6dc3OT/rklX6W3dc2Iljp3v3VUPeVvOQC8mlRo6JMFQ/5fFxJ0IuopAuakIcQFuqxmTLFYFfASzkEmn+gORAKkECweQdVEoZa3K77EOyvjDaDu2DYU//oNsdevwaut94STYmDxs5QtCyBqNWHid2WDMaYz7Q9P5ONhvIivCw2lbccYYdD5s7nBX8G4tchle+AfUqGYUxKrzIf SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Sep 2018 10:37:50.4144 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 00fa9145-a74e-4a58-9def-08d61c899e4d X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4673 Subject: [dpdk-dev] [PATCH 04/11] crypto/dpaa2_sec: upgarde mc FW APIs to 10.10.0 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" From: Hemant Agrawal Signed-off-by: Hemant Agrawal --- drivers/crypto/dpaa2_sec/mc/dpseci.c | 30 ++++++++++++++++++-- drivers/crypto/dpaa2_sec/mc/fsl_dpseci.h | 10 +++++-- drivers/crypto/dpaa2_sec/mc/fsl_dpseci_cmd.h | 13 +++++++-- 3 files changed, 45 insertions(+), 8 deletions(-) -- 2.17.1 diff --git a/drivers/crypto/dpaa2_sec/mc/dpseci.c b/drivers/crypto/dpaa2_sec/mc/dpseci.c index de8ca970c..778dc37f7 100644 --- a/drivers/crypto/dpaa2_sec/mc/dpseci.c +++ b/drivers/crypto/dpaa2_sec/mc/dpseci.c @@ -116,11 +116,13 @@ int dpseci_create(struct fsl_mc_io *mc_io, cmd_flags, dprc_token); cmd_params = (struct dpseci_cmd_create *)cmd.params; - for (i = 0; i < DPSECI_PRIO_NUM; i++) + for (i = 0; i < 8; i++) cmd_params->priorities[i] = cfg->priorities[i]; + for (i = 0; i < 8; i++) + cmd_params->priorities2[i] = cfg->priorities[8 + i]; cmd_params->num_tx_queues = cfg->num_tx_queues; cmd_params->num_rx_queues = cfg->num_rx_queues; - cmd_params->options = cfg->options; + cmd_params->options = cpu_to_le32(cfg->options); /* send command to mc*/ err = mc_send_command(mc_io, &cmd); @@ -302,7 +304,7 @@ int dpseci_get_attributes(struct fsl_mc_io *mc_io, /* retrieve response parameters */ rsp_params = (struct dpseci_rsp_get_attr *)cmd.params; attr->id = le32_to_cpu(rsp_params->id); - attr->options = rsp_params->options; + attr->options = le32_to_cpu(rsp_params->options); attr->num_tx_queues = rsp_params->num_tx_queues; attr->num_rx_queues = rsp_params->num_rx_queues; @@ -490,6 +492,8 @@ int dpseci_get_sec_attr(struct fsl_mc_io *mc_io, attr->arc4_acc_num = rsp_params->arc4_acc_num; attr->des_acc_num = rsp_params->des_acc_num; attr->aes_acc_num = rsp_params->aes_acc_num; + attr->ccha_acc_num = rsp_params->ccha_acc_num; + attr->ptha_acc_num = rsp_params->ptha_acc_num; return 0; } @@ -569,6 +573,16 @@ int dpseci_get_api_version(struct fsl_mc_io *mc_io, return 0; } +/** + * dpseci_set_congestion_notification() - Set congestion group + * notification configuration + * @mc_io: Pointer to MC portal's I/O object + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' + * @token: Token of DPSECI object + * @cfg: congestion notification configuration + * + * Return: '0' on success, error code otherwise + */ int dpseci_set_congestion_notification( struct fsl_mc_io *mc_io, uint32_t cmd_flags, @@ -604,6 +618,16 @@ int dpseci_set_congestion_notification( return mc_send_command(mc_io, &cmd); } +/** + * dpseci_get_congestion_notification() - Get congestion group + * notification configuration + * @mc_io: Pointer to MC portal's I/O object + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' + * @token: Token of DPSECI object + * @cfg: congestion notification configuration + * + * Return: '0' on success, error code otherwise + */ int dpseci_get_congestion_notification( struct fsl_mc_io *mc_io, uint32_t cmd_flags, diff --git a/drivers/crypto/dpaa2_sec/mc/fsl_dpseci.h b/drivers/crypto/dpaa2_sec/mc/fsl_dpseci.h index 12ac005ad..f4b6fe8ad 100644 --- a/drivers/crypto/dpaa2_sec/mc/fsl_dpseci.h +++ b/drivers/crypto/dpaa2_sec/mc/fsl_dpseci.h @@ -20,7 +20,7 @@ struct fsl_mc_io; /** * Maximum number of Tx/Rx priorities per DPSECI object */ -#define DPSECI_PRIO_NUM 8 +#define DPSECI_MAX_QUEUE_NUM 16 /** * All queues considered; see dpseci_set_rx_queue() @@ -58,7 +58,7 @@ struct dpseci_cfg { uint32_t options; uint8_t num_tx_queues; uint8_t num_rx_queues; - uint8_t priorities[DPSECI_PRIO_NUM]; + uint8_t priorities[DPSECI_MAX_QUEUE_NUM]; }; int dpseci_create(struct fsl_mc_io *mc_io, @@ -259,6 +259,10 @@ int dpseci_get_tx_queue(struct fsl_mc_io *mc_io, * implemented in this version of SEC. * @aes_acc_num: The number of copies of the AES module that are * implemented in this version of SEC. + * @ccha_acc_num: The number of copies of the ChaCha20 module that are + * implemented in this version of SEC. + * @ptha_acc_num: The number of copies of the Poly1305 module that are + * implemented in this version of SEC. **/ struct dpseci_sec_attr { @@ -279,6 +283,8 @@ struct dpseci_sec_attr { uint8_t arc4_acc_num; uint8_t des_acc_num; uint8_t aes_acc_num; + uint8_t ccha_acc_num; + uint8_t ptha_acc_num; }; int dpseci_get_sec_attr(struct fsl_mc_io *mc_io, diff --git a/drivers/crypto/dpaa2_sec/mc/fsl_dpseci_cmd.h b/drivers/crypto/dpaa2_sec/mc/fsl_dpseci_cmd.h index 26cef0f73..2f78c3563 100644 --- a/drivers/crypto/dpaa2_sec/mc/fsl_dpseci_cmd.h +++ b/drivers/crypto/dpaa2_sec/mc/fsl_dpseci_cmd.h @@ -9,22 +9,25 @@ /* DPSECI Version */ #define DPSECI_VER_MAJOR 5 -#define DPSECI_VER_MINOR 1 +#define DPSECI_VER_MINOR 3 /* Command versioning */ #define DPSECI_CMD_BASE_VERSION 1 #define DPSECI_CMD_BASE_VERSION_V2 2 +#define DPSECI_CMD_BASE_VERSION_V3 3 #define DPSECI_CMD_ID_OFFSET 4 #define DPSECI_CMD_V1(id) \ ((id << DPSECI_CMD_ID_OFFSET) | DPSECI_CMD_BASE_VERSION) #define DPSECI_CMD_V2(id) \ ((id << DPSECI_CMD_ID_OFFSET) | DPSECI_CMD_BASE_VERSION_V2) +#define DPSECI_CMD_V3(id) \ + ((id << DPSECI_CMD_ID_OFFSET) | DPSECI_CMD_BASE_VERSION_V3) /* Command IDs */ #define DPSECI_CMDID_CLOSE DPSECI_CMD_V1(0x800) #define DPSECI_CMDID_OPEN DPSECI_CMD_V1(0x809) -#define DPSECI_CMDID_CREATE DPSECI_CMD_V2(0x909) +#define DPSECI_CMDID_CREATE DPSECI_CMD_V3(0x909) #define DPSECI_CMDID_DESTROY DPSECI_CMD_V1(0x989) #define DPSECI_CMDID_GET_API_VERSION DPSECI_CMD_V1(0xa09) @@ -37,7 +40,7 @@ #define DPSECI_CMDID_SET_RX_QUEUE DPSECI_CMD_V1(0x194) #define DPSECI_CMDID_GET_RX_QUEUE DPSECI_CMD_V1(0x196) #define DPSECI_CMDID_GET_TX_QUEUE DPSECI_CMD_V1(0x197) -#define DPSECI_CMDID_GET_SEC_ATTR DPSECI_CMD_V1(0x198) +#define DPSECI_CMDID_GET_SEC_ATTR DPSECI_CMD_V2(0x198) #define DPSECI_CMDID_GET_SEC_COUNTERS DPSECI_CMD_V1(0x199) #define DPSECI_CMDID_SET_CONGESTION_NOTIFICATION DPSECI_CMD_V1(0x170) @@ -63,6 +66,8 @@ struct dpseci_cmd_create { uint8_t num_rx_queues; uint8_t pad[6]; uint32_t options; + uint32_t pad2; + uint8_t priorities2[8]; }; struct dpseci_cmd_destroy { @@ -152,6 +157,8 @@ struct dpseci_rsp_get_sec_attr { uint8_t arc4_acc_num; uint8_t des_acc_num; uint8_t aes_acc_num; + uint8_t ccha_acc_num; + uint8_t ptha_acc_num; }; struct dpseci_rsp_get_sec_counters {