658af4511130079d074afb66a7fd6e4de3d8adb2
[dpdk.git] / drivers / net / qede / base / ecore_l2.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_L2_H__
10 #define __ECORE_L2_H__
11
12 #include "ecore.h"
13 #include "ecore_hw.h"
14 #include "ecore_spq.h"
15 #include "ecore_l2_api.h"
16
17 /**
18  * @brief ecore_sp_eth_tx_queue_update -
19  *
20  * This ramrod updates a TX queue. It is used for setting the active
21  * state of the queue.
22  *
23  * @note Final phase API.
24  *
25  * @param p_hwfn
26  *
27  * @return enum _ecore_status_t
28  */
29 enum _ecore_status_t ecore_sp_eth_tx_queue_update(struct ecore_hwfn *p_hwfn);
30
31 enum _ecore_status_t
32 ecore_sp_eth_vport_start(struct ecore_hwfn *p_hwfn,
33                          struct ecore_sp_vport_start_params *p_params);
34
35 /**
36  * @brief - Starts an Rx queue; Should be used where contexts are handled
37  * outside of the ramrod area [specifically iov scenarios]
38  *
39  * @param p_hwfn
40  * @param opaque_fid
41  * @param cid
42  * @param rx_queue_id
43  * @param vport_id
44  * @param stats_id
45  * @param sb
46  * @param sb_index
47  * @param bd_max_bytes
48  * @param bd_chain_phys_addr
49  * @param cqe_pbl_addr
50  * @param cqe_pbl_size
51  * @param leading
52  *
53  * @return enum _ecore_status_t
54  */
55 enum _ecore_status_t
56 ecore_sp_eth_rxq_start_ramrod(struct ecore_hwfn *p_hwfn,
57                               u16 opaque_fid,
58                               u32 cid,
59                               u16 rx_queue_id,
60                               u8 vport_id,
61                               u8 stats_id,
62                               u16 sb,
63                               u8 sb_index,
64                               u16 bd_max_bytes,
65                               dma_addr_t bd_chain_phys_addr,
66                               dma_addr_t cqe_pbl_addr, u16 cqe_pbl_size);
67
68 /**
69  * @brief - Starts a Tx queue; Should be used where contexts are handled
70  * outside of the ramrod area [specifically iov scenarios]
71  *
72  * @param p_hwfn
73  * @param opaque_fid
74  * @param tx_queue_id
75  * @param cid
76  * @param vport_id
77  * @param stats_id
78  * @param sb
79  * @param sb_index
80  * @param pbl_addr
81  * @param pbl_size
82  * @param p_pq_params - parameters for choosing the PQ for this Tx queue
83  *
84  * @return enum _ecore_status_t
85  */
86 enum _ecore_status_t
87 ecore_sp_eth_txq_start_ramrod(struct ecore_hwfn *p_hwfn,
88                               u16 opaque_fid,
89                               u16 tx_queue_id,
90                               u32 cid,
91                               u8 vport_id,
92                               u8 stats_id,
93                               u16 sb,
94                               u8 sb_index,
95                               dma_addr_t pbl_addr,
96                               u16 pbl_size,
97                               union ecore_qm_pq_params *p_pq_params);
98
99 u8 ecore_mcast_bin_from_mac(u8 *mac);
100
101 #endif