get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/27966/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 27966,
    "url": "https://patches.dpdk.org/api/patches/27966/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1503658183-4078-12-git-send-email-hemant.agrawal@nxp.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<1503658183-4078-12-git-send-email-hemant.agrawal@nxp.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1503658183-4078-12-git-send-email-hemant.agrawal@nxp.com",
    "date": "2017-08-25T10:49:27",
    "name": "[dpdk-dev,11/27] crypto/dpaa2_sec: update MC to 10.3.x",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "fbc3ecb2b917332f3c3b40ba2da15790326613a9",
    "submitter": {
        "id": 477,
        "url": "https://patches.dpdk.org/api/people/477/?format=api",
        "name": "Hemant Agrawal",
        "email": "hemant.agrawal@nxp.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1503658183-4078-12-git-send-email-hemant.agrawal@nxp.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/27966/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/27966/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 0106F9185;\n\tFri, 25 Aug 2017 12:50:29 +0200 (CEST)",
            "from NAM02-CY1-obe.outbound.protection.outlook.com\n\t(mail-cys01nam02on0069.outbound.protection.outlook.com\n\t[104.47.37.69]) by dpdk.org (Postfix) with ESMTP id 91112916D\n\tfor <dev@dpdk.org>; Fri, 25 Aug 2017 12:50:24 +0200 (CEST)",
            "from BN3PR03CA0084.namprd03.prod.outlook.com (10.167.1.172) by\n\tDM5PR03MB3322.namprd03.prod.outlook.com (10.174.241.143) with\n\tMicrosoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id\n\t15.1.1385.9; Fri, 25 Aug 2017 10:50:22 +0000",
            "from BL2FFO11FD048.protection.gbl (2a01:111:f400:7c09::115) by\n\tBN3PR03CA0084.outlook.office365.com (2a01:111:e400:7a4d::44) with\n\tMicrosoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1362.18\n\tvia Frontend Transport; Fri, 25 Aug 2017 10:50:22 +0000",
            "from tx30smr01.am.freescale.net (192.88.168.50) by\n\tBL2FFO11FD048.mail.protection.outlook.com (10.173.161.210) with\n\tMicrosoft\n\tSMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id\n\t15.1.1341.15 via Frontend Transport; Fri, 25 Aug 2017 10:50:22 +0000",
            "from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net\n\t[10.232.134.28])\n\tby tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id\n\tv7PAnw6F032070; Fri, 25 Aug 2017 03:50:20 -0700"
        ],
        "Authentication-Results": "spf=fail (sender IP is 192.88.168.50)\n\tsmtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed)\n\theader.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com;",
        "Received-SPF": "Fail (protection.outlook.com: domain of nxp.com does not\n\tdesignate 192.88.168.50 as permitted sender)\n\treceiver=protection.outlook.com; \n\tclient-ip=192.88.168.50; helo=tx30smr01.am.freescale.net;",
        "From": "Hemant Agrawal <hemant.agrawal@nxp.com>",
        "To": "<ferruh.yigit@intel.com>",
        "CC": "<dev@dpdk.org>, <shreyansh.jain@nxp.com>",
        "Date": "Fri, 25 Aug 2017 16:19:27 +0530",
        "Message-ID": "<1503658183-4078-12-git-send-email-hemant.agrawal@nxp.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1503658183-4078-1-git-send-email-hemant.agrawal@nxp.com>",
        "References": "<1503658183-4078-1-git-send-email-hemant.agrawal@nxp.com>",
        "X-EOPAttributedMessage": "0",
        "X-Matching-Connectors": "131481318222262795;\n\t(91ab9b29-cfa4-454e-5278-08d120cd25b8); ()",
        "X-Forefront-Antispam-Report": "CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI;\n\tSFV:NSPM;\n\tSFS:(10009020)(6009001)(336005)(39380400002)(39860400002)(2980300002)(1110001)(1109001)(339900001)(189002)(45074003)(51234002)(199003)(86362001)(575784001)(77096006)(47776003)(189998001)(97736004)(85426001)(50226002)(305945005)(2906002)(6916009)(104016004)(54906002)(2950100002)(626005)(81166006)(8656003)(50986999)(5660300001)(498600001)(53946003)(16200700003)(76176999)(33646002)(356003)(8936002)(15650500001)(106466001)(81156014)(2351001)(68736007)(8676002)(36756003)(53936002)(105606002)(50466002)(110136004)(48376002)(5003940100001)(4326008)(579004)(569006);\n\tDIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR03MB3322;\n\tH:tx30smr01.am.freescale.net; \n\tFPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; ",
        "X-Microsoft-Exchange-Diagnostics": [
            "1; BL2FFO11FD048;\n\t1:op5qOFftkzTliCU9pqoP3+5dYyXoRc+3aPBifPNZoVbsIhen07B0ueOasnDcyhGcwQTYmw/Bv7XqXxkAi6P5E0mD1qXH5FydKrHXU1teYnPy2osp8b6hypny+Hd+yLBJ",
            "1; DM5PR03MB3322;\n\t3:uQqIoG9+qiS2VY+cwE2UL2a+hRV+zLWr29EXoPo9G46Pld0kzeIiUxU/R9Gj828TYUBqK4GnTJjJ+tiihnnQsdqS+mpz938UgEHcIOkG5Bi87G6Fc/pXJAD011zm+f4IC19pbShXabwviKMO7paaAWuKH0nCW/uQfoSL2mvNiPrCGkZWAYXLNK2b5kGBVyf6dvIk16EfC/xSTe4+u5YggiYl9IjEGQcsoyvXU+s2KgwId6UZUFEkYEexhFQ0B9zB0HNUcuWuFKJYaTcs26vCMmhHoeW8W3l2Cm8tVztMC2pzXtk9M5nV88AMkSKt17ZpMG1cSzya+qxklbx1JK5o7VogmOtPXUqjs7Ww9LuI3K0=;\n\t25:RRrn4nUAfW+uybhoWnW8QoxOQGd8iGmijmNmx4SykCdAJI0hW2tmhZ6rXq49cthj1od51zP60x1G1/BZ7FqSiMgB4uUNUX4xcidxrjZEE2BmGaHwHX1e12PtuvsLnNswFg4GeSQsq8aZ/3jA8Q0TtNAHAdEfLi74Fzjg7YsjMRNx+5L2WDM/g3moFVJTeu2yxKvilhp6INe9S+qKDZUkXQqPbZkS2qdpIwUUyZEskC2IzEDWcqIO1U50wxT3DeHz5kEx8uh7LWN7Mp4iBRv83KSGPw4CIn/lgWa5JVzwbsI574Qh9gOP4sWKlEpFzEwsnDpVy/MyMnjdEMjC3JXjrw==",
            "1; DM5PR03MB3322;\n\t31:LOttKFWZDeZ+t0S0jqPZpWMnDPlVqdjFHpHaisaejTxicH2K4bk0OTh8Hcbz41yl1JjgU7cHtAP/XPjlEinBF9PBlhZYI3zp5N7MtJJReXSkBkOOIylowXSmD3JfgxQOoPg9oa6tmpAeYj0z0w6bpQ8oDcuhoxYKXE6XArfChpI8wwiMGU3wn7PAdtfts/tuykjjbJVfG83eAU9AMzaWIkACqlubG1NVRmhVZTg0Vz4=;\n\t4:M3urrE1q1WGiSHkuPKYOYFNO4HTpM/vaG4TRhGY3zNGtnOvbQj0hFb9H5EiJv56yU5A3RH12fQ+CoYuzVcFQRSvvxnFhOn6ntMuHwlnkdNP2IRwDAEFS0zxw7lR5xVsIJXKrJ8aB1TLWphImvaBcVAzPNeNlo70DKgr7RwQMl6ZnTKx6JmrWspiHyZwKVeVlVzeq+0q1xfEIWcpMJspnEouxzr/2tSye9fDoj1y9NgI2j0acnEuMW5bKCqx9jWPXP6G7XVFntpqZkDWXFWlM6FYMVIk4L1+uq9Jw+YC2qJxUzgK2yHUNCbQk3e9nd/vmWSMwUTjqdCIUA2GZsXSvbg==",
            "=?us-ascii?Q?1; DM5PR03MB3322;\n\t23:V4HZt3z/5j0yZjCc9d6bHAfAOr/AXjHS7ZCK79S85?=\n\t6WBLsIFLH1zShuhNW6iI0Bvv3HkobO1ADfX/5LN/FBU9+byxvUVlHxqpUvgtEpvJUJ6IjG5hIS7MU4izqLDFFDhKFn2btP4aZuNeoKHr9yiUL/ZptR4Bq21LzeJ1WPgn2xXaaroPcx9vFXZuQUx4KuQ58/VgM03bt3tnCRjQ58wlDu3FC9emKVoOdfmFsyDBHNkE3qVEmfBlS9G1NHteylfZi4tmK9Vj56Y3QjgDOSqpuTZuxxV+6RIFAAvkld9a2DGRyIZVGNNaijf9/XUFPLFaB55D8ibGqY8f4FBpTfNuv1kZAPSxV0cbyeCQ51VjRNDmHNQ18nwcpBuc2irYhPOd3YtV/W731OZ0S4SrnJes6Fdr19LqXfHIArLYoqKnxVzivXXMWredzJdBbo0cllWrZUaDopvXoTeKqLJBDlTR/LVRu9XCa6XoDX4y1VPACo11/XBtqZxvf2JLv86jEBNPdjMeTnMxQsUh73R+jGG7pJj+Cu2r6B2OkFDAQ4TxQhRhJcLmV/BTFdgMCbPWp/gDZFSGKvfEqX3uAAmKnEReB9SYn4oIfvYtHFv3OVpSp+CBkKyi8XJBLFjaP1MZGL2DBa3GKhP5z5cnvnc32Fc8Jy7jTaYaYCCweuc2qlairgu1pLPjAU8Ce+JTiQOKc75D67wZvD9FF1G/QFfiCcmIY33c2UeuwLdeTvLQ2mDfKMO/r9T5sheA8djVRfCepdAWxujjd9CjR46v5GX2CiG4MMwNteSN6zeGRXJLgVVwUJTXrSZiPiP1wlaZPlaiGVdVJyPU630SiI635sjlmX3yXj0NaGnxCf+oSNayonylUnqWCdlzpLcMLmjy7vFeFwsUg/ZNZPCk/zDGy6P0v6Q9Rd7q2p23kp941EUzeSZ2H7QTSiqn14L9o/aa/duRtz7LjVyxdwMdGpIerksF845dnZ8RIOuDsVES0VuXb3253QtLR4BDTN88QVGny8N543M7Ji9+gqAbWZGwGAy4+pEJ3dSuBFaZr837LIHICKlaeAahl7kyre1isByTJMEeCYNRguJrWf3ywlBeFxlpuzZifOykvHd979VPtx458vy3cP5HXaUry8KGTmmH7aaxej+5G5P8mJNfUAEuKNDNCw8AuFyoYJurnmz58EhcvJaaX8EHqdo8mhx6WDveWMsbSQDhm4I2FohL0BDiVzRTlWuYlcMEcEX/CJoGzo+vVplsSSlGsgjLMr1p1HOXSjI6dwdr1YWlAGTQJU8fejHE1tbHQ==",
            "1; DM5PR03MB3322;\n\t6:YPW/mt96SKriXM/NSn1PvDzFLTSMcFdQBpdtHg7GGI2tKYBQmRSsX8oi4qHziB5f5xiS8t6AAXXl4pkUUbujr1qV6yTe483SYapJC2VG+KD+kD9QW9JOAnfq1L2miGEHHYCljPuSUVrnVJxsuXsxZ8bb51ZhqCq6dgl5E/N6M2Tan1KyFrgni75VxFj42zFBQn9zITQvxkEbBZw5TNcH25ya250BaayUtNjRnZa6Zb3WQpnEg4jYbxbwCc43ezBP4U7RjwEZnUMoOEiNBGyQsPCHl4WTx5RLWcxnbbanSRELTVBeC/TLU1YebgeuMXkzihRTzIn7cVAwZaVKEU3HvQ==;\n\t5:e2TrGXBHcuvxRqrx0hk82/ZaK3S11EZAviGWnTHMzrNfE0/AE440jnag6RId3UIw7ZUIbz5aLTfwZB/eA4BrkYMIqS+21R2fm5CXbxPcHVRr8i8m0LhTrRqrJ8mfitgY0RW7/xW85P4dclhySI4ajQ==;\n\t24:7JWfvXotPl09wnRmF+08PO+z0Pt3ZbTGY1KfZigl3ss4yjcHoZYTMIb0q6G+HPPE3dWBvtF3UFbq/aqEQNE2oYBR7bNfrm9Y8T0Tq87AQkA=;\n\t7:JVrPOro4X4rRCLHIAbtAmM3rWS3ALJH20g2CTuv1o/X2Q+L/U2Dm3Gww27JhmrxTtZxofb2tSEDfD1FSoDtXE+/memi/CAd01C49SU3PjkIYfuA2aQ+Q/mOWHEQkz3gFE8IZA9gHs0+6vQeGJNOOQbbk/VcWtqX1FS86ZaZi6GK9dXe5y+AQcHMrGGliVjqwTL1Ji+yJYV9XWIDn1ONWuTYc75OZGweQl+H21LLZ5Fc="
        ],
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-Office365-Filtering-Correlation-Id": "fa5f04b0-aa2a-4464-90ae-08d4eba715b1",
        "X-Microsoft-Antispam": "UriScan:; BCL:0; PCL:0;\n\tRULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603199)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);\n\tSRVR:DM5PR03MB3322; ",
        "X-MS-TrafficTypeDiagnostic": "DM5PR03MB3322:",
        "X-Exchange-Antispam-Report-Test": "UriScan:(185117386973197)(275809806118684); ",
        "X-Microsoft-Antispam-PRVS": "<DM5PR03MB3322BD44680A7C830DD8E110899B0@DM5PR03MB3322.namprd03.prod.outlook.com>",
        "X-Exchange-Antispam-Report-CFA-Test": "BCL:0; PCL:0;\n\tRULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(8121501046)(5005006)(13016025)(13018025)(100000703101)(100105400095)(3002001)(10201501046)(93006095)(93001095)(6055026)(6096035)(20161123559100)(20161123556025)(20161123561025)(20161123563025)(20161123565025)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);\n\tSRVR:DM5PR03MB3322; BCL:0; PCL:0;\n\tRULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095);\n\tSRVR:DM5PR03MB3322; ",
        "X-Forefront-PRVS": "041032FF37",
        "SpamDiagnosticOutput": "1:99",
        "SpamDiagnosticMetadata": "NSPM",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "25 Aug 2017 10:50:22.0546\n\t(UTC)",
        "X-MS-Exchange-CrossTenant-Id": "5afe0b00-7697-4969-b663-5eab37d5f47e",
        "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;\n\tIp=[192.88.168.50]; \n\tHelo=[tx30smr01.am.freescale.net]",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "DM5PR03MB3322",
        "Subject": "[dpdk-dev] [PATCH 11/27] crypto/dpaa2_sec: update MC to 10.3.x",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: Shreyansh Jain <shreyansh.jain@nxp.com>\n\nSigned-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>\n---\n drivers/crypto/dpaa2_sec/mc/dpseci.c         | 676 +++++++++++++----------\n drivers/crypto/dpaa2_sec/mc/fsl_dpseci.h     | 782 ++++++++-------------------\n drivers/crypto/dpaa2_sec/mc/fsl_dpseci_cmd.h | 387 ++++++-------\n 3 files changed, 808 insertions(+), 1037 deletions(-)",
    "diff": "diff --git a/drivers/crypto/dpaa2_sec/mc/dpseci.c b/drivers/crypto/dpaa2_sec/mc/dpseci.c\nindex 4a10962..2a216af 100644\n--- a/drivers/crypto/dpaa2_sec/mc/dpseci.c\n+++ b/drivers/crypto/dpaa2_sec/mc/dpseci.c\n@@ -37,18 +37,34 @@\n  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n  * POSSIBILITY OF SUCH DAMAGE.\n  */\n-\n #include <fsl_mc_sys.h>\n #include <fsl_mc_cmd.h>\n #include <fsl_dpseci.h>\n #include <fsl_dpseci_cmd.h>\n \n-int\n-dpseci_open(struct fsl_mc_io *mc_io,\n-\t    uint32_t cmd_flags,\n-\t    int dpseci_id,\n-\t    uint16_t *token)\n+/**\n+ * dpseci_open() - Open a control session for the specified object\n+ * @mc_io:\tPointer to MC portal's I/O object\n+ * @cmd_flags:\tCommand flags; one or more of 'MC_CMD_FLAG_'\n+ * @dpseci_id:\tDPSECI unique ID\n+ * @token:\tReturned token; use in subsequent API calls\n+ *\n+ * This function can be used to open a control session for an\n+ * already created object; an object may have been declared in\n+ * the DPL or by calling the dpseci_create() function.\n+ * This function returns a unique authentication token,\n+ * associated with the specific object ID and the specific MC\n+ * portal; this token must be used in all subsequent commands for\n+ * this specific object.\n+ *\n+ * Return:\t'0' on Success; Error code otherwise.\n+ */\n+int dpseci_open(struct fsl_mc_io *mc_io,\n+\t\tuint32_t cmd_flags,\n+\t\tint dpseci_id,\n+\t\tuint16_t *token)\n {\n+\tstruct dpseci_cmd_open *cmd_params;\n \tstruct mc_command cmd = { 0 };\n \tint err;\n \n@@ -56,23 +72,34 @@ dpseci_open(struct fsl_mc_io *mc_io,\n \tcmd.header = mc_encode_cmd_header(DPSECI_CMDID_OPEN,\n \t\t\t\t\t  cmd_flags,\n \t\t\t\t\t  0);\n-\tDPSECI_CMD_OPEN(cmd, dpseci_id);\n+\tcmd_params = (struct dpseci_cmd_open *)cmd.params;\n+\tcmd_params->dpseci_id = cpu_to_le32(dpseci_id);\n \n-\t/* send command to mc */\n+\t/* send command to mc*/\n \terr = mc_send_command(mc_io, &cmd);\n \tif (err)\n \t\treturn err;\n \n \t/* retrieve response parameters */\n-\t*token = MC_CMD_HDR_READ_TOKEN(cmd.header);\n+\t*token = mc_cmd_hdr_read_token(&cmd);\n \n \treturn 0;\n }\n \n-int\n-dpseci_close(struct fsl_mc_io *mc_io,\n-\t     uint32_t cmd_flags,\n-\t     uint16_t token)\n+/**\n+ * dpseci_close() - Close the control session of the object\n+ * @mc_io:\tPointer to MC portal's I/O object\n+ * @cmd_flags:\tCommand flags; one or more of 'MC_CMD_FLAG_'\n+ * @token:\tToken of DPSECI object\n+ *\n+ * After this function is called, no further operations are\n+ * allowed on the object without opening a new control session.\n+ *\n+ * Return:\t'0' on Success; Error code otherwise.\n+ */\n+int dpseci_close(struct fsl_mc_io *mc_io,\n+\t\t uint32_t cmd_flags,\n+\t\t uint16_t token)\n {\n \tstruct mc_command cmd = { 0 };\n \n@@ -81,478 +108,569 @@ dpseci_close(struct fsl_mc_io *mc_io,\n \t\t\t\t\t  cmd_flags,\n \t\t\t\t\t  token);\n \n-\t/* send command to mc */\n+\t/* send command to mc*/\n \treturn mc_send_command(mc_io, &cmd);\n }\n \n-int\n-dpseci_create(struct fsl_mc_io *mc_io,\n-\t      uint16_t dprc_token,\n-\t      uint32_t cmd_flags,\n-\t      const struct dpseci_cfg *cfg,\n-\t      uint32_t *obj_id)\n+/**\n+ * dpseci_create() - Create the DPSECI object\n+ * @mc_io:\tPointer to MC portal's I/O object\n+ * @dprc_token:\tParent container token; '0' for default container\n+ * @cmd_flags:\tCommand flags; one or more of 'MC_CMD_FLAG_'\n+ * @cfg:\tConfiguration structure\n+ * @obj_id:\tReturned object id\n+ *\n+ * Create the DPSECI object, allocate required resources and\n+ * perform required initialization.\n+ *\n+ * The object can be created either by declaring it in the\n+ * DPL file, or by calling this function.\n+ *\n+ * The function accepts an authentication token of a parent\n+ * container that this object should be assigned to. The token\n+ * can be '0' so the object will be assigned to the default container.\n+ * The newly created object can be opened with the returned\n+ * object id and using the container's associated tokens and MC portals.\n+ *\n+ * Return:\t'0' on Success; Error code otherwise.\n+ */\n+int dpseci_create(struct fsl_mc_io *mc_io,\n+\t\t  uint16_t dprc_token,\n+\t\t  uint32_t cmd_flags,\n+\t\t  const struct dpseci_cfg *cfg,\n+\t\t  uint32_t *obj_id)\n {\n+\tstruct dpseci_cmd_create *cmd_params;\n \tstruct mc_command cmd = { 0 };\n-\tint err;\n+\tint err, i;\n \n \t/* prepare command */\n \tcmd.header = mc_encode_cmd_header(DPSECI_CMDID_CREATE,\n \t\t\t\t\t  cmd_flags,\n \t\t\t\t\t  dprc_token);\n-\tDPSECI_CMD_CREATE(cmd, cfg);\n-\n-\t/* send command to mc */\n+\tcmd_params = (struct dpseci_cmd_create *)cmd.params;\n+\tfor (i = 0; i < DPSECI_PRIO_NUM; i++)\n+\t\tcmd_params->priorities[i] = cfg->priorities[i];\n+\tcmd_params->num_tx_queues = cfg->num_tx_queues;\n+\tcmd_params->num_rx_queues = cfg->num_rx_queues;\n+\tcmd_params->options = cfg->options;\n+\n+\t/* send command to mc*/\n \terr = mc_send_command(mc_io, &cmd);\n \tif (err)\n \t\treturn err;\n \n \t/* retrieve response parameters */\n-\tCMD_CREATE_RSP_GET_OBJ_ID_PARAM0(cmd, *obj_id);\n+\t*obj_id = mc_cmd_read_object_id(&cmd);\n \n \treturn 0;\n }\n \n-int\n-dpseci_destroy(struct fsl_mc_io\t*mc_io,\n-\t       uint16_t\tdprc_token,\n-\t       uint32_t\tcmd_flags,\n-\t       uint32_t\tobject_id)\n+/**\n+ * dpseci_destroy() - Destroy the DPSECI object and release all its resources.\n+ * @mc_io:\tPointer to MC portal's I/O object\n+ * @dprc_token: Parent container token; '0' for default container\n+ * @cmd_flags:\tCommand flags; one or more of 'MC_CMD_FLAG_'\n+ * @object_id:\tThe object id; it must be a valid id within the container that\n+ * created this object;\n+ *\n+ * The function accepts the authentication token of the parent container that\n+ * created the object (not the one that currently owns the object). The object\n+ * is searched within parent using the provided 'object_id'.\n+ * All tokens to the object must be closed before calling destroy.\n+ *\n+ * Return:\t'0' on Success; error code otherwise.\n+ */\n+int dpseci_destroy(struct fsl_mc_io *mc_io,\n+\t\t   uint16_t dprc_token,\n+\t\t   uint32_t cmd_flags,\n+\t\t   uint32_t object_id)\n {\n+\tstruct dpseci_cmd_destroy *cmd_params;\n \tstruct mc_command cmd = { 0 };\n \n \t/* prepare command */\n \tcmd.header = mc_encode_cmd_header(DPSECI_CMDID_DESTROY,\n \t\t\t\t\t  cmd_flags,\n \t\t\t\t\t  dprc_token);\n-\t/* set object id to destroy */\n-\tCMD_DESTROY_SET_OBJ_ID_PARAM0(cmd, object_id);\n-\t/* send command to mc */\n-\treturn mc_send_command(mc_io, &cmd);\n-}\n-\n-int\n-dpseci_enable(struct fsl_mc_io *mc_io,\n-\t      uint32_t cmd_flags,\n-\t      uint16_t token)\n-{\n-\tstruct mc_command cmd = { 0 };\n+\tcmd_params = (struct dpseci_cmd_destroy *)cmd.params;\n+\tcmd_params->dpseci_id = cpu_to_le32(object_id);\n \n-\t/* prepare command */\n-\tcmd.header = mc_encode_cmd_header(DPSECI_CMDID_ENABLE,\n-\t\t\t\t\t  cmd_flags,\n-\t\t\t\t\t  token);\n-\n-\t/* send command to mc */\n+\t/* send command to mc*/\n \treturn mc_send_command(mc_io, &cmd);\n }\n \n-int\n-dpseci_disable(struct fsl_mc_io *mc_io,\n-\t       uint32_t cmd_flags,\n-\t       uint16_t token)\n-{\n-\tstruct mc_command cmd = { 0 };\n-\n-\t/* prepare command */\n-\tcmd.header = mc_encode_cmd_header(DPSECI_CMDID_DISABLE,\n-\t\t\t\t\t  cmd_flags,\n-\t\t\t\t\t  token);\n-\n-\t/* send command to mc */\n-\treturn mc_send_command(mc_io, &cmd);\n-}\n-\n-int\n-dpseci_is_enabled(struct fsl_mc_io *mc_io,\n+/**\n+ * dpseci_enable() - Enable the DPSECI, allow sending and receiving frames.\n+ * @mc_io:\tPointer to MC portal's I/O object\n+ * @cmd_flags:\tCommand flags; one or more of 'MC_CMD_FLAG_'\n+ * @token:\tToken of DPSECI object\n+ *\n+ * Return:\t'0' on Success; Error code otherwise.\n+ */\n+int dpseci_enable(struct fsl_mc_io *mc_io,\n \t\t  uint32_t cmd_flags,\n-\t\t  uint16_t token,\n-\t\t  int *en)\n-{\n-\tstruct mc_command cmd = { 0 };\n-\tint err;\n-\t/* prepare command */\n-\tcmd.header = mc_encode_cmd_header(DPSECI_CMDID_IS_ENABLED,\n-\t\t\t\t\t  cmd_flags,\n-\t\t\t\t\t  token);\n-\n-\t/* send command to mc */\n-\terr = mc_send_command(mc_io, &cmd);\n-\tif (err)\n-\t\treturn err;\n-\n-\t/* retrieve response parameters */\n-\tDPSECI_RSP_IS_ENABLED(cmd, *en);\n-\n-\treturn 0;\n-}\n-\n-int\n-dpseci_reset(struct fsl_mc_io *mc_io,\n-\t     uint32_t cmd_flags,\n-\t     uint16_t token)\n+\t\t  uint16_t token)\n {\n \tstruct mc_command cmd = { 0 };\n \n \t/* prepare command */\n-\tcmd.header = mc_encode_cmd_header(DPSECI_CMDID_RESET,\n+\tcmd.header = mc_encode_cmd_header(DPSECI_CMDID_ENABLE,\n \t\t\t\t\t  cmd_flags,\n \t\t\t\t\t  token);\n \n-\t/* send command to mc */\n+\t/* send command to mc*/\n \treturn mc_send_command(mc_io, &cmd);\n }\n \n-int\n-dpseci_get_irq(struct fsl_mc_io *mc_io,\n-\t       uint32_t cmd_flags,\n-\t       uint16_t token,\n-\t       uint8_t irq_index,\n-\t       int *type,\n-\t       struct dpseci_irq_cfg *irq_cfg)\n-{\n-\tstruct mc_command cmd = { 0 };\n-\tint err;\n-\n-\t/* prepare command */\n-\tcmd.header = mc_encode_cmd_header(DPSECI_CMDID_GET_IRQ,\n-\t\t\t\t\t  cmd_flags,\n-\t\t\t\t\t  token);\n-\tDPSECI_CMD_GET_IRQ(cmd, irq_index);\n-\n-\t/* send command to mc */\n-\terr = mc_send_command(mc_io, &cmd);\n-\tif (err)\n-\t\treturn err;\n-\n-\t/* retrieve response parameters */\n-\tDPSECI_RSP_GET_IRQ(cmd, *type, irq_cfg);\n-\n-\treturn 0;\n-}\n-\n-int\n-dpseci_set_irq(struct fsl_mc_io *mc_io,\n-\t       uint32_t cmd_flags,\n-\t       uint16_t token,\n-\t       uint8_t irq_index,\n-\t       struct dpseci_irq_cfg *irq_cfg)\n+/**\n+ * dpseci_disable() - Disable the DPSECI, stop sending and receiving frames.\n+ * @mc_io:\tPointer to MC portal's I/O object\n+ * @cmd_flags:\tCommand flags; one or more of 'MC_CMD_FLAG_'\n+ * @token:\tToken of DPSECI object\n+ *\n+ * Return:\t'0' on Success; Error code otherwise.\n+ */\n+int dpseci_disable(struct fsl_mc_io *mc_io,\n+\t\t   uint32_t cmd_flags,\n+\t\t   uint16_t token)\n {\n \tstruct mc_command cmd = { 0 };\n \n \t/* prepare command */\n-\tcmd.header = mc_encode_cmd_header(DPSECI_CMDID_SET_IRQ,\n+\tcmd.header = mc_encode_cmd_header(DPSECI_CMDID_DISABLE,\n \t\t\t\t\t  cmd_flags,\n \t\t\t\t\t  token);\n-\tDPSECI_CMD_SET_IRQ(cmd, irq_index, irq_cfg);\n \n-\t/* send command to mc */\n+\t/* send command to mc*/\n \treturn mc_send_command(mc_io, &cmd);\n }\n \n-int\n-dpseci_get_irq_enable(struct fsl_mc_io *mc_io,\n+/**\n+ * dpseci_is_enabled() - Check if the DPSECI is enabled.\n+ * @mc_io:\tPointer to MC portal's I/O object\n+ * @cmd_flags:\tCommand flags; one or more of 'MC_CMD_FLAG_'\n+ * @token:\tToken of DPSECI object\n+ * @en:\t\tReturns '1' if object is enabled; '0' otherwise\n+ *\n+ * Return:\t'0' on Success; Error code otherwise.\n+ */\n+int dpseci_is_enabled(struct fsl_mc_io *mc_io,\n \t\t      uint32_t cmd_flags,\n \t\t      uint16_t token,\n-\t\t      uint8_t irq_index,\n-\t\t      uint8_t *en)\n+\t\t      int *en)\n {\n+\tstruct dpseci_rsp_is_enabled *rsp_params;\n \tstruct mc_command cmd = { 0 };\n \tint err;\n \n \t/* prepare command */\n-\tcmd.header = mc_encode_cmd_header(DPSECI_CMDID_GET_IRQ_ENABLE,\n+\tcmd.header = mc_encode_cmd_header(DPSECI_CMDID_IS_ENABLED,\n \t\t\t\t\t  cmd_flags,\n \t\t\t\t\t  token);\n-\tDPSECI_CMD_GET_IRQ_ENABLE(cmd, irq_index);\n \n-\t/* send command to mc */\n+\t/* send command to mc*/\n \terr = mc_send_command(mc_io, &cmd);\n \tif (err)\n \t\treturn err;\n \n \t/* retrieve response parameters */\n-\tDPSECI_RSP_GET_IRQ_ENABLE(cmd, *en);\n+\trsp_params = (struct dpseci_rsp_is_enabled *)cmd.params;\n+\t*en = dpseci_get_field(rsp_params->en, ENABLE);\n \n \treturn 0;\n }\n \n-int\n-dpseci_set_irq_enable(struct fsl_mc_io *mc_io,\n-\t\t      uint32_t cmd_flags,\n-\t\t      uint16_t token,\n-\t\t      uint8_t irq_index,\n-\t\t      uint8_t en)\n+/**\n+ * dpseci_reset() - Reset the DPSECI, returns the object to initial state.\n+ * @mc_io:\tPointer to MC portal's I/O object\n+ * @cmd_flags:\tCommand flags; one or more of 'MC_CMD_FLAG_'\n+ * @token:\tToken of DPSECI object\n+ *\n+ * Return:\t'0' on Success; Error code otherwise.\n+ */\n+int dpseci_reset(struct fsl_mc_io *mc_io,\n+\t\t uint32_t cmd_flags,\n+\t\t uint16_t token)\n {\n \tstruct mc_command cmd = { 0 };\n \n \t/* prepare command */\n-\tcmd.header = mc_encode_cmd_header(DPSECI_CMDID_SET_IRQ_ENABLE,\n+\tcmd.header = mc_encode_cmd_header(DPSECI_CMDID_RESET,\n \t\t\t\t\t  cmd_flags,\n \t\t\t\t\t  token);\n-\tDPSECI_CMD_SET_IRQ_ENABLE(cmd, irq_index, en);\n \n-\t/* send command to mc */\n+\t/* send command to mc*/\n \treturn mc_send_command(mc_io, &cmd);\n }\n \n-int\n-dpseci_get_irq_mask(struct fsl_mc_io *mc_io,\n-\t\t    uint32_t cmd_flags,\n-\t\t    uint16_t token,\n-\t\t    uint8_t irq_index,\n-\t\t    uint32_t *mask)\n+/**\n+ * dpseci_get_attributes() - Retrieve DPSECI attributes.\n+ * @mc_io:\tPointer to MC portal's I/O object\n+ * @cmd_flags:\tCommand flags; one or more of 'MC_CMD_FLAG_'\n+ * @token:\tToken of DPSECI object\n+ * @attr:\tReturned object's attributes\n+ *\n+ * Return:\t'0' on Success; Error code otherwise.\n+ */\n+int dpseci_get_attributes(struct fsl_mc_io *mc_io,\n+\t\t\t  uint32_t cmd_flags,\n+\t\t\t  uint16_t token,\n+\t\t\t  struct dpseci_attr *attr)\n {\n+\tstruct dpseci_rsp_get_attr *rsp_params;\n \tstruct mc_command cmd = { 0 };\n \tint err;\n \n \t/* prepare command */\n-\tcmd.header = mc_encode_cmd_header(DPSECI_CMDID_GET_IRQ_MASK,\n+\tcmd.header = mc_encode_cmd_header(DPSECI_CMDID_GET_ATTR,\n \t\t\t\t\t  cmd_flags,\n \t\t\t\t\t  token);\n-\tDPSECI_CMD_GET_IRQ_MASK(cmd, irq_index);\n \n-\t/* send command to mc */\n+\t/* send command to mc*/\n \terr = mc_send_command(mc_io, &cmd);\n \tif (err)\n \t\treturn err;\n \n \t/* retrieve response parameters */\n-\tDPSECI_RSP_GET_IRQ_MASK(cmd, *mask);\n+\trsp_params = (struct dpseci_rsp_get_attr *)cmd.params;\n+\tattr->id = le32_to_cpu(rsp_params->id);\n+\tattr->options = rsp_params->options;\n+\tattr->num_tx_queues = rsp_params->num_tx_queues;\n+\tattr->num_rx_queues = rsp_params->num_rx_queues;\n \n \treturn 0;\n }\n \n-int\n-dpseci_set_irq_mask(struct fsl_mc_io *mc_io,\n-\t\t    uint32_t cmd_flags,\n-\t\t    uint16_t token,\n-\t\t    uint8_t irq_index,\n-\t\t    uint32_t mask)\n+/**\n+ * dpseci_set_rx_queue() - Set Rx queue configuration\n+ * @mc_io:\tPointer to MC portal's I/O object\n+ * @cmd_flags:\tCommand flags; one or more of 'MC_CMD_FLAG_'\n+ * @token:\tToken of DPSECI object\n+ * @queue:\tSelect the queue relative to number of\n+ *\t\tpriorities configured at DPSECI creation; use\n+ *\t\tDPSECI_ALL_QUEUES to configure all Rx queues identically.\n+ * @cfg:\tRx queue configuration\n+ *\n+ * Return:\t'0' on Success; Error code otherwise.\n+ */\n+int dpseci_set_rx_queue(struct fsl_mc_io *mc_io,\n+\t\t\tuint32_t cmd_flags,\n+\t\t\tuint16_t token,\n+\t\t\tuint8_t queue,\n+\t\t\tconst struct dpseci_rx_queue_cfg *cfg)\n {\n+\tstruct dpseci_cmd_set_rx_queue *cmd_params;\n \tstruct mc_command cmd = { 0 };\n \n \t/* prepare command */\n-\tcmd.header = mc_encode_cmd_header(DPSECI_CMDID_SET_IRQ_MASK,\n+\tcmd.header = mc_encode_cmd_header(DPSECI_CMDID_SET_RX_QUEUE,\n \t\t\t\t\t  cmd_flags,\n \t\t\t\t\t  token);\n-\tDPSECI_CMD_SET_IRQ_MASK(cmd, irq_index, mask);\n-\n-\t/* send command to mc */\n+\tcmd_params = (struct dpseci_cmd_set_rx_queue *)cmd.params;\n+\tcmd_params->dest_id = cpu_to_le32(cfg->dest_cfg.dest_id);\n+\tcmd_params->dest_priority = cfg->dest_cfg.priority;\n+\tcmd_params->queue = queue;\n+\tcmd_params->user_ctx = cpu_to_le64(cfg->user_ctx);\n+\tcmd_params->options = cpu_to_le32(cfg->options);\n+\tdpseci_set_field(cmd_params->dest_type,\n+\t\t\t DEST_TYPE,\n+\t\t\t cfg->dest_cfg.dest_type);\n+\tdpseci_set_field(cmd_params->order_preservation_en,\n+\t\t\t ORDER_PRESERVATION,\n+\t\t\t cfg->order_preservation_en);\n+\n+\t/* send command to mc*/\n \treturn mc_send_command(mc_io, &cmd);\n }\n \n-int\n-dpseci_get_irq_status(struct fsl_mc_io *mc_io,\n-\t\t      uint32_t cmd_flags,\n-\t\t      uint16_t token,\n-\t\t      uint8_t irq_index,\n-\t\t      uint32_t *status)\n+/**\n+ * dpseci_get_rx_queue() - Retrieve Rx queue attributes.\n+ * @mc_io:\tPointer to MC portal's I/O object\n+ * @cmd_flags:\tCommand flags; one or more of 'MC_CMD_FLAG_'\n+ * @token:\tToken of DPSECI object\n+ * @queue:\tSelect the queue relative to number of\n+ *\t\t\t\tpriorities configured at DPSECI creation\n+ * @attr:\tReturned Rx queue attributes\n+ *\n+ * Return:\t'0' on Success; Error code otherwise.\n+ */\n+int dpseci_get_rx_queue(struct fsl_mc_io *mc_io,\n+\t\t\tuint32_t cmd_flags,\n+\t\t\tuint16_t token,\n+\t\t\tuint8_t queue,\n+\t\t\tstruct dpseci_rx_queue_attr *attr)\n {\n+\tstruct dpseci_rsp_get_rx_queue *rsp_params;\n+\tstruct dpseci_cmd_get_queue *cmd_params;\n \tstruct mc_command cmd = { 0 };\n \tint err;\n \n \t/* prepare command */\n-\tcmd.header = mc_encode_cmd_header(DPSECI_CMDID_GET_IRQ_STATUS,\n+\tcmd.header = mc_encode_cmd_header(DPSECI_CMDID_GET_RX_QUEUE,\n \t\t\t\t\t  cmd_flags,\n \t\t\t\t\t  token);\n-\tDPSECI_CMD_GET_IRQ_STATUS(cmd, irq_index, *status);\n+\tcmd_params = (struct dpseci_cmd_get_queue *)cmd.params;\n+\tcmd_params->queue = queue;\n \n-\t/* send command to mc */\n+\t/* send command to mc*/\n \terr = mc_send_command(mc_io, &cmd);\n \tif (err)\n \t\treturn err;\n \n \t/* retrieve response parameters */\n-\tDPSECI_RSP_GET_IRQ_STATUS(cmd, *status);\n+\trsp_params = (struct dpseci_rsp_get_rx_queue *)cmd.params;\n+\tattr->user_ctx = le64_to_cpu(rsp_params->user_ctx);\n+\tattr->fqid = le32_to_cpu(rsp_params->fqid);\n+\tattr->dest_cfg.dest_id = le32_to_cpu(rsp_params->dest_id);\n+\tattr->dest_cfg.priority = rsp_params->dest_priority;\n+\tattr->dest_cfg.dest_type =\n+\t\tdpseci_get_field(rsp_params->dest_type,\n+\t\t\t\t DEST_TYPE);\n+\tattr->order_preservation_en =\n+\t\tdpseci_get_field(rsp_params->order_preservation_en,\n+\t\t\t\t ORDER_PRESERVATION);\n \n \treturn 0;\n }\n \n-int\n-dpseci_clear_irq_status(struct fsl_mc_io *mc_io,\n+/**\n+ * dpseci_get_tx_queue() - Retrieve Tx queue attributes.\n+ * @mc_io:\tPointer to MC portal's I/O object\n+ * @cmd_flags:\tCommand flags; one or more of 'MC_CMD_FLAG_'\n+ * @token:\tToken of DPSECI object\n+ * @queue:\tSelect the queue relative to number of\n+ *\t\tpriorities configured at DPSECI creation\n+ * @attr:\tReturned Tx queue attributes\n+ *\n+ * Return:\t'0' on Success; Error code otherwise.\n+ */\n+int dpseci_get_tx_queue(struct fsl_mc_io *mc_io,\n \t\t\tuint32_t cmd_flags,\n \t\t\tuint16_t token,\n-\t\t\tuint8_t irq_index,\n-\t\t\tuint32_t status)\n-{\n-\tstruct mc_command cmd = { 0 };\n-\n-\t/* prepare command */\n-\tcmd.header = mc_encode_cmd_header(DPSECI_CMDID_CLEAR_IRQ_STATUS,\n-\t\t\t\t\t  cmd_flags,\n-\t\t\t\t\t  token);\n-\tDPSECI_CMD_CLEAR_IRQ_STATUS(cmd, irq_index, status);\n-\n-\t/* send command to mc */\n-\treturn mc_send_command(mc_io, &cmd);\n-}\n-\n-int\n-dpseci_get_attributes(struct fsl_mc_io *mc_io,\n-\t\t      uint32_t cmd_flags,\n-\t\t      uint16_t token,\n-\t\t      struct dpseci_attr *attr)\n+\t\t\tuint8_t queue,\n+\t\t\tstruct dpseci_tx_queue_attr *attr)\n {\n+\tstruct dpseci_rsp_get_tx_queue *rsp_params;\n+\tstruct dpseci_cmd_get_queue *cmd_params;\n \tstruct mc_command cmd = { 0 };\n \tint err;\n \n \t/* prepare command */\n-\tcmd.header = mc_encode_cmd_header(DPSECI_CMDID_GET_ATTR,\n+\tcmd.header = mc_encode_cmd_header(DPSECI_CMDID_GET_TX_QUEUE,\n \t\t\t\t\t  cmd_flags,\n \t\t\t\t\t  token);\n+\tcmd_params = (struct dpseci_cmd_get_queue *)cmd.params;\n+\tcmd_params->queue = queue;\n \n-\t/* send command to mc */\n+\t/* send command to mc*/\n \terr = mc_send_command(mc_io, &cmd);\n \tif (err)\n \t\treturn err;\n \n \t/* retrieve response parameters */\n-\tDPSECI_RSP_GET_ATTR(cmd, attr);\n+\trsp_params = (struct dpseci_rsp_get_tx_queue *)cmd.params;\n+\tattr->fqid = le32_to_cpu(rsp_params->fqid);\n+\tattr->priority = rsp_params->priority;\n \n \treturn 0;\n }\n \n-int\n-dpseci_set_rx_queue(struct fsl_mc_io *mc_io,\n-\t\t    uint32_t cmd_flags,\n-\t\t    uint16_t token,\n-\t\t    uint8_t queue,\n-\t\t    const struct dpseci_rx_queue_cfg *cfg)\n-{\n-\tstruct mc_command cmd = { 0 };\n-\n-\t/* prepare command */\n-\tcmd.header = mc_encode_cmd_header(DPSECI_CMDID_SET_RX_QUEUE,\n-\t\t\t\t\t  cmd_flags,\n-\t\t\t\t\t  token);\n-\tDPSECI_CMD_SET_RX_QUEUE(cmd, queue, cfg);\n-\n-\t/* send command to mc */\n-\treturn mc_send_command(mc_io, &cmd);\n-}\n-\n-int\n-dpseci_get_rx_queue(struct fsl_mc_io *mc_io,\n-\t\t    uint32_t cmd_flags,\n-\t\t    uint16_t token,\n-\t\t    uint8_t queue,\n-\t\t    struct dpseci_rx_queue_attr *attr)\n+/**\n+ * dpseci_get_sec_attr() - Retrieve SEC accelerator attributes.\n+ * @mc_io:\tPointer to MC portal's I/O object\n+ * @cmd_flags:\tCommand flags; one or more of 'MC_CMD_FLAG_'\n+ * @token:\tToken of DPSECI object\n+ * @attr:\tReturned SEC attributes\n+ *\n+ * Return:\t'0' on Success; Error code otherwise.\n+ */\n+int dpseci_get_sec_attr(struct fsl_mc_io *mc_io,\n+\t\t\tuint32_t cmd_flags,\n+\t\t\tuint16_t token,\n+\t\t\tstruct dpseci_sec_attr *attr)\n {\n+\tstruct dpseci_rsp_get_sec_attr *rsp_params;\n \tstruct mc_command cmd = { 0 };\n \tint err;\n \n \t/* prepare command */\n-\tcmd.header = mc_encode_cmd_header(DPSECI_CMDID_GET_RX_QUEUE,\n+\tcmd.header = mc_encode_cmd_header(DPSECI_CMDID_GET_SEC_ATTR,\n \t\t\t\t\t  cmd_flags,\n \t\t\t\t\t  token);\n-\tDPSECI_CMD_GET_RX_QUEUE(cmd, queue);\n \n-\t/* send command to mc */\n+\t/* send command to mc*/\n \terr = mc_send_command(mc_io, &cmd);\n \tif (err)\n \t\treturn err;\n \n \t/* retrieve response parameters */\n-\tDPSECI_RSP_GET_RX_QUEUE(cmd, attr);\n+\trsp_params = (struct dpseci_rsp_get_sec_attr *)cmd.params;\n+\tattr->ip_id = le16_to_cpu(rsp_params->ip_id);\n+\tattr->major_rev = rsp_params->major_rev;\n+\tattr->minor_rev = rsp_params->minor_rev;\n+\tattr->era = rsp_params->era;\n+\tattr->deco_num = rsp_params->deco_num;\n+\tattr->zuc_auth_acc_num = rsp_params->zuc_auth_acc_num;\n+\tattr->zuc_enc_acc_num = rsp_params->zuc_enc_acc_num;\n+\tattr->snow_f8_acc_num = rsp_params->snow_f8_acc_num;\n+\tattr->snow_f9_acc_num = rsp_params->snow_f9_acc_num;\n+\tattr->crc_acc_num = rsp_params->crc_acc_num;\n+\tattr->pk_acc_num = rsp_params->pk_acc_num;\n+\tattr->kasumi_acc_num = rsp_params->kasumi_acc_num;\n+\tattr->rng_acc_num = rsp_params->rng_acc_num;\n+\tattr->md_acc_num = rsp_params->md_acc_num;\n+\tattr->arc4_acc_num = rsp_params->arc4_acc_num;\n+\tattr->des_acc_num = rsp_params->des_acc_num;\n+\tattr->aes_acc_num = rsp_params->aes_acc_num;\n \n \treturn 0;\n }\n \n-int\n-dpseci_get_tx_queue(struct fsl_mc_io *mc_io,\n-\t\t    uint32_t cmd_flags,\n-\t\t    uint16_t token,\n-\t\t    uint8_t queue,\n-\t\t    struct dpseci_tx_queue_attr *attr)\n+/**\n+ * dpseci_get_sec_counters() - Retrieve SEC accelerator counters.\n+ * @mc_io:\tPointer to MC portal's I/O object\n+ * @cmd_flags:\tCommand flags; one or more of 'MC_CMD_FLAG_'\n+ * @token:\tToken of DPSECI object\n+ * @counters:\tReturned SEC counters\n+ *\n+ * Return:\t'0' on Success; Error code otherwise.\n+ */\n+int dpseci_get_sec_counters(struct fsl_mc_io *mc_io,\n+\t\t\t    uint32_t cmd_flags,\n+\t\t\t    uint16_t token,\n+\t\t\t    struct dpseci_sec_counters *counters)\n {\n+\tstruct dpseci_rsp_get_sec_counters *rsp_params;\n \tstruct mc_command cmd = { 0 };\n \tint err;\n \n \t/* prepare command */\n-\tcmd.header = mc_encode_cmd_header(DPSECI_CMDID_GET_TX_QUEUE,\n+\tcmd.header = mc_encode_cmd_header(DPSECI_CMDID_GET_SEC_COUNTERS,\n \t\t\t\t\t  cmd_flags,\n \t\t\t\t\t  token);\n-\tDPSECI_CMD_GET_TX_QUEUE(cmd, queue);\n \n-\t/* send command to mc */\n+\t/* send command to mc*/\n \terr = mc_send_command(mc_io, &cmd);\n \tif (err)\n \t\treturn err;\n \n \t/* retrieve response parameters */\n-\tDPSECI_RSP_GET_TX_QUEUE(cmd, attr);\n+\trsp_params = (struct dpseci_rsp_get_sec_counters *)cmd.params;\n+\tcounters->dequeued_requests =\n+\t\t\t\tle64_to_cpu(rsp_params->dequeued_requests);\n+\tcounters->ob_enc_requests = le64_to_cpu(rsp_params->ob_enc_requests);\n+\tcounters->ib_dec_requests = le64_to_cpu(rsp_params->ib_dec_requests);\n+\tcounters->ob_enc_bytes = le64_to_cpu(rsp_params->ob_enc_bytes);\n+\tcounters->ob_prot_bytes = le64_to_cpu(rsp_params->ob_prot_bytes);\n+\tcounters->ib_dec_bytes = le64_to_cpu(rsp_params->ib_dec_bytes);\n+\tcounters->ib_valid_bytes = le64_to_cpu(rsp_params->ib_valid_bytes);\n \n \treturn 0;\n }\n \n-int\n-dpseci_get_sec_attr(struct fsl_mc_io *mc_io,\n-\t\t    uint32_t cmd_flags,\n-\t\t    uint16_t token,\n-\t\t    struct dpseci_sec_attr *attr)\n+/**\n+ * dpseci_get_api_version() - Get Data Path SEC Interface API version\n+ * @mc_io:  Pointer to MC portal's I/O object\n+ * @cmd_flags:\tCommand flags; one or more of 'MC_CMD_FLAG_'\n+ * @major_ver:\tMajor version of data path sec API\n+ * @minor_ver:\tMinor version of data path sec API\n+ *\n+ * Return:  '0' on Success; Error code otherwise.\n+ */\n+int dpseci_get_api_version(struct fsl_mc_io *mc_io,\n+\t\t\t   uint32_t cmd_flags,\n+\t\t\t   uint16_t *major_ver,\n+\t\t\t   uint16_t *minor_ver)\n {\n+\tstruct dpseci_rsp_get_api_version *rsp_params;\n \tstruct mc_command cmd = { 0 };\n \tint err;\n \n-\t/* prepare command */\n-\tcmd.header = mc_encode_cmd_header(DPSECI_CMDID_GET_SEC_ATTR,\n-\t\t\t\t\t  cmd_flags,\n-\t\t\t\t\t  token);\n+\tcmd.header = mc_encode_cmd_header(DPSECI_CMDID_GET_API_VERSION,\n+\t\t\t\t\tcmd_flags,\n+\t\t\t\t\t0);\n \n-\t/* send command to mc */\n \terr = mc_send_command(mc_io, &cmd);\n \tif (err)\n \t\treturn err;\n \n-\t/* retrieve response parameters */\n-\tDPSECI_RSP_GET_SEC_ATTR(cmd, attr);\n+\trsp_params = (struct dpseci_rsp_get_api_version *)cmd.params;\n+\t*major_ver = le16_to_cpu(rsp_params->major);\n+\t*minor_ver = le16_to_cpu(rsp_params->minor);\n \n \treturn 0;\n }\n \n-int\n-dpseci_get_sec_counters(struct fsl_mc_io *mc_io,\n+int dpseci_set_congestion_notification(\n+\t\t\tstruct fsl_mc_io *mc_io,\n \t\t\tuint32_t cmd_flags,\n \t\t\tuint16_t token,\n-\t\t\tstruct dpseci_sec_counters *counters)\n+\t\t\tconst struct dpseci_congestion_notification_cfg *cfg)\n {\n+\tstruct dpseci_cmd_set_congestion_notification *cmd_params;\n \tstruct mc_command cmd = { 0 };\n-\tint err;\n \n \t/* prepare command */\n-\tcmd.header = mc_encode_cmd_header(DPSECI_CMDID_GET_SEC_COUNTERS,\n-\t\t\t\t\t  cmd_flags,\n-\t\t\t\t\t  token);\n-\n-\t/* send command to mc */\n-\terr = mc_send_command(mc_io, &cmd);\n-\tif (err)\n-\t\treturn err;\n-\n-\t/* retrieve response parameters */\n-\tDPSECI_RSP_GET_SEC_COUNTERS(cmd, counters);\n-\n-\treturn 0;\n+\tcmd.header = mc_encode_cmd_header(\n+\t\t\tDPSECI_CMDID_SET_CONGESTION_NOTIFICATION,\n+\t\t\tcmd_flags,\n+\t\t\ttoken);\n+\n+\tcmd_params =\n+\t\t(struct dpseci_cmd_set_congestion_notification *)cmd.params;\n+\tcmd_params->dest_id = cfg->dest_cfg.dest_id;\n+\tcmd_params->dest_priority = cfg->dest_cfg.priority;\n+\tcmd_params->message_ctx = cfg->message_ctx;\n+\tcmd_params->message_iova = cfg->message_iova;\n+\tcmd_params->notification_mode = cfg->notification_mode;\n+\tcmd_params->threshold_entry = cfg->threshold_entry;\n+\tcmd_params->threshold_exit = cfg->threshold_exit;\n+\tdpseci_set_field(cmd_params->type_units,\n+\t\t\t DEST_TYPE,\n+\t\t\t cfg->dest_cfg.dest_type);\n+\tdpseci_set_field(cmd_params->type_units,\n+\t\t\t CG_UNITS,\n+\t\t\t cfg->units);\n+\n+\t/* send command to mc*/\n+\treturn mc_send_command(mc_io, &cmd);\n }\n \n-int\n-dpseci_get_api_version(struct fsl_mc_io *mc_io,\n-\t\t       uint32_t cmd_flags,\n-\t\t       uint16_t *major_ver,\n-\t\t       uint16_t *minor_ver)\n+int dpseci_get_congestion_notification(\n+\t\t\t\tstruct fsl_mc_io *mc_io,\n+\t\t\t\tuint32_t cmd_flags,\n+\t\t\t\tuint16_t token,\n+\t\t\t\tstruct dpseci_congestion_notification_cfg *cfg)\n {\n+\tstruct dpseci_cmd_set_congestion_notification *rsp_params;\n \tstruct mc_command cmd = { 0 };\n \tint err;\n \n-\tcmd.header = mc_encode_cmd_header(DPSECI_CMDID_GET_API_VERSION,\n-\t\t\t\t\tcmd_flags,\n-\t\t\t\t\t0);\n+\t/* prepare command */\n+\tcmd.header = mc_encode_cmd_header(\n+\t\t\tDPSECI_CMDID_GET_CONGESTION_NOTIFICATION,\n+\t\t\tcmd_flags,\n+\t\t\ttoken);\n \n+\t/* send command to mc*/\n \terr = mc_send_command(mc_io, &cmd);\n \tif (err)\n \t\treturn err;\n \n-\tDPSECI_RSP_GET_API_VERSION(cmd, *major_ver, *minor_ver);\n+\trsp_params =\n+\t\t(struct dpseci_cmd_set_congestion_notification *)cmd.params;\n+\n+\tcfg->dest_cfg.dest_id = le32_to_cpu(rsp_params->dest_id);\n+\tcfg->dest_cfg.priority = rsp_params->dest_priority;\n+\tcfg->notification_mode = le16_to_cpu(rsp_params->notification_mode);\n+\tcfg->message_ctx = le64_to_cpu(rsp_params->message_ctx);\n+\tcfg->message_iova = le64_to_cpu(rsp_params->message_iova);\n+\tcfg->threshold_entry = le32_to_cpu(rsp_params->threshold_entry);\n+\tcfg->threshold_exit = le32_to_cpu(rsp_params->threshold_exit);\n+\tcfg->units = dpseci_get_field(rsp_params->type_units, CG_UNITS);\n+\tcfg->dest_cfg.dest_type = dpseci_get_field(rsp_params->type_units,\n+\t\t\t\t\t\tDEST_TYPE);\n \n \treturn 0;\n }\ndiff --git a/drivers/crypto/dpaa2_sec/mc/fsl_dpseci.h b/drivers/crypto/dpaa2_sec/mc/fsl_dpseci.h\nindex 6cc14a6..4acb595 100644\n--- a/drivers/crypto/dpaa2_sec/mc/fsl_dpseci.h\n+++ b/drivers/crypto/dpaa2_sec/mc/fsl_dpseci.h\n@@ -5,7 +5,7 @@\n  *   BSD LICENSE\n  *\n  * Copyright 2013-2016 Freescale Semiconductor Inc.\n- * Copyright 2016 NXP.\n+ * Copyright 2016-2017 NXP.\n  *\n  * Redistribution and use in source and binary forms, with or without\n  * modification, are permitted provided that the following conditions are met:\n@@ -37,7 +37,6 @@\n  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n  * POSSIBILITY OF SUCH DAMAGE.\n  */\n-\n #ifndef __FSL_DPSECI_H\n #define __FSL_DPSECI_H\n \n@@ -61,394 +60,89 @@ struct fsl_mc_io;\n  */\n #define DPSECI_ALL_QUEUES\t(uint8_t)(-1)\n \n-/**\n- * dpseci_open() - Open a control session for the specified object\n- * This function can be used to open a control session for an\n- * already created object; an object may have been declared in\n- * the DPL or by calling the dpseci_create() function.\n- * This function returns a unique authentication token,\n- * associated with the specific object ID and the specific MC\n- * portal; this token must be used in all subsequent commands for\n- * this specific object.\n- *\n- * @param\tmc_io\t\tPointer to MC portal's I/O object\n- * @param\tcmd_flags\tCommand flags; one or more of 'MC_CMD_FLAG_'\n- * @param\tdpseci_id\tDPSECI unique ID\n- * @param\ttoken\t\tReturned token; use in subsequent API calls\n- *\n- * @return:\n- *   - Return '0' on Success.\n- *   - Return Error code otherwise.\n- */\n-int\n-dpseci_open(struct fsl_mc_io *mc_io,\n-\t    uint32_t cmd_flags,\n-\t    int dpseci_id,\n-\t    uint16_t *token);\n+int dpseci_open(struct fsl_mc_io *mc_io,\n+\t\tuint32_t cmd_flags,\n+\t\tint dpseci_id,\n+\t\tuint16_t *token);\n+\n+int dpseci_close(struct fsl_mc_io *mc_io,\n+\t\t uint32_t cmd_flags,\n+\t\t uint16_t token);\n \n /**\n- * dpseci_close() - Close the control session of the object\n- * After this function is called, no further operations are\n- * allowed on the object without opening a new control session.\n- *\n- * @param\tmc_io\t\tPointer to MC portal's I/O object\n- * @param\tcmd_flags\tCommand flags; one or more of 'MC_CMD_FLAG_'\n- * @param\ttoken\t\tToken of DPSECI object\n- *\n- * @return:\n- *   - Return '0' on Success.\n- *   - Return Error code otherwise.\n+ * Enable the Congestion Group support\n  */\n-int\n-dpseci_close(struct fsl_mc_io *mc_io,\n-\t     uint32_t cmd_flags,\n-\t     uint16_t token);\n+#define DPSECI_OPT_HAS_CG\t\t\t\t0x000020\n \n /**\n  * struct dpseci_cfg - Structure representing DPSECI configuration\n+ * @options: Any combination of the following options:\n+ *\t\tDPSECI_OPT_HAS_CG\n+ *\t\tDPSECI_OPT_HAS_OPR\n+ *\t\tDPSECI_OPT_OPR_SHARED\n+ * @num_tx_queues: num of queues towards the SEC\n+ * @num_rx_queues: num of queues back from the SEC\n+ * @priorities: Priorities for the SEC hardware processing;\n+ *\t\teach place in the array is the priority of the tx queue\n+ *\t\ttowards the SEC,\n+ *\t\tvalid priorities are configured with values 1-8;\n  */\n struct dpseci_cfg {\n-\tuint8_t num_tx_queues;\t/* num of queues towards the SEC */\n-\tuint8_t num_rx_queues;\t/* num of queues back from the SEC */\n+\tuint32_t options;\n+\tuint8_t num_tx_queues;\n+\tuint8_t num_rx_queues;\n \tuint8_t priorities[DPSECI_PRIO_NUM];\n-\t/**< Priorities for the SEC hardware processing;\n-\t * each place in the array is the priority of the tx queue\n-\t * towards the SEC,\n-\t * valid priorities are configured with values 1-8;\n-\t */\n };\n \n-/**\n- * dpseci_create() - Create the DPSECI object\n- * Create the DPSECI object, allocate required resources and\n- * perform required initialization.\n- *\n- * The object can be created either by declaring it in the\n- * DPL file, or by calling this function.\n- *\n- * The function accepts an authentication token of a parent\n- * container that this object should be assigned to. The token\n- * can be '0' so the object will be assigned to the default container.\n- * The newly created object can be opened with the returned\n- * object id and using the container's associated tokens and MC portals.\n- *\n- * @param\tmc_io\t      Pointer to MC portal's I/O object\n- * @param\tdprc_token    Parent container token; '0' for default container\n- * @param\tcmd_flags     Command flags; one or more of 'MC_CMD_FLAG_'\n- * @param\tcfg\t      Configuration structure\n- * @param\tobj_id\t      returned object id\n- *\n- * @return:\n- *   - Return '0' on Success.\n- *   - Return Error code otherwise.\n- */\n-int\n-dpseci_create(struct fsl_mc_io *mc_io,\n-\t      uint16_t dprc_token,\n-\t      uint32_t cmd_flags,\n-\t      const struct dpseci_cfg *cfg,\n-\t      uint32_t *obj_id);\n-\n-/**\n- * dpseci_destroy() - Destroy the DPSECI object and release all its resources.\n- * The function accepts the authentication token of the parent container that\n- * created the object (not the one that currently owns the object). The object\n- * is searched within parent using the provided 'object_id'.\n- * All tokens to the object must be closed before calling destroy.\n- *\n- * @param\tmc_io\t      Pointer to MC portal's I/O object\n- * @param\tdprc_token    Parent container token; '0' for default container\n- * @param\tcmd_flags     Command flags; one or more of 'MC_CMD_FLAG_'\n- * @param\tobject_id     The object id; it must be a valid id within the\n- *\t\t\t      container that created this object;\n- *\n- * @return:\n- *   - Return '0' on Success.\n- *   - Return Error code otherwise.\n- */\n-int\n-dpseci_destroy(struct fsl_mc_io\t*mc_io,\n-\t       uint16_t\tdprc_token,\n-\t       uint32_t\tcmd_flags,\n-\t       uint32_t\tobject_id);\n-\n-/**\n- * dpseci_enable() - Enable the DPSECI, allow sending and receiving frames.\n- * @param\tmc_io\t\tPointer to MC portal's I/O object\n- * @param\tcmd_flags\tCommand flags; one or more of 'MC_CMD_FLAG_'\n- * @param\ttoken\t\tToken of DPSECI object\n- *\n- * @return:\n- *   - Return '0' on Success.\n- *   - Return Error code otherwise.\n- */\n-int\n-dpseci_enable(struct fsl_mc_io *mc_io,\n-\t      uint32_t cmd_flags,\n-\t      uint16_t token);\n-\n-/**\n- * dpseci_disable() - Disable the DPSECI, stop sending and receiving frames.\n- * @param\tmc_io\t\tPointer to MC portal's I/O object\n- * @param\tcmd_flags\tCommand flags; one or more of 'MC_CMD_FLAG_'\n- * @param\ttoken\t\tToken of DPSECI object\n- *\n- * @return:\n- *   - Return '0' on Success.\n- *   - Return Error code otherwise.\n- */\n-int\n-dpseci_disable(struct fsl_mc_io *mc_io,\n-\t       uint32_t cmd_flags,\n-\t       uint16_t token);\n-\n-/**\n- * dpseci_is_enabled() - Check if the DPSECI is enabled.\n- * @param\tmc_io\t\tPointer to MC portal's I/O object\n- * @param\tcmd_flags\tCommand flags; one or more of 'MC_CMD_FLAG_'\n- * @param\ttoken\t\tToken of DPSECI object\n- * @param\ten\t\tReturns '1' if object is enabled; '0' otherwise\n- *\n- * @return:\n- *   - Return '0' on Success.\n- *   - Return Error code otherwise.\n- */\n-int\n-dpseci_is_enabled(struct fsl_mc_io *mc_io,\n+int dpseci_create(struct fsl_mc_io *mc_io,\n+\t\t  uint16_t dprc_token,\n \t\t  uint32_t cmd_flags,\n-\t\t  uint16_t token,\n-\t\t  int *en);\n+\t\t  const struct dpseci_cfg *cfg,\n+\t\t  uint32_t *obj_id);\n \n-/**\n- * dpseci_reset() - Reset the DPSECI, returns the object to initial state.\n- * @param\tmc_io\t\tPointer to MC portal's I/O object\n- * @param\tcmd_flags\tCommand flags; one or more of 'MC_CMD_FLAG_'\n- * @param\ttoken\t\tToken of DPSECI object\n- *\n- * @return:\n- *   - Return '0' on Success.\n- *   - Return Error code otherwise.\n- */\n-int\n-dpseci_reset(struct fsl_mc_io *mc_io,\n-\t     uint32_t cmd_flags,\n-\t     uint16_t token);\n+int dpseci_destroy(struct fsl_mc_io *mc_io,\n+\t\t   uint16_t dprc_token,\n+\t\t   uint32_t cmd_flags,\n+\t\t   uint32_t object_id);\n \n-/**\n- * struct dpseci_irq_cfg - IRQ configuration\n- */\n-struct dpseci_irq_cfg {\n-\tuint64_t addr;\n-\t/* Address that must be written to signal a message-based interrupt */\n-\tuint32_t val;\n-\t/* Value to write into irq_addr address */\n-\tint irq_num;\n-\t/* A user defined number associated with this IRQ */\n-};\n+int dpseci_enable(struct fsl_mc_io *mc_io,\n+\t\t  uint32_t cmd_flags,\n+\t\t  uint16_t token);\n \n-/**\n- * dpseci_set_irq() - Set IRQ information for the DPSECI to trigger an interrupt\n- * @param\tmc_io\t\tPointer to MC portal's I/O object\n- * @param\tcmd_flags\tCommand flags; one or more of 'MC_CMD_FLAG_'\n- * @param\ttoken\t\tToken of DPSECI object\n- * @param\tirq_index\tIdentifies the interrupt index to configure\n- * @param\tirq_cfg\t\tIRQ configuration\n- *\n- * @return:\n- *   - Return '0' on Success.\n- *   - Return Error code otherwise.\n- */\n-int\n-dpseci_set_irq(struct fsl_mc_io *mc_io,\n-\t       uint32_t cmd_flags,\n-\t       uint16_t token,\n-\t       uint8_t irq_index,\n-\t       struct dpseci_irq_cfg *irq_cfg);\n+int dpseci_disable(struct fsl_mc_io *mc_io,\n+\t\t   uint32_t cmd_flags,\n+\t\t   uint16_t token);\n \n-/**\n- * dpseci_get_irq() - Get IRQ information from the DPSECI\n- *\n- * @param\tmc_io\t\tPointer to MC portal's I/O object\n- * @param\tcmd_flags\tCommand flags; one or more of 'MC_CMD_FLAG_'\n- * @param\ttoken\t\tToken of DPSECI object\n- * @param\tirq_index\tThe interrupt index to configure\n- * @param\ttype\t\tInterrupt type: 0 represents message interrupt\n- *\t\t\t\ttype (both irq_addr and irq_val are valid)\n- * @param\tirq_cfg\t\tIRQ attributes\n- *\n- * @return:\n- *   - Return '0' on Success.\n- *   - Return Error code otherwise.\n- */\n-int\n-dpseci_get_irq(struct fsl_mc_io *mc_io,\n-\t       uint32_t cmd_flags,\n-\t       uint16_t token,\n-\t       uint8_t irq_index,\n-\t       int *type,\n-\t       struct dpseci_irq_cfg *irq_cfg);\n-\n-/**\n- * dpseci_set_irq_enable() - Set overall interrupt state.\n- * Allows GPP software to control when interrupts are generated.\n- * Each interrupt can have up to 32 causes.  The enable/disable control's the\n- * overall interrupt state. if the interrupt is disabled no causes will cause\n- * an interrupt\n- *\n- * @param\tmc_io\t\tPointer to MC portal's I/O object\n- * @param\tcmd_flags\tCommand flags; one or more of 'MC_CMD_FLAG_'\n- * @param\ttoken\t\tToken of DPSECI object\n- * @param\tirq_index\tThe interrupt index to configure\n- * @param\ten\t\tInterrupt state - enable = 1, disable = 0\n- *\n- * @return:\n- *   - Return '0' on Success.\n- *   - Return Error code otherwise.\n- */\n-int\n-dpseci_set_irq_enable(struct fsl_mc_io *mc_io,\n+int dpseci_is_enabled(struct fsl_mc_io *mc_io,\n \t\t      uint32_t cmd_flags,\n \t\t      uint16_t token,\n-\t\t      uint8_t irq_index,\n-\t\t      uint8_t en);\n+\t\t      int *en);\n \n-/**\n- * dpseci_get_irq_enable() - Get overall interrupt state\n- * @param\tmc_io\t\tPointer to MC portal's I/O object\n- * @param\tcmd_flags\tCommand flags; one or more of 'MC_CMD_FLAG_'\n- * @param\ttoken\t\tToken of DPSECI object\n- * @param\tirq_index\tThe interrupt index to configure\n- * @param\ten\t\tReturned Interrupt state - enable = 1,\n- *\t\t\t\tdisable = 0\n- *\n- * @return:\n- *   - Return '0' on Success.\n- *   - Return Error code otherwise.\n- */\n-int\n-dpseci_get_irq_enable(struct fsl_mc_io *mc_io,\n-\t\t      uint32_t cmd_flags,\n-\t\t      uint16_t token,\n-\t\t      uint8_t irq_index,\n-\t\t      uint8_t *en);\n-\n-/**\n- * dpseci_set_irq_mask() - Set interrupt mask.\n- * Every interrupt can have up to 32 causes and the interrupt model supports\n- * masking/unmasking each cause independently\n- *\n- * @param\tmc_io\t\tPointer to MC portal's I/O object\n- * @param\tcmd_flags\tCommand flags; one or more of 'MC_CMD_FLAG_'\n- * @param\ttoken\t\tToken of DPSECI object\n- * @param\tirq_index\tThe interrupt index to configure\n- * @param\tmask\t\tevent mask to trigger interrupt;\n- *\t\t\t\teach bit:\n- *\t\t\t\t\t0 = ignore event\n- *\t\t\t\t\t1 = consider event for asserting IRQ\n- *\n- * @return:\n- *   - Return '0' on Success.\n- *   - Return Error code otherwise.\n- */\n-int\n-dpseci_set_irq_mask(struct fsl_mc_io *mc_io,\n-\t\t    uint32_t cmd_flags,\n-\t\t    uint16_t token,\n-\t\t    uint8_t irq_index,\n-\t\t    uint32_t mask);\n-\n-/**\n- * dpseci_get_irq_mask() - Get interrupt mask.\n- * Every interrupt can have up to 32 causes and the interrupt model supports\n- * masking/unmasking each cause independently\n- *\n- * @param\tmc_io\t\tPointer to MC portal's I/O object\n- * @param\tcmd_flags\tCommand flags; one or more of 'MC_CMD_FLAG_'\n- * @param\ttoken\t\tToken of DPSECI object\n- * @param\tirq_index\tThe interrupt index to configure\n- * @param\tmask\t\tReturned event mask to trigger interrupt\n- *\n- * @return:\n- *   - Return '0' on Success.\n- *   - Return Error code otherwise.\n- */\n-int\n-dpseci_get_irq_mask(struct fsl_mc_io *mc_io,\n-\t\t    uint32_t cmd_flags,\n-\t\t    uint16_t token,\n-\t\t    uint8_t irq_index,\n-\t\t    uint32_t *mask);\n-\n-/**\n- * dpseci_get_irq_status() - Get the current status of any pending interrupts\n- * @param\tmc_io\t\tPointer to MC portal's I/O object\n- * @param\tcmd_flags\tCommand flags; one or more of 'MC_CMD_FLAG_'\n- * @param\ttoken\t\tToken of DPSECI object\n- * @param\tirq_index\tThe interrupt index to configure\n- * @param\tstatus\t\tReturned interrupts status - one bit per cause:\n- *\t\t\t\t\t0 = no interrupt pending\n- *\t\t\t\t\t1 = interrupt pending\n- *\n- * @return:\n- *   - Return '0' on Success.\n- *   - Return Error code otherwise.\n- */\n-int\n-dpseci_get_irq_status(struct fsl_mc_io *mc_io,\n-\t\t      uint32_t cmd_flags,\n-\t\t      uint16_t token,\n-\t\t      uint8_t irq_index,\n-\t\t      uint32_t *status);\n-\n-/**\n- * dpseci_clear_irq_status() - Clear a pending interrupt's status\n- * @param\tmc_io\t\tPointer to MC portal's I/O object\n- * @param\tcmd_flags\tCommand flags; one or more of 'MC_CMD_FLAG_'\n- * @param\ttoken\t\tToken of DPSECI object\n- * @param\tirq_index\tThe interrupt index to configure\n- * @param\tstatus\t\tbits to clear (W1C) - one bit per cause:\n- *\t\t\t\t\t0 = don't change\n- *\t\t\t\t\t1 = clear status bit\n- *\n- * @return:\n- *   - Return '0' on Success.\n- *   - Return Error code otherwise.\n- */\n-int\n-dpseci_clear_irq_status(struct fsl_mc_io *mc_io,\n-\t\t\tuint32_t cmd_flags,\n-\t\t\tuint16_t token,\n-\t\t\tuint8_t irq_index,\n-\t\t\tuint32_t status);\n+int dpseci_reset(struct fsl_mc_io *mc_io,\n+\t\t uint32_t cmd_flags,\n+\t\t uint16_t token);\n \n /**\n  * struct dpseci_attr - Structure representing DPSECI attributes\n- * @param\tid: DPSECI object ID\n- * @param\tnum_tx_queues: number of queues towards the SEC\n- * @param\tnum_rx_queues: number of queues back from the SEC\n+ * @id: DPSECI object ID\n+ * @num_tx_queues: number of queues towards the SEC\n+ * @num_rx_queues: number of queues back from the SEC\n+ * @options: Any combination of the following options:\n+ *\t\tDPSECI_OPT_HAS_CG\n+ *\t\tDPSECI_OPT_HAS_OPR\n+ *\t\tDPSECI_OPT_OPR_SHARED\n  */\n struct dpseci_attr {\n-\tint id;\t\t\t/* DPSECI object ID */\n-\tuint8_t num_tx_queues;\t/* number of queues towards the SEC */\n-\tuint8_t num_rx_queues;\t/* number of queues back from the SEC */\n+\tint id;\n+\tuint8_t num_tx_queues;\n+\tuint8_t num_rx_queues;\n+\tuint32_t options;\n };\n \n-/**\n- * dpseci_get_attributes() - Retrieve DPSECI attributes.\n- * @param\tmc_io\t\tPointer to MC portal's I/O object\n- * @param\tcmd_flags\tCommand flags; one or more of 'MC_CMD_FLAG_'\n- * @param\ttoken\t\tToken of DPSECI object\n- * @param\tattr\t\tReturned object's attributes\n- *\n- * @return:\n- *   - Return '0' on Success.\n- *   - Return Error code otherwise.\n- */\n-int\n-dpseci_get_attributes(struct fsl_mc_io *mc_io,\n-\t\t      uint32_t cmd_flags,\n-\t\t      uint16_t token,\n-\t\t      struct dpseci_attr *attr);\n+int dpseci_get_attributes(struct fsl_mc_io *mc_io,\n+\t\t\t  uint32_t cmd_flags,\n+\t\t\t  uint16_t token,\n+\t\t\t  struct dpseci_attr *attr);\n \n /**\n  * enum dpseci_dest - DPSECI destination types\n@@ -471,16 +165,16 @@ enum dpseci_dest {\n \n /**\n  * struct dpseci_dest_cfg - Structure representing DPSECI destination parameters\n+ * @dest_type: Destination type\n+ * @dest_id: Either DPIO ID or DPCON ID, depending on the destination type\n+ * @priority: Priority selection within the DPIO or DPCON channel; valid values\n+ *\tare 0-1 or 0-7, depending on the number of priorities in that\n+ *\tchannel; not relevant for 'DPSECI_DEST_NONE' option\n  */\n struct dpseci_dest_cfg {\n-\tenum dpseci_dest dest_type; /* Destination type */\n+\tenum dpseci_dest dest_type;\n \tint dest_id;\n-\t/* Either DPIO ID or DPCON ID, depending on the destination type */\n \tuint8_t priority;\n-\t/* Priority selection within the DPIO or DPCON channel; valid values\n-\t * are 0-1 or 0-7, depending on the number of priorities in that\n-\t * channel; not relevant for 'DPSECI_DEST_NONE' option\n-\t */\n };\n \n /**\n@@ -504,243 +198,235 @@ struct dpseci_dest_cfg {\n \n /**\n  * struct dpseci_rx_queue_cfg - DPSECI RX queue configuration\n+ * @options: Flags representing the suggested modifications to the queue;\n+ *\tUse any combination of 'DPSECI_QUEUE_OPT_<X>' flags\n+ * @order_preservation_en: order preservation configuration for the rx queue\n+ * valid only if 'DPSECI_QUEUE_OPT_ORDER_PRESERVATION' is contained in 'options'\n+ * @user_ctx: User context value provided in the frame descriptor of each\n+ *\tdequeued frame;\n+ *\tvalid only if 'DPSECI_QUEUE_OPT_USER_CTX' is contained in 'options'\n+ * @dest_cfg: Queue destination parameters;\n+ *\tvalid only if 'DPSECI_QUEUE_OPT_DEST' is contained in 'options'\n  */\n struct dpseci_rx_queue_cfg {\n \tuint32_t options;\n-\t/* Flags representing the suggested modifications to the queue;\n-\t * Use any combination of 'DPSECI_QUEUE_OPT_<X>' flags\n-\t */\n \tint order_preservation_en;\n-\t/* order preservation configuration for the rx queue\n-\t * valid only if 'DPSECI_QUEUE_OPT_ORDER_PRESERVATION' is contained in\n-\t * 'options'\n-\t */\n \tuint64_t user_ctx;\n-\t/* User context value provided in the frame descriptor of each\n-\t * dequeued frame;\n-\t * valid only if 'DPSECI_QUEUE_OPT_USER_CTX' is contained in 'options'\n-\t */\n \tstruct dpseci_dest_cfg dest_cfg;\n-\t/* Queue destination parameters;\n-\t * valid only if 'DPSECI_QUEUE_OPT_DEST' is contained in 'options'\n-\t */\n };\n \n-/**\n- * dpseci_set_rx_queue() - Set Rx queue configuration\n- * @param\tmc_io\t\tPointer to MC portal's I/O object\n- * @param\tcmd_flags\tCommand flags; one or more of 'MC_CMD_FLAG_'\n- * @param\ttoken\t\tToken of DPSECI object\n- * @param\tqueue\t\tSelect the queue relative to number of\n- *\t\t\t\tpriorities configured at DPSECI creation; use\n- *\t\t\t\tDPSECI_ALL_QUEUES to configure all Rx queues\n- *\t\t\t\tidentically.\n- * @param\tcfg\t\tRx queue configuration\n- *\n- * @return:\n- *   - Return '0' on Success.\n- *   - Return Error code otherwise.\n- */\n-int\n-dpseci_set_rx_queue(struct fsl_mc_io *mc_io,\n-\t\t    uint32_t cmd_flags,\n-\t\t    uint16_t token,\n-\t\t    uint8_t queue,\n-\t\t    const struct dpseci_rx_queue_cfg *cfg);\n+int dpseci_set_rx_queue(struct fsl_mc_io *mc_io,\n+\t\t\tuint32_t cmd_flags,\n+\t\t\tuint16_t token,\n+\t\t\tuint8_t queue,\n+\t\t\tconst struct dpseci_rx_queue_cfg *cfg);\n \n /**\n  * struct dpseci_rx_queue_attr - Structure representing attributes of Rx queues\n+ * @user_ctx: User context value provided in the frame descriptor of each\n+ *\tdequeued frame\n+ * @order_preservation_en: Status of the order preservation configuration\n+ *\t\t\t\ton the queue\n+ * @dest_cfg: Queue destination configuration\n+ * @fqid: Virtual FQID value to be used for dequeue operations\n  */\n struct dpseci_rx_queue_attr {\n \tuint64_t user_ctx;\n-\t/* User context value provided in the frame descriptor of\n-\t * each dequeued frame\n-\t */\n \tint order_preservation_en;\n-\t/* Status of the order preservation configuration on the queue */\n-\tstruct dpseci_dest_cfg\tdest_cfg;\n-\t/* Queue destination configuration */\n+\tstruct dpseci_dest_cfg dest_cfg;\n \tuint32_t fqid;\n-\t/* Virtual FQID value to be used for dequeue operations */\n };\n \n-/**\n- * dpseci_get_rx_queue() - Retrieve Rx queue attributes.\n- * @param\tmc_io\t\tPointer to MC portal's I/O object\n- * @param\tcmd_flags\tCommand flags; one or more of 'MC_CMD_FLAG_'\n- * @param\ttoken\t\tToken of DPSECI object\n- * @param\tqueue\t\tSelect the queue relative to number of\n- *\t\t\t\tpriorities configured at DPSECI creation\n- * @param\tattr\t\tReturned Rx queue attributes\n- *\n- * @return:\n- *   - Return '0' on Success.\n- *   - Return Error code otherwise.\n- */\n-int\n-dpseci_get_rx_queue(struct fsl_mc_io *mc_io,\n-\t\t    uint32_t cmd_flags,\n-\t\t    uint16_t token,\n-\t\t    uint8_t queue,\n-\t\t    struct dpseci_rx_queue_attr *attr);\n+int dpseci_get_rx_queue(struct fsl_mc_io *mc_io,\n+\t\t\tuint32_t cmd_flags,\n+\t\t\tuint16_t token,\n+\t\t\tuint8_t queue,\n+\t\t\tstruct dpseci_rx_queue_attr *attr);\n \n /**\n  * struct dpseci_tx_queue_attr - Structure representing attributes of Tx queues\n+ * @fqid: Virtual FQID to be used for sending frames to SEC hardware\n+ * @priority: SEC hardware processing priority for the queue\n  */\n struct dpseci_tx_queue_attr {\n \tuint32_t fqid;\n-\t/* Virtual FQID to be used for sending frames to SEC hardware */\n \tuint8_t priority;\n-\t/* SEC hardware processing priority for the queue */\n };\n \n-/**\n- * dpseci_get_tx_queue() - Retrieve Tx queue attributes.\n- * @param\tmc_io\t\tPointer to MC portal's I/O object\n- * @param\tcmd_flags\tCommand flags; one or more of 'MC_CMD_FLAG_'\n- * @param\ttoken\t\tToken of DPSECI object\n- * @param\tqueue\t\tSelect the queue relative to number of\n- *\t\t\t\tpriorities configured at DPSECI creation\n- * @param\tattr\t\tReturned Tx queue attributes\n- *\n- * @return:\n- *   - Return '0' on Success.\n- *   - Return Error code otherwise.\n- */\n-int\n-dpseci_get_tx_queue(struct fsl_mc_io *mc_io,\n-\t\t    uint32_t cmd_flags,\n-\t\t    uint16_t token,\n-\t\t    uint8_t queue,\n-\t\t    struct dpseci_tx_queue_attr *attr);\n+int dpseci_get_tx_queue(struct fsl_mc_io *mc_io,\n+\t\t\tuint32_t cmd_flags,\n+\t\t\tuint16_t token,\n+\t\t\tuint8_t queue,\n+\t\t\tstruct dpseci_tx_queue_attr *attr);\n \n /**\n  * struct dpseci_sec_attr - Structure representing attributes of the SEC\n- *\t\t\thardware accelerator\n- */\n+ *\t\t\t\thardware accelerator\n+ * @ip_id:\t\tID for SEC.\n+ * @major_rev:\t\tMajor revision number for SEC.\n+ * @minor_rev:\t\tMinor revision number for SEC.\n+ * @era:\t\tSEC Era.\n+ * @deco_num:\t\tThe number of copies of the DECO that are implemented\n+ *\t\t\tin this version of SEC.\n+ * @zuc_auth_acc_num:\tThe number of copies of ZUCA that are implemented\n+ *\t\t\tin this version of SEC.\n+ * @zuc_enc_acc_num:\tThe number of copies of ZUCE that are implemented\n+ *\t\t\tin this version of SEC.\n+ * @snow_f8_acc_num:\tThe number of copies of the SNOW-f8 module that are\n+ *\t\t\timplemented in this version of SEC.\n+ * @snow_f9_acc_num:\tThe number of copies of the SNOW-f9 module that are\n+ *\t\t\timplemented in this version of SEC.\n+ * @crc_acc_num:\tThe number of copies of the CRC module that are\n+ *\t\t\timplemented in this version of SEC.\n+ * @pk_acc_num:\t\tThe number of copies of the Public Key module that are\n+ *\t\t\timplemented in this version of SEC.\n+ * @kasumi_acc_num:\tThe number of copies of the Kasumi module that are\n+ *\t\t\timplemented in this version of SEC.\n+ * @rng_acc_num:\tThe number of copies of the Random Number Generator that\n+ *\t\t\tare implemented in this version of SEC.\n+ * @md_acc_num:\t\tThe number of copies of the MDHA (Hashing module) that\n+ *\t\t\tare implemented in this version of SEC.\n+ * @arc4_acc_num:\tThe number of copies of the ARC4 module that are\n+ *\t\t\timplemented in this version of SEC.\n+ * @des_acc_num:\tThe number of copies of the DES module that are\n+ *\t\t\timplemented in this version of SEC.\n+ * @aes_acc_num:\tThe number of copies of the AES module that are\n+ *\t\t\timplemented in this version of SEC.\n+ **/\n \n struct dpseci_sec_attr {\n-\tuint16_t ip_id;\t\t/* ID for SEC */\n-\tuint8_t major_rev;\t/* Major revision number for SEC */\n-\tuint8_t minor_rev;\t/* Minor revision number for SEC */\n-\tuint8_t era;\t\t/* SEC Era */\n+\tuint16_t ip_id;\n+\tuint8_t major_rev;\n+\tuint8_t minor_rev;\n+\tuint8_t era;\n \tuint8_t deco_num;\n-\t/* The number of copies of the DECO that are implemented in\n-\t * this version of SEC\n-\t */\n \tuint8_t zuc_auth_acc_num;\n-\t/* The number of copies of ZUCA that are implemented in this\n-\t * version of SEC\n-\t */\n \tuint8_t zuc_enc_acc_num;\n-\t/* The number of copies of ZUCE that are implemented in this\n-\t * version of SEC\n-\t */\n \tuint8_t snow_f8_acc_num;\n-\t/* The number of copies of the SNOW-f8 module that are\n-\t * implemented in this version of SEC\n-\t */\n \tuint8_t snow_f9_acc_num;\n-\t/* The number of copies of the SNOW-f9 module that are\n-\t * implemented in this version of SEC\n-\t */\n \tuint8_t crc_acc_num;\n-\t/* The number of copies of the CRC module that are implemented\n-\t * in this version of SEC\n-\t */\n \tuint8_t pk_acc_num;\n-\t/* The number of copies of the Public Key module that are\n-\t * implemented in this version of SEC\n-\t */\n \tuint8_t kasumi_acc_num;\n-\t/* The number of copies of the Kasumi module that are\n-\t * implemented in this version of SEC\n-\t */\n \tuint8_t rng_acc_num;\n-\t/* The number of copies of the Random Number Generator that are\n-\t * implemented in this version of SEC\n-\t */\n \tuint8_t md_acc_num;\n-\t/* The number of copies of the MDHA (Hashing module) that are\n-\t * implemented in this version of SEC\n-\t */\n \tuint8_t arc4_acc_num;\n-\t/* The number of copies of the ARC4 module that are implemented\n-\t * in this version of SEC\n-\t */\n \tuint8_t des_acc_num;\n-\t/* The number of copies of the DES module that are implemented\n-\t * in this version of SEC\n-\t */\n \tuint8_t aes_acc_num;\n-\t/* The number of copies of the AES module that are implemented\n-\t * in this version of SEC\n-\t */\n };\n \n-/**\n- * dpseci_get_sec_attr() - Retrieve SEC accelerator attributes.\n- * @param\tmc_io\t\tPointer to MC portal's I/O object\n- * @param\tcmd_flags\tCommand flags; one or more of 'MC_CMD_FLAG_'\n- * @param\ttoken\t\tToken of DPSECI object\n- * @param\tattr\t\tReturned SEC attributes\n- *\n- * @return:\n- *   - Return '0' on Success.\n- *   - Return Error code otherwise.\n- */\n-int\n-dpseci_get_sec_attr(struct fsl_mc_io *mc_io,\n-\t\t    uint32_t cmd_flags,\n-\t\t    uint16_t token,\n-\t\t    struct dpseci_sec_attr *attr);\n+int dpseci_get_sec_attr(struct fsl_mc_io *mc_io,\n+\t\t\tuint32_t cmd_flags,\n+\t\t\tuint16_t token,\n+\t\t\tstruct dpseci_sec_attr *attr);\n \n /**\n  * struct dpseci_sec_counters - Structure representing global SEC counters and\n  *\t\t\t\tnot per dpseci counters\n+ * @dequeued_requests:\tNumber of Requests Dequeued\n+ * @ob_enc_requests:\tNumber of Outbound Encrypt Requests\n+ * @ib_dec_requests:\tNumber of Inbound Decrypt Requests\n+ * @ob_enc_bytes:\tNumber of Outbound Bytes Encrypted\n+ * @ob_prot_bytes:\tNumber of Outbound Bytes Protected\n+ * @ib_dec_bytes:\tNumber of Inbound Bytes Decrypted\n+ * @ib_valid_bytes:\tNumber of Inbound Bytes Validated\n  */\n struct dpseci_sec_counters {\n-\tuint64_t dequeued_requests; /* Number of Requests Dequeued */\n-\tuint64_t ob_enc_requests;   /* Number of Outbound Encrypt Requests */\n-\tuint64_t ib_dec_requests;   /* Number of Inbound Decrypt Requests */\n-\tuint64_t ob_enc_bytes;      /* Number of Outbound Bytes Encrypted */\n-\tuint64_t ob_prot_bytes;     /* Number of Outbound Bytes Protected */\n-\tuint64_t ib_dec_bytes;      /* Number of Inbound Bytes Decrypted */\n-\tuint64_t ib_valid_bytes;    /* Number of Inbound Bytes Validated */\n+\tuint64_t dequeued_requests;\n+\tuint64_t ob_enc_requests;\n+\tuint64_t ib_dec_requests;\n+\tuint64_t ob_enc_bytes;\n+\tuint64_t ob_prot_bytes;\n+\tuint64_t ib_dec_bytes;\n+\tuint64_t ib_valid_bytes;\n };\n \n+int dpseci_get_sec_counters(struct fsl_mc_io *mc_io,\n+\t\t\t    uint32_t cmd_flags,\n+\t\t\t    uint16_t token,\n+\t\t\t    struct dpseci_sec_counters *counters);\n+\n+int dpseci_get_api_version(struct fsl_mc_io *mc_io,\n+\t\t\t   uint32_t cmd_flags,\n+\t\t\t   uint16_t *major_ver,\n+\t\t\t   uint16_t *minor_ver);\n /**\n- * dpseci_get_sec_counters() - Retrieve SEC accelerator counters.\n- * @param\tmc_io\t\tPointer to MC portal's I/O object\n- * @param\tcmd_flags\tCommand flags; one or more of 'MC_CMD_FLAG_'\n- * @param\ttoken\t\tToken of DPSECI object\n- * @param\tcounters\tReturned SEC counters\n- *\n- * @return:\n- *   - Return '0' on Success.\n- *   - Return Error code otherwise.\n+ * enum dpseci_congestion_unit - DPSECI congestion units\n+ * @DPSECI_CONGESTION_UNIT_BYTES: bytes units\n+ * @DPSECI_CONGESTION_UNIT_FRAMES: frames units\n  */\n-int\n-dpseci_get_sec_counters(struct fsl_mc_io *mc_io,\n-\t\t\tuint32_t cmd_flags,\n-\t\t\tuint16_t token,\n-\t\t\tstruct dpseci_sec_counters *counters);\n+enum dpseci_congestion_unit {\n+\tDPSECI_CONGESTION_UNIT_BYTES = 0,\n+\tDPSECI_CONGESTION_UNIT_FRAMES\n+};\n \n /**\n- * dpseci_get_api_version() - Get Data Path SEC Interface API version\n- * @param\tmc_io\t\tPointer to MC portal's I/O object\n- * @param\tcmd_flags\tCommand flags; one or more of 'MC_CMD_FLAG_'\n- * @param\tmajor_ver\tMajor version of data path sec API\n- * @param\tminor_ver\tMinor version of data path sec API\n- *\n- * @return:\n- *   - Return '0' on Success.\n- *   - Return Error code otherwise.\n+ * CSCN message is written to message_iova once entering a\n+ * congestion state (see 'threshold_entry')\n+ */\n+#define DPSECI_CGN_MODE_WRITE_MEM_ON_ENTER\t\t0x00000001\n+/**\n+ * CSCN message is written to message_iova once exiting a\n+ * congestion state (see 'threshold_exit')\n+ */\n+#define DPSECI_CGN_MODE_WRITE_MEM_ON_EXIT\t\t0x00000002\n+/**\n+ * CSCN write will attempt to allocate into a cache (coherent write);\n+ * valid only if 'DPSECI_CGN_MODE_WRITE_MEM_<X>' is selected\n  */\n-int\n-dpseci_get_api_version(struct fsl_mc_io *mc_io,\n-\t\t       uint32_t cmd_flags,\n-\t\t       uint16_t *major_ver,\n-\t\t       uint16_t *minor_ver);\n+#define DPSECI_CGN_MODE_COHERENT_WRITE\t\t\t0x00000004\n+/**\n+ * if 'dpseci_dest_cfg.dest_type != DPSECI_DEST_NONE' CSCN message is sent to\n+ * DPIO/DPCON's WQ channel once entering a congestion state\n+ * (see 'threshold_entry')\n+ */\n+#define DPSECI_CGN_MODE_NOTIFY_DEST_ON_ENTER\t\t0x00000008\n+/**\n+ * if 'dpseci_dest_cfg.dest_type != DPSECI_DEST_NONE' CSCN message is sent to\n+ * DPIO/DPCON's WQ channel once exiting a congestion state\n+ * (see 'threshold_exit')\n+ */\n+#define DPSECI_CGN_MODE_NOTIFY_DEST_ON_EXIT\t\t0x00000010\n+/**\n+ * if 'dpseci_dest_cfg.dest_type != DPSECI_DEST_NONE' when the CSCN is written\n+ * to the sw-portal's DQRR, the DQRI interrupt is asserted immediately\n+ * (if enabled)\n+ */\n+#define DPSECI_CGN_MODE_INTR_COALESCING_DISABLED\t0x00000020\n+\n+/**\n+ * struct dpseci_congestion_notification_cfg - congestion notification\n+ *\t\tconfiguration\n+ * @units: units type\n+ * @threshold_entry: above this threshold we enter a congestion state.\n+ *\t\tset it to '0' to disable it\n+ * @threshold_exit: below this threshold we exit the congestion state.\n+ * @message_ctx: The context that will be part of the CSCN message\n+ * @message_iova: I/O virtual address (must be in DMA-able memory),\n+ *\t\tmust be 16B aligned;\n+ * @dest_cfg: CSCN can be send to either DPIO or DPCON WQ channel\n+ * @notification_mode: Mask of available options; use 'DPSECI_CGN_MODE_<X>'\n+ *\t\tvalues\n+ */\n+struct dpseci_congestion_notification_cfg {\n+\tenum dpseci_congestion_unit units;\n+\tuint32_t threshold_entry;\n+\tuint32_t threshold_exit;\n+\tuint64_t message_ctx;\n+\tuint64_t message_iova;\n+\tstruct dpseci_dest_cfg dest_cfg;\n+\tuint16_t notification_mode;\n+};\n+\n+int dpseci_set_congestion_notification(\n+\t\t\tstruct fsl_mc_io *mc_io,\n+\t\t\tuint32_t cmd_flags,\n+\t\t\tuint16_t token,\n+\t\t\tconst struct dpseci_congestion_notification_cfg *cfg);\n+\n+int dpseci_get_congestion_notification(\n+\t\t\tstruct fsl_mc_io *mc_io,\n+\t\t\tuint32_t cmd_flags,\n+\t\t\tuint16_t token,\n+\t\t\tstruct dpseci_congestion_notification_cfg *cfg);\n \n #endif /* __FSL_DPSECI_H */\ndiff --git a/drivers/crypto/dpaa2_sec/mc/fsl_dpseci_cmd.h b/drivers/crypto/dpaa2_sec/mc/fsl_dpseci_cmd.h\nindex 3f9f474..a100a0e 100644\n--- a/drivers/crypto/dpaa2_sec/mc/fsl_dpseci_cmd.h\n+++ b/drivers/crypto/dpaa2_sec/mc/fsl_dpseci_cmd.h\n@@ -5,7 +5,7 @@\n  *   BSD LICENSE\n  *\n  * Copyright 2013-2016 Freescale Semiconductor Inc.\n- * Copyright 2016 NXP.\n+ * Copyright 2016-2017 NXP.\n  *\n  * Redistribution and use in source and binary forms, with or without\n  * modification, are permitted provided that the following conditions are met:\n@@ -37,220 +37,187 @@\n  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n  * POSSIBILITY OF SUCH DAMAGE.\n  */\n-\n #ifndef _FSL_DPSECI_CMD_H\n #define _FSL_DPSECI_CMD_H\n \n /* DPSECI Version */\n-#define DPSECI_VER_MAJOR\t\t\t\t5\n-#define DPSECI_VER_MINOR\t\t\t\t0\n-\n-/* Command IDs */\n-#define DPSECI_CMDID_CLOSE                              ((0x800 << 4) | (0x1))\n-#define DPSECI_CMDID_OPEN                               ((0x809 << 4) | (0x1))\n-#define DPSECI_CMDID_CREATE                             ((0x909 << 4) | (0x1))\n-#define DPSECI_CMDID_DESTROY                            ((0x989 << 4) | (0x1))\n-#define DPSECI_CMDID_GET_API_VERSION                    ((0xa09 << 4) | (0x1))\n-\n-#define DPSECI_CMDID_ENABLE                             ((0x002 << 4) | (0x1))\n-#define DPSECI_CMDID_DISABLE                            ((0x003 << 4) | (0x1))\n-#define DPSECI_CMDID_GET_ATTR                           ((0x004 << 4) | (0x1))\n-#define DPSECI_CMDID_RESET                              ((0x005 << 4) | (0x1))\n-#define DPSECI_CMDID_IS_ENABLED                         ((0x006 << 4) | (0x1))\n-\n-#define DPSECI_CMDID_SET_IRQ                            ((0x010 << 4) | (0x1))\n-#define DPSECI_CMDID_GET_IRQ                            ((0x011 << 4) | (0x1))\n-#define DPSECI_CMDID_SET_IRQ_ENABLE                     ((0x012 << 4) | (0x1))\n-#define DPSECI_CMDID_GET_IRQ_ENABLE                     ((0x013 << 4) | (0x1))\n-#define DPSECI_CMDID_SET_IRQ_MASK                       ((0x014 << 4) | (0x1))\n-#define DPSECI_CMDID_GET_IRQ_MASK                       ((0x015 << 4) | (0x1))\n-#define DPSECI_CMDID_GET_IRQ_STATUS                     ((0x016 << 4) | (0x1))\n-#define DPSECI_CMDID_CLEAR_IRQ_STATUS                   ((0x017 << 4) | (0x1))\n-\n-#define DPSECI_CMDID_SET_RX_QUEUE                       ((0x194 << 4) | (0x1))\n-#define DPSECI_CMDID_GET_RX_QUEUE                       ((0x196 << 4) | (0x1))\n-#define DPSECI_CMDID_GET_TX_QUEUE                       ((0x197 << 4) | (0x1))\n-#define DPSECI_CMDID_GET_SEC_ATTR                       ((0x198 << 4) | (0x1))\n-#define DPSECI_CMDID_GET_SEC_COUNTERS                   ((0x199 << 4) | (0x1))\n-\n-/*                cmd, param, offset, width, type, arg_name */\n-#define DPSECI_CMD_OPEN(cmd, dpseci_id) \\\n-\tMC_CMD_OP(cmd, 0, 0,  32, int,      dpseci_id)\n-\n-/*                cmd, param, offset, width, type, arg_name */\n-#define DPSECI_CMD_CREATE(cmd, cfg) \\\n-do { \\\n-\tMC_CMD_OP(cmd, 0, 0,  8,  uint8_t,  cfg->priorities[0]);\\\n-\tMC_CMD_OP(cmd, 0, 8,  8,  uint8_t,  cfg->priorities[1]);\\\n-\tMC_CMD_OP(cmd, 0, 16, 8,  uint8_t,  cfg->priorities[2]);\\\n-\tMC_CMD_OP(cmd, 0, 24, 8,  uint8_t,  cfg->priorities[3]);\\\n-\tMC_CMD_OP(cmd, 0, 32, 8,  uint8_t,  cfg->priorities[4]);\\\n-\tMC_CMD_OP(cmd, 0, 40, 8,  uint8_t,  cfg->priorities[5]);\\\n-\tMC_CMD_OP(cmd, 0, 48, 8,  uint8_t,  cfg->priorities[6]);\\\n-\tMC_CMD_OP(cmd, 0, 56, 8,  uint8_t,  cfg->priorities[7]);\\\n-\tMC_CMD_OP(cmd, 1, 0,  8,  uint8_t,  cfg->num_tx_queues);\\\n-\tMC_CMD_OP(cmd, 1, 8,  8,  uint8_t,  cfg->num_rx_queues);\\\n-} while (0)\n-\n-/*                cmd, param, offset, width, type, arg_name */\n-#define DPSECI_RSP_IS_ENABLED(cmd, en) \\\n-\tMC_RSP_OP(cmd, 0, 0,  1,  int,\t    en)\n-\n-/*                cmd, param, offset, width, type, arg_name */\n-#define DPSECI_CMD_SET_IRQ(cmd, irq_index, irq_cfg) \\\n-do { \\\n-\tMC_CMD_OP(cmd, 0, 0,  8,  uint8_t,  irq_index);\\\n-\tMC_CMD_OP(cmd, 0, 32, 32, uint32_t, irq_cfg->val);\\\n-\tMC_CMD_OP(cmd, 1, 0,  64, uint64_t, irq_cfg->addr);\\\n-\tMC_CMD_OP(cmd, 2, 0,  32, int,\t    irq_cfg->irq_num); \\\n-} while (0)\n-\n-/*                cmd, param, offset, width, type, arg_name */\n-#define DPSECI_CMD_GET_IRQ(cmd, irq_index) \\\n-\tMC_CMD_OP(cmd, 0, 32, 8,  uint8_t,  irq_index)\n-\n-/*                cmd, param, offset, width, type, arg_name */\n-#define DPSECI_RSP_GET_IRQ(cmd, type, irq_cfg) \\\n-do { \\\n-\tMC_RSP_OP(cmd, 0, 0,  32, uint32_t, irq_cfg->val); \\\n-\tMC_RSP_OP(cmd, 1, 0,  64, uint64_t, irq_cfg->addr);\\\n-\tMC_RSP_OP(cmd, 2, 0,  32, int,\t    irq_cfg->irq_num); \\\n-\tMC_RSP_OP(cmd, 2, 32, 32, int,\t    type); \\\n-} while (0)\n-\n-/*                cmd, param, offset, width, type, arg_name */\n-#define DPSECI_CMD_SET_IRQ_ENABLE(cmd, irq_index, enable_state) \\\n-do { \\\n-\tMC_CMD_OP(cmd, 0, 0,  8,  uint8_t,  enable_state); \\\n-\tMC_CMD_OP(cmd, 0, 32, 8,  uint8_t,  irq_index); \\\n-} while (0)\n-\n-/*                cmd, param, offset, width, type, arg_name */\n-#define DPSECI_CMD_GET_IRQ_ENABLE(cmd, irq_index) \\\n-\tMC_CMD_OP(cmd, 0, 32, 8,  uint8_t,  irq_index)\n-\n-/*                cmd, param, offset, width, type, arg_name */\n-#define DPSECI_RSP_GET_IRQ_ENABLE(cmd, enable_state) \\\n-\tMC_RSP_OP(cmd, 0, 0,  8,  uint8_t,  enable_state)\n+#define DPSECI_VER_MAJOR\t\t5\n+#define DPSECI_VER_MINOR\t\t1\n \n-/*                cmd, param, offset, width, type, arg_name */\n-#define DPSECI_CMD_SET_IRQ_MASK(cmd, irq_index, mask) \\\n-do { \\\n-\tMC_CMD_OP(cmd, 0, 0,  32, uint32_t, mask); \\\n-\tMC_CMD_OP(cmd, 0, 32, 8,  uint8_t,  irq_index); \\\n-} while (0)\n+/* Command versioning */\n+#define DPSECI_CMD_BASE_VERSION\t\t1\n+#define DPSECI_CMD_BASE_VERSION_V2\t2\n+#define DPSECI_CMD_ID_OFFSET\t\t4\n \n-/*                cmd, param, offset, width, type, arg_name */\n-#define DPSECI_CMD_GET_IRQ_MASK(cmd, irq_index) \\\n-\tMC_CMD_OP(cmd, 0, 32, 8,  uint8_t,  irq_index)\n-\n-/*                cmd, param, offset, width, type, arg_name */\n-#define DPSECI_RSP_GET_IRQ_MASK(cmd, mask) \\\n-\tMC_RSP_OP(cmd, 0, 0,  32, uint32_t, mask)\n-\n-/*                cmd, param, offset, width, type, arg_name */\n-#define DPSECI_CMD_GET_IRQ_STATUS(cmd, irq_index, status) \\\n-do { \\\n-\tMC_CMD_OP(cmd, 0, 0,  32, uint32_t, status);\\\n-\tMC_CMD_OP(cmd, 0, 32, 8,  uint8_t,  irq_index);\\\n-} while (0)\n-\n-/*                cmd, param, offset, width, type, arg_name */\n-#define DPSECI_RSP_GET_IRQ_STATUS(cmd, status) \\\n-\tMC_RSP_OP(cmd, 0, 0,  32, uint32_t,  status)\n-\n-/*                cmd, param, offset, width, type, arg_name */\n-#define DPSECI_CMD_CLEAR_IRQ_STATUS(cmd, irq_index, status) \\\n-do { \\\n-\tMC_CMD_OP(cmd, 0, 0,  32, uint32_t, status); \\\n-\tMC_CMD_OP(cmd, 0, 32, 8,  uint8_t,  irq_index); \\\n-} while (0)\n-\n-/*                cmd, param, offset, width, type, arg_name */\n-#define DPSECI_RSP_GET_ATTR(cmd, attr) \\\n-do { \\\n-\tMC_RSP_OP(cmd, 0, 0,  32, int,\t    attr->id); \\\n-\tMC_RSP_OP(cmd, 1, 0,  8,  uint8_t,  attr->num_tx_queues); \\\n-\tMC_RSP_OP(cmd, 1, 8,  8,  uint8_t,  attr->num_rx_queues); \\\n-} while (0)\n-\n-/*                cmd, param, offset, width, type, arg_name */\n-#define DPSECI_CMD_SET_RX_QUEUE(cmd, queue, cfg) \\\n-do { \\\n-\tMC_CMD_OP(cmd, 0, 0,  32, int,      cfg->dest_cfg.dest_id); \\\n-\tMC_CMD_OP(cmd, 0, 32, 8,  uint8_t,  cfg->dest_cfg.priority); \\\n-\tMC_CMD_OP(cmd, 0, 40, 8,  uint8_t,  queue); \\\n-\tMC_CMD_OP(cmd, 0, 48, 4,  enum dpseci_dest, cfg->dest_cfg.dest_type); \\\n-\tMC_CMD_OP(cmd, 1, 0,  64, uint64_t, cfg->user_ctx); \\\n-\tMC_CMD_OP(cmd, 2, 0,  32, uint32_t, cfg->options);\\\n-\tMC_CMD_OP(cmd, 2, 32, 1,  int,\t\tcfg->order_preservation_en);\\\n-} while (0)\n-\n-/*                cmd, param, offset, width, type, arg_name */\n-#define DPSECI_CMD_GET_RX_QUEUE(cmd, queue) \\\n-\tMC_CMD_OP(cmd, 0, 40, 8,  uint8_t,  queue)\n-\n-/*                cmd, param, offset, width, type, arg_name */\n-#define DPSECI_RSP_GET_RX_QUEUE(cmd, attr) \\\n-do { \\\n-\tMC_RSP_OP(cmd, 0, 0,  32, int,      attr->dest_cfg.dest_id);\\\n-\tMC_RSP_OP(cmd, 0, 32, 8,  uint8_t,  attr->dest_cfg.priority);\\\n-\tMC_RSP_OP(cmd, 0, 48, 4,  enum dpseci_dest, attr->dest_cfg.dest_type);\\\n-\tMC_RSP_OP(cmd, 1, 0,  8,  uint64_t,  attr->user_ctx);\\\n-\tMC_RSP_OP(cmd, 2, 0,  32, uint32_t,  attr->fqid);\\\n-\tMC_RSP_OP(cmd, 2, 32, 1,  int,\t\t attr->order_preservation_en);\\\n-} while (0)\n-\n-/*                cmd, param, offset, width, type, arg_name */\n-#define DPSECI_CMD_GET_TX_QUEUE(cmd, queue) \\\n-\tMC_CMD_OP(cmd, 0, 40, 8,  uint8_t,  queue)\n-\n-/*                cmd, param, offset, width, type, arg_name */\n-#define DPSECI_RSP_GET_TX_QUEUE(cmd, attr) \\\n-do { \\\n-\tMC_RSP_OP(cmd, 0, 32, 32, uint32_t,  attr->fqid);\\\n-\tMC_RSP_OP(cmd, 1, 0,  8,  uint8_t,   attr->priority);\\\n-} while (0)\n-\n-/*                cmd, param, offset, width, type, arg_name */\n-#define DPSECI_RSP_GET_SEC_ATTR(cmd, attr) \\\n-do { \\\n-\tMC_RSP_OP(cmd, 0,  0, 16, uint16_t,  attr->ip_id);\\\n-\tMC_RSP_OP(cmd, 0, 16,  8,  uint8_t,  attr->major_rev);\\\n-\tMC_RSP_OP(cmd, 0, 24,  8,  uint8_t,  attr->minor_rev);\\\n-\tMC_RSP_OP(cmd, 0, 32,  8,  uint8_t,  attr->era);\\\n-\tMC_RSP_OP(cmd, 1,  0,  8,  uint8_t,  attr->deco_num);\\\n-\tMC_RSP_OP(cmd, 1,  8,  8,  uint8_t,  attr->zuc_auth_acc_num);\\\n-\tMC_RSP_OP(cmd, 1, 16,  8,  uint8_t,  attr->zuc_enc_acc_num);\\\n-\tMC_RSP_OP(cmd, 1, 32,  8,  uint8_t,  attr->snow_f8_acc_num);\\\n-\tMC_RSP_OP(cmd, 1, 40,  8,  uint8_t,  attr->snow_f9_acc_num);\\\n-\tMC_RSP_OP(cmd, 1, 48,  8,  uint8_t,  attr->crc_acc_num);\\\n-\tMC_RSP_OP(cmd, 2,  0,  8,  uint8_t,  attr->pk_acc_num);\\\n-\tMC_RSP_OP(cmd, 2,  8,  8,  uint8_t,  attr->kasumi_acc_num);\\\n-\tMC_RSP_OP(cmd, 2, 16,  8,  uint8_t,  attr->rng_acc_num);\\\n-\tMC_RSP_OP(cmd, 2, 32,  8,  uint8_t,  attr->md_acc_num);\\\n-\tMC_RSP_OP(cmd, 2, 40,  8,  uint8_t,  attr->arc4_acc_num);\\\n-\tMC_RSP_OP(cmd, 2, 48,  8,  uint8_t,  attr->des_acc_num);\\\n-\tMC_RSP_OP(cmd, 2, 56,  8,  uint8_t,  attr->aes_acc_num);\\\n-} while (0)\n-\n-/*                cmd, param, offset, width, type, arg_name */\n-#define DPSECI_RSP_GET_SEC_COUNTERS(cmd, counters) \\\n-do { \\\n-\tMC_RSP_OP(cmd, 0,  0, 64, uint64_t,  counters->dequeued_requests);\\\n-\tMC_RSP_OP(cmd, 1,  0, 64, uint64_t,  counters->ob_enc_requests);\\\n-\tMC_RSP_OP(cmd, 2,  0, 64, uint64_t,  counters->ib_dec_requests);\\\n-\tMC_RSP_OP(cmd, 3,  0, 64, uint64_t,  counters->ob_enc_bytes);\\\n-\tMC_RSP_OP(cmd, 4,  0, 64, uint64_t,  counters->ob_prot_bytes);\\\n-\tMC_RSP_OP(cmd, 5,  0, 64, uint64_t,  counters->ib_dec_bytes);\\\n-\tMC_RSP_OP(cmd, 6,  0, 64, uint64_t,  counters->ib_valid_bytes);\\\n-} while (0)\n-\n-/*                cmd, param, offset, width, type,      arg_name */\n-#define DPSECI_RSP_GET_API_VERSION(cmd, major, minor) \\\n-do { \\\n-\tMC_RSP_OP(cmd, 0, 0,  16, uint16_t, major);\\\n-\tMC_RSP_OP(cmd, 0, 16, 16, uint16_t, minor);\\\n-} while (0)\n+#define DPSECI_CMD_V1(id) \\\n+\t((id << DPSECI_CMD_ID_OFFSET) | DPSECI_CMD_BASE_VERSION)\n+#define DPSECI_CMD_V2(id) \\\n+\t((id << DPSECI_CMD_ID_OFFSET) | DPSECI_CMD_BASE_VERSION_V2)\n \n+/* Command IDs */\n+#define DPSECI_CMDID_CLOSE\t\tDPSECI_CMD_V1(0x800)\n+#define DPSECI_CMDID_OPEN\t\tDPSECI_CMD_V1(0x809)\n+#define DPSECI_CMDID_CREATE\t\tDPSECI_CMD_V2(0x909)\n+#define DPSECI_CMDID_DESTROY\t\tDPSECI_CMD_V1(0x989)\n+#define DPSECI_CMDID_GET_API_VERSION\tDPSECI_CMD_V1(0xa09)\n+\n+#define DPSECI_CMDID_ENABLE\t\tDPSECI_CMD_V1(0x002)\n+#define DPSECI_CMDID_DISABLE\t\tDPSECI_CMD_V1(0x003)\n+#define DPSECI_CMDID_GET_ATTR\t\tDPSECI_CMD_V1(0x004)\n+#define DPSECI_CMDID_RESET\t\tDPSECI_CMD_V1(0x005)\n+#define DPSECI_CMDID_IS_ENABLED\t\tDPSECI_CMD_V1(0x006)\n+\n+#define DPSECI_CMDID_SET_RX_QUEUE\tDPSECI_CMD_V1(0x194)\n+#define DPSECI_CMDID_GET_RX_QUEUE\tDPSECI_CMD_V1(0x196)\n+#define DPSECI_CMDID_GET_TX_QUEUE\tDPSECI_CMD_V1(0x197)\n+#define DPSECI_CMDID_GET_SEC_ATTR\tDPSECI_CMD_V1(0x198)\n+#define DPSECI_CMDID_GET_SEC_COUNTERS\tDPSECI_CMD_V1(0x199)\n+\n+#define DPSECI_CMDID_SET_CONGESTION_NOTIFICATION\tDPSECI_CMD_V1(0x170)\n+#define DPSECI_CMDID_GET_CONGESTION_NOTIFICATION\tDPSECI_CMD_V1(0x171)\n+\n+/* Macros for accessing command fields smaller than 1byte */\n+#define DPSECI_MASK(field)        \\\n+\tGENMASK(DPSECI_##field##_SHIFT + DPSECI_##field##_SIZE - 1, \\\n+\t\tDPSECI_##field##_SHIFT)\n+#define dpseci_set_field(var, field, val) \\\n+\t((var) |= (((val) << DPSECI_##field##_SHIFT) & DPSECI_MASK(field)))\n+#define dpseci_get_field(var, field)      \\\n+\t(((var) & DPSECI_MASK(field)) >> DPSECI_##field##_SHIFT)\n+\n+#pragma pack(push, 1)\n+struct dpseci_cmd_open {\n+\tuint32_t dpseci_id;\n+};\n+\n+struct dpseci_cmd_create {\n+\tuint8_t priorities[8];\n+\tuint8_t num_tx_queues;\n+\tuint8_t num_rx_queues;\n+\tuint8_t pad[6];\n+\tuint32_t options;\n+};\n+\n+struct dpseci_cmd_destroy {\n+\tuint32_t dpseci_id;\n+};\n+\n+#define DPSECI_ENABLE_SHIFT\t0\n+#define DPSECI_ENABLE_SIZE\t1\n+\n+struct dpseci_rsp_is_enabled {\n+\t/* only the first LSB */\n+\tuint8_t en;\n+};\n+\n+struct dpseci_rsp_get_attr {\n+\tuint32_t id;\n+\tuint32_t pad;\n+\tuint8_t num_tx_queues;\n+\tuint8_t num_rx_queues;\n+\tuint8_t pad1[6];\n+\tuint32_t options;\n+};\n+\n+#define DPSECI_DEST_TYPE_SHIFT\t0\n+#define DPSECI_DEST_TYPE_SIZE\t4\n+\n+#define DPSECI_ORDER_PRESERVATION_SHIFT\t0\n+#define DPSECI_ORDER_PRESERVATION_SIZE\t1\n+\n+struct dpseci_cmd_set_rx_queue {\n+\tuint32_t dest_id;\n+\tuint8_t dest_priority;\n+\tuint8_t queue;\n+\t/* from LSB: dest_type:4 */\n+\tuint8_t dest_type;\n+\tuint8_t pad;\n+\tuint64_t user_ctx;\n+\tuint32_t options;\n+\t/* only the LSB */\n+\tuint8_t order_preservation_en;\n+};\n+\n+struct dpseci_cmd_get_queue {\n+\tuint8_t pad[5];\n+\tuint8_t queue;\n+};\n+\n+struct dpseci_rsp_get_rx_queue {\n+\tuint32_t dest_id;\n+\tuint8_t dest_priority;\n+\tuint8_t pad1;\n+\t/* from LSB: dest_type:4 */\n+\tuint8_t dest_type;\n+\tuint8_t pad2;\n+\tuint64_t user_ctx;\n+\tuint32_t fqid;\n+\t/* only the LSB */\n+\tuint8_t order_preservation_en;\n+\n+};\n+\n+struct dpseci_rsp_get_tx_queue {\n+\tuint32_t pad;\n+\tuint32_t fqid;\n+\tuint8_t priority;\n+};\n+\n+struct dpseci_rsp_get_sec_attr {\n+\tuint16_t ip_id;\n+\tuint8_t major_rev;\n+\tuint8_t minor_rev;\n+\tuint8_t era;\n+\tuint8_t pad1[3];\n+\tuint8_t deco_num;\n+\tuint8_t zuc_auth_acc_num;\n+\tuint8_t zuc_enc_acc_num;\n+\tuint8_t pad2;\n+\tuint8_t snow_f8_acc_num;\n+\tuint8_t snow_f9_acc_num;\n+\tuint8_t crc_acc_num;\n+\tuint8_t pad3;\n+\tuint8_t pk_acc_num;\n+\tuint8_t kasumi_acc_num;\n+\tuint8_t rng_acc_num;\n+\tuint8_t pad4;\n+\tuint8_t md_acc_num;\n+\tuint8_t arc4_acc_num;\n+\tuint8_t des_acc_num;\n+\tuint8_t aes_acc_num;\n+};\n+\n+struct dpseci_rsp_get_sec_counters {\n+\tuint64_t dequeued_requests;\n+\tuint64_t ob_enc_requests;\n+\tuint64_t ib_dec_requests;\n+\tuint64_t ob_enc_bytes;\n+\tuint64_t ob_prot_bytes;\n+\tuint64_t ib_dec_bytes;\n+\tuint64_t ib_valid_bytes;\n+};\n+\n+struct dpseci_rsp_get_api_version {\n+\tuint16_t major;\n+\tuint16_t minor;\n+};\n+\n+#define DPSECI_DEST_TYPE_SHIFT\t\t0\n+#define DPSECI_DEST_TYPE_SIZE\t\t4\n+#define DPSECI_CG_UNITS_SHIFT\t\t4\n+#define DPSECI_CG_UNITS_SIZE\t\t2\n+\n+struct dpseci_cmd_set_congestion_notification {\n+\tuint32_t dest_id;\n+\tuint16_t notification_mode;\n+\tuint8_t dest_priority;\n+\t/* from LSB: dest_type: 4 units:2 */\n+\tuint8_t type_units;\n+\tuint64_t message_iova;\n+\tuint64_t message_ctx;\n+\tuint32_t threshold_entry;\n+\tuint32_t threshold_exit;\n+};\n+\n+#pragma pack(pop)\n #endif /* _FSL_DPSECI_CMD_H */\n",
    "prefixes": [
        "dpdk-dev",
        "11/27"
    ]
}