2 * Copyright (c) 2016 QLogic Corporation.
6 * See LICENSE.qede_pmd for copyright and licensing details.
10 #define __ECORE_L2_H__
15 #include "ecore_spq.h"
16 #include "ecore_l2_api.h"
18 struct ecore_queue_cid {
19 /* 'Relative' is a relative term ;-). Usually the indices [not counting
20 * SBs] would be PF-relative, but there are some cases where that isn't
21 * the case - specifically for a PF configuring its VF indices it's
22 * possible some fields [E.g., stats-id] in 'rel' would already be abs.
24 struct ecore_queue_start_common_params rel;
25 struct ecore_queue_start_common_params abs;
29 /* VFs queues are mapped differently, so we need to know the
30 * relative queue associated with them [0-based].
31 * Notice this is relevant on the *PF* queue-cid of its VF's queues,
32 * and not on the VF itself.
37 /* Legacy VFs might have Rx producer located elsewhere */
40 struct ecore_hwfn *p_owner;
43 void ecore_eth_queue_cid_release(struct ecore_hwfn *p_hwfn,
44 struct ecore_queue_cid *p_cid);
46 struct ecore_queue_cid *
47 _ecore_eth_queue_to_cid(struct ecore_hwfn *p_hwfn,
48 u16 opaque_fid, u32 cid, u8 vf_qid,
49 struct ecore_queue_start_common_params *p_params);
52 ecore_sp_eth_vport_start(struct ecore_hwfn *p_hwfn,
53 struct ecore_sp_vport_start_params *p_params);
56 * @brief - Starts an Rx queue, when queue_cid is already prepared
61 * @param bd_chain_phys_addr
65 * @return enum _ecore_status_t
68 ecore_eth_rxq_start_ramrod(struct ecore_hwfn *p_hwfn,
69 struct ecore_queue_cid *p_cid,
71 dma_addr_t bd_chain_phys_addr,
72 dma_addr_t cqe_pbl_addr,
76 * @brief - Starts a Tx queue, where queue_cid is already prepared
82 * @param p_pq_params - parameters for choosing the PQ for this Tx queue
84 * @return enum _ecore_status_t
87 ecore_eth_txq_start_ramrod(struct ecore_hwfn *p_hwfn,
88 struct ecore_queue_cid *p_cid,
89 dma_addr_t pbl_addr, u16 pbl_size,
92 u8 ecore_mcast_bin_from_mac(u8 *mac);