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 */
41 void ecore_eth_queue_cid_release(struct ecore_hwfn *p_hwfn,
42 struct ecore_queue_cid *p_cid);
44 struct ecore_queue_cid *
45 _ecore_eth_queue_to_cid(struct ecore_hwfn *p_hwfn,
46 u16 opaque_fid, u32 cid, u8 vf_qid,
47 struct ecore_queue_start_common_params *p_params);
50 ecore_sp_eth_vport_start(struct ecore_hwfn *p_hwfn,
51 struct ecore_sp_vport_start_params *p_params);
54 * @brief - Starts an Rx queue, when queue_cid is already prepared
59 * @param bd_chain_phys_addr
63 * @return enum _ecore_status_t
66 ecore_eth_rxq_start_ramrod(struct ecore_hwfn *p_hwfn,
67 struct ecore_queue_cid *p_cid,
69 dma_addr_t bd_chain_phys_addr,
70 dma_addr_t cqe_pbl_addr,
74 * @brief - Starts a Tx queue, where queue_cid is already prepared
80 * @param p_pq_params - parameters for choosing the PQ for this Tx queue
82 * @return enum _ecore_status_t
85 ecore_eth_txq_start_ramrod(struct ecore_hwfn *p_hwfn,
86 struct ecore_queue_cid *p_cid,
87 dma_addr_t pbl_addr, u16 pbl_size,
90 u8 ecore_mcast_bin_from_mac(u8 *mac);