From mboxrd@z Thu Jan 1 00:00:00 1970 From: Akhil Goyal Subject: Re: [PATCH v2 05/33] common/cpt: add common code for init routine Date: Mon, 17 Sep 2018 16:15:45 +0530 Message-ID: References: <1528476325-15585-1-git-send-email-anoob.joseph@caviumnetworks.com> <1536033560-21541-1-git-send-email-ajoseph@caviumnetworks.com> <1536033560-21541-6-git-send-email-ajoseph@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Anoob Joseph , Jerin Jacob , Narayana Prasad , dev@dpdk.org, Ankur Dwivedi , Murthy NSSR , Nithin Dabilpuram , Ragothaman Jayaraman , Srisivasubramanian S , Tejasree Kondoj To: Anoob Joseph , Pablo de Lara , Thomas Monjalon Return-path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0059.outbound.protection.outlook.com [104.47.2.59]) by dpdk.org (Postfix) with ESMTP id C948B2BA8 for ; Mon, 17 Sep 2018 12:46:05 +0200 (CEST) In-Reply-To: <1536033560-21541-6-git-send-email-ajoseph@caviumnetworks.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 9/4/2018 9:28 AM, Anoob Joseph wrote: > 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 */ no need for extra tab for comments. > +}; > + > +/* > + * 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 */ > +}; better to add comment for each element of structure. Also remove extra tab for comments(here and any other place if any.) > + > +#endif /* _CPT_COMMON_H_ */