1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2017 Intel Corporation
5 #ifndef _RTE_ETHDEV_DRIVER_H_
6 #define _RTE_ETHDEV_DRIVER_H_
11 * RTE Ethernet Device PMD API
13 * These APIs for the use from Ethernet drivers, user applications shouldn't
18 #include <rte_ethdev.h>
24 /**< @internal Declaration of the hairpin peer queue information structure. */
25 struct rte_hairpin_peer_info;
28 * Definitions of all functions exported by an Ethernet driver through the
29 * generic structure of type *eth_dev_ops* supplied in the *rte_eth_dev*
30 * structure associated with an Ethernet device.
33 typedef int (*eth_dev_configure_t)(struct rte_eth_dev *dev);
34 /**< @internal Ethernet device configuration. */
36 typedef int (*eth_dev_start_t)(struct rte_eth_dev *dev);
37 /**< @internal Function used to start a configured Ethernet device. */
39 typedef int (*eth_dev_stop_t)(struct rte_eth_dev *dev);
40 /**< @internal Function used to stop a configured Ethernet device. */
42 typedef int (*eth_dev_set_link_up_t)(struct rte_eth_dev *dev);
43 /**< @internal Function used to link up a configured Ethernet device. */
45 typedef int (*eth_dev_set_link_down_t)(struct rte_eth_dev *dev);
46 /**< @internal Function used to link down a configured Ethernet device. */
48 typedef int (*eth_dev_close_t)(struct rte_eth_dev *dev);
49 /**< @internal Function used to close a configured Ethernet device. */
51 typedef int (*eth_dev_reset_t)(struct rte_eth_dev *dev);
52 /** <@internal Function used to reset a configured Ethernet device. */
54 typedef int (*eth_is_removed_t)(struct rte_eth_dev *dev);
55 /**< @internal Function used to detect an Ethernet device removal. */
59 * Function used to enable the Rx promiscuous mode of an Ethernet device.
62 * ethdev handle of port.
65 * Negative errno value on error, 0 on success.
68 * Success, promiscuous mode is enabled.
70 * Promiscuous mode is not supported.
73 * @retval -E_RTE_SECONDARY
74 * Function was called from a secondary process instance and not supported.
76 * Attempt to enable promiscuos mode failed because of timeout.
78 * Failed to enable promiscuous mode.
80 typedef int (*eth_promiscuous_enable_t)(struct rte_eth_dev *dev);
84 * Function used to disable the Rx promiscuous mode of an Ethernet device.
87 * ethdev handle of port.
90 * Negative errno value on error, 0 on success.
93 * Success, promiscuous mode is disabled.
95 * Promiscuous mode disabling is not supported.
98 * @retval -E_RTE_SECONDARY
99 * Function was called from a secondary process instance and not supported.
101 * Attempt to disable promiscuos mode failed because of timeout.
103 * Failed to disable promiscuous mode.
105 typedef int (*eth_promiscuous_disable_t)(struct rte_eth_dev *dev);
109 * Enable the receipt of all multicast packets by an Ethernet device.
112 * ethdev handle of port.
115 * Negative errno value on error, 0 on success.
118 * Success, all-multicast mode is enabled.
120 * All-multicast mode is not supported.
123 * @retval -E_RTE_SECONDARY
124 * Function was called from a secondary process instance and not supported.
126 * Attempt to enable all-multicast mode failed because of timeout.
128 * Failed to enable all-multicast mode.
130 typedef int (*eth_allmulticast_enable_t)(struct rte_eth_dev *dev);
134 * Disable the receipt of all multicast packets by an Ethernet device.
137 * ethdev handle of port.
140 * Negative errno value on error, 0 on success.
143 * Success, all-multicast mode is disabled.
145 * All-multicast mode disabling is not supported.
148 * @retval -E_RTE_SECONDARY
149 * Function was called from a secondary process instance and not supported.
151 * Attempt to disable all-multicast mode failed because of timeout.
153 * Failed to disable all-multicast mode.
155 typedef int (*eth_allmulticast_disable_t)(struct rte_eth_dev *dev);
157 typedef int (*eth_link_update_t)(struct rte_eth_dev *dev,
158 int wait_to_complete);
159 /**< @internal Get link speed, duplex mode and state (up/down) of an Ethernet device. */
161 typedef int (*eth_stats_get_t)(struct rte_eth_dev *dev,
162 struct rte_eth_stats *igb_stats);
163 /**< @internal Get global I/O statistics of an Ethernet device. */
167 * Reset global I/O statistics of an Ethernet device to 0.
170 * ethdev handle of port.
173 * Negative errno value on error, 0 on success.
176 * Success, statistics has been reset.
178 * Resetting statistics is not supported.
180 * Resetting statistics is not valid.
182 * Not enough memory to get the stats.
184 typedef int (*eth_stats_reset_t)(struct rte_eth_dev *dev);
186 typedef int (*eth_xstats_get_t)(struct rte_eth_dev *dev,
187 struct rte_eth_xstat *stats, unsigned int n);
188 /**< @internal Get extended stats of an Ethernet device. */
190 typedef int (*eth_xstats_get_by_id_t)(struct rte_eth_dev *dev,
194 /**< @internal Get extended stats of an Ethernet device. */
198 * Reset extended stats of an Ethernet device.
201 * ethdev handle of port.
204 * Negative errno value on error, 0 on success.
207 * Success, statistics has been reset.
209 * Resetting statistics is not supported.
211 * Resetting statistics is not valid.
213 * Not enough memory to get the stats.
215 typedef int (*eth_xstats_reset_t)(struct rte_eth_dev *dev);
217 typedef int (*eth_xstats_get_names_t)(struct rte_eth_dev *dev,
218 struct rte_eth_xstat_name *xstats_names, unsigned int size);
219 /**< @internal Get names of extended stats of an Ethernet device. */
221 typedef int (*eth_xstats_get_names_by_id_t)(struct rte_eth_dev *dev,
222 struct rte_eth_xstat_name *xstats_names, const uint64_t *ids,
224 /**< @internal Get names of extended stats of an Ethernet device. */
226 typedef int (*eth_queue_stats_mapping_set_t)(struct rte_eth_dev *dev,
230 /**< @internal Set a queue statistics mapping for a tx/rx queue of an Ethernet device. */
232 typedef int (*eth_dev_infos_get_t)(struct rte_eth_dev *dev,
233 struct rte_eth_dev_info *dev_info);
234 /**< @internal Get specific information of an Ethernet device. */
236 typedef const uint32_t *(*eth_dev_supported_ptypes_get_t)(struct rte_eth_dev *dev);
237 /**< @internal Get supported ptypes of an Ethernet device. */
241 * Inform Ethernet device about reduced range of packet types to handle.
244 * The Ethernet device identifier.
246 * The ptype family that application is interested in should be bitwise OR of
247 * RTE_PTYPE_*_MASK or 0.
251 typedef int (*eth_dev_ptypes_set_t)(struct rte_eth_dev *dev,
252 uint32_t ptype_mask);
254 typedef int (*eth_queue_start_t)(struct rte_eth_dev *dev,
256 /**< @internal Start rx and tx of a queue of an Ethernet device. */
258 typedef int (*eth_queue_stop_t)(struct rte_eth_dev *dev,
260 /**< @internal Stop rx and tx of a queue of an Ethernet device. */
262 typedef int (*eth_rx_queue_setup_t)(struct rte_eth_dev *dev,
263 uint16_t rx_queue_id,
265 unsigned int socket_id,
266 const struct rte_eth_rxconf *rx_conf,
267 struct rte_mempool *mb_pool);
268 /**< @internal Set up a receive queue of an Ethernet device. */
270 typedef int (*eth_tx_queue_setup_t)(struct rte_eth_dev *dev,
271 uint16_t tx_queue_id,
273 unsigned int socket_id,
274 const struct rte_eth_txconf *tx_conf);
275 /**< @internal Setup a transmit queue of an Ethernet device. */
277 typedef int (*eth_rx_enable_intr_t)(struct rte_eth_dev *dev,
278 uint16_t rx_queue_id);
279 /**< @internal Enable interrupt of a receive queue of an Ethernet device. */
281 typedef int (*eth_rx_disable_intr_t)(struct rte_eth_dev *dev,
282 uint16_t rx_queue_id);
283 /**< @internal Disable interrupt of a receive queue of an Ethernet device. */
285 typedef void (*eth_queue_release_t)(void *queue);
286 /**< @internal Release memory resources allocated by given RX/TX queue. */
288 typedef int (*eth_fw_version_get_t)(struct rte_eth_dev *dev,
289 char *fw_version, size_t fw_size);
290 /**< @internal Get firmware information of an Ethernet device. */
292 typedef int (*eth_tx_done_cleanup_t)(void *txq, uint32_t free_cnt);
293 /**< @internal Force mbufs to be from TX ring. */
295 typedef void (*eth_rxq_info_get_t)(struct rte_eth_dev *dev,
296 uint16_t rx_queue_id, struct rte_eth_rxq_info *qinfo);
298 typedef void (*eth_txq_info_get_t)(struct rte_eth_dev *dev,
299 uint16_t tx_queue_id, struct rte_eth_txq_info *qinfo);
301 typedef int (*eth_burst_mode_get_t)(struct rte_eth_dev *dev,
302 uint16_t queue_id, struct rte_eth_burst_mode *mode);
304 typedef int (*mtu_set_t)(struct rte_eth_dev *dev, uint16_t mtu);
305 /**< @internal Set MTU. */
307 typedef int (*vlan_filter_set_t)(struct rte_eth_dev *dev,
310 /**< @internal filtering of a VLAN Tag Identifier by an Ethernet device. */
312 typedef int (*vlan_tpid_set_t)(struct rte_eth_dev *dev,
313 enum rte_vlan_type type, uint16_t tpid);
314 /**< @internal set the outer/inner VLAN-TPID by an Ethernet device. */
316 typedef int (*vlan_offload_set_t)(struct rte_eth_dev *dev, int mask);
317 /**< @internal set VLAN offload function by an Ethernet device. */
319 typedef int (*vlan_pvid_set_t)(struct rte_eth_dev *dev,
322 /**< @internal set port based TX VLAN insertion by an Ethernet device. */
324 typedef void (*vlan_strip_queue_set_t)(struct rte_eth_dev *dev,
325 uint16_t rx_queue_id,
327 /**< @internal VLAN stripping enable/disable by an queue of Ethernet device. */
329 typedef int (*flow_ctrl_get_t)(struct rte_eth_dev *dev,
330 struct rte_eth_fc_conf *fc_conf);
331 /**< @internal Get current flow control parameter on an Ethernet device */
333 typedef int (*flow_ctrl_set_t)(struct rte_eth_dev *dev,
334 struct rte_eth_fc_conf *fc_conf);
335 /**< @internal Setup flow control parameter on an Ethernet device */
337 typedef int (*priority_flow_ctrl_set_t)(struct rte_eth_dev *dev,
338 struct rte_eth_pfc_conf *pfc_conf);
339 /**< @internal Setup priority flow control parameter on an Ethernet device */
341 typedef int (*reta_update_t)(struct rte_eth_dev *dev,
342 struct rte_eth_rss_reta_entry64 *reta_conf,
344 /**< @internal Update RSS redirection table on an Ethernet device */
346 typedef int (*reta_query_t)(struct rte_eth_dev *dev,
347 struct rte_eth_rss_reta_entry64 *reta_conf,
349 /**< @internal Query RSS redirection table on an Ethernet device */
351 typedef int (*rss_hash_update_t)(struct rte_eth_dev *dev,
352 struct rte_eth_rss_conf *rss_conf);
353 /**< @internal Update RSS hash configuration of an Ethernet device */
355 typedef int (*rss_hash_conf_get_t)(struct rte_eth_dev *dev,
356 struct rte_eth_rss_conf *rss_conf);
357 /**< @internal Get current RSS hash configuration of an Ethernet device */
359 typedef int (*eth_dev_led_on_t)(struct rte_eth_dev *dev);
360 /**< @internal Turn on SW controllable LED on an Ethernet device */
362 typedef int (*eth_dev_led_off_t)(struct rte_eth_dev *dev);
363 /**< @internal Turn off SW controllable LED on an Ethernet device */
365 typedef void (*eth_mac_addr_remove_t)(struct rte_eth_dev *dev, uint32_t index);
366 /**< @internal Remove MAC address from receive address register */
368 typedef int (*eth_mac_addr_add_t)(struct rte_eth_dev *dev,
369 struct rte_ether_addr *mac_addr,
372 /**< @internal Set a MAC address into Receive Address Register */
374 typedef int (*eth_mac_addr_set_t)(struct rte_eth_dev *dev,
375 struct rte_ether_addr *mac_addr);
376 /**< @internal Set a MAC address into Receive Address Register */
378 typedef int (*eth_uc_hash_table_set_t)(struct rte_eth_dev *dev,
379 struct rte_ether_addr *mac_addr,
381 /**< @internal Set a Unicast Hash bitmap */
383 typedef int (*eth_uc_all_hash_table_set_t)(struct rte_eth_dev *dev,
385 /**< @internal Set all Unicast Hash bitmap */
387 typedef int (*eth_set_queue_rate_limit_t)(struct rte_eth_dev *dev,
390 /**< @internal Set queue TX rate */
392 typedef int (*eth_mirror_rule_set_t)(struct rte_eth_dev *dev,
393 struct rte_eth_mirror_conf *mirror_conf,
396 /**< @internal Add a traffic mirroring rule on an Ethernet device */
398 typedef int (*eth_mirror_rule_reset_t)(struct rte_eth_dev *dev,
400 /**< @internal Remove a traffic mirroring rule on an Ethernet device */
402 typedef int (*eth_udp_tunnel_port_add_t)(struct rte_eth_dev *dev,
403 struct rte_eth_udp_tunnel *tunnel_udp);
404 /**< @internal Add tunneling UDP port */
406 typedef int (*eth_udp_tunnel_port_del_t)(struct rte_eth_dev *dev,
407 struct rte_eth_udp_tunnel *tunnel_udp);
408 /**< @internal Delete tunneling UDP port */
410 typedef int (*eth_set_mc_addr_list_t)(struct rte_eth_dev *dev,
411 struct rte_ether_addr *mc_addr_set,
412 uint32_t nb_mc_addr);
413 /**< @internal set the list of multicast addresses on an Ethernet device */
415 typedef int (*eth_timesync_enable_t)(struct rte_eth_dev *dev);
416 /**< @internal Function used to enable IEEE1588/802.1AS timestamping. */
418 typedef int (*eth_timesync_disable_t)(struct rte_eth_dev *dev);
419 /**< @internal Function used to disable IEEE1588/802.1AS timestamping. */
421 typedef int (*eth_timesync_read_rx_timestamp_t)(struct rte_eth_dev *dev,
422 struct timespec *timestamp,
424 /**< @internal Function used to read an RX IEEE1588/802.1AS timestamp. */
426 typedef int (*eth_timesync_read_tx_timestamp_t)(struct rte_eth_dev *dev,
427 struct timespec *timestamp);
428 /**< @internal Function used to read a TX IEEE1588/802.1AS timestamp. */
430 typedef int (*eth_timesync_adjust_time)(struct rte_eth_dev *dev, int64_t);
431 /**< @internal Function used to adjust the device clock */
433 typedef int (*eth_timesync_read_time)(struct rte_eth_dev *dev,
434 struct timespec *timestamp);
435 /**< @internal Function used to get time from the device clock. */
437 typedef int (*eth_timesync_write_time)(struct rte_eth_dev *dev,
438 const struct timespec *timestamp);
439 /**< @internal Function used to get time from the device clock */
441 typedef int (*eth_read_clock)(struct rte_eth_dev *dev,
442 uint64_t *timestamp);
443 /**< @internal Function used to get the current value of the device clock. */
445 typedef int (*eth_get_reg_t)(struct rte_eth_dev *dev,
446 struct rte_dev_reg_info *info);
447 /**< @internal Retrieve registers */
449 typedef int (*eth_get_eeprom_length_t)(struct rte_eth_dev *dev);
450 /**< @internal Retrieve eeprom size */
452 typedef int (*eth_get_eeprom_t)(struct rte_eth_dev *dev,
453 struct rte_dev_eeprom_info *info);
454 /**< @internal Retrieve eeprom data */
456 typedef int (*eth_set_eeprom_t)(struct rte_eth_dev *dev,
457 struct rte_dev_eeprom_info *info);
458 /**< @internal Program eeprom data */
460 typedef int (*eth_get_module_info_t)(struct rte_eth_dev *dev,
461 struct rte_eth_dev_module_info *modinfo);
462 /**< @internal Retrieve type and size of plugin module eeprom */
464 typedef int (*eth_get_module_eeprom_t)(struct rte_eth_dev *dev,
465 struct rte_dev_eeprom_info *info);
466 /**< @internal Retrieve plugin module eeprom data */
471 * Get flow operations.
473 * If the flow API is not supported for the specified device,
474 * the driver can return NULL.
476 typedef int (*eth_flow_ops_get_t)(struct rte_eth_dev *dev,
477 const struct rte_flow_ops **ops);
479 typedef int (*eth_tm_ops_get_t)(struct rte_eth_dev *dev, void *ops);
480 /**< @internal Get Traffic Management (TM) operations on an Ethernet device */
482 typedef int (*eth_mtr_ops_get_t)(struct rte_eth_dev *dev, void *ops);
483 /**< @internal Get Traffic Metering and Policing (MTR) operations */
485 typedef int (*eth_get_dcb_info)(struct rte_eth_dev *dev,
486 struct rte_eth_dcb_info *dcb_info);
487 /**< @internal Get dcb information on an Ethernet device */
489 typedef int (*eth_pool_ops_supported_t)(struct rte_eth_dev *dev,
491 /**< @internal Test if a port supports specific mempool ops */
495 * Get the hairpin capabilities.
498 * ethdev handle of port.
500 * returns the hairpin capabilities from the device.
503 * Negative errno value on error, 0 on success.
506 * Success, hairpin is supported.
508 * Hairpin is not supported.
510 typedef int (*eth_hairpin_cap_get_t)(struct rte_eth_dev *dev,
511 struct rte_eth_hairpin_cap *cap);
515 * Setup RX hairpin queue.
518 * ethdev handle of port.
520 * the selected RX queue index.
522 * the requested number of descriptors for this queue. 0 - use PMD default.
524 * the RX hairpin configuration structure.
527 * Negative errno value on error, 0 on success.
530 * Success, hairpin is supported.
532 * Hairpin is not supported.
534 * One of the parameters is invalid.
536 * Unable to allocate resources.
538 typedef int (*eth_rx_hairpin_queue_setup_t)
539 (struct rte_eth_dev *dev, uint16_t rx_queue_id,
541 const struct rte_eth_hairpin_conf *conf);
545 * Setup TX hairpin queue.
548 * ethdev handle of port.
550 * the selected TX queue index.
552 * the requested number of descriptors for this queue. 0 - use PMD default.
554 * the TX hairpin configuration structure.
557 * Negative errno value on error, 0 on success.
560 * Success, hairpin is supported.
562 * Hairpin is not supported.
564 * One of the parameters is invalid.
566 * Unable to allocate resources.
568 typedef int (*eth_tx_hairpin_queue_setup_t)
569 (struct rte_eth_dev *dev, uint16_t tx_queue_id,
571 const struct rte_eth_hairpin_conf *hairpin_conf);
575 * Get Forward Error Correction(FEC) capability.
578 * ethdev handle of port.
579 * @param speed_fec_capa
580 * speed_fec_capa is out only with per-speed capabilities.
582 * a number of elements in an speed_fec_capa array.
585 * Negative errno value on error, positive value on success.
587 * @retval positive value
588 * A non-negative value lower or equal to num: success. The return value
589 * is the number of entries filled in the fec capa array.
590 * A non-negative value higher than num: error, the given fec capa array
591 * is too small. The return value corresponds to the num that should
592 * be given to succeed. The entries in the fec capa array are not valid
593 * and shall not be used by the caller.
595 * Operation is not supported.
599 * *num* or *speed_fec_capa* invalid.
601 typedef int (*eth_fec_get_capability_t)(struct rte_eth_dev *dev,
602 struct rte_eth_fec_capa *speed_fec_capa, unsigned int num);
606 * Get Forward Error Correction(FEC) mode.
609 * ethdev handle of port.
611 * a bitmask of enabled FEC modes. If AUTO bit is set, other
612 * bits specify FEC modes which may be negotiated. If AUTO
613 * bit is clear, specify FEC modes to be used (only one valid
614 * mode per speed may be set).
617 * Negative errno value on error, 0 on success.
620 * Success, get FEC success.
622 * Operation is not supported.
626 typedef int (*eth_fec_get_t)(struct rte_eth_dev *dev,
631 * Set Forward Error Correction(FEC) mode.
634 * ethdev handle of port.
636 * bitmask of allowed FEC modes. It must be only one
637 * if AUTO is disabled. If AUTO is enabled, other
638 * bits specify FEC modes which may be negotiated.
641 * Negative errno value on error, 0 on success.
644 * Success, set FEC success.
646 * Operation is not supported.
648 * Unsupported FEC mode requested.
652 typedef int (*eth_fec_set_t)(struct rte_eth_dev *dev, uint32_t fec_capa);
656 * Get all hairpin Tx/Rx peer ports of the current device, if any.
659 * ethdev handle of port.
661 * array to save the ports list.
665 * value to decide the current to peer direction
666 * positive - used as Tx to get all peer Rx ports.
667 * zero - used as Rx to get all peer Tx ports.
670 * Negative errno value on error, 0 or positive on success.
673 * Success, no peer ports.
675 * Actual number of the peer ports.
677 * Get peer ports API is not supported.
679 * One of the parameters is invalid.
681 typedef int (*hairpin_get_peer_ports_t)(struct rte_eth_dev *dev,
682 uint16_t *peer_ports, size_t len,
687 * Bind all hairpin Tx queues of one port to the Rx queues of the peer port.
690 * ethdev handle of port.
695 * Negative errno value on error, 0 on success.
698 * Success, bind successfully.
700 * Bind API is not supported.
702 * One of the parameters is invalid.
704 * Device is not started.
706 typedef int (*eth_hairpin_bind_t)(struct rte_eth_dev *dev,
711 * Unbind all hairpin Tx queues of one port from the Rx queues of the peer port.
714 * ethdev handle of port.
719 * Negative errno value on error, 0 on success.
722 * Success, unbind successfully.
724 * Bind API is not supported.
726 * One of the parameters is invalid.
728 * Device is already stopped.
730 typedef int (*eth_hairpin_unbind_t)(struct rte_eth_dev *dev,
733 typedef int (*eth_hairpin_queue_peer_update_t)
734 (struct rte_eth_dev *dev, uint16_t peer_queue,
735 struct rte_hairpin_peer_info *current_info,
736 struct rte_hairpin_peer_info *peer_info, uint32_t direction);
737 /**< @internal Update and fetch peer queue information. */
739 typedef int (*eth_hairpin_queue_peer_bind_t)
740 (struct rte_eth_dev *dev, uint16_t cur_queue,
741 struct rte_hairpin_peer_info *peer_info, uint32_t direction);
742 /**< @internal Bind peer queue to the current queue with fetched information. */
744 typedef int (*eth_hairpin_queue_peer_unbind_t)
745 (struct rte_eth_dev *dev, uint16_t cur_queue, uint32_t direction);
746 /**< @internal Unbind peer queue from the current queue. */
750 * Get address of memory location whose contents will change whenever there is
751 * new data to be received on an Rx queue.
754 * Ethdev queue pointer.
756 * The pointer to power-optimized monitoring condition structure.
758 * Negative errno value on error, 0 on success.
765 typedef int (*eth_get_monitor_addr_t)(void *rxq,
766 struct rte_power_monitor_cond *pmc);
770 * Get representor info to be able to calculate the unique representor ID.
772 * Caller should pass NULL as pointer of info to get number of entries,
773 * allocate info buffer according to returned entry number, then call
774 * again with buffer to get real info.
776 * To calculate the representor ID, caller should iterate each entry,
777 * match controller index, pf index, vf or sf start index and range,
778 * then calculate representor ID from offset to vf/sf start index.
779 * @see rte_eth_representor_id_get.
782 * Ethdev handle of port.
784 * Pointer to memory to save device representor info.
786 * Negative errno value on error, number of info entries otherwise.
789 typedef int (*eth_representor_info_get_t)(struct rte_eth_dev *dev,
790 struct rte_eth_representor_info *info);
793 * @internal A structure containing the functions exported by an Ethernet driver.
796 eth_dev_configure_t dev_configure; /**< Configure device. */
797 eth_dev_start_t dev_start; /**< Start device. */
798 eth_dev_stop_t dev_stop; /**< Stop device. */
799 eth_dev_set_link_up_t dev_set_link_up; /**< Device link up. */
800 eth_dev_set_link_down_t dev_set_link_down; /**< Device link down. */
801 eth_dev_close_t dev_close; /**< Close device. */
802 eth_dev_reset_t dev_reset; /**< Reset device. */
803 eth_link_update_t link_update; /**< Get device link state. */
804 eth_is_removed_t is_removed;
805 /**< Check if the device was physically removed. */
807 eth_promiscuous_enable_t promiscuous_enable; /**< Promiscuous ON. */
808 eth_promiscuous_disable_t promiscuous_disable;/**< Promiscuous OFF. */
809 eth_allmulticast_enable_t allmulticast_enable;/**< RX multicast ON. */
810 eth_allmulticast_disable_t allmulticast_disable;/**< RX multicast OFF. */
811 eth_mac_addr_remove_t mac_addr_remove; /**< Remove MAC address. */
812 eth_mac_addr_add_t mac_addr_add; /**< Add a MAC address. */
813 eth_mac_addr_set_t mac_addr_set; /**< Set a MAC address. */
814 eth_set_mc_addr_list_t set_mc_addr_list; /**< set list of mcast addrs. */
815 mtu_set_t mtu_set; /**< Set MTU. */
817 eth_stats_get_t stats_get; /**< Get generic device statistics. */
818 eth_stats_reset_t stats_reset; /**< Reset generic device statistics. */
819 eth_xstats_get_t xstats_get; /**< Get extended device statistics. */
820 eth_xstats_reset_t xstats_reset; /**< Reset extended device statistics. */
821 eth_xstats_get_names_t xstats_get_names;
822 /**< Get names of extended statistics. */
823 eth_queue_stats_mapping_set_t queue_stats_mapping_set;
824 /**< Configure per queue stat counter mapping. */
826 eth_dev_infos_get_t dev_infos_get; /**< Get device info. */
827 eth_rxq_info_get_t rxq_info_get; /**< retrieve RX queue information. */
828 eth_txq_info_get_t txq_info_get; /**< retrieve TX queue information. */
829 eth_burst_mode_get_t rx_burst_mode_get; /**< Get RX burst mode */
830 eth_burst_mode_get_t tx_burst_mode_get; /**< Get TX burst mode */
831 eth_fw_version_get_t fw_version_get; /**< Get firmware version. */
832 eth_dev_supported_ptypes_get_t dev_supported_ptypes_get;
833 /**< Get packet types supported and identified by device. */
834 eth_dev_ptypes_set_t dev_ptypes_set;
835 /**< Inform Ethernet device about reduced range of packet types to handle. */
837 vlan_filter_set_t vlan_filter_set; /**< Filter VLAN Setup. */
838 vlan_tpid_set_t vlan_tpid_set; /**< Outer/Inner VLAN TPID Setup. */
839 vlan_strip_queue_set_t vlan_strip_queue_set; /**< VLAN Stripping on queue. */
840 vlan_offload_set_t vlan_offload_set; /**< Set VLAN Offload. */
841 vlan_pvid_set_t vlan_pvid_set; /**< Set port based TX VLAN insertion. */
843 eth_queue_start_t rx_queue_start;/**< Start RX for a queue. */
844 eth_queue_stop_t rx_queue_stop; /**< Stop RX for a queue. */
845 eth_queue_start_t tx_queue_start;/**< Start TX for a queue. */
846 eth_queue_stop_t tx_queue_stop; /**< Stop TX for a queue. */
847 eth_rx_queue_setup_t rx_queue_setup;/**< Set up device RX queue. */
848 eth_queue_release_t rx_queue_release; /**< Release RX queue. */
850 eth_rx_enable_intr_t rx_queue_intr_enable; /**< Enable Rx queue interrupt. */
851 eth_rx_disable_intr_t rx_queue_intr_disable; /**< Disable Rx queue interrupt. */
852 eth_tx_queue_setup_t tx_queue_setup;/**< Set up device TX queue. */
853 eth_queue_release_t tx_queue_release; /**< Release TX queue. */
854 eth_tx_done_cleanup_t tx_done_cleanup;/**< Free tx ring mbufs */
856 eth_dev_led_on_t dev_led_on; /**< Turn on LED. */
857 eth_dev_led_off_t dev_led_off; /**< Turn off LED. */
859 flow_ctrl_get_t flow_ctrl_get; /**< Get flow control. */
860 flow_ctrl_set_t flow_ctrl_set; /**< Setup flow control. */
861 priority_flow_ctrl_set_t priority_flow_ctrl_set; /**< Setup priority flow control. */
863 eth_uc_hash_table_set_t uc_hash_table_set; /**< Set Unicast Table Array. */
864 eth_uc_all_hash_table_set_t uc_all_hash_table_set; /**< Set Unicast hash bitmap. */
866 eth_mirror_rule_set_t mirror_rule_set; /**< Add a traffic mirror rule. */
867 eth_mirror_rule_reset_t mirror_rule_reset; /**< reset a traffic mirror rule. */
869 eth_udp_tunnel_port_add_t udp_tunnel_port_add; /** Add UDP tunnel port. */
870 eth_udp_tunnel_port_del_t udp_tunnel_port_del; /** Del UDP tunnel port. */
872 eth_set_queue_rate_limit_t set_queue_rate_limit; /**< Set queue rate limit. */
874 rss_hash_update_t rss_hash_update; /** Configure RSS hash protocols. */
875 rss_hash_conf_get_t rss_hash_conf_get; /** Get current RSS hash configuration. */
876 reta_update_t reta_update; /** Update redirection table. */
877 reta_query_t reta_query; /** Query redirection table. */
879 eth_get_reg_t get_reg; /**< Get registers. */
880 eth_get_eeprom_length_t get_eeprom_length; /**< Get eeprom length. */
881 eth_get_eeprom_t get_eeprom; /**< Get eeprom data. */
882 eth_set_eeprom_t set_eeprom; /**< Set eeprom. */
884 eth_get_module_info_t get_module_info;
885 /** Get plugin module eeprom attribute. */
886 eth_get_module_eeprom_t get_module_eeprom;
887 /** Get plugin module eeprom data. */
889 eth_flow_ops_get_t flow_ops_get; /**< Get flow operations. */
891 eth_get_dcb_info get_dcb_info; /** Get DCB information. */
893 eth_timesync_enable_t timesync_enable;
894 /** Turn IEEE1588/802.1AS timestamping on. */
895 eth_timesync_disable_t timesync_disable;
896 /** Turn IEEE1588/802.1AS timestamping off. */
897 eth_timesync_read_rx_timestamp_t timesync_read_rx_timestamp;
898 /** Read the IEEE1588/802.1AS RX timestamp. */
899 eth_timesync_read_tx_timestamp_t timesync_read_tx_timestamp;
900 /** Read the IEEE1588/802.1AS TX timestamp. */
901 eth_timesync_adjust_time timesync_adjust_time; /** Adjust the device clock. */
902 eth_timesync_read_time timesync_read_time; /** Get the device clock time. */
903 eth_timesync_write_time timesync_write_time; /** Set the device clock time. */
905 eth_read_clock read_clock;
907 eth_xstats_get_by_id_t xstats_get_by_id;
908 /**< Get extended device statistic values by ID. */
909 eth_xstats_get_names_by_id_t xstats_get_names_by_id;
910 /**< Get name of extended device statistics by ID. */
912 eth_tm_ops_get_t tm_ops_get;
913 /**< Get Traffic Management (TM) operations. */
915 eth_mtr_ops_get_t mtr_ops_get;
916 /**< Get Traffic Metering and Policing (MTR) operations. */
918 eth_pool_ops_supported_t pool_ops_supported;
919 /**< Test if a port supports specific mempool ops */
921 eth_hairpin_cap_get_t hairpin_cap_get;
922 /**< Returns the hairpin capabilities. */
923 eth_rx_hairpin_queue_setup_t rx_hairpin_queue_setup;
924 /**< Set up device RX hairpin queue. */
925 eth_tx_hairpin_queue_setup_t tx_hairpin_queue_setup;
926 /**< Set up device TX hairpin queue. */
928 eth_fec_get_capability_t fec_get_capability;
929 /**< Get Forward Error Correction(FEC) capability. */
930 eth_fec_get_t fec_get;
931 /**< Get Forward Error Correction(FEC) mode. */
932 eth_fec_set_t fec_set;
933 /**< Set Forward Error Correction(FEC) mode. */
934 hairpin_get_peer_ports_t hairpin_get_peer_ports;
935 /**< Get hairpin peer ports list. */
936 eth_hairpin_bind_t hairpin_bind;
937 /**< Bind all hairpin Tx queues of device to the peer port Rx queues. */
938 eth_hairpin_unbind_t hairpin_unbind;
939 /**< Unbind all hairpin Tx queues from the peer port Rx queues. */
940 eth_hairpin_queue_peer_update_t hairpin_queue_peer_update;
941 /**< Pass the current queue info and get the peer queue info. */
942 eth_hairpin_queue_peer_bind_t hairpin_queue_peer_bind;
943 /**< Set up the connection between the pair of hairpin queues. */
944 eth_hairpin_queue_peer_unbind_t hairpin_queue_peer_unbind;
945 /**< Disconnect the hairpin queues of a pair from each other. */
947 eth_get_monitor_addr_t get_monitor_addr;
948 /**< Get power monitoring condition for Rx queue. */
950 eth_representor_info_get_t representor_info_get;
951 /**< Get representor info. */
956 * Check if the selected Rx queue is hairpin queue.
959 * Pointer to the selected device.
961 * The selected queue.
964 * - (1) if the queue is hairpin queue, 0 otherwise.
967 int rte_eth_dev_is_rx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);
971 * Check if the selected Tx queue is hairpin queue.
974 * Pointer to the selected device.
976 * The selected queue.
979 * - (1) if the queue is hairpin queue, 0 otherwise.
982 int rte_eth_dev_is_tx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);
986 * Returns a ethdev slot specified by the unique identifier name.
989 * The pointer to the Unique identifier name for each Ethernet device
991 * - The pointer to the ethdev slot, on success. NULL on error
994 struct rte_eth_dev *rte_eth_dev_allocated(const char *name);
998 * Allocates a new ethdev slot for an ethernet device and returns the pointer
999 * to that slot for the driver to use.
1001 * @param name Unique identifier name for each Ethernet device
1003 * - Slot in the rte_dev_devices array for a new device;
1006 struct rte_eth_dev *rte_eth_dev_allocate(const char *name);
1010 * Attach to the ethdev already initialized by the primary
1013 * @param name Ethernet device's name.
1015 * - Success: Slot in the rte_dev_devices array for attached
1017 * - Error: Null pointer.
1020 struct rte_eth_dev *rte_eth_dev_attach_secondary(const char *name);
1024 * Notify RTE_ETH_EVENT_DESTROY and release the specified ethdev port.
1026 * The following PMD-managed data fields will be freed:
1030 * If one of these fields should not be freed,
1031 * it must be reset to NULL by the PMD, typically in dev_close method.
1034 * Device to be detached.
1036 * - 0 on success, negative on error
1039 int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev);
1043 * Release device queues and clear its configuration to force the user
1044 * application to reconfigure it. It is for internal use only.
1047 * Pointer to struct rte_eth_dev.
1053 void rte_eth_dev_internal_reset(struct rte_eth_dev *dev);
1056 * @internal Executes all the user application registered callbacks for
1057 * the specific device. It is for DPDK internal user only. User
1058 * application should not call it directly.
1061 * Pointer to struct rte_eth_dev.
1063 * Eth device interrupt event type.
1065 * To pass data back to user application.
1066 * This allows the user application to decide if a particular function
1067 * is permitted or not.
1073 int rte_eth_dev_callback_process(struct rte_eth_dev *dev,
1074 enum rte_eth_event_type event, void *ret_param);
1078 * This is the last step of device probing.
1079 * It must be called after a port is allocated and initialized successfully.
1081 * The notification RTE_ETH_EVENT_NEW is sent to other entities
1082 * (libraries and applications).
1083 * The state is set as RTE_ETH_DEV_ATTACHED.
1089 void rte_eth_dev_probing_finish(struct rte_eth_dev *dev);
1092 * Create memzone for HW rings.
1093 * malloc can't be used as the physical address is needed.
1094 * If the memzone is already created, then this function returns a ptr
1098 * The *eth_dev* pointer is the address of the *rte_eth_dev* structure
1100 * The name of the memory zone
1102 * The index of the queue to add to name
1104 * The sizeof of the memory area
1106 * Alignment for resulting memzone. Must be a power of 2.
1108 * The *socket_id* argument is the socket identifier in case of NUMA.
1111 const struct rte_memzone *
1112 rte_eth_dma_zone_reserve(const struct rte_eth_dev *eth_dev, const char *name,
1113 uint16_t queue_id, size_t size,
1114 unsigned align, int socket_id);
1117 * Free previously allocated memzone for HW rings.
1120 * The *eth_dev* pointer is the address of the *rte_eth_dev* structure
1122 * The name of the memory zone
1124 * The index of the queue to add to name
1126 * Negative errno value on error, 0 on success.
1130 rte_eth_dma_zone_free(const struct rte_eth_dev *eth_dev, const char *name,
1135 * Atomically set the link status for the specific device.
1136 * It is for use by DPDK device driver use only.
1137 * User applications should not call it
1140 * Pointer to struct rte_eth_dev.
1142 * New link status value.
1144 * Same convention as eth_link_update operation.
1145 * 0 if link up status has changed
1146 * -1 if link up status was unchanged
1149 rte_eth_linkstatus_set(struct rte_eth_dev *dev,
1150 const struct rte_eth_link *new_link)
1152 uint64_t *dev_link = (uint64_t *)&(dev->data->dev_link);
1155 struct rte_eth_link link;
1158 RTE_BUILD_BUG_ON(sizeof(*new_link) != sizeof(uint64_t));
1160 orig.val64 = __atomic_exchange_n(dev_link, *(const uint64_t *)new_link,
1163 return (orig.link.link_status == new_link->link_status) ? -1 : 0;
1168 * Atomically get the link speed and status.
1171 * Pointer to struct rte_eth_dev.
1173 * link status value.
1176 rte_eth_linkstatus_get(const struct rte_eth_dev *dev,
1177 struct rte_eth_link *link)
1179 uint64_t *src = (uint64_t *)&(dev->data->dev_link);
1180 uint64_t *dst = (uint64_t *)link;
1182 RTE_BUILD_BUG_ON(sizeof(*link) != sizeof(uint64_t));
1184 *dst = __atomic_load_n(src, __ATOMIC_SEQ_CST);
1188 * Allocate an unique switch domain identifier.
1190 * A pool of switch domain identifiers which can be allocated on request. This
1191 * will enabled devices which support the concept of switch domains to request
1192 * a switch domain id which is guaranteed to be unique from other devices
1193 * running in the same process.
1196 * switch domain identifier parameter to pass back to application
1199 * Negative errno value on error, 0 on success.
1203 rte_eth_switch_domain_alloc(uint16_t *domain_id);
1206 * Free switch domain.
1208 * Return a switch domain identifier to the pool of free identifiers after it is
1209 * no longer in use by device.
1212 * switch domain identifier to free
1215 * Negative errno value on error, 0 on success.
1219 rte_eth_switch_domain_free(uint16_t domain_id);
1222 * Generic Ethernet device arguments
1224 * One type of representor each structure.
1226 struct rte_eth_devargs {
1227 uint16_t mh_controllers[RTE_MAX_MULTI_HOST_CTRLS];
1228 /** controller/s number in case of multi-host */
1229 uint16_t nb_mh_controllers;
1230 /** number of controllers in multi-host controllers field */
1231 uint16_t ports[RTE_MAX_ETHPORTS];
1232 /** port/s number to enable on a multi-port single function */
1234 /** number of ports in ports field */
1235 uint16_t representor_ports[RTE_MAX_ETHPORTS];
1236 /** representor port/s identifier to enable on device */
1237 uint16_t nb_representor_ports;
1238 /** number of ports in representor port field */
1239 enum rte_eth_representor_type type; /* type of representor */
1243 * PMD helper function to get representor ID from location detail.
1245 * Get representor ID from controller, pf and (sf or vf).
1246 * The mapping is retrieved from rte_eth_representor_info_get().
1248 * For backward compatibility, if no representor info, direct
1249 * map legacy VF (no controller and pf).
1252 * Handle of ethdev port.
1256 * Controller ID, -1 if unspecified.
1258 * PF port ID, -1 if unspecified.
1259 * @param representor_port
1260 * VF or SF representor port number, -1 if unspecified.
1262 * Pointer to output representor ID.
1265 * Negative errno value on error, 0 on success.
1269 rte_eth_representor_id_get(const struct rte_eth_dev *ethdev,
1270 enum rte_eth_representor_type type,
1271 int controller, int pf, int representor_port,
1275 * PMD helper function to parse ethdev arguments
1279 * @param eth_devargs
1280 * parsed ethdev specific arguments.
1283 * Negative errno value on error, 0 on success.
1287 rte_eth_devargs_parse(const char *devargs, struct rte_eth_devargs *eth_devargs);
1290 typedef int (*ethdev_init_t)(struct rte_eth_dev *ethdev, void *init_params);
1291 typedef int (*ethdev_bus_specific_init)(struct rte_eth_dev *ethdev,
1292 void *bus_specific_init_params);
1295 * PMD helper function for the creation of a new ethdev ports.
1298 * rte_device handle.
1301 * @param priv_data_size
1302 * size of private data required for port.
1303 * @param bus_specific_init
1304 * port bus specific initialisation callback function
1305 * @param bus_init_params
1306 * port bus specific initialisation parameters
1307 * @param ethdev_init
1308 * device specific port initialization callback function
1309 * @param init_params
1310 * port initialisation parameters
1313 * Negative errno value on error, 0 on success.
1317 rte_eth_dev_create(struct rte_device *device, const char *name,
1318 size_t priv_data_size,
1319 ethdev_bus_specific_init bus_specific_init, void *bus_init_params,
1320 ethdev_init_t ethdev_init, void *init_params);
1323 typedef int (*ethdev_uninit_t)(struct rte_eth_dev *ethdev);
1326 * PMD helper function for cleaning up the resources of a ethdev port on it's
1330 * ethdev handle of port.
1331 * @param ethdev_uninit
1332 * device specific port un-initialise callback function
1335 * Negative errno value on error, 0 on success.
1339 rte_eth_dev_destroy(struct rte_eth_dev *ethdev, ethdev_uninit_t ethdev_uninit);
1343 * Pass the current hairpin queue HW and/or SW information to the peer queue
1344 * and fetch back the information of the peer queue.
1347 * Peer port identifier of the Ethernet device.
1349 * Peer queue index of the port.
1351 * Pointer to the current information structure.
1353 * Pointer to the peer information, output.
1355 * Direction to pass the information.
1356 * positive - pass Tx queue information and get peer Rx queue information
1357 * zero - pass Rx queue information and get peer Tx queue information
1360 * Negative errno value on error, 0 on success.
1364 rte_eth_hairpin_queue_peer_update(uint16_t peer_port, uint16_t peer_queue,
1365 struct rte_hairpin_peer_info *cur_info,
1366 struct rte_hairpin_peer_info *peer_info,
1367 uint32_t direction);
1371 * Configure current hairpin queue with the peer information fetched to create
1372 * the connection (bind) with peer queue in the specified direction.
1373 * This function might need to be called twice to fully create the connections.
1376 * Current port identifier of the Ethernet device.
1378 * Current queue index of the port.
1380 * Pointer to the peer information, input.
1382 * Direction to create the connection.
1383 * positive - bind current Tx queue to peer Rx queue
1384 * zero - bind current Rx queue to peer Tx queue
1387 * Negative errno value on error, 0 on success.
1391 rte_eth_hairpin_queue_peer_bind(uint16_t cur_port, uint16_t cur_queue,
1392 struct rte_hairpin_peer_info *peer_info,
1393 uint32_t direction);
1397 * Reset the current queue state and configuration to disconnect (unbind) it
1398 * from the peer queue.
1399 * This function might need to be called twice to disconnect each other.
1402 * Current port identifier of the Ethernet device.
1404 * Current queue index of the port.
1406 * Direction to destroy the connection.
1407 * positive - unbind current Tx queue from peer Rx queue
1408 * zero - unbind current Rx queue from peer Tx queue
1411 * Negative errno value on error, 0 on success.
1415 rte_eth_hairpin_queue_peer_unbind(uint16_t cur_port, uint16_t cur_queue,
1416 uint32_t direction);
1420 * Legacy ethdev API used internally by drivers.
1423 enum rte_filter_type {
1424 RTE_ETH_FILTER_NONE = 0,
1425 RTE_ETH_FILTER_ETHERTYPE,
1426 RTE_ETH_FILTER_FLEXIBLE,
1428 RTE_ETH_FILTER_NTUPLE,
1429 RTE_ETH_FILTER_TUNNEL,
1430 RTE_ETH_FILTER_FDIR,
1431 RTE_ETH_FILTER_HASH,
1432 RTE_ETH_FILTER_L2_TUNNEL,
1436 * Define all structures for Ethertype Filter type.
1439 #define RTE_ETHTYPE_FLAGS_MAC 0x0001 /**< If set, compare mac */
1440 #define RTE_ETHTYPE_FLAGS_DROP 0x0002 /**< If set, drop packet when match */
1443 * A structure used to define the ethertype filter entry
1444 * to support RTE_ETH_FILTER_ETHERTYPE data representation.
1446 struct rte_eth_ethertype_filter {
1447 struct rte_ether_addr mac_addr; /**< Mac address to match. */
1448 uint16_t ether_type; /**< Ether type to match */
1449 uint16_t flags; /**< Flags from RTE_ETHTYPE_FLAGS_* */
1450 uint16_t queue; /**< Queue assigned to when match*/
1454 * A structure used to define the TCP syn filter entry
1455 * to support RTE_ETH_FILTER_SYN data representation.
1457 struct rte_eth_syn_filter {
1458 /** 1 - higher priority than other filters, 0 - lower priority. */
1460 uint16_t queue; /**< Queue assigned to when match */
1464 * filter type of tunneling packet
1466 #define ETH_TUNNEL_FILTER_OMAC 0x01 /**< filter by outer MAC addr */
1467 #define ETH_TUNNEL_FILTER_OIP 0x02 /**< filter by outer IP Addr */
1468 #define ETH_TUNNEL_FILTER_TENID 0x04 /**< filter by tenant ID */
1469 #define ETH_TUNNEL_FILTER_IMAC 0x08 /**< filter by inner MAC addr */
1470 #define ETH_TUNNEL_FILTER_IVLAN 0x10 /**< filter by inner VLAN ID */
1471 #define ETH_TUNNEL_FILTER_IIP 0x20 /**< filter by inner IP addr */
1473 #define RTE_TUNNEL_FILTER_IMAC_IVLAN (ETH_TUNNEL_FILTER_IMAC | \
1474 ETH_TUNNEL_FILTER_IVLAN)
1475 #define RTE_TUNNEL_FILTER_IMAC_IVLAN_TENID (ETH_TUNNEL_FILTER_IMAC | \
1476 ETH_TUNNEL_FILTER_IVLAN | \
1477 ETH_TUNNEL_FILTER_TENID)
1478 #define RTE_TUNNEL_FILTER_IMAC_TENID (ETH_TUNNEL_FILTER_IMAC | \
1479 ETH_TUNNEL_FILTER_TENID)
1480 #define RTE_TUNNEL_FILTER_OMAC_TENID_IMAC (ETH_TUNNEL_FILTER_OMAC | \
1481 ETH_TUNNEL_FILTER_TENID | \
1482 ETH_TUNNEL_FILTER_IMAC)
1485 * Select IPv4 or IPv6 for tunnel filters.
1487 enum rte_tunnel_iptype {
1488 RTE_TUNNEL_IPTYPE_IPV4 = 0, /**< IPv4. */
1489 RTE_TUNNEL_IPTYPE_IPV6, /**< IPv6. */
1493 * Tunneling Packet filter configuration.
1495 struct rte_eth_tunnel_filter_conf {
1496 struct rte_ether_addr outer_mac; /**< Outer MAC address to match. */
1497 struct rte_ether_addr inner_mac; /**< Inner MAC address to match. */
1498 uint16_t inner_vlan; /**< Inner VLAN to match. */
1499 enum rte_tunnel_iptype ip_type; /**< IP address type. */
1501 * Outer destination IP address to match if ETH_TUNNEL_FILTER_OIP
1502 * is set in filter_type, or inner destination IP address to match
1503 * if ETH_TUNNEL_FILTER_IIP is set in filter_type.
1506 uint32_t ipv4_addr; /**< IPv4 address in big endian. */
1507 uint32_t ipv6_addr[4]; /**< IPv6 address in big endian. */
1509 /** Flags from ETH_TUNNEL_FILTER_XX - see above. */
1510 uint16_t filter_type;
1511 enum rte_eth_tunnel_type tunnel_type; /**< Tunnel Type. */
1512 uint32_t tenant_id; /**< Tenant ID to match. VNI, GRE key... */
1513 uint16_t queue_id; /**< Queue assigned to if match. */
1520 #endif /* _RTE_ETHDEV_DRIVER_H_ */