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 <rte_kvargs.h>
11 : : #include <rte_tm_driver.h>
12 : :
13 : : #include <iavf_prototype.h>
14 : : #include <iavf_adminq_cmd.h>
15 : : #include <iavf_type.h>
16 : :
17 : : #include "iavf_log.h"
18 : : #include "rte_pmd_iavf.h"
19 : :
20 : : #define IAVF_AQ_LEN 32
21 : : #define IAVF_AQ_BUF_SZ 4096
22 : : #define IAVF_RESET_WAIT_CNT 2000
23 : : #define IAVF_RESET_DETECTED_CNT 500
24 : : #define IAVF_RESET_POLL_SCALE 4 /* Poll-interval scale for reset detection */
25 : : #define IAVF_BUF_SIZE_MIN 1024
26 : : #define IAVF_FRAME_SIZE_MAX 9728
27 : : #define IAVF_QUEUE_BASE_ADDR_UNIT 128
28 : :
29 : : #define IAVF_MAX_NUM_QUEUES_DFLT 16
30 : : #define IAVF_MAX_NUM_QUEUES_LV 256
31 : : #define IAVF_CFG_Q_NUM_PER_BUF 32
32 : : #define IAVF_IRQ_MAP_NUM_PER_BUF 128
33 : : #define IAVF_RXTX_QUEUE_CHUNKS_NUM 2
34 : :
35 : : #define IAVF_NUM_MACADDR_MAX 64
36 : :
37 : : #define IAVF_DEV_WATCHDOG_PERIOD 2000 /* microseconds, set 0 to disable*/
38 : :
39 : : #define IAVF_DEFAULT_RX_PTHRESH 8
40 : : #define IAVF_DEFAULT_RX_HTHRESH 8
41 : : #define IAVF_DEFAULT_RX_WTHRESH 0
42 : :
43 : : #define IAVF_DEFAULT_RX_FREE_THRESH 32
44 : :
45 : : #define IAVF_DEFAULT_TX_PTHRESH 32
46 : : #define IAVF_DEFAULT_TX_HTHRESH 0
47 : : #define IAVF_DEFAULT_TX_WTHRESH 0
48 : :
49 : : #define IAVF_DEFAULT_TX_FREE_THRESH 32
50 : : #define IAVF_DEFAULT_TX_RS_THRESH 32
51 : :
52 : : #define IAVF_BASIC_OFFLOAD_CAPS ( \
53 : : VF_BASE_MODE_OFFLOADS | \
54 : : VIRTCHNL_VF_OFFLOAD_WB_ON_ITR | \
55 : : VIRTCHNL_VF_OFFLOAD_RX_POLLING)
56 : :
57 : : #define IAVF_RSS_OFFLOAD_ALL ( \
58 : : RTE_ETH_RSS_IPV4 | \
59 : : RTE_ETH_RSS_FRAG_IPV4 | \
60 : : RTE_ETH_RSS_NONFRAG_IPV4_TCP | \
61 : : RTE_ETH_RSS_NONFRAG_IPV4_UDP | \
62 : : RTE_ETH_RSS_NONFRAG_IPV4_SCTP | \
63 : : RTE_ETH_RSS_NONFRAG_IPV4_OTHER | \
64 : : RTE_ETH_RSS_IPV6 | \
65 : : RTE_ETH_RSS_FRAG_IPV6 | \
66 : : RTE_ETH_RSS_NONFRAG_IPV6_TCP | \
67 : : RTE_ETH_RSS_NONFRAG_IPV6_UDP | \
68 : : RTE_ETH_RSS_NONFRAG_IPV6_SCTP | \
69 : : RTE_ETH_RSS_NONFRAG_IPV6_OTHER)
70 : :
71 : : #define IAVF_MISC_VEC_ID RTE_INTR_VEC_ZERO_OFFSET
72 : : #define IAVF_RX_VEC_START RTE_INTR_VEC_RXTX_OFFSET
73 : :
74 : : /* Default queue interrupt throttling time in microseconds */
75 : : #define IAVF_ITR_INDEX_DEFAULT 0
76 : : #define IAVF_QUEUE_ITR_INTERVAL_DEFAULT 32 /* 32 us */
77 : : #define IAVF_QUEUE_ITR_INTERVAL_MAX 8160 /* 8160 us */
78 : :
79 : : #define IAVF_ALARM_INTERVAL 50000 /* us */
80 : : #define IAVF_PHC_SYNC_ALARM_INTERVAL_US 200000
81 : :
82 : : /* The overhead from MTU to max frame size.
83 : : * Considering QinQ packet, the VLAN tag needs to be counted twice.
84 : : */
85 : : #define IAVF_ETH_OVERHEAD \
86 : : (RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + RTE_VLAN_HLEN * 2)
87 : : #define IAVF_ETH_MAX_LEN (RTE_ETHER_MTU + IAVF_ETH_OVERHEAD)
88 : :
89 : : #define IAVF_32_BIT_WIDTH (CHAR_BIT * 4)
90 : : #define IAVF_48_BIT_WIDTH (CHAR_BIT * 6)
91 : : #define IAVF_48_BIT_MASK RTE_LEN2MASK(IAVF_48_BIT_WIDTH, uint64_t)
92 : :
93 : : #define IAVF_RX_DESC_EXT_STATUS_FLEXBH_MASK 0x03
94 : : #define IAVF_RX_DESC_EXT_STATUS_FLEXBH_FD_ID 0x01
95 : :
96 : : #define IAVF_BITS_PER_BYTE 8
97 : :
98 : : #define IAVF_VLAN_TAG_PCP_OFFSET 13
99 : :
100 : : #define IAVF_L2TPV2_FLAGS_LEN 0x4000
101 : :
102 : : struct iavf_adapter;
103 : : struct ci_rx_queue;
104 : : struct ci_tx_queue;
105 : :
106 : :
107 : : struct iavf_ipsec_crypto_stats {
108 : : uint64_t icount;
109 : : uint64_t ibytes;
110 : : struct {
111 : : uint64_t count;
112 : : uint64_t sad_miss;
113 : : uint64_t not_processed;
114 : : uint64_t icv_check;
115 : : uint64_t ipsec_length;
116 : : uint64_t misc;
117 : : } ierrors;
118 : : };
119 : :
120 : : struct iavf_mbuf_stats {
121 : : uint64_t tx_pkt_errors;
122 : : };
123 : :
124 : : struct iavf_eth_xstats {
125 : : struct virtchnl_eth_stats eth_stats;
126 : : struct iavf_ipsec_crypto_stats ips_stats;
127 : : struct iavf_mbuf_stats mbuf_stats;
128 : : };
129 : :
130 : : /* Structure that defines a VSI, associated with a adapter. */
131 : : struct iavf_vsi {
132 : : struct iavf_adapter *adapter; /* Backreference to associated adapter */
133 : : uint16_t vsi_id;
134 : : uint16_t nb_qps; /* Number of queue pairs VSI can occupy */
135 : : uint16_t nb_used_qps; /* Number of queue pairs VSI uses */
136 : : uint16_t max_macaddrs; /* Maximum number of MAC addresses */
137 : : uint16_t base_vector;
138 : : uint16_t msix_intr; /* The MSIX interrupt binds to VSI */
139 : : struct iavf_eth_xstats eth_stats_offset;
140 : : };
141 : :
142 : : struct rte_flow;
143 : : TAILQ_HEAD(iavf_flow_list, rte_flow);
144 : :
145 : : struct iavf_flow_parser_node;
146 : : TAILQ_HEAD(iavf_parser_list, iavf_flow_parser_node);
147 : :
148 : : struct iavf_fdir_conf {
149 : : struct virtchnl_fdir_add add_fltr;
150 : : struct virtchnl_fdir_del del_fltr;
151 : : uint64_t input_set;
152 : : uint32_t flow_id;
153 : : uint32_t mark_flag;
154 : : };
155 : :
156 : : struct iavf_fdir_info {
157 : : struct iavf_fdir_conf conf;
158 : : };
159 : :
160 : : struct iavf_fsub_conf {
161 : : struct virtchnl_flow_sub sub_fltr;
162 : : struct virtchnl_flow_unsub unsub_fltr;
163 : : uint64_t input_set;
164 : : uint32_t flow_id;
165 : : };
166 : :
167 : : struct iavf_qv_map {
168 : : uint16_t queue_id;
169 : : uint16_t vector_id;
170 : : };
171 : :
172 : : /* Message type read in admin queue from PF */
173 : : enum iavf_aq_result {
174 : : IAVF_MSG_ERR = -1, /* Meet error when accessing admin queue */
175 : : IAVF_MSG_NON, /* Read nothing from admin queue */
176 : : IAVF_MSG_SYS, /* Read system msg from admin queue */
177 : : IAVF_MSG_CMD, /* Read async command result */
178 : : };
179 : :
180 : : /* Struct to store Traffic Manager node configuration. */
181 : : struct iavf_tm_node {
182 : : TAILQ_ENTRY(iavf_tm_node) node;
183 : : uint32_t id;
184 : : uint32_t tc;
185 : : uint32_t priority;
186 : : uint32_t weight;
187 : : uint32_t reference_count;
188 : : struct iavf_tm_node *parent;
189 : : struct iavf_tm_shaper_profile *shaper_profile;
190 : : struct rte_tm_node_params params;
191 : : };
192 : :
193 : : TAILQ_HEAD(iavf_tm_node_list, iavf_tm_node);
194 : :
195 : : struct iavf_tm_shaper_profile {
196 : : TAILQ_ENTRY(iavf_tm_shaper_profile) node;
197 : : uint32_t shaper_profile_id;
198 : : uint32_t reference_count;
199 : : struct rte_tm_shaper_params profile;
200 : : };
201 : :
202 : : TAILQ_HEAD(iavf_shaper_profile_list, iavf_tm_shaper_profile);
203 : :
204 : : /* node type of Traffic Manager */
205 : : enum iavf_tm_node_type {
206 : : IAVF_TM_NODE_TYPE_PORT,
207 : : IAVF_TM_NODE_TYPE_TC,
208 : : IAVF_TM_NODE_TYPE_QUEUE,
209 : : IAVF_TM_NODE_TYPE_MAX,
210 : : };
211 : :
212 : : /* Struct to store all the Traffic Manager configuration. */
213 : : struct iavf_tm_conf {
214 : : struct iavf_tm_node *root; /* root node - vf vsi */
215 : : struct iavf_tm_node_list tc_list; /* node list for all the TCs */
216 : : struct iavf_tm_node_list queue_list; /* node list for all the queues */
217 : : struct iavf_shaper_profile_list shaper_profile_list;
218 : : uint32_t nb_tc_node;
219 : : uint32_t nb_queue_node;
220 : : bool committed;
221 : : };
222 : :
223 : : /* Struct to store queue TC mapping. Queue is continuous in one TC */
224 : : struct iavf_qtc_map {
225 : : uint8_t tc;
226 : : uint16_t start_queue_id;
227 : : uint16_t queue_count;
228 : : };
229 : :
230 : : /* Structure to store private data specific for VF instance. */
231 : : struct iavf_info {
232 : : uint16_t num_queue_pairs;
233 : : uint16_t max_pkt_len; /* Maximum packet length */
234 : : uint16_t mac_num; /* Number of MAC addresses */
235 : : bool promisc_unicast_enabled;
236 : : bool promisc_multicast_enabled;
237 : :
238 : : struct virtchnl_version_info virtchnl_version;
239 : : struct virtchnl_vf_resource *vf_res; /* VF resource */
240 : : struct virtchnl_vsi_resource *vsi_res; /* LAN VSI */
241 : : struct virtchnl_vlan_caps vlan_v2_caps;
242 : : uint64_t supported_rxdid;
243 : : uint8_t *proto_xtr; /* proto xtr type for all queues */
244 : : volatile RTE_ATOMIC(enum virtchnl_ops) pend_cmd; /* pending command not finished */
245 : : RTE_ATOMIC(uint32_t) pend_cmd_count;
246 : : int cmd_retval; /* return value of the cmd response from PF */
247 : : uint8_t aq_resp[IAVF_AQ_BUF_SZ]; /* buffer to store the adminq response from PF */
248 : : bool aq_intr_enabled;
249 : :
250 : : /** iAVF watchdog enable */
251 : : bool watchdog_enabled;
252 : :
253 : : /* Event from pf */
254 : : bool dev_closed;
255 : : bool link_up;
256 : : uint32_t link_speed;
257 : :
258 : : /* Multicast addrs */
259 : : struct rte_ether_addr mc_addrs[IAVF_NUM_MACADDR_MAX];
260 : : uint16_t mc_addrs_num; /* Multicast mac addresses number */
261 : :
262 : : struct iavf_vsi vsi;
263 : : bool vf_reset; /* true for VF reset pending, false for no VF reset */
264 : : iavf_pre_reset_cb_t pre_reset_cb; /* Pre reset callback function ptr */
265 : : iavf_post_reset_cb_t post_reset_cb; /* Post reset callback function ptr */
266 : : void *pre_reset_cb_arg; /* Pre reset callback argument */
267 : : void *post_reset_cb_arg; /* Post reset callback argument */
268 : : uint64_t flags;
269 : :
270 : : uint8_t *rss_lut;
271 : : uint8_t *rss_key;
272 : : uint64_t rss_hf;
273 : : uint16_t nb_msix; /* number of MSI-X interrupts on Rx */
274 : : uint16_t msix_base; /* msix vector base from */
275 : : uint16_t max_rss_qregion; /* max RSS queue region supported by PF */
276 : : struct iavf_qv_map *qv_map; /* queue vector mapping */
277 : : struct iavf_flow_list flow_list;
278 : : rte_spinlock_t flow_ops_lock;
279 : : rte_spinlock_t aq_lock;
280 : : struct iavf_parser_list rss_parser_list;
281 : : struct iavf_parser_list dist_parser_list;
282 : : struct iavf_parser_list ipsec_crypto_parser_list;
283 : :
284 : : struct iavf_fdir_info fdir; /* flow director info */
285 : : /* indicate large VF support enabled or not */
286 : : bool lv_enabled;
287 : :
288 : : struct virtchnl_qos_cap_list *qos_cap;
289 : : struct iavf_qtc_map *qtc_map;
290 : : struct iavf_tm_conf tm_conf;
291 : :
292 : : struct rte_eth_dev *eth_dev;
293 : :
294 : : bool in_reset_recovery;
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 : : uint16_t tpid; /* VLAN tag identifier */
405 : : };
406 : :
407 : : /* IAVF_DEV_PRIVATE_TO */
408 : : #define IAVF_DEV_PRIVATE_TO_ADAPTER(adapter) \
409 : : ((struct iavf_adapter *)adapter)
410 : : #define IAVF_DEV_PRIVATE_TO_VF(adapter) \
411 : : (&((struct iavf_adapter *)adapter)->vf)
412 : : #define IAVF_DEV_PRIVATE_TO_HW(adapter) \
413 : : (&((struct iavf_adapter *)adapter)->hw)
414 : : #define IAVF_DEV_PRIVATE_TO_IAVF_SECURITY_CTX(adapter) \
415 : : (((struct iavf_adapter *)adapter)->security_ctx)
416 : :
417 : : /* IAVF_VSI_TO */
418 : : #define IAVF_VSI_TO_HW(vsi) \
419 : : (&(((struct iavf_vsi *)vsi)->adapter->hw))
420 : : #define IAVF_VSI_TO_VF(vsi) \
421 : : (&(((struct iavf_vsi *)vsi)->adapter->vf))
422 : :
423 : : static inline void
424 : : iavf_init_adminq_parameter(struct iavf_hw *hw)
425 : : {
426 : 0 : hw->aq.num_arq_entries = IAVF_AQ_LEN;
427 : 0 : hw->aq.num_asq_entries = IAVF_AQ_LEN;
428 : 0 : hw->aq.arq_buf_size = IAVF_AQ_BUF_SZ;
429 : 0 : hw->aq.asq_buf_size = IAVF_AQ_BUF_SZ;
430 : : }
431 : :
432 : : static inline uint16_t
433 : : iavf_calc_itr_interval(int16_t interval)
434 : : {
435 : : if (interval < 0 || interval > IAVF_QUEUE_ITR_INTERVAL_MAX)
436 : : interval = IAVF_QUEUE_ITR_INTERVAL_DEFAULT;
437 : :
438 : : /* Convert to hardware count, as writing each 1 represents 2 us */
439 : : return interval / 2;
440 : : }
441 : :
442 : : /* structure used for sending and checking response of virtchnl ops */
443 : : struct iavf_cmd_info {
444 : : enum virtchnl_ops ops;
445 : : uint8_t *in_args; /* buffer for sending */
446 : : uint32_t in_args_size; /* buffer size for sending */
447 : : uint8_t *out_buffer; /* buffer for response */
448 : : uint32_t out_size; /* buffer size for response */
449 : : };
450 : :
451 : : int iavf_check_api_version(struct iavf_adapter *adapter);
452 : : int iavf_get_vf_resource(struct iavf_adapter *adapter);
453 : : void iavf_dev_event_post(struct rte_eth_dev *dev,
454 : : enum rte_eth_event_type event,
455 : : void *param, size_t param_alloc_size);
456 : : void iavf_dev_event_handler_fini(void);
457 : : int iavf_dev_event_handler_init(void);
458 : : void iavf_handle_virtchnl_msg(struct rte_eth_dev *dev);
459 : : int iavf_enable_vlan_strip(struct iavf_adapter *adapter);
460 : : int iavf_disable_vlan_strip(struct iavf_adapter *adapter);
461 : : int iavf_switch_queue(struct iavf_adapter *adapter, uint16_t qid,
462 : : bool rx, bool on);
463 : : int iavf_switch_queue_lv(struct iavf_adapter *adapter, uint16_t qid,
464 : : bool rx, bool on);
465 : : int iavf_enable_queues(struct iavf_adapter *adapter);
466 : : int iavf_enable_queues_lv(struct iavf_adapter *adapter);
467 : : int iavf_disable_queues(struct iavf_adapter *adapter);
468 : : int iavf_disable_queues_lv(struct iavf_adapter *adapter);
469 : : int iavf_configure_rss_lut(struct iavf_adapter *adapter);
470 : : int iavf_configure_rss_key(struct iavf_adapter *adapter);
471 : : int iavf_configure_queues(struct iavf_adapter *adapter, uint16_t num_queue_pairs);
472 : : int iavf_get_supported_rxdid(struct iavf_adapter *adapter);
473 : : int iavf_config_vlan_strip_v2(struct iavf_adapter *adapter, bool enable);
474 : : int iavf_config_outer_vlan_strip_v2(struct iavf_adapter *adapter, bool enable);
475 : : int iavf_config_vlan_insert_v2(struct iavf_adapter *adapter, bool enable);
476 : : int iavf_config_outer_vlan_insert_v2(struct iavf_adapter *adapter, bool enable);
477 : : int iavf_add_del_vlan_v2(struct iavf_adapter *adapter, uint16_t vlanid,
478 : : bool add);
479 : : int iavf_get_vlan_offload_caps_v2(struct iavf_adapter *adapter);
480 : : int iavf_config_irq_map(struct iavf_adapter *adapter);
481 : : int iavf_config_irq_map_lv(struct iavf_adapter *adapter, uint16_t num);
482 : : void iavf_add_del_all_mac_addr(struct iavf_adapter *adapter, bool add);
483 : : int iavf_dev_link_update(struct rte_eth_dev *dev,
484 : : __rte_unused int wait_to_complete);
485 : : void iavf_dev_alarm_handler(void *param);
486 : : void iavf_phc_sync_alarm_start(struct rte_eth_dev *dev);
487 : : void iavf_phc_sync_alarm_stop(struct rte_eth_dev *dev);
488 : : int iavf_query_stats(struct iavf_adapter *adapter,
489 : : struct virtchnl_eth_stats *pstats);
490 : : int iavf_config_promisc(struct iavf_adapter *adapter, bool enable_unicast,
491 : : bool enable_multicast);
492 : : int iavf_add_del_eth_addr(struct iavf_adapter *adapter,
493 : : struct rte_ether_addr *addr, bool add, uint8_t type);
494 : : int iavf_add_del_vlan(struct iavf_adapter *adapter, uint16_t vlanid, bool add);
495 : : int iavf_fdir_add(struct iavf_adapter *adapter, struct iavf_fdir_conf *filter);
496 : : int iavf_fdir_del(struct iavf_adapter *adapter, struct iavf_fdir_conf *filter);
497 : : int iavf_fdir_check(struct iavf_adapter *adapter,
498 : : struct iavf_fdir_conf *filter);
499 : : int iavf_add_del_rss_cfg(struct iavf_adapter *adapter,
500 : : struct virtchnl_rss_cfg *rss_cfg, bool add);
501 : : int iavf_get_hena_caps(struct iavf_adapter *adapter, uint64_t *caps);
502 : : int iavf_set_hena(struct iavf_adapter *adapter, uint64_t hena);
503 : : int iavf_rss_hash_set(struct iavf_adapter *ad, uint64_t rss_hf, bool add);
504 : : int iavf_add_del_mc_addr_list(struct iavf_adapter *adapter,
505 : : struct rte_ether_addr *mc_addrs,
506 : : uint32_t mc_addrs_num, bool add);
507 : : int iavf_request_queues(struct rte_eth_dev *dev, uint16_t num);
508 : : int iavf_get_max_rss_queue_region(struct iavf_adapter *adapter);
509 : : int iavf_get_qos_cap(struct iavf_adapter *adapter);
510 : : int iavf_set_q_bw(struct rte_eth_dev *dev,
511 : : struct virtchnl_queues_bw_cfg *q_bw, uint16_t size);
512 : : int iavf_set_q_tc_map(struct rte_eth_dev *dev,
513 : : struct virtchnl_queue_tc_mapping *q_tc_mapping,
514 : : uint16_t size);
515 : : int iavf_set_vf_quanta_size(struct iavf_adapter *adapter, u16 start_queue_id,
516 : : u16 num_queues);
517 : : void iavf_tm_conf_init(struct rte_eth_dev *dev);
518 : : void iavf_tm_conf_uninit(struct rte_eth_dev *dev);
519 : : int iavf_ipsec_crypto_request(struct iavf_adapter *adapter,
520 : : uint8_t *msg, size_t msg_len,
521 : : uint8_t *resp_msg, size_t resp_msg_len);
522 : : extern const struct rte_tm_ops iavf_tm_ops;
523 : : int iavf_get_ptp_cap(struct iavf_adapter *adapter);
524 : : int iavf_get_phc_time(struct ci_rx_queue *rxq);
525 : : int iavf_flow_sub(struct iavf_adapter *adapter,
526 : : struct iavf_fsub_conf *filter);
527 : : int iavf_flow_unsub(struct iavf_adapter *adapter,
528 : : struct iavf_fsub_conf *filter);
529 : : int iavf_flow_sub_check(struct iavf_adapter *adapter,
530 : : struct iavf_fsub_conf *filter);
531 : : void iavf_dev_watchdog_enable(struct iavf_adapter *adapter);
532 : : void iavf_dev_watchdog_disable(struct iavf_adapter *adapter);
533 : : void iavf_handle_hw_reset(struct rte_eth_dev *dev, bool vf_initiated_reset);
534 : : void iavf_set_no_poll(struct iavf_adapter *adapter, bool link_change);
535 : : bool is_iavf_supported(struct rte_eth_dev *dev);
536 : : void iavf_hash_uninit(struct iavf_adapter *ad);
537 : : void iavf_resume_pending_start(struct rte_eth_dev *dev);
538 : : int iavf_phc_get_time(struct iavf_adapter *adapter, uint64_t *time);
539 : :
540 : : #endif /* _IAVF_ETHDEV_H_ */
|