2 * Copyright (c) 2016 QLogic Corporation.
6 * See LICENSE.qede_pmd for copyright and licensing details.
10 #define _QEDE_ETH_IF_H
15 struct eth_slow_path_rx_cqe
;
17 #define INIT_STRUCT_FIELD(field, value) .field = value
19 #define QED_ETH_INTERFACE_VERSION 609
21 #define QEDE_MAX_MCAST_FILTERS 64
23 enum qed_filter_rx_mode_type
{
24 QED_FILTER_RX_MODE_TYPE_REGULAR
,
25 QED_FILTER_RX_MODE_TYPE_MULTI_PROMISC
,
26 QED_FILTER_RX_MODE_TYPE_PROMISC
,
29 enum qed_filter_type
{
30 QED_FILTER_TYPE_UCAST
,
31 QED_FILTER_TYPE_MCAST
,
32 QED_FILTER_TYPE_RX_MODE
,
36 struct qed_dev_eth_info
{
37 struct qed_dev_info common
;
42 struct ether_addr port_mac
;
43 uint16_t num_vlan_filters
;
44 uint32_t num_mac_filters
;
46 /* Legacy VF - this affects the datapath */
50 struct qed_update_vport_params
{
52 uint8_t update_vport_active_flg
;
53 uint8_t vport_active_flg
;
54 uint8_t update_inner_vlan_removal_flg
;
55 uint8_t inner_vlan_removal_flg
;
56 uint8_t update_tx_switching_flg
;
57 uint8_t tx_switching_flg
;
58 uint8_t update_accept_any_vlan_flg
;
59 uint8_t accept_any_vlan
;
60 uint8_t update_rss_flg
;
62 struct ecore_sge_tpa_params
*sge_tpa_params
;
65 struct qed_start_vport_params
{
66 bool remove_inner_vlan
;
76 const struct qed_common_ops
*common
;
78 int (*fill_dev_info
)(struct ecore_dev
*edev
,
79 struct qed_dev_eth_info
*info
);
81 int (*vport_start
)(struct ecore_dev
*edev
,
82 struct qed_start_vport_params
*params
);
84 int (*vport_stop
)(struct ecore_dev
*edev
, uint8_t vport_id
);
86 int (*vport_update
)(struct ecore_dev
*edev
,
87 struct qed_update_vport_params
*params
);
89 int (*q_rx_start
)(struct ecore_dev
*cdev
,
91 struct ecore_queue_start_common_params
*p_params
,
92 uint16_t bd_max_bytes
,
93 dma_addr_t bd_chain_phys_addr
,
94 dma_addr_t cqe_pbl_addr
,
95 uint16_t cqe_pbl_size
,
96 struct ecore_rxq_start_ret_params
*ret_params
);
98 int (*q_rx_stop
)(struct ecore_dev
*edev
,
99 uint8_t rss_id
, void *handle
);
101 int (*q_tx_start
)(struct ecore_dev
*edev
,
103 struct ecore_queue_start_common_params
*p_params
,
106 struct ecore_txq_start_ret_params
*ret_params
);
108 int (*q_tx_stop
)(struct ecore_dev
*edev
,
109 uint8_t rss_id
, void *handle
);
111 int (*eth_cqe_completion
)(struct ecore_dev
*edev
,
113 struct eth_slow_path_rx_cqe
*cqe
);
115 int (*fastpath_stop
)(struct ecore_dev
*edev
);
117 void (*fastpath_start
)(struct ecore_dev
*edev
);
119 void (*get_vport_stats
)(struct ecore_dev
*edev
,
120 struct ecore_eth_stats
*stats
);
125 extern const struct qed_common_ops qed_common_ops_pass
;
127 const struct qed_eth_ops
*qed_get_eth_ops(void);
129 int qed_configure_filter_rx_mode(struct rte_eth_dev
*eth_dev
,
130 enum qed_filter_rx_mode_type type
);
132 #endif /* _QEDE_ETH_IF_H */