From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0076.outbound.protection.outlook.com [104.47.33.76]) by dpdk.org (Postfix) with ESMTP id A81345F2B for ; Fri, 5 Oct 2018 15:00:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xQ9I+N2GaXKpnyyQTxthc/X3kLR9nxcsowEGhaOPqzI=; b=KdzGUk8PW5xwLeijLo0FC+wlM6nt/Tr7QimjAlQLAMk2TZZ4w0x6ONpqT6s5NMkhH81zZZtkJJw5l3W/PgodPeL6rMuUuxdgdvKUjytYUwoH2bPJC/CKN7SAhJqzsBiSumZ5K8ZUN5pT7BUV3nyWeYFSe5yZDSefTgdheOEOx7U= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Anoob.Joseph@cavium.com; Received: from ajoseph83.caveonetworks.com.com (115.113.156.2) by SN6PR07MB4910.namprd07.prod.outlook.com (2603:10b6:805:39::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1207.21; Fri, 5 Oct 2018 13:00:24 +0000 From: Anoob Joseph To: Akhil Goyal , Pablo de Lara , Thomas Monjalon Cc: Ankur Dwivedi , Jerin Jacob , Narayana Prasad , dev@dpdk.org, Anoob Joseph , Murthy NSSR , Nithin Dabilpuram , Ragothaman Jayaraman , Srisivasubramanian S , Tejasree Kondoj Date: Fri, 5 Oct 2018 18:28:55 +0530 Message-Id: <1538744363-30340-5-git-send-email-anoob.joseph@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1538744363-30340-1-git-send-email-anoob.joseph@caviumnetworks.com> References: <1536033560-21541-1-git-send-email-ajoseph@caviumnetworks.com> <1538744363-30340-1-git-send-email-anoob.joseph@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [115.113.156.2] X-ClientProxiedBy: MA1PR0101CA0036.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:22::22) To SN6PR07MB4910.namprd07.prod.outlook.com (2603:10b6:805:39::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5b9af36b-96bf-4e32-f4cf-08d62ac286a2 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:SN6PR07MB4910; X-Microsoft-Exchange-Diagnostics: 1; SN6PR07MB4910; 3:Oz0fttnwdQwdHoHM1aaA6/PYv4iJsQCQXkTp3zZ9/U8ewTr089qpVK33UIvamzJ7F5j6Icyx5B06Rt/lJORQIKqqu55pS6a9cfQQpCrtJ+eJqIh9S+hzcNJOjDQTSa8v9IBH40o7DcIXUsl4QIUVx4fCGu94uMmefm/zLnJlHw9zW5pw83qfxOwP1Aln0DK6KXdEpC/OAnn/Ix19p1xtKzX6p+9uiq/cbUasnw9IK6tC2xcDEhpfzHjjghG3I6Cq; 25:3xkZcFo1Br9ulb1wFx72+7hJveJpmQAVy7U+qqJmNkGqdUdUb6j9GwzghbT+/Y3Z1KMDUxbfV4KxI2btchQ3bH0EUYj+Asg55cXSWEDxVdNXwzIjw/KchSqWuK42J8UT5R3ZC3RbZUxZtGF6BEMepGLbxyWdy1zLvaiRtfrTEiDf/AemgLr9BrKpyiEAUEkL48i53DLRr1z2sX3o9GYN6xyiZBHr4CAicZJ6BrN5efhhsxUJlVYSVZvtiavBB5XgjadXCBOuVG8oKlSEHlanNi0bDX0ROlCNN68z1X+E3kJgHxqAOXexVeBAtnm0WtlW4taAzIqm7GbObaRSROe6kQ==; 31:YbC8u30qJT/JOnJfD8VbAB3PDrAER9molCzZGtj23QrwhcsU6EHFI96GVqVog7K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AtL3vEfNgQ53PmagLRefRZaukN8Cv2MDEv89LfWOaiW2dIQs6txXuxKjuHtdD46JWqGN4DevBdySC05A== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(3231355)(944501410)(52105095)(10201501046)(93006095)(149066)(150057)(6041310)(20161123564045)(20161123558120)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051); SRVR:SN6PR07MB4910; BCL:0; PCL:0; RULEID:; SRVR:SN6PR07MB4910; X-Forefront-PRVS: 0816F1D86E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(39860400002)(346002)(136003)(396003)(366004)(199004)(189003)(51416003)(76176011)(11346002)(50226002)(25786009)(8936002)(48376002)(305945005)(186003)(16526019)(110136005)(6486002)(3846002)(446003)(52116002)(6116002)(81156014)(8676002)(97736004)(5660300001)(50466002)(4326008)(956004)(42882007)(2616005)(68736007)(478600001)(54906003)(7736002)(81166006)(6666003)(16586007)(107886003)(26005)(55236004)(66066001)(386003)(47776003)(6512007)(72206003)(44832011)(476003)(316002)(14444005)(36756003)(105586002)(106356001)(486006)(6506007)(2906002)(53936002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR07MB4910; H:ajoseph83.caveonetworks.com.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN6PR07MB4910; 23:FtPNkcmFqxMdw9pZZZG7iySOY2+1/KNH6uJqlnlEy?= =?us-ascii?Q?5MNVoFjphMcGm0fQxvnfGsDlGGKX+mZmnw1H/S646rVDzQz3EN08zrdHDsuP?= =?us-ascii?Q?oRMyWkFPUrWVNfRnM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Z0mQ2hiRvGx0lG6q8F2N/NuofxHiinondyKJTaFmOfS3Z2Fim06WexLpD3T/2GyJE7MWwW+0bzSq7Lt2Xc4GCMkGv/2ffuHdq1YW7Bc1hZk9xicv4EvRT5MIHAQHIo6DQRfpde0LQ4bSHn7bG3KVS9snRF4jsjHi3lByNtF86e4WQ8E6psWwmFb0l8oHLbQeVT4GGYKC2H00+b7QYLQ==; 5:PCpYywZV6KEYzPk1RoPrv9k5a39n4y/ahAdGUbCOf4LmXHX0kjEqQKqY53G8QfDfOO5lNdpsM/ijCgXQBZ5+MwZmHKZuF/7Es8nEcw3+O3Ci3gdlbnhT8LdSt4ZY8dMnO571CobuaR+vCjsTw41JBE6ce163GnbcoQmtrVW8UNU=; 7:qx21BHB0VpeMwZGwFnn6sIfOiJkjYolsW2zstfly5nVI3cWT0EVVaL4kyvE0coVyGdrhbqT0VAOSD1Zv84WoZF1ugyd81iemQbkJ6JzkGWTVOAeNuQCX9eLmIs92oCyVWXF0X6ew7vmw1CnEraHDECJU6gfRXnuek54zFjwgCY9ieaLY1MKQnvwKVYSrmXq6/KjgXPcSArBZb6pHSejo/vPel82Nu3PQpXptmban05ezqK5N4BKkIS7qvkkxVz3D SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Oct 2018 13:00:24.3998 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5b9af36b-96bf-4e32-f4cf-08d62ac286a2 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR07MB4910 Subject: [dpdk-dev] [PATCH v3 04/32] common/cpt: add common code for init routine X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2018 13:00:31 -0000 From: Ankur Dwivedi Adding code identified common for OCTEON TX family crypto devices. This patch is adding the code required by the structures and code path of init routine. Signed-off-by: Ankur Dwivedi Signed-off-by: Anoob Joseph Signed-off-by: Murthy NSSR Signed-off-by: Nithin Dabilpuram Signed-off-by: Ragothaman Jayaraman Signed-off-by: Srisivasubramanian S Signed-off-by: Tejasree Kondoj --- drivers/common/cpt/cpt_common.h | 47 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 drivers/common/cpt/cpt_common.h diff --git a/drivers/common/cpt/cpt_common.h b/drivers/common/cpt/cpt_common.h new file mode 100644 index 0000000..5e2099a --- /dev/null +++ b/drivers/common/cpt/cpt_common.h @@ -0,0 +1,47 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2018 Cavium, Inc + */ + +#ifndef _CPT_COMMON_H_ +#define _CPT_COMMON_H_ + +/* + * This file defines common macros and structs + */ + +/* + * Macros to determine CPT model. Driver makefile will define CPT_MODEL + * accordingly + */ +#define CRYPTO_OCTEONTX 0x1 + +#define AE_TYPE 1 +#define SE_TYPE 2 + +struct cptvf_meta_info { + void *cptvf_meta_pool; + int cptvf_op_mlen; + int cptvf_op_sb_mlen; +}; + +struct rid { + /** Request id of a crypto operation */ + uintptr_t rid; +}; + +/* + * Pending queue structure + * + */ +struct pending_queue { + /** Tail of queue to be used for enqueue */ + uint16_t enq_tail; + /** Head of queue to be used for dequeue */ + uint16_t deq_head; + /** Array of pending requests */ + struct rid *rid_queue; + /** Pending requests count */ + uint64_t pending_count; +}; + +#endif /* _CPT_COMMON_H_ */ -- 2.7.4