From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anoob Joseph Subject: [PATCH v3 04/32] common/cpt: add common code for init routine Date: Fri, 5 Oct 2018 18:28:55 +0530 Message-ID: <1538744363-30340-5-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 Cc: Ankur Dwivedi , Jerin Jacob , Narayana Prasad , dev@dpdk.org, Anoob Joseph , Murthy NSSR , Nithin Dabilpuram , Ragothaman Jayaraman , Srisivasubramanian S , Tejasree Kondoj To: Akhil Goyal , Pablo de Lara , Thomas Monjalon 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) In-Reply-To: <1538744363-30340-1-git-send-email-anoob.joseph@caviumnetworks.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: 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