]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
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 ecore_cxt_acquire - Acquire a new cid of a specific protocol type | |
30 | * | |
31 | * @param p_hwfn | |
32 | * @param type | |
33 | * @param p_cid | |
34 | * | |
35 | * @return enum _ecore_status_t | |
36 | */ | |
37 | enum _ecore_status_t ecore_cxt_acquire_cid(struct ecore_hwfn *p_hwfn, | |
38 | enum protocol_type type, | |
39 | u32 *p_cid); | |
40 | ||
41 | /** | |
42 | * @brief ecoreo_cid_get_cxt_info - Returns the context info for a specific cid | |
43 | * | |
44 | * | |
45 | * @param p_hwfn | |
46 | * @param p_info in/out | |
47 | * | |
48 | * @return enum _ecore_status_t | |
49 | */ | |
50 | enum _ecore_status_t ecore_cxt_get_cid_info(struct ecore_hwfn *p_hwfn, | |
51 | struct ecore_cxt_info *p_info); | |
52 | ||
53 | /** | |
54 | * @brief ecore_cxt_get_tid_mem_info | |
55 | * | |
56 | * @param p_hwfn | |
57 | * @param p_info | |
58 | * | |
59 | * @return enum _ecore_status_t | |
60 | */ | |
61 | enum _ecore_status_t ecore_cxt_get_tid_mem_info(struct ecore_hwfn *p_hwfn, | |
62 | struct ecore_tid_mem *p_info); | |
63 | ||
64 | #endif |