From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0082.outbound.protection.outlook.com [104.47.32.82]) by dpdk.org (Postfix) with ESMTP id 996DC2BF3 for ; Tue, 4 Sep 2018 06:03:06 +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=Tz2lYphsSHz0KnMcmRqYcZmCteHPcxRuJVFm0sHMoyo=; b=N/p+iiy6WH8N6D97FUx1Acct26XZmmziyk1nLsj3mJPVFdmi2uCat6uYedB1TFNP5Vr2qJkyAVjwZXU6t/1/qbDz8s2zyqkXanOtKaMsgHHl2owhXmyGDmqb6HeYEGv200k2iT59yGa51glgec/9g1e27BjCAA+WpaG0pjRXGAA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Anoob.Joseph@cavium.com; Received: from ajoseph83.caveonetworks.com.com (115.113.156.2) by BYAPR07MB4902.namprd07.prod.outlook.com (2603:10b6:a02:ef::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1101.15; Tue, 4 Sep 2018 04:02:03 +0000 From: Anoob Joseph To: Akhil Goyal , Pablo de Lara , Thomas Monjalon Cc: Anoob Joseph , Jerin Jacob , Narayana Prasad , dev@dpdk.org, Ankur Dwivedi , Murthy NSSR , Nithin Dabilpuram , Ragothaman Jayaraman , Srisivasubramanian S , Tejasree Kondoj Date: Tue, 4 Sep 2018 09:28:52 +0530 Message-Id: <1536033560-21541-6-git-send-email-ajoseph@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1536033560-21541-1-git-send-email-ajoseph@caviumnetworks.com> References: <1528476325-15585-1-git-send-email-anoob.joseph@caviumnetworks.com> <1536033560-21541-1-git-send-email-ajoseph@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [115.113.156.2] X-ClientProxiedBy: BMXPR01CA0023.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:d::33) To BYAPR07MB4902.namprd07.prod.outlook.com (2603:10b6:a02:ef::25) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 85fbd161-4944-479d-25c0-08d6121b2e4b X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:BYAPR07MB4902; X-Microsoft-Exchange-Diagnostics: 1; BYAPR07MB4902; 3:xiODd+n9H/Xq/6cJinrSSFlw+aJVhWO+tERUf0rPAyy5abqDb46HW+KsMiDM6u0LLeKrgSzBWXgJuu3H2h3V7bPrD2/ulyyT/ytj15h+LtZ2OvyoIACnUX3cvHkMwHrsTyTu4lEhpo3EslB1zlylgCXsAIYt22cWSWjG9rdO40I5jb9VvJ9zbweL14PxM1AikZeggog2ApN1PQyFW/ONSOoOdJcIHyqhPhSHeT18Swzx3atLZoxoZuOsrsN8rBmv; 25:5pvdh/nvMRZ6ggpweOG0cq5XIFxfgI1bx170H0BaQ6TMl+V12us/2Ut1MI5FIg7HEz355IbH93rnxcISqJahiXg+cne0iNWMi2E96IX3Zrp8tdDp+JuNrjZJpvjC6lpOVL9bBkcSY2wa0JDb/Jzg05O+Wro0Fh7VdmSMN8vSHqac8pcQ6JAX+SUKPrfvMiy6GRN4kngWmiPEV/rDF13ZvcDEdBtdH1JXoK6CJYnCFnA5aDnSqF4QeBE3McxhuFVH9+RdLAHbWhmQ+9ADabl7f/NHgWsklKm3ZpsESUvRp/uICmwT5v+gf4sM9/7xBPEkhBIpPOgJ4sSUXY0iItX6WA==; 31:NTHTIUOsacTOHRwGmTY2Ez5UGie/uXzOBBcTrIK1J+8C1FOl2bMwcjlK3yXZXpzpwco0eCzJRCmKK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jEY/AA3ayxoiST5KvtGK8YhT1li7yRBDT15kP8Gnsi8KrMDK1kkAcA== 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)(10201501046)(93006095)(3231311)(944501410)(52105095)(3002001)(149027)(150027)(6041310)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(201708071742011)(7699016); SRVR:BYAPR07MB4902; BCL:0; PCL:0; RULEID:; SRVR:BYAPR07MB4902; X-Forefront-PRVS: 0785459C39 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(396003)(136003)(346002)(376002)(39860400002)(199004)(189003)(26005)(51416003)(52116002)(76176011)(81166006)(305945005)(81156014)(7736002)(105586002)(316002)(6506007)(106356001)(6512007)(8936002)(446003)(54906003)(25786009)(6666003)(68736007)(50226002)(110136005)(53936002)(16586007)(42882007)(386003)(5660300001)(2906002)(72206003)(50466002)(6486002)(36756003)(6116002)(107886003)(2616005)(14444005)(186003)(3846002)(478600001)(66066001)(476003)(8676002)(47776003)(486006)(956004)(48376002)(11346002)(4326008)(97736004)(16526019); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR07MB4902; 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; BYAPR07MB4902; 23:63YTc1Oynv45WZiM2BcSHU/mVK45xXn8SRyJL3y3T?= =?us-ascii?Q?9CO3nwq2RyIG1QrfX24noTvZgybCPhjkjJq+V2pSJp4ZSgxNbYXAxjjJSOTj?= =?us-ascii?Q?XntxPEmnVufzUabv/PctRSRMt3WsYHvUH4n4Y9F8sA/VKucoT6Nv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X/+vfEHvEqn1OmSfgQxmXYnFyRUQuMmkIT9tm/WhRn0iQXHtzTmVJjjuzjda2k1pGOsrnd2Wkl0Zu7Q6XAXBT01kfyEOWzQFlLeB6ppWTvhstdZg==; 5:bJsGvxdMMSJYmWmNWjaiGcPYFEthg1v4jHE5UPDmFbn8kizS4l/N/xFoU+mKv0ue8bdw23afkuSyU9ZbZOpXZXAxKFA1U0hqkXwG/DqhJreDwnPRo+UD9AC6a4DWyfCxRvyZIyD21Uzp27zsrv10lnxzojOU5Wlhn56nU0yO1UE=; 7:jsV72QYUBq+N5FCtOTalF5nrO7F0Hy9vyXve0BQjGX/rX+zF4FbNJoQph8FCk+oNlJdSN8lG/Y0M7pHf0FiOvV+312MAr95ghAtrd1BL/yCL2CCXQs69vqQNPBL3x/SqNUezmuD58DrASt7FaD5MvamGPaO9INJBVhhB81eAX6dvBvGK68cptAycxxFC+Ln8veMNlu3Zt3SYCJf9++xoC8Ilonf3Xp0clGob7FVwnhae60WG3lNBPOu62l2fzCrO SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Sep 2018 04:02:03.0535 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 85fbd161-4944-479d-25c0-08d6121b2e4b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR07MB4902 Subject: [dpdk-dev] [PATCH v2 05/33] 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: Tue, 04 Sep 2018 04:03:07 -0000 From: Anoob Joseph Adding code identified common for OcteonTX 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 | 54 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 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..feca5fe --- /dev/null +++ b/drivers/common/cpt/cpt_common.h @@ -0,0 +1,54 @@ +/* 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 + +/* cpt instance */ +struct cpt_instance { + uint32_t queue_id; + uintptr_t rsvd; +}; + +struct cptvf_meta_info { + void *cptvf_meta_pool; + int cptvf_op_mlen; + int cptvf_op_sb_mlen; +}; + +struct rid { + uintptr_t rid; + /**< Request id of a crypto operation */ +}; + +/* + * Pending queue structure + * + */ +struct pending_queue { + uint16_t enq_tail; + uint16_t deq_head; + uint16_t soft_qlen; + /**< Software expected queue length */ + uint16_t p_doorbell; + struct rid *rid_queue; + /**< Array of pending requests */ + uint64_t pending_count; + /**< Pending requests count */ +}; + +#endif /* _CPT_COMMON_H_ */ -- 2.7.4