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 QEDE_MAX_MCAST_FILTERS 64
21 enum qed_filter_rx_mode_type {
22 QED_FILTER_RX_MODE_TYPE_REGULAR,
23 QED_FILTER_RX_MODE_TYPE_MULTI_PROMISC,
24 QED_FILTER_RX_MODE_TYPE_PROMISC,
27 enum qed_filter_type {
28 QED_FILTER_TYPE_UCAST,
29 QED_FILTER_TYPE_MCAST,
30 QED_FILTER_TYPE_RX_MODE,
34 struct qed_dev_eth_info {
35 struct qed_dev_info common;
40 struct ether_addr port_mac;
41 uint16_t num_vlan_filters;
42 uint32_t num_mac_filters;
44 /* Legacy VF - this affects the datapath */
49 const struct qed_common_ops *common;
51 int (*fill_dev_info)(struct ecore_dev *edev,
52 struct qed_dev_eth_info *info);
54 int (*q_rx_start)(struct ecore_dev *cdev,
56 struct ecore_queue_start_common_params *p_params,
57 uint16_t bd_max_bytes,
58 dma_addr_t bd_chain_phys_addr,
59 dma_addr_t cqe_pbl_addr,
60 uint16_t cqe_pbl_size,
61 struct ecore_rxq_start_ret_params *ret_params);
63 int (*q_rx_stop)(struct ecore_dev *edev,
64 uint8_t rss_id, void *handle);
66 int (*q_tx_start)(struct ecore_dev *edev,
68 struct ecore_queue_start_common_params *p_params,
71 struct ecore_txq_start_ret_params *ret_params);
73 int (*q_tx_stop)(struct ecore_dev *edev,
74 uint8_t rss_id, void *handle);
76 int (*eth_cqe_completion)(struct ecore_dev *edev,
78 struct eth_slow_path_rx_cqe *cqe);
80 int (*fastpath_stop)(struct ecore_dev *edev);
82 void (*fastpath_start)(struct ecore_dev *edev);
84 void (*get_vport_stats)(struct ecore_dev *edev,
85 struct ecore_eth_stats *stats);
90 extern const struct qed_common_ops qed_common_ops_pass;
92 const struct qed_eth_ops *qed_get_eth_ops(void);
94 int qed_configure_filter_rx_mode(struct rte_eth_dev *eth_dev,
95 enum qed_filter_rx_mode_type type);
97 #endif /* _QEDE_ETH_IF_H */