Branch data Line data Source code
1 : : /* SPDX-License-Identifier: BSD-3-Clause
2 : : * Copyright(c) 2017 Intel Corporation
3 : : */
4 : :
5 : : #ifndef _IAVF_ETHDEV_H_
6 : : #define _IAVF_ETHDEV_H_
7 : :
8 : : #include <sys/queue.h>
9 : :
10 : : #include <ethdev_driver.h>
11 : : #include <rte_kvargs.h>
12 : : #include <rte_tm_driver.h>
13 : :
14 : : #include <iavf_prototype.h>
15 : : #include <iavf_adminq_cmd.h>
16 : : #include <iavf_type.h>
17 : :
18 : : #include "iavf_log.h"
19 : : #include "rte_pmd_iavf.h"
20 : :
21 : : #define IAVF_AQ_LEN 32
22 : : #define IAVF_AQ_BUF_SZ 4096
23 : : #define IAVF_RESET_WAIT_CNT 2000
24 : : #define IAVF_RESET_DETECTED_CNT 500
25 : : #define IAVF_RESET_POLL_SCALE 4 /* Poll-interval scale for reset detection */
26 : : #define IAVF_BUF_SIZE_MIN 1024
27 : : #define IAVF_FRAME_SIZE_MAX 9728
28 : : #define IAVF_QUEUE_BASE_ADDR_UNIT 128
29 : :
30 : : #define IAVF_MAX_NUM_QUEUES_DFLT 16
31 : : #define IAVF_MAX_NUM_QUEUES_LV 256
32 : : #define IAVF_CFG_Q_NUM_PER_BUF 32
33 : : #define IAVF_IRQ_MAP_NUM_PER_BUF 128
34 : : #define IAVF_RXTX_QUEUE_CHUNKS_NUM 2
35 : :
36 : : #define IAVF_UC_MACADDR_MAX 32768
37 : : #define IAVF_MC_MACADDR_MAX 64
38 : :
39 : : #define IAVF_DEV_WATCHDOG_PERIOD 2000 /* microseconds, set 0 to disable*/
40 : :
41 : : #define IAVF_DEFAULT_RX_PTHRESH 8
42 : : #define IAVF_DEFAULT_RX_HTHRESH 8
43 : : #define IAVF_DEFAULT_RX_WTHRESH 0
44 : :
45 : : #define IAVF_DEFAULT_RX_FREE_THRESH 32
46 : :
47 : : #define IAVF_DEFAULT_TX_PTHRESH 32
48 : : #define IAVF_DEFAULT_TX_HTHRESH 0
49 : : #define IAVF_DEFAULT_TX_WTHRESH 0
50 : :
51 : : #define IAVF_DEFAULT_TX_FREE_THRESH 32
52 : : #define IAVF_DEFAULT_TX_RS_THRESH 32
53 : :
54 : : #define IAVF_BASIC_OFFLOAD_CAPS ( \
55 : : VF_BASE_MODE_OFFLOADS | \
56 : : VIRTCHNL_VF_OFFLOAD_WB_ON_ITR | \
57 : : VIRTCHNL_VF_OFFLOAD_RX_POLLING)
58 : :
59 : : #define IAVF_RSS_OFFLOAD_ALL ( \
60 : : RTE_ETH_RSS_IPV4 | \
61 : : RTE_ETH_RSS_FRAG_IPV4 | \
62 : : RTE_ETH_RSS_NONFRAG_IPV4_TCP | \
63 : : RTE_ETH_RSS_NONFRAG_IPV4_UDP | \
64 : : RTE_ETH_RSS_NONFRAG_IPV4_SCTP | \
65 : : RTE_ETH_RSS_NONFRAG_IPV4_OTHER | \
66 : : RTE_ETH_RSS_IPV6 | \
67 : : RTE_ETH_RSS_FRAG_IPV6 | \
68 : : RTE_ETH_RSS_NONFRAG_IPV6_TCP | \
69 : : RTE_ETH_RSS_NONFRAG_IPV6_UDP | \
70 : : RTE_ETH_RSS_NONFRAG_IPV6_SCTP | \
71 : : RTE_ETH_RSS_NONFRAG_IPV6_OTHER)
72 : :
73 : : #define IAVF_MISC_VEC_ID RTE_INTR_VEC_ZERO_OFFSET
74 : : #define IAVF_RX_VEC_START RTE_INTR_VEC_RXTX_OFFSET
75 : :
76 : : /* Default queue interrupt throttling time in microseconds */
77 : : #define IAVF_ITR_INDEX_DEFAULT 0
78 : : #define IAVF_QUEUE_ITR_INTERVAL_DEFAULT 32 /* 32 us */
79 : : #define IAVF_QUEUE_ITR_INTERVAL_MAX 8160 /* 8160 us */
80 : :
81 : : #define IAVF_ALARM_INTERVAL 50000 /* us */
82 : : #define IAVF_PHC_SYNC_ALARM_INTERVAL_US 200000
83 : :
84 : : /* The overhead from MTU to max frame size.
85 : : * Considering QinQ packet, the VLAN tag needs to be counted twice.
86 : : */
87 : : #define IAVF_ETH_OVERHEAD \
88 : : (RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + RTE_VLAN_HLEN * 2)
89 : : #define IAVF_ETH_MAX_LEN (RTE_ETHER_MTU + IAVF_ETH_OVERHEAD)
90 : :
91 : : #define IAVF_32_BIT_WIDTH (CHAR_BIT * 4)
92 : : #define IAVF_48_BIT_WIDTH (CHAR_BIT * 6)
93 : : #define IAVF_48_BIT_MASK RTE_LEN2MASK(IAVF_48_BIT_WIDTH, uint64_t)
94 : :
95 : : #define IAVF_RX_DESC_EXT_STATUS_FLEXBH_MASK 0x03
96 : : #define IAVF_RX_DESC_EXT_STATUS_FLEXBH_FD_ID 0x01
97 : :
98 : : #define IAVF_BITS_PER_BYTE 8
99 : :
100 : : #define IAVF_VLAN_TAG_PCP_OFFSET 13
101 : :
102 : : #define IAVF_L2TPV2_FLAGS_LEN 0x4000
103 : :
104 : : struct iavf_adapter;
105 : : struct ci_rx_queue;
106 : : struct ci_tx_queue;
107 : :
108 : :
109 : : struct iavf_ipsec_crypto_stats {
110 : : uint64_t icount;
111 : : uint64_t ibytes;
112 : : struct {
113 : : uint64_t count;
114 : : uint64_t sad_miss;
115 : : uint64_t not_processed;
116 : : uint64_t icv_check;
117 : : uint64_t ipsec_length;
118 : : uint64_t misc;
119 : : } ierrors;
120 : : };
121 : :
122 : : struct iavf_mbuf_stats {
123 : : uint64_t tx_pkt_errors;
124 : : };
125 : :
126 : : struct iavf_eth_xstats {
127 : : struct virtchnl_eth_stats eth_stats;
128 : : struct iavf_ipsec_crypto_stats ips_stats;
129 : : struct iavf_mbuf_stats mbuf_stats;
130 : : };
131 : :
132 : : /* Structure that defines a VSI, associated with a adapter. */
133 : : struct iavf_vsi {
134 : : struct iavf_adapter *adapter; /* Backreference to associated adapter */
135 : : uint16_t vsi_id;
136 : : uint16_t nb_qps; /* Number of queue pairs VSI can occupy */
137 : : uint16_t nb_used_qps; /* Number of queue pairs VSI uses */
138 : : uint16_t max_macaddrs; /* Maximum number of MAC addresses */
139 : : uint16_t base_vector;
140 : : uint16_t msix_intr; /* The MSIX interrupt binds to VSI */
141 : : struct iavf_eth_xstats eth_stats_offset;
142 : : };
143 : :
144 : : struct rte_flow;
145 : : TAILQ_HEAD(iavf_flow_list, rte_flow);
146 : :
147 : : struct iavf_flow_parser_node;
148 : : TAILQ_HEAD(iavf_parser_list, iavf_flow_parser_node);
149 : :
150 : : struct iavf_fdir_conf {
151 : : struct virtchnl_fdir_add add_fltr;
152 : : struct virtchnl_fdir_del del_fltr;
153 : : uint64_t input_set;
154 : : uint32_t flow_id;
155 : : uint32_t mark_flag;
156 : : };
157 : :
158 : : struct iavf_fsub_conf {
159 : : struct virtchnl_flow_sub sub_fltr;
160 : : struct virtchnl_flow_unsub unsub_fltr;
161 : : uint64_t input_set;
162 : : uint32_t flow_id;
163 : : };
164 : :
165 : : struct iavf_qv_map {
166 : : uint16_t queue_id;
167 : : uint16_t vector_id;
168 : : };
169 : :
170 : : /* Message type read in admin queue from PF */
171 : : enum iavf_aq_result {
172 : : IAVF_MSG_ERR = -1, /* Meet error when accessing admin queue */
173 : : IAVF_MSG_NON, /* Read nothing from admin queue */
174 : : IAVF_MSG_SYS, /* Read system msg from admin queue */
175 : : IAVF_MSG_CMD, /* Read async command result */
176 : : };
177 : :
178 : : /* Struct to store Traffic Manager node configuration. */
179 : : struct iavf_tm_node {
180 : : TAILQ_ENTRY(iavf_tm_node) node;
181 : : uint32_t id;
182 : : uint32_t tc;
183 : : uint32_t priority;
184 : : uint32_t weight;
185 : : uint32_t reference_count;
186 : : struct iavf_tm_node *parent;
187 : : struct iavf_tm_shaper_profile *shaper_profile;
188 : : struct rte_tm_node_params params;
189 : : };
190 : :
191 : : TAILQ_HEAD(iavf_tm_node_list, iavf_tm_node);
192 : :
193 : : struct iavf_tm_shaper_profile {
194 : : TAILQ_ENTRY(iavf_tm_shaper_profile) node;
195 : : uint32_t shaper_profile_id;
196 : : uint32_t reference_count;
197 : : struct rte_tm_shaper_params profile;
198 : : };
199 : :
200 : : TAILQ_HEAD(iavf_shaper_profile_list, iavf_tm_shaper_profile);
201 : :
202 : : /* node type of Traffic Manager */
203 : : enum iavf_tm_node_type {
204 : : IAVF_TM_NODE_TYPE_PORT,
205 : : IAVF_TM_NODE_TYPE_TC,
206 : : IAVF_TM_NODE_TYPE_QUEUE,
207 : : IAVF_TM_NODE_TYPE_MAX,
208 : : };
209 : :
210 : : /* Struct to store all the Traffic Manager configuration. */
211 : : struct iavf_tm_conf {
212 : : struct iavf_tm_node *root; /* root node - vf vsi */
213 : : struct iavf_tm_node_list tc_list; /* node list for all the TCs */
214 : : struct iavf_tm_node_list queue_list; /* node list for all the queues */
215 : : struct iavf_shaper_profile_list shaper_profile_list;
216 : : uint32_t nb_tc_node;
217 : : uint32_t nb_queue_node;
218 : : bool committed;
219 : : };
220 : :
221 : : /* Struct to store queue TC mapping. Queue is continuous in one TC */
222 : : struct iavf_qtc_map {
223 : : uint8_t tc;
224 : : uint16_t start_queue_id;
225 : : uint16_t queue_count;
226 : : };
227 : :
228 : : /* Structure to store private data specific for VF instance. */
229 : : struct iavf_info {
230 : : uint16_t num_queue_pairs;
231 : : uint16_t max_pkt_len; /* Maximum packet length */
232 : : uint16_t mac_num; /* Number of MAC addresses */
233 : : bool promisc_unicast_enabled;
234 : : bool promisc_multicast_enabled;
235 : :
236 : : struct virtchnl_version_info virtchnl_version;
237 : : struct virtchnl_vf_resource *vf_res; /* VF resource */
238 : : struct virtchnl_vsi_resource *vsi_res; /* LAN VSI */
239 : : struct virtchnl_vlan_caps vlan_v2_caps;
240 : : uint64_t supported_rxdid;
241 : : uint8_t *proto_xtr; /* proto xtr type for all queues */
242 : : volatile RTE_ATOMIC(enum virtchnl_ops) pend_cmd; /* pending command not finished */
243 : : RTE_ATOMIC(uint32_t) pend_cmd_count;
244 : : int cmd_retval; /* return value of the cmd response from PF */
245 : : uint8_t aq_resp[IAVF_AQ_BUF_SZ]; /* buffer to store the adminq response from PF */
246 : : bool aq_intr_enabled;
247 : :
248 : : /** iAVF watchdog enable */
249 : : bool watchdog_enabled;
250 : : rte_spinlock_t watchdog_lock;
251 : :
252 : : /* Event from pf */
253 : : bool dev_closed;
254 : : bool link_up;
255 : : uint32_t link_speed;
256 : :
257 : : /* Unicast addrs */
258 : : struct rte_ether_addr mac_addrs[IAVF_UC_MACADDR_MAX];
259 : :
260 : : /* Multicast addrs */
261 : : struct rte_ether_addr mc_addrs[IAVF_MC_MACADDR_MAX];
262 : : uint16_t mc_addrs_num; /* Multicast mac addresses number */
263 : :
264 : : struct iavf_vsi vsi;
265 : : RTE_ATOMIC(bool)vf_reset; /* true for VF reset pending, false for no VF reset */
266 : : iavf_pre_reset_cb_t pre_reset_cb; /* Pre reset callback function ptr */
267 : : iavf_post_reset_cb_t post_reset_cb; /* Post reset callback function ptr */
268 : : void *pre_reset_cb_arg; /* Pre reset callback argument */
269 : : void *post_reset_cb_arg; /* Post reset callback argument */
270 : : uint64_t flags;
271 : :
272 : : uint8_t *rss_lut;
273 : : uint8_t *rss_key;
274 : : uint64_t rss_hf;
275 : : uint16_t nb_msix; /* number of MSI-X interrupts on Rx */
276 : : uint16_t msix_base; /* msix vector base from */
277 : : uint16_t max_rss_qregion; /* max RSS queue region supported by PF */
278 : : struct iavf_qv_map *qv_map; /* queue vector mapping */
279 : : struct iavf_flow_list flow_list;
280 : : rte_spinlock_t flow_ops_lock;
281 : : rte_spinlock_t aq_lock;
282 : : struct iavf_parser_list rss_parser_list;
283 : : struct iavf_parser_list dist_parser_list;
284 : : struct iavf_parser_list ipsec_crypto_parser_list;
285 : :
286 : : /* indicate large VF support enabled or not */
287 : : bool lv_enabled;
288 : :
289 : : struct virtchnl_qos_cap_list *qos_cap;
290 : : struct iavf_qtc_map *qtc_map;
291 : : struct iavf_tm_conf tm_conf;
292 : :
293 : : RTE_ATOMIC(bool)in_reset_recovery;
294 : : RTE_ATOMIC(uint32_t)reset_events_pending;
295 : : bool reset_pending;
296 : : bool pf_reset_in_progress;
297 : : bool start_pending;
298 : :
299 : : uint32_t ptp_caps;
300 : : rte_spinlock_t phc_time_aq_lock;
301 : : };
302 : :
303 : : #define IAVF_MAX_PKT_TYPE 1024
304 : :
305 : : #define IAVF_MAX_QUEUE_NUM 2048
306 : :
307 : : enum iavf_proto_xtr_type {
308 : : IAVF_PROTO_XTR_NONE,
309 : : IAVF_PROTO_XTR_VLAN,
310 : : IAVF_PROTO_XTR_IPV4,
311 : : IAVF_PROTO_XTR_IPV6,
312 : : IAVF_PROTO_XTR_IPV6_FLOW,
313 : : IAVF_PROTO_XTR_TCP,
314 : : IAVF_PROTO_XTR_IP_OFFSET,
315 : : IAVF_PROTO_XTR_IPSEC_CRYPTO_SAID,
316 : : IAVF_PROTO_XTR_MAX,
317 : : };
318 : :
319 : : /**
320 : : * Cache devargs parse result.
321 : : */
322 : : struct iavf_devargs {
323 : : uint8_t proto_xtr_dflt;
324 : : uint8_t proto_xtr[IAVF_MAX_QUEUE_NUM];
325 : : uint16_t quanta_size;
326 : : uint32_t watchdog_period;
327 : : int auto_reset;
328 : : int no_poll_on_link_down;
329 : : uint64_t mbuf_check;
330 : : int enable_lldp;
331 : : };
332 : :
333 : : struct iavf_security_ctx;
334 : :
335 : : enum iavf_rx_func_type {
336 : : IAVF_RX_DISABLED,
337 : : IAVF_RX_DEFAULT,
338 : : IAVF_RX_SCATTERED,
339 : : IAVF_RX_FLEX_RXD,
340 : : IAVF_RX_SCATTERED_FLEX_RXD,
341 : : IAVF_RX_BULK_ALLOC,
342 : : IAVF_RX_BULK_ALLOC_FLEX_RXD,
343 : : IAVF_RX_NEON,
344 : : IAVF_RX_NEON_SCATTERED,
345 : : IAVF_RX_NEON_FLEX_RXD,
346 : : IAVF_RX_NEON_SCATTERED_FLEX_RXD,
347 : : IAVF_RX_AVX2,
348 : : IAVF_RX_AVX2_SCATTERED,
349 : : IAVF_RX_AVX2_OFFLOAD,
350 : : IAVF_RX_AVX2_SCATTERED_OFFLOAD,
351 : : IAVF_RX_AVX2_FLEX_RXD,
352 : : IAVF_RX_AVX2_SCATTERED_FLEX_RXD,
353 : : IAVF_RX_AVX2_FLEX_RXD_OFFLOAD,
354 : : IAVF_RX_AVX2_SCATTERED_FLEX_RXD_OFFLOAD,
355 : : IAVF_RX_AVX512,
356 : : IAVF_RX_AVX512_SCATTERED,
357 : : IAVF_RX_AVX512_OFFLOAD,
358 : : IAVF_RX_AVX512_SCATTERED_OFFLOAD,
359 : : IAVF_RX_AVX512_FLEX_RXD,
360 : : IAVF_RX_AVX512_SCATTERED_FLEX_RXD,
361 : : IAVF_RX_AVX512_FLEX_RXD_OFFLOAD,
362 : : IAVF_RX_AVX512_SCATTERED_FLEX_RXD_OFFLOAD,
363 : : };
364 : :
365 : : enum iavf_tx_func_type {
366 : : IAVF_TX_DISABLED,
367 : : IAVF_TX_DEFAULT,
368 : : IAVF_TX_NEON,
369 : : IAVF_TX_AVX2,
370 : : IAVF_TX_AVX2_OFFLOAD,
371 : : IAVF_TX_AVX2_CTX,
372 : : IAVF_TX_AVX2_CTX_OFFLOAD,
373 : : IAVF_TX_AVX512,
374 : : IAVF_TX_AVX512_OFFLOAD,
375 : : IAVF_TX_AVX512_CTX,
376 : : IAVF_TX_AVX512_CTX_OFFLOAD,
377 : : };
378 : :
379 : : #define IAVF_MBUF_CHECK_F_TX_MBUF (1ULL << 0)
380 : : #define IAVF_MBUF_CHECK_F_TX_SIZE (1ULL << 1)
381 : : #define IAVF_MBUF_CHECK_F_TX_SEGMENT (1ULL << 2)
382 : : #define IAVF_MBUF_CHECK_F_TX_OFFLOAD (1ULL << 3)
383 : :
384 : : /* Structure to store private data for each VF instance. */
385 : : struct iavf_adapter {
386 : : struct iavf_hw hw;
387 : : struct rte_eth_dev_data *dev_data;
388 : : struct iavf_info vf;
389 : : struct iavf_security_ctx *security_ctx;
390 : :
391 : : bool rx_bulk_alloc_allowed;
392 : : alignas(RTE_CACHE_LINE_MIN_SIZE) uint32_t ptype_tbl[IAVF_MAX_PKT_TYPE];
393 : : bool stopped;
394 : : bool closed;
395 : : RTE_ATOMIC(bool) no_poll;
396 : : enum iavf_rx_func_type rx_func_type;
397 : : enum iavf_tx_func_type tx_func_type;
398 : : uint16_t fdir_ref_cnt;
399 : : rte_spinlock_t phc_sync_lock;
400 : : uint8_t phc_sync_ticks;
401 : : bool phc_sync_paused;
402 : : struct iavf_devargs devargs;
403 : : bool mac_primary_set;
404 : : bool adminq_polling; /* Interrupt setup fell back to alarm polling. */
405 : : uint16_t tpid; /* VLAN tag identifier */
406 : : };
407 : :
408 : : static inline struct rte_eth_dev *
409 : : iavf_get_eth_dev(struct iavf_adapter *adapter)
410 : : {
411 [ # # # # ]: 0 : return &rte_eth_devices[adapter->dev_data->port_id];
412 : : }
413 : :
414 : : /* IAVF_DEV_PRIVATE_TO */
415 : : #define IAVF_DEV_PRIVATE_TO_ADAPTER(adapter) \
416 : : ((struct iavf_adapter *)adapter)
417 : : #define IAVF_DEV_PRIVATE_TO_VF(adapter) \
418 : : (&((struct iavf_adapter *)adapter)->vf)
419 : : #define IAVF_DEV_PRIVATE_TO_HW(adapter) \
420 : : (&((struct iavf_adapter *)adapter)->hw)
421 : : #define IAVF_DEV_PRIVATE_TO_IAVF_SECURITY_CTX(adapter) \
422 : : (((struct iavf_adapter *)adapter)->security_ctx)
423 : :
424 : : /* IAVF_VSI_TO */
425 : : #define IAVF_VSI_TO_HW(vsi) \
426 : : (&(((struct iavf_vsi *)vsi)->adapter->hw))
427 : : #define IAVF_VSI_TO_VF(vsi) \
428 : : (&(((struct iavf_vsi *)vsi)->adapter->vf))
429 : :
430 : : static inline void
431 : : iavf_init_adminq_parameter(struct iavf_hw *hw)
432 : : {
433 : 0 : hw->aq.num_arq_entries = IAVF_AQ_LEN;
434 : 0 : hw->aq.num_asq_entries = IAVF_AQ_LEN;
435 : 0 : hw->aq.arq_buf_size = IAVF_AQ_BUF_SZ;
436 : 0 : hw->aq.asq_buf_size = IAVF_AQ_BUF_SZ;
437 : : }
438 : :
439 : : static inline uint16_t
440 : : iavf_calc_itr_interval(int16_t interval)
441 : : {
442 : : if (interval < 0 || interval > IAVF_QUEUE_ITR_INTERVAL_MAX)
443 : : interval = IAVF_QUEUE_ITR_INTERVAL_DEFAULT;
444 : :
445 : : /* Convert to hardware count, as writing each 1 represents 2 us */
446 : : return interval / 2;
447 : : }
448 : :
449 : : /* structure used for sending and checking response of virtchnl ops */
450 : : struct iavf_cmd_info {
451 : : enum virtchnl_ops ops;
452 : : uint8_t *in_args; /* buffer for sending */
453 : : uint32_t in_args_size; /* buffer size for sending */
454 : : uint8_t *out_buffer; /* buffer for response */
455 : : uint32_t out_size; /* buffer size for response */
456 : : };
457 : :
458 : : int iavf_check_api_version(struct iavf_adapter *adapter);
459 : : int iavf_get_vf_resource(struct iavf_adapter *adapter);
460 : : int iavf_dev_event_post(struct rte_eth_dev *dev,
461 : : enum rte_eth_event_type event,
462 : : void *param, size_t param_alloc_size);
463 : : bool iavf_dev_enter_reset(struct rte_eth_dev *dev, bool drain_tx);
464 : : void iavf_dev_event_handler_fini(void);
465 : : int iavf_dev_event_handler_init(void);
466 : : void iavf_handle_virtchnl_msg(struct rte_eth_dev *dev);
467 : : int iavf_enable_vlan_strip(struct iavf_adapter *adapter);
468 : : int iavf_disable_vlan_strip(struct iavf_adapter *adapter);
469 : : int iavf_switch_queue(struct iavf_adapter *adapter, uint16_t qid,
470 : : bool rx, bool on);
471 : : int iavf_switch_queue_lv(struct iavf_adapter *adapter, uint16_t qid,
472 : : bool rx, bool on);
473 : : int iavf_enable_queues(struct iavf_adapter *adapter);
474 : : int iavf_enable_queues_lv(struct iavf_adapter *adapter);
475 : : int iavf_disable_queues(struct iavf_adapter *adapter);
476 : : int iavf_disable_queues_lv(struct iavf_adapter *adapter);
477 : : int iavf_configure_rss_lut(struct iavf_adapter *adapter);
478 : : int iavf_configure_rss_key(struct iavf_adapter *adapter);
479 : : int iavf_configure_queues(struct iavf_adapter *adapter, uint16_t num_queue_pairs);
480 : : int iavf_get_supported_rxdid(struct iavf_adapter *adapter);
481 : : int iavf_config_vlan_strip_v2(struct iavf_adapter *adapter, bool enable);
482 : : int iavf_config_outer_vlan_strip_v2(struct iavf_adapter *adapter, bool enable);
483 : : int iavf_config_vlan_insert_v2(struct iavf_adapter *adapter, bool enable);
484 : : int iavf_config_outer_vlan_insert_v2(struct iavf_adapter *adapter, bool enable);
485 : : int iavf_add_del_vlan_v2(struct iavf_adapter *adapter, uint16_t vlanid,
486 : : bool add);
487 : : int iavf_get_vlan_offload_caps_v2(struct iavf_adapter *adapter);
488 : : int iavf_config_irq_map(struct iavf_adapter *adapter);
489 : : int iavf_config_irq_map_lv(struct iavf_adapter *adapter, uint16_t num);
490 : : void iavf_add_del_secondary_mac_addr(struct iavf_adapter *adapter, bool add);
491 : : int iavf_dev_link_update(struct rte_eth_dev *dev,
492 : : __rte_unused int wait_to_complete);
493 : : void iavf_dev_alarm_handler(void *param);
494 : : void iavf_phc_sync_alarm_start(struct rte_eth_dev *dev);
495 : : void iavf_phc_sync_alarm_stop(struct rte_eth_dev *dev);
496 : : int iavf_query_stats(struct iavf_adapter *adapter,
497 : : struct virtchnl_eth_stats *pstats);
498 : : int iavf_config_promisc(struct iavf_adapter *adapter, bool enable_unicast,
499 : : bool enable_multicast);
500 : : int iavf_add_del_eth_addr(struct iavf_adapter *adapter,
501 : : struct rte_ether_addr *addr, bool add, uint8_t type);
502 : : int iavf_add_del_vlan(struct iavf_adapter *adapter, uint16_t vlanid, bool add);
503 : : int iavf_fdir_add(struct iavf_adapter *adapter, struct iavf_fdir_conf *filter);
504 : : int iavf_fdir_del(struct iavf_adapter *adapter, struct iavf_fdir_conf *filter);
505 : : int iavf_fdir_check(struct iavf_adapter *adapter,
506 : : struct iavf_fdir_conf *filter);
507 : : int iavf_add_del_rss_cfg(struct iavf_adapter *adapter,
508 : : struct virtchnl_rss_cfg *rss_cfg, bool add);
509 : : int iavf_get_hena_caps(struct iavf_adapter *adapter, uint64_t *caps);
510 : : int iavf_set_hena(struct iavf_adapter *adapter, uint64_t hena);
511 : : int iavf_rss_hash_set(struct iavf_adapter *ad, uint64_t rss_hf, bool add);
512 : : int iavf_add_del_mc_addr_list(struct iavf_adapter *adapter,
513 : : struct rte_ether_addr *mc_addrs,
514 : : uint32_t mc_addrs_num, bool add);
515 : : int iavf_request_queues(struct rte_eth_dev *dev, uint16_t num);
516 : : int iavf_get_max_rss_queue_region(struct iavf_adapter *adapter);
517 : : int iavf_get_qos_cap(struct iavf_adapter *adapter);
518 : : int iavf_set_q_bw(struct rte_eth_dev *dev,
519 : : struct virtchnl_queues_bw_cfg *q_bw, uint16_t size);
520 : : int iavf_set_q_tc_map(struct rte_eth_dev *dev,
521 : : struct virtchnl_queue_tc_mapping *q_tc_mapping,
522 : : uint16_t size);
523 : : int iavf_set_vf_quanta_size(struct iavf_adapter *adapter, u16 start_queue_id,
524 : : u16 num_queues);
525 : : void iavf_tm_conf_init(struct rte_eth_dev *dev);
526 : : void iavf_tm_conf_uninit(struct rte_eth_dev *dev);
527 : : int iavf_ipsec_crypto_request(struct iavf_adapter *adapter,
528 : : uint8_t *msg, size_t msg_len,
529 : : uint8_t *resp_msg, size_t resp_msg_len);
530 : : extern const struct rte_tm_ops iavf_tm_ops;
531 : : int iavf_get_ptp_cap(struct iavf_adapter *adapter);
532 : : int iavf_get_phc_time(struct ci_rx_queue *rxq);
533 : : int iavf_flow_sub(struct iavf_adapter *adapter,
534 : : struct iavf_fsub_conf *filter);
535 : : int iavf_flow_unsub(struct iavf_adapter *adapter,
536 : : struct iavf_fsub_conf *filter);
537 : : int iavf_flow_sub_check(struct iavf_adapter *adapter,
538 : : struct iavf_fsub_conf *filter);
539 : : void iavf_dev_watchdog_enable(struct iavf_adapter *adapter);
540 : : void iavf_dev_watchdog_disable(struct iavf_adapter *adapter);
541 : : int iavf_handle_hw_reset(struct rte_eth_dev *dev, bool vf_initiated_reset);
542 : : void iavf_set_no_poll(struct iavf_adapter *adapter, bool link_change);
543 : : bool is_iavf_supported(struct rte_eth_dev *dev);
544 : : void iavf_hash_uninit(struct iavf_adapter *ad);
545 : : void iavf_resume_pending_start(struct rte_eth_dev *dev);
546 : : int iavf_phc_get_time(struct iavf_adapter *adapter, uint64_t *time);
547 : :
548 : : #endif /* _IAVF_ETHDEV_H_ */
|