f154e0dc88739a17ec4530739d1e3899e2ef42d1
[dpdk.git] / drivers / net / qede / base / ecore_cxt_api.h
1 /*
2  * Copyright (c) 2016 QLogic Corporation.
3  * All rights reserved.
4  * www.qlogic.com
5  *
6  * See LICENSE.qede_pmd for copyright and licensing details.
7  */
8
9 #ifndef __ECORE_CXT_API_H__
10 #define __ECORE_CXT_API_H__
11
12 struct ecore_hwfn;
13
14 struct ecore_cxt_info {
15         void                    *p_cxt;
16         u32                     iid;
17         enum protocol_type      type;
18 };
19
20 #define MAX_TID_BLOCKS                  512
21 struct ecore_tid_mem {
22         u32 tid_size;
23         u32 num_tids_per_block;
24         u32 waste;
25         u8 *blocks[MAX_TID_BLOCKS]; /* 4K */
26 };
27
28 /**
29 * @brief ecoreo_cid_get_cxt_info - Returns the context info for a specific cid
30 *
31 *
32 * @param p_hwfn
33 * @param p_info in/out
34 *
35 * @return enum _ecore_status_t
36 */
37 enum _ecore_status_t ecore_cxt_get_cid_info(struct ecore_hwfn *p_hwfn,
38                                             struct ecore_cxt_info *p_info);
39
40 /**
41 * @brief ecore_cxt_get_tid_mem_info
42 *
43 * @param p_hwfn
44 * @param p_info
45 *
46 * @return enum _ecore_status_t
47 */
48 enum _ecore_status_t ecore_cxt_get_tid_mem_info(struct ecore_hwfn *p_hwfn,
49                                                 struct ecore_tid_mem *p_info);
50
51 #endif