DPDK  18.11.6
rte_ethdev.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2010-2017 Intel Corporation
3  */
4 
5 #ifndef _RTE_ETHDEV_H_
6 #define _RTE_ETHDEV_H_
7 
140 #ifdef __cplusplus
141 extern "C" {
142 #endif
143 
144 #include <stdint.h>
145 
146 /* Use this macro to check if LRO API is supported */
147 #define RTE_ETHDEV_HAS_LRO_SUPPORT
148 
149 #include <rte_compat.h>
150 #include <rte_log.h>
151 #include <rte_interrupts.h>
152 #include <rte_dev.h>
153 #include <rte_devargs.h>
154 #include <rte_errno.h>
155 #include <rte_common.h>
156 #include <rte_config.h>
157 #include <rte_ether.h>
158 
159 #include "rte_eth_ctrl.h"
160 #include "rte_dev_info.h"
161 
162 extern int rte_eth_dev_logtype;
163 
164 #define RTE_ETHDEV_LOG(level, ...) \
165  rte_log(RTE_LOG_ ## level, rte_eth_dev_logtype, "" __VA_ARGS__)
166 
167 struct rte_mbuf;
168 
185 int rte_eth_iterator_init(struct rte_dev_iterator *iter, const char *devargs);
186 
201 uint16_t rte_eth_iterator_next(struct rte_dev_iterator *iter);
202 
215 void rte_eth_iterator_cleanup(struct rte_dev_iterator *iter);
216 
230 #define RTE_ETH_FOREACH_MATCHING_DEV(id, devargs, iter) \
231  for (rte_eth_iterator_init(iter, devargs), \
232  id = rte_eth_iterator_next(iter); \
233  id != RTE_MAX_ETHPORTS; \
234  id = rte_eth_iterator_next(iter))
235 
243  uint64_t ipackets;
244  uint64_t opackets;
245  uint64_t ibytes;
246  uint64_t obytes;
247  uint64_t imissed;
251  uint64_t ierrors;
252  uint64_t oerrors;
253  uint64_t rx_nombuf;
254  uint64_t q_ipackets[RTE_ETHDEV_QUEUE_STAT_CNTRS];
256  uint64_t q_opackets[RTE_ETHDEV_QUEUE_STAT_CNTRS];
258  uint64_t q_ibytes[RTE_ETHDEV_QUEUE_STAT_CNTRS];
260  uint64_t q_obytes[RTE_ETHDEV_QUEUE_STAT_CNTRS];
262  uint64_t q_errors[RTE_ETHDEV_QUEUE_STAT_CNTRS];
264 };
265 
269 #define ETH_LINK_SPEED_AUTONEG (0 << 0)
270 #define ETH_LINK_SPEED_FIXED (1 << 0)
271 #define ETH_LINK_SPEED_10M_HD (1 << 1)
272 #define ETH_LINK_SPEED_10M (1 << 2)
273 #define ETH_LINK_SPEED_100M_HD (1 << 3)
274 #define ETH_LINK_SPEED_100M (1 << 4)
275 #define ETH_LINK_SPEED_1G (1 << 5)
276 #define ETH_LINK_SPEED_2_5G (1 << 6)
277 #define ETH_LINK_SPEED_5G (1 << 7)
278 #define ETH_LINK_SPEED_10G (1 << 8)
279 #define ETH_LINK_SPEED_20G (1 << 9)
280 #define ETH_LINK_SPEED_25G (1 << 10)
281 #define ETH_LINK_SPEED_40G (1 << 11)
282 #define ETH_LINK_SPEED_50G (1 << 12)
283 #define ETH_LINK_SPEED_56G (1 << 13)
284 #define ETH_LINK_SPEED_100G (1 << 14)
289 #define ETH_SPEED_NUM_NONE 0
290 #define ETH_SPEED_NUM_10M 10
291 #define ETH_SPEED_NUM_100M 100
292 #define ETH_SPEED_NUM_1G 1000
293 #define ETH_SPEED_NUM_2_5G 2500
294 #define ETH_SPEED_NUM_5G 5000
295 #define ETH_SPEED_NUM_10G 10000
296 #define ETH_SPEED_NUM_20G 20000
297 #define ETH_SPEED_NUM_25G 25000
298 #define ETH_SPEED_NUM_40G 40000
299 #define ETH_SPEED_NUM_50G 50000
300 #define ETH_SPEED_NUM_56G 56000
301 #define ETH_SPEED_NUM_100G 100000
306 __extension__
307 struct rte_eth_link {
308  uint32_t link_speed;
309  uint16_t link_duplex : 1;
310  uint16_t link_autoneg : 1;
311  uint16_t link_status : 1;
312 } __attribute__((aligned(8)));
314 /* Utility constants */
315 #define ETH_LINK_HALF_DUPLEX 0
316 #define ETH_LINK_FULL_DUPLEX 1
317 #define ETH_LINK_DOWN 0
318 #define ETH_LINK_UP 1
319 #define ETH_LINK_FIXED 0
320 #define ETH_LINK_AUTONEG 1
326 struct rte_eth_thresh {
327  uint8_t pthresh;
328  uint8_t hthresh;
329  uint8_t wthresh;
330 };
331 
335 #define ETH_MQ_RX_RSS_FLAG 0x1
336 #define ETH_MQ_RX_DCB_FLAG 0x2
337 #define ETH_MQ_RX_VMDQ_FLAG 0x4
338 
346 
350  ETH_MQ_RX_DCB = ETH_MQ_RX_DCB_FLAG,
352  ETH_MQ_RX_DCB_RSS = ETH_MQ_RX_RSS_FLAG | ETH_MQ_RX_DCB_FLAG,
353 
355  ETH_MQ_RX_VMDQ_ONLY = ETH_MQ_RX_VMDQ_FLAG,
357  ETH_MQ_RX_VMDQ_RSS = ETH_MQ_RX_RSS_FLAG | ETH_MQ_RX_VMDQ_FLAG,
359  ETH_MQ_RX_VMDQ_DCB = ETH_MQ_RX_VMDQ_FLAG | ETH_MQ_RX_DCB_FLAG,
362  ETH_MQ_RX_VMDQ_FLAG,
363 };
364 
368 #define ETH_RSS ETH_MQ_RX_RSS
369 #define VMDQ_DCB ETH_MQ_RX_VMDQ_DCB
370 #define ETH_DCB_RX ETH_MQ_RX_DCB
371 
381 };
382 
386 #define ETH_DCB_NONE ETH_MQ_TX_NONE
387 #define ETH_VMDQ_DCB_TX ETH_MQ_TX_VMDQ_DCB
388 #define ETH_DCB_TX ETH_MQ_TX_DCB
389 
396  uint32_t max_rx_pkt_len;
397  uint16_t split_hdr_size;
403  uint64_t offloads;
404 };
405 
411  ETH_VLAN_TYPE_UNKNOWN = 0,
414  ETH_VLAN_TYPE_MAX,
415 };
416 
422  uint64_t ids[64];
423 };
424 
443  uint8_t *rss_key;
444  uint8_t rss_key_len;
445  uint64_t rss_hf;
446 };
447 
448 /*
449  * The RSS offload types are defined based on flow types which are defined
450  * in rte_eth_ctrl.h. Different NIC hardwares may support different RSS offload
451  * types. The supported flow types or RSS offload types can be queried by
452  * rte_eth_dev_info_get().
453  */
454 #define ETH_RSS_IPV4 (1ULL << RTE_ETH_FLOW_IPV4)
455 #define ETH_RSS_FRAG_IPV4 (1ULL << RTE_ETH_FLOW_FRAG_IPV4)
456 #define ETH_RSS_NONFRAG_IPV4_TCP (1ULL << RTE_ETH_FLOW_NONFRAG_IPV4_TCP)
457 #define ETH_RSS_NONFRAG_IPV4_UDP (1ULL << RTE_ETH_FLOW_NONFRAG_IPV4_UDP)
458 #define ETH_RSS_NONFRAG_IPV4_SCTP (1ULL << RTE_ETH_FLOW_NONFRAG_IPV4_SCTP)
459 #define ETH_RSS_NONFRAG_IPV4_OTHER (1ULL << RTE_ETH_FLOW_NONFRAG_IPV4_OTHER)
460 #define ETH_RSS_IPV6 (1ULL << RTE_ETH_FLOW_IPV6)
461 #define ETH_RSS_FRAG_IPV6 (1ULL << RTE_ETH_FLOW_FRAG_IPV6)
462 #define ETH_RSS_NONFRAG_IPV6_TCP (1ULL << RTE_ETH_FLOW_NONFRAG_IPV6_TCP)
463 #define ETH_RSS_NONFRAG_IPV6_UDP (1ULL << RTE_ETH_FLOW_NONFRAG_IPV6_UDP)
464 #define ETH_RSS_NONFRAG_IPV6_SCTP (1ULL << RTE_ETH_FLOW_NONFRAG_IPV6_SCTP)
465 #define ETH_RSS_NONFRAG_IPV6_OTHER (1ULL << RTE_ETH_FLOW_NONFRAG_IPV6_OTHER)
466 #define ETH_RSS_L2_PAYLOAD (1ULL << RTE_ETH_FLOW_L2_PAYLOAD)
467 #define ETH_RSS_IPV6_EX (1ULL << RTE_ETH_FLOW_IPV6_EX)
468 #define ETH_RSS_IPV6_TCP_EX (1ULL << RTE_ETH_FLOW_IPV6_TCP_EX)
469 #define ETH_RSS_IPV6_UDP_EX (1ULL << RTE_ETH_FLOW_IPV6_UDP_EX)
470 #define ETH_RSS_PORT (1ULL << RTE_ETH_FLOW_PORT)
471 #define ETH_RSS_VXLAN (1ULL << RTE_ETH_FLOW_VXLAN)
472 #define ETH_RSS_GENEVE (1ULL << RTE_ETH_FLOW_GENEVE)
473 #define ETH_RSS_NVGRE (1ULL << RTE_ETH_FLOW_NVGRE)
474 
475 #define ETH_RSS_IP ( \
476  ETH_RSS_IPV4 | \
477  ETH_RSS_FRAG_IPV4 | \
478  ETH_RSS_NONFRAG_IPV4_OTHER | \
479  ETH_RSS_IPV6 | \
480  ETH_RSS_FRAG_IPV6 | \
481  ETH_RSS_NONFRAG_IPV6_OTHER | \
482  ETH_RSS_IPV6_EX)
483 
484 #define ETH_RSS_UDP ( \
485  ETH_RSS_NONFRAG_IPV4_UDP | \
486  ETH_RSS_NONFRAG_IPV6_UDP | \
487  ETH_RSS_IPV6_UDP_EX)
488 
489 #define ETH_RSS_TCP ( \
490  ETH_RSS_NONFRAG_IPV4_TCP | \
491  ETH_RSS_NONFRAG_IPV6_TCP | \
492  ETH_RSS_IPV6_TCP_EX)
493 
494 #define ETH_RSS_SCTP ( \
495  ETH_RSS_NONFRAG_IPV4_SCTP | \
496  ETH_RSS_NONFRAG_IPV6_SCTP)
497 
498 #define ETH_RSS_TUNNEL ( \
499  ETH_RSS_VXLAN | \
500  ETH_RSS_GENEVE | \
501  ETH_RSS_NVGRE)
502 
504 #define ETH_RSS_PROTO_MASK ( \
505  ETH_RSS_IPV4 | \
506  ETH_RSS_FRAG_IPV4 | \
507  ETH_RSS_NONFRAG_IPV4_TCP | \
508  ETH_RSS_NONFRAG_IPV4_UDP | \
509  ETH_RSS_NONFRAG_IPV4_SCTP | \
510  ETH_RSS_NONFRAG_IPV4_OTHER | \
511  ETH_RSS_IPV6 | \
512  ETH_RSS_FRAG_IPV6 | \
513  ETH_RSS_NONFRAG_IPV6_TCP | \
514  ETH_RSS_NONFRAG_IPV6_UDP | \
515  ETH_RSS_NONFRAG_IPV6_SCTP | \
516  ETH_RSS_NONFRAG_IPV6_OTHER | \
517  ETH_RSS_L2_PAYLOAD | \
518  ETH_RSS_IPV6_EX | \
519  ETH_RSS_IPV6_TCP_EX | \
520  ETH_RSS_IPV6_UDP_EX | \
521  ETH_RSS_PORT | \
522  ETH_RSS_VXLAN | \
523  ETH_RSS_GENEVE | \
524  ETH_RSS_NVGRE)
525 
526 /*
527  * Definitions used for redirection table entry size.
528  * Some RSS RETA sizes may not be supported by some drivers, check the
529  * documentation or the description of relevant functions for more details.
530  */
531 #define ETH_RSS_RETA_SIZE_64 64
532 #define ETH_RSS_RETA_SIZE_128 128
533 #define ETH_RSS_RETA_SIZE_256 256
534 #define ETH_RSS_RETA_SIZE_512 512
535 #define RTE_RETA_GROUP_SIZE 64
536 
537 /* Definitions used for VMDQ and DCB functionality */
538 #define ETH_VMDQ_MAX_VLAN_FILTERS 64
539 #define ETH_DCB_NUM_USER_PRIORITIES 8
540 #define ETH_VMDQ_DCB_NUM_QUEUES 128
541 #define ETH_DCB_NUM_QUEUES 128
543 /* DCB capability defines */
544 #define ETH_DCB_PG_SUPPORT 0x00000001
545 #define ETH_DCB_PFC_SUPPORT 0x00000002
547 /* Definitions used for VLAN Offload functionality */
548 #define ETH_VLAN_STRIP_OFFLOAD 0x0001
549 #define ETH_VLAN_FILTER_OFFLOAD 0x0002
550 #define ETH_VLAN_EXTEND_OFFLOAD 0x0004
552 /* Definitions used for mask VLAN setting */
553 #define ETH_VLAN_STRIP_MASK 0x0001
554 #define ETH_VLAN_FILTER_MASK 0x0002
555 #define ETH_VLAN_EXTEND_MASK 0x0004
556 #define ETH_VLAN_ID_MAX 0x0FFF
558 /* Definitions used for receive MAC address */
559 #define ETH_NUM_RECEIVE_MAC_ADDR 128
561 /* Definitions used for unicast hash */
562 #define ETH_VMDQ_NUM_UC_HASH_ARRAY 128
564 /* Definitions used for VMDQ pool rx mode setting */
565 #define ETH_VMDQ_ACCEPT_UNTAG 0x0001
566 #define ETH_VMDQ_ACCEPT_HASH_MC 0x0002
567 #define ETH_VMDQ_ACCEPT_HASH_UC 0x0004
568 #define ETH_VMDQ_ACCEPT_BROADCAST 0x0008
569 #define ETH_VMDQ_ACCEPT_MULTICAST 0x0010
572 #define ETH_MIRROR_MAX_VLANS 64
573 
574 #define ETH_MIRROR_VIRTUAL_POOL_UP 0x01
575 #define ETH_MIRROR_UPLINK_PORT 0x02
576 #define ETH_MIRROR_DOWNLINK_PORT 0x04
577 #define ETH_MIRROR_VLAN 0x08
578 #define ETH_MIRROR_VIRTUAL_POOL_DOWN 0x10
583 struct rte_eth_vlan_mirror {
584  uint64_t vlan_mask;
586  uint16_t vlan_id[ETH_MIRROR_MAX_VLANS];
587 };
588 
593  uint8_t rule_type;
594  uint8_t dst_pool;
595  uint64_t pool_mask;
598 };
599 
607  uint64_t mask;
609  uint16_t reta[RTE_RETA_GROUP_SIZE];
611 };
612 
618  ETH_4_TCS = 4,
620 };
621 
631 };
632 
633 /* This structure may be extended in future. */
634 struct rte_eth_dcb_rx_conf {
635  enum rte_eth_nb_tcs nb_tcs;
637  uint8_t dcb_tc[ETH_DCB_NUM_USER_PRIORITIES];
638 };
639 
640 struct rte_eth_vmdq_dcb_tx_conf {
641  enum rte_eth_nb_pools nb_queue_pools;
643  uint8_t dcb_tc[ETH_DCB_NUM_USER_PRIORITIES];
644 };
645 
646 struct rte_eth_dcb_tx_conf {
647  enum rte_eth_nb_tcs nb_tcs;
649  uint8_t dcb_tc[ETH_DCB_NUM_USER_PRIORITIES];
650 };
651 
652 struct rte_eth_vmdq_tx_conf {
653  enum rte_eth_nb_pools nb_queue_pools;
654 };
655 
670  uint8_t default_pool;
671  uint8_t nb_pool_maps;
672  struct {
673  uint16_t vlan_id;
674  uint64_t pools;
678 };
679 
701  uint8_t default_pool;
703  uint8_t nb_pool_maps;
704  uint32_t rx_mode;
705  struct {
706  uint16_t vlan_id;
707  uint64_t pools;
709 };
710 
721  uint64_t offloads;
722 
723  /* For i40e specifically */
724  uint16_t pvid;
725  __extension__
726  uint8_t hw_vlan_reject_tagged : 1,
732 };
733 
739  uint16_t rx_free_thresh;
740  uint8_t rx_drop_en;
747  uint64_t offloads;
748 };
749 
755  uint16_t tx_rs_thresh;
756  uint16_t tx_free_thresh;
765  uint64_t offloads;
766 };
767 
772  uint16_t nb_max;
773  uint16_t nb_min;
774  uint16_t nb_align;
784  uint16_t nb_seg_max;
785 
797  uint16_t nb_mtu_seg_max;
798 };
799 
808 };
809 
816  uint32_t high_water;
817  uint32_t low_water;
818  uint16_t pause_time;
819  uint16_t send_xon;
822  uint8_t autoneg;
823 };
824 
832  uint8_t priority;
833 };
834 
843 };
844 
852 };
853 
865  uint8_t drop_queue;
866  struct rte_eth_fdir_masks mask;
869 };
870 
879  uint16_t udp_port;
880  uint8_t prot_type;
881 };
882 
888  uint32_t lsc:1;
890  uint32_t rxq:1;
892  uint32_t rmv:1;
893 };
894 
900 struct rte_eth_conf {
901  uint32_t link_speeds;
910  uint32_t lpbk_mode;
915  struct {
919  struct rte_eth_dcb_rx_conf dcb_rx_conf;
923  } rx_adv_conf;
924  union {
925  struct rte_eth_vmdq_dcb_tx_conf vmdq_dcb_tx_conf;
927  struct rte_eth_dcb_tx_conf dcb_tx_conf;
929  struct rte_eth_vmdq_tx_conf vmdq_tx_conf;
931  } tx_adv_conf;
937 };
938 
942 #define DEV_RX_OFFLOAD_VLAN_STRIP 0x00000001
943 #define DEV_RX_OFFLOAD_IPV4_CKSUM 0x00000002
944 #define DEV_RX_OFFLOAD_UDP_CKSUM 0x00000004
945 #define DEV_RX_OFFLOAD_TCP_CKSUM 0x00000008
946 #define DEV_RX_OFFLOAD_TCP_LRO 0x00000010
947 #define DEV_RX_OFFLOAD_QINQ_STRIP 0x00000020
948 #define DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM 0x00000040
949 #define DEV_RX_OFFLOAD_MACSEC_STRIP 0x00000080
950 #define DEV_RX_OFFLOAD_HEADER_SPLIT 0x00000100
951 #define DEV_RX_OFFLOAD_VLAN_FILTER 0x00000200
952 #define DEV_RX_OFFLOAD_VLAN_EXTEND 0x00000400
953 #define DEV_RX_OFFLOAD_JUMBO_FRAME 0x00000800
954 #define DEV_RX_OFFLOAD_SCATTER 0x00002000
955 #define DEV_RX_OFFLOAD_TIMESTAMP 0x00004000
956 #define DEV_RX_OFFLOAD_SECURITY 0x00008000
957 #define DEV_RX_OFFLOAD_KEEP_CRC 0x00010000
958 #define DEV_RX_OFFLOAD_SCTP_CKSUM 0x00020000
959 #define DEV_RX_OFFLOAD_OUTER_UDP_CKSUM 0x00040000
960 
961 #define DEV_RX_OFFLOAD_CHECKSUM (DEV_RX_OFFLOAD_IPV4_CKSUM | \
962  DEV_RX_OFFLOAD_UDP_CKSUM | \
963  DEV_RX_OFFLOAD_TCP_CKSUM)
964 #define DEV_RX_OFFLOAD_VLAN (DEV_RX_OFFLOAD_VLAN_STRIP | \
965  DEV_RX_OFFLOAD_VLAN_FILTER | \
966  DEV_RX_OFFLOAD_VLAN_EXTEND)
967 
968 /*
969  * If new Rx offload capabilities are defined, they also must be
970  * mentioned in rte_rx_offload_names in rte_ethdev.c file.
971  */
972 
976 #define DEV_TX_OFFLOAD_VLAN_INSERT 0x00000001
977 #define DEV_TX_OFFLOAD_IPV4_CKSUM 0x00000002
978 #define DEV_TX_OFFLOAD_UDP_CKSUM 0x00000004
979 #define DEV_TX_OFFLOAD_TCP_CKSUM 0x00000008
980 #define DEV_TX_OFFLOAD_SCTP_CKSUM 0x00000010
981 #define DEV_TX_OFFLOAD_TCP_TSO 0x00000020
982 #define DEV_TX_OFFLOAD_UDP_TSO 0x00000040
983 #define DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM 0x00000080
984 #define DEV_TX_OFFLOAD_QINQ_INSERT 0x00000100
985 #define DEV_TX_OFFLOAD_VXLAN_TNL_TSO 0x00000200
986 #define DEV_TX_OFFLOAD_GRE_TNL_TSO 0x00000400
987 #define DEV_TX_OFFLOAD_IPIP_TNL_TSO 0x00000800
988 #define DEV_TX_OFFLOAD_GENEVE_TNL_TSO 0x00001000
989 #define DEV_TX_OFFLOAD_MACSEC_INSERT 0x00002000
990 #define DEV_TX_OFFLOAD_MT_LOCKFREE 0x00004000
991 
994 #define DEV_TX_OFFLOAD_MULTI_SEGS 0x00008000
995 
996 #define DEV_TX_OFFLOAD_MBUF_FAST_FREE 0x00010000
997 
1001 #define DEV_TX_OFFLOAD_SECURITY 0x00020000
1002 
1007 #define DEV_TX_OFFLOAD_UDP_TNL_TSO 0x00040000
1008 
1013 #define DEV_TX_OFFLOAD_IP_TNL_TSO 0x00080000
1014 
1015 #define DEV_TX_OFFLOAD_OUTER_UDP_CKSUM 0x00100000
1016 
1020 #define DEV_TX_OFFLOAD_MATCH_METADATA 0x00200000
1021 
1022 #define RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP 0x00000001
1023 
1024 #define RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP 0x00000002
1025 
1027 /*
1028  * If new Tx offload capabilities are defined, they also must be
1029  * mentioned in rte_tx_offload_names in rte_ethdev.c file.
1030  */
1031 
1032 /*
1033  * Fallback default preferred Rx/Tx port parameters.
1034  * These are used if an application requests default parameters
1035  * but the PMD does not provide preferred values.
1036  */
1037 #define RTE_ETH_DEV_FALLBACK_RX_RINGSIZE 512
1038 #define RTE_ETH_DEV_FALLBACK_TX_RINGSIZE 512
1039 #define RTE_ETH_DEV_FALLBACK_RX_NBQUEUES 1
1040 #define RTE_ETH_DEV_FALLBACK_TX_NBQUEUES 1
1041 
1048  uint16_t burst_size;
1049  uint16_t ring_size;
1050  uint16_t nb_queues;
1051 };
1052 
1057 #define RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID (0)
1058 
1063  const char *name;
1064  uint16_t domain_id;
1065  uint16_t port_id;
1073 };
1074 
1085  struct rte_device *device;
1086  const char *driver_name;
1087  unsigned int if_index;
1089  const uint32_t *dev_flags;
1090  uint32_t min_rx_bufsize;
1091  uint32_t max_rx_pktlen;
1092  uint16_t max_rx_queues;
1093  uint16_t max_tx_queues;
1094  uint32_t max_mac_addrs;
1095  uint32_t max_hash_mac_addrs;
1097  uint16_t max_vfs;
1098  uint16_t max_vmdq_pools;
1107  uint16_t reta_size;
1109  uint8_t hash_key_size;
1114  uint16_t vmdq_queue_base;
1115  uint16_t vmdq_queue_num;
1116  uint16_t vmdq_pool_base;
1119  uint32_t speed_capa;
1121  uint16_t nb_rx_queues;
1122  uint16_t nb_tx_queues;
1128  uint64_t dev_capa;
1134 };
1135 
1141  struct rte_mempool *mp;
1143  uint8_t scattered_rx;
1144  uint16_t nb_desc;
1146 
1153  uint16_t nb_desc;
1155 
1157 #define RTE_ETH_XSTATS_NAME_SIZE 64
1158 
1169  uint64_t id;
1170  uint64_t value;
1171 };
1172 
1182 };
1183 
1184 #define ETH_DCB_NUM_TCS 8
1185 #define ETH_MAX_VMDQ_POOL 64
1186 
1193  struct {
1194  uint8_t base;
1195  uint8_t nb_queue;
1196  } tc_rxq[ETH_MAX_VMDQ_POOL][ETH_DCB_NUM_TCS];
1198  struct {
1199  uint8_t base;
1200  uint8_t nb_queue;
1201  } tc_txq[ETH_MAX_VMDQ_POOL][ETH_DCB_NUM_TCS];
1202 };
1203 
1209  uint8_t nb_tcs;
1211  uint8_t tc_bws[ETH_DCB_NUM_TCS];
1214 };
1215 
1219 #define RTE_ETH_QUEUE_STATE_STOPPED 0
1220 #define RTE_ETH_QUEUE_STATE_STARTED 1
1221 
1222 #define RTE_ETH_ALL RTE_MAX_ETHPORTS
1223 
1224 /* Macros to check for valid port */
1225 #define RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, retval) do { \
1226  if (!rte_eth_dev_is_valid_port(port_id)) { \
1227  RTE_ETHDEV_LOG(ERR, "Invalid port_id=%u\n", port_id); \
1228  return retval; \
1229  } \
1230 } while (0)
1231 
1232 #define RTE_ETH_VALID_PORTID_OR_RET(port_id) do { \
1233  if (!rte_eth_dev_is_valid_port(port_id)) { \
1234  RTE_ETHDEV_LOG(ERR, "Invalid port_id=%u\n", port_id); \
1235  return; \
1236  } \
1237 } while (0)
1238 
1244 #define ETH_L2_TUNNEL_ENABLE_MASK 0x00000001
1245 
1246 #define ETH_L2_TUNNEL_INSERTION_MASK 0x00000002
1247 
1248 #define ETH_L2_TUNNEL_STRIPPING_MASK 0x00000004
1249 
1250 #define ETH_L2_TUNNEL_FORWARDING_MASK 0x00000008
1251 
1274 typedef uint16_t (*rte_rx_callback_fn)(uint16_t port_id, uint16_t queue,
1275  struct rte_mbuf *pkts[], uint16_t nb_pkts, uint16_t max_pkts,
1276  void *user_param);
1277 
1298 typedef uint16_t (*rte_tx_callback_fn)(uint16_t port_id, uint16_t queue,
1299  struct rte_mbuf *pkts[], uint16_t nb_pkts, void *user_param);
1300 
1311 };
1312 
1313 struct rte_eth_dev_sriov {
1314  uint8_t active;
1315  uint8_t nb_q_per_pool;
1316  uint16_t def_vmdq_idx;
1317  uint16_t def_pool_q_idx;
1318 };
1319 #define RTE_ETH_DEV_SRIOV(dev) ((dev)->data->sriov)
1320 
1321 #define RTE_ETH_NAME_MAX_LEN RTE_DEV_NAME_MAX_LEN
1322 
1323 #define RTE_ETH_DEV_NO_OWNER 0
1324 
1325 #define RTE_ETH_MAX_OWNER_NAME_LEN 64
1326 
1327 struct rte_eth_dev_owner {
1328  uint64_t id;
1329  char name[RTE_ETH_MAX_OWNER_NAME_LEN];
1330 };
1331 
1336 #define RTE_ETH_DEV_CLOSE_REMOVE 0x0001
1337 
1338 #define RTE_ETH_DEV_INTR_LSC 0x0002
1339 
1340 #define RTE_ETH_DEV_BONDED_SLAVE 0x0004
1341 
1342 #define RTE_ETH_DEV_INTR_RMV 0x0008
1343 
1344 #define RTE_ETH_DEV_REPRESENTOR 0x0010
1345 
1346 #define RTE_ETH_DEV_NOLIVE_MAC_ADDR 0x0020
1347 
1359 uint64_t rte_eth_find_next_owned_by(uint16_t port_id,
1360  const uint64_t owner_id);
1361 
1365 #define RTE_ETH_FOREACH_DEV_OWNED_BY(p, o) \
1366  for (p = rte_eth_find_next_owned_by(0, o); \
1367  (unsigned int)p < (unsigned int)RTE_MAX_ETHPORTS; \
1368  p = rte_eth_find_next_owned_by(p + 1, o))
1369 
1378 uint16_t rte_eth_find_next(uint16_t port_id);
1379 
1383 #define RTE_ETH_FOREACH_DEV(p) \
1384  RTE_ETH_FOREACH_DEV_OWNED_BY(p, RTE_ETH_DEV_NO_OWNER)
1385 
1386 
1400 int __rte_experimental rte_eth_dev_owner_new(uint64_t *owner_id);
1401 
1415 int __rte_experimental rte_eth_dev_owner_set(const uint16_t port_id,
1416  const struct rte_eth_dev_owner *owner);
1417 
1431 int __rte_experimental rte_eth_dev_owner_unset(const uint16_t port_id,
1432  const uint64_t owner_id);
1433 
1443 void __rte_experimental rte_eth_dev_owner_delete(const uint64_t owner_id);
1444 
1458 int __rte_experimental rte_eth_dev_owner_get(const uint16_t port_id,
1459  struct rte_eth_dev_owner *owner);
1460 
1473 __rte_deprecated
1474 uint16_t rte_eth_dev_count(void);
1475 
1486 uint16_t rte_eth_dev_count_avail(void);
1487 
1496 uint16_t __rte_experimental rte_eth_dev_count_total(void);
1497 
1509 uint32_t rte_eth_speed_bitflag(uint32_t speed, int duplex);
1510 
1519 const char *rte_eth_dev_rx_offload_name(uint64_t offload);
1520 
1529 const char *rte_eth_dev_tx_offload_name(uint64_t offload);
1530 
1570 int rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_queue,
1571  uint16_t nb_tx_queue, const struct rte_eth_conf *eth_conf);
1572 
1584 int __rte_experimental
1585 rte_eth_dev_is_removed(uint16_t port_id);
1586 
1636 int rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
1637  uint16_t nb_rx_desc, unsigned int socket_id,
1638  const struct rte_eth_rxconf *rx_conf,
1639  struct rte_mempool *mb_pool);
1640 
1689 int rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
1690  uint16_t nb_tx_desc, unsigned int socket_id,
1691  const struct rte_eth_txconf *tx_conf);
1692 
1703 int rte_eth_dev_socket_id(uint16_t port_id);
1704 
1714 int rte_eth_dev_is_valid_port(uint16_t port_id);
1715 
1732 int rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t rx_queue_id);
1733 
1749 int rte_eth_dev_rx_queue_stop(uint16_t port_id, uint16_t rx_queue_id);
1750 
1767 int rte_eth_dev_tx_queue_start(uint16_t port_id, uint16_t tx_queue_id);
1768 
1784 int rte_eth_dev_tx_queue_stop(uint16_t port_id, uint16_t tx_queue_id);
1785 
1805 int rte_eth_dev_start(uint16_t port_id);
1806 
1814 void rte_eth_dev_stop(uint16_t port_id);
1815 
1828 int rte_eth_dev_set_link_up(uint16_t port_id);
1829 
1839 int rte_eth_dev_set_link_down(uint16_t port_id);
1840 
1849 void rte_eth_dev_close(uint16_t port_id);
1850 
1888 int rte_eth_dev_reset(uint16_t port_id);
1889 
1896 void rte_eth_promiscuous_enable(uint16_t port_id);
1897 
1904 void rte_eth_promiscuous_disable(uint16_t port_id);
1905 
1916 int rte_eth_promiscuous_get(uint16_t port_id);
1917 
1924 void rte_eth_allmulticast_enable(uint16_t port_id);
1925 
1932 void rte_eth_allmulticast_disable(uint16_t port_id);
1933 
1944 int rte_eth_allmulticast_get(uint16_t port_id);
1945 
1957 void rte_eth_link_get(uint16_t port_id, struct rte_eth_link *link);
1958 
1970 void rte_eth_link_get_nowait(uint16_t port_id, struct rte_eth_link *link);
1971 
1989 int rte_eth_stats_get(uint16_t port_id, struct rte_eth_stats *stats);
1990 
2001 int rte_eth_stats_reset(uint16_t port_id);
2002 
2032 int rte_eth_xstats_get_names(uint16_t port_id,
2033  struct rte_eth_xstat_name *xstats_names,
2034  unsigned int size);
2035 
2065 int rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats,
2066  unsigned int n);
2067 
2090 int
2091 rte_eth_xstats_get_names_by_id(uint16_t port_id,
2092  struct rte_eth_xstat_name *xstats_names, unsigned int size,
2093  uint64_t *ids);
2094 
2118 int rte_eth_xstats_get_by_id(uint16_t port_id, const uint64_t *ids,
2119  uint64_t *values, unsigned int size);
2120 
2139 int rte_eth_xstats_get_id_by_name(uint16_t port_id, const char *xstat_name,
2140  uint64_t *id);
2141 
2148 void rte_eth_xstats_reset(uint16_t port_id);
2149 
2167 int rte_eth_dev_set_tx_queue_stats_mapping(uint16_t port_id,
2168  uint16_t tx_queue_id, uint8_t stat_idx);
2169 
2187 int rte_eth_dev_set_rx_queue_stats_mapping(uint16_t port_id,
2188  uint16_t rx_queue_id,
2189  uint8_t stat_idx);
2190 
2200 void rte_eth_macaddr_get(uint16_t port_id, struct ether_addr *mac_addr);
2201 
2211 void rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info);
2212 
2232 int rte_eth_dev_fw_version_get(uint16_t port_id,
2233  char *fw_version, size_t fw_size);
2234 
2273 int rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
2274  uint32_t *ptypes, int num);
2275 
2287 int rte_eth_dev_get_mtu(uint16_t port_id, uint16_t *mtu);
2288 
2304 int rte_eth_dev_set_mtu(uint16_t port_id, uint16_t mtu);
2305 
2325 int rte_eth_dev_vlan_filter(uint16_t port_id, uint16_t vlan_id, int on);
2326 
2346 int rte_eth_dev_set_vlan_strip_on_queue(uint16_t port_id, uint16_t rx_queue_id,
2347  int on);
2348 
2366 int rte_eth_dev_set_vlan_ether_type(uint16_t port_id,
2367  enum rte_vlan_type vlan_type,
2368  uint16_t tag_type);
2369 
2391 int rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask);
2392 
2405 int rte_eth_dev_get_vlan_offload(uint16_t port_id);
2406 
2421 int rte_eth_dev_set_vlan_pvid(uint16_t port_id, uint16_t pvid, int on);
2422 
2423 typedef void (*buffer_tx_error_fn)(struct rte_mbuf **unsent, uint16_t count,
2424  void *userdata);
2425 
2431  buffer_tx_error_fn error_callback;
2432  void *error_userdata;
2433  uint16_t size;
2434  uint16_t length;
2435  struct rte_mbuf *pkts[];
2437 };
2438 
2445 #define RTE_ETH_TX_BUFFER_SIZE(sz) \
2446  (sizeof(struct rte_eth_dev_tx_buffer) + (sz) * sizeof(struct rte_mbuf *))
2447 
2458 int
2459 rte_eth_tx_buffer_init(struct rte_eth_dev_tx_buffer *buffer, uint16_t size);
2460 
2485 int
2487  buffer_tx_error_fn callback, void *userdata);
2488 
2511 void
2512 rte_eth_tx_buffer_drop_callback(struct rte_mbuf **pkts, uint16_t unsent,
2513  void *userdata);
2514 
2538 void
2539 rte_eth_tx_buffer_count_callback(struct rte_mbuf **pkts, uint16_t unsent,
2540  void *userdata);
2541 
2567 int
2568 rte_eth_tx_done_cleanup(uint16_t port_id, uint16_t queue_id, uint32_t free_cnt);
2569 
2585 };
2586 
2594  uint64_t metadata;
2608 };
2609 
2627 };
2628 
2629 typedef int (*rte_eth_dev_cb_fn)(uint16_t port_id,
2630  enum rte_eth_event_type event, void *cb_arg, void *ret_param);
2650 int rte_eth_dev_callback_register(uint16_t port_id,
2651  enum rte_eth_event_type event,
2652  rte_eth_dev_cb_fn cb_fn, void *cb_arg);
2653 
2672 int rte_eth_dev_callback_unregister(uint16_t port_id,
2673  enum rte_eth_event_type event,
2674  rte_eth_dev_cb_fn cb_fn, void *cb_arg);
2675 
2697 int rte_eth_dev_rx_intr_enable(uint16_t port_id, uint16_t queue_id);
2698 
2719 int rte_eth_dev_rx_intr_disable(uint16_t port_id, uint16_t queue_id);
2720 
2738 int rte_eth_dev_rx_intr_ctl(uint16_t port_id, int epfd, int op, void *data);
2739 
2761 int rte_eth_dev_rx_intr_ctl_q(uint16_t port_id, uint16_t queue_id,
2762  int epfd, int op, void *data);
2763 
2781 int __rte_experimental
2782 rte_eth_dev_rx_intr_ctl_q_get_fd(uint16_t port_id, uint16_t queue_id);
2783 
2797 int rte_eth_led_on(uint16_t port_id);
2798 
2812 int rte_eth_led_off(uint16_t port_id);
2813 
2827 int rte_eth_dev_flow_ctrl_get(uint16_t port_id,
2828  struct rte_eth_fc_conf *fc_conf);
2829 
2844 int rte_eth_dev_flow_ctrl_set(uint16_t port_id,
2845  struct rte_eth_fc_conf *fc_conf);
2846 
2862 int rte_eth_dev_priority_flow_ctrl_set(uint16_t port_id,
2863  struct rte_eth_pfc_conf *pfc_conf);
2864 
2884 int rte_eth_dev_mac_addr_add(uint16_t port_id, struct ether_addr *mac_addr,
2885  uint32_t pool);
2886 
2900 int rte_eth_dev_mac_addr_remove(uint16_t port_id, struct ether_addr *mac_addr);
2901 
2915 int rte_eth_dev_default_mac_addr_set(uint16_t port_id,
2916  struct ether_addr *mac_addr);
2917 
2934 int rte_eth_dev_rss_reta_update(uint16_t port_id,
2935  struct rte_eth_rss_reta_entry64 *reta_conf,
2936  uint16_t reta_size);
2937 
2954 int rte_eth_dev_rss_reta_query(uint16_t port_id,
2955  struct rte_eth_rss_reta_entry64 *reta_conf,
2956  uint16_t reta_size);
2957 
2977 int rte_eth_dev_uc_hash_table_set(uint16_t port_id, struct ether_addr *addr,
2978  uint8_t on);
2979 
2998 int rte_eth_dev_uc_all_hash_table_set(uint16_t port_id, uint8_t on);
2999 
3022 int rte_eth_mirror_rule_set(uint16_t port_id,
3023  struct rte_eth_mirror_conf *mirror_conf,
3024  uint8_t rule_id,
3025  uint8_t on);
3026 
3041 int rte_eth_mirror_rule_reset(uint16_t port_id,
3042  uint8_t rule_id);
3043 
3060 int rte_eth_set_queue_rate_limit(uint16_t port_id, uint16_t queue_idx,
3061  uint16_t tx_rate);
3062 
3077 int rte_eth_dev_rss_hash_update(uint16_t port_id,
3078  struct rte_eth_rss_conf *rss_conf);
3079 
3094 int
3095 rte_eth_dev_rss_hash_conf_get(uint16_t port_id,
3096  struct rte_eth_rss_conf *rss_conf);
3097 
3116 int
3117 rte_eth_dev_udp_tunnel_port_add(uint16_t port_id,
3118  struct rte_eth_udp_tunnel *tunnel_udp);
3119 
3139 int
3140 rte_eth_dev_udp_tunnel_port_delete(uint16_t port_id,
3141  struct rte_eth_udp_tunnel *tunnel_udp);
3142 
3157 int rte_eth_dev_filter_supported(uint16_t port_id,
3158  enum rte_filter_type filter_type);
3159 
3179 int rte_eth_dev_filter_ctrl(uint16_t port_id, enum rte_filter_type filter_type,
3180  enum rte_filter_op filter_op, void *arg);
3181 
3195 int rte_eth_dev_get_dcb_info(uint16_t port_id,
3196  struct rte_eth_dcb_info *dcb_info);
3197 
3198 struct rte_eth_rxtx_callback;
3199 
3224 const struct rte_eth_rxtx_callback *
3225 rte_eth_add_rx_callback(uint16_t port_id, uint16_t queue_id,
3226  rte_rx_callback_fn fn, void *user_param);
3227 
3253 const struct rte_eth_rxtx_callback *
3254 rte_eth_add_first_rx_callback(uint16_t port_id, uint16_t queue_id,
3255  rte_rx_callback_fn fn, void *user_param);
3256 
3281 const struct rte_eth_rxtx_callback *
3282 rte_eth_add_tx_callback(uint16_t port_id, uint16_t queue_id,
3283  rte_tx_callback_fn fn, void *user_param);
3284 
3315 int rte_eth_remove_rx_callback(uint16_t port_id, uint16_t queue_id,
3316  const struct rte_eth_rxtx_callback *user_cb);
3317 
3348 int rte_eth_remove_tx_callback(uint16_t port_id, uint16_t queue_id,
3349  const struct rte_eth_rxtx_callback *user_cb);
3350 
3368 int rte_eth_rx_queue_info_get(uint16_t port_id, uint16_t queue_id,
3369  struct rte_eth_rxq_info *qinfo);
3370 
3388 int rte_eth_tx_queue_info_get(uint16_t port_id, uint16_t queue_id,
3389  struct rte_eth_txq_info *qinfo);
3390 
3408 int rte_eth_dev_get_reg_info(uint16_t port_id, struct rte_dev_reg_info *info);
3409 
3422 int rte_eth_dev_get_eeprom_length(uint16_t port_id);
3423 
3439 int rte_eth_dev_get_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info);
3440 
3456 int rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info);
3457 
3475 int __rte_experimental
3476 rte_eth_dev_get_module_info(uint16_t port_id,
3477  struct rte_eth_dev_module_info *modinfo);
3478 
3497 int __rte_experimental
3498 rte_eth_dev_get_module_eeprom(uint16_t port_id,
3499  struct rte_dev_eeprom_info *info);
3500 
3519 int rte_eth_dev_set_mc_addr_list(uint16_t port_id,
3520  struct ether_addr *mc_addr_set,
3521  uint32_t nb_mc_addr);
3522 
3535 int rte_eth_timesync_enable(uint16_t port_id);
3536 
3549 int rte_eth_timesync_disable(uint16_t port_id);
3550 
3569 int rte_eth_timesync_read_rx_timestamp(uint16_t port_id,
3570  struct timespec *timestamp, uint32_t flags);
3571 
3587 int rte_eth_timesync_read_tx_timestamp(uint16_t port_id,
3588  struct timespec *timestamp);
3589 
3607 int rte_eth_timesync_adjust_time(uint16_t port_id, int64_t delta);
3608 
3623 int rte_eth_timesync_read_time(uint16_t port_id, struct timespec *time);
3624 
3643 int rte_eth_timesync_write_time(uint16_t port_id, const struct timespec *time);
3644 
3660 int
3661 rte_eth_dev_l2_tunnel_eth_type_conf(uint16_t port_id,
3662  struct rte_eth_l2_tunnel_conf *l2_tunnel);
3663 
3688 int
3689 rte_eth_dev_l2_tunnel_offload_set(uint16_t port_id,
3690  struct rte_eth_l2_tunnel_conf *l2_tunnel,
3691  uint32_t mask,
3692  uint8_t en);
3693 
3709 int
3710 rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id);
3711 
3726 int
3727 rte_eth_dev_get_name_by_port(uint16_t port_id, char *name);
3728 
3745 int rte_eth_dev_adjust_nb_rx_tx_desc(uint16_t port_id,
3746  uint16_t *nb_rx_desc,
3747  uint16_t *nb_tx_desc);
3748 
3763 int
3764 rte_eth_dev_pool_ops_supported(uint16_t port_id, const char *pool);
3765 
3775 void *
3776 rte_eth_dev_get_sec_ctx(uint16_t port_id);
3777 
3778 
3779 #include <rte_ethdev_core.h>
3780 
3863 static inline uint16_t
3864 rte_eth_rx_burst(uint16_t port_id, uint16_t queue_id,
3865  struct rte_mbuf **rx_pkts, const uint16_t nb_pkts)
3866 {
3867  struct rte_eth_dev *dev = &rte_eth_devices[port_id];
3868  uint16_t nb_rx;
3869 
3870 #ifdef RTE_LIBRTE_ETHDEV_DEBUG
3871  RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0);
3872  RTE_FUNC_PTR_OR_ERR_RET(*dev->rx_pkt_burst, 0);
3873 
3874  if (queue_id >= dev->data->nb_rx_queues) {
3875  RTE_ETHDEV_LOG(ERR, "Invalid RX queue_id=%u\n", queue_id);
3876  return 0;
3877  }
3878 #endif
3879  nb_rx = (*dev->rx_pkt_burst)(dev->data->rx_queues[queue_id],
3880  rx_pkts, nb_pkts);
3881 
3882 #ifdef RTE_ETHDEV_RXTX_CALLBACKS
3883  if (unlikely(dev->post_rx_burst_cbs[queue_id] != NULL)) {
3884  struct rte_eth_rxtx_callback *cb =
3885  dev->post_rx_burst_cbs[queue_id];
3886 
3887  do {
3888  nb_rx = cb->fn.rx(port_id, queue_id, rx_pkts, nb_rx,
3889  nb_pkts, cb->param);
3890  cb = cb->next;
3891  } while (cb != NULL);
3892  }
3893 #endif
3894 
3895  return nb_rx;
3896 }
3897 
3910 static inline int
3911 rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)
3912 {
3913  struct rte_eth_dev *dev;
3914 
3915  RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);
3916  dev = &rte_eth_devices[port_id];
3917  RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_count, -ENOTSUP);
3918  if (queue_id >= dev->data->nb_rx_queues)
3919  return -EINVAL;
3920 
3921  return (int)(*dev->dev_ops->rx_queue_count)(dev, queue_id);
3922 }
3923 
3939 static inline int
3940 rte_eth_rx_descriptor_done(uint16_t port_id, uint16_t queue_id, uint16_t offset)
3941 {
3942  struct rte_eth_dev *dev = &rte_eth_devices[port_id];
3943  RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
3944  RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_descriptor_done, -ENOTSUP);
3945  return (*dev->dev_ops->rx_descriptor_done)( \
3946  dev->data->rx_queues[queue_id], offset);
3947 }
3948 
3949 #define RTE_ETH_RX_DESC_AVAIL 0
3950 #define RTE_ETH_RX_DESC_DONE 1
3951 #define RTE_ETH_RX_DESC_UNAVAIL 2
3986 static inline int
3987 rte_eth_rx_descriptor_status(uint16_t port_id, uint16_t queue_id,
3988  uint16_t offset)
3989 {
3990  struct rte_eth_dev *dev;
3991  void *rxq;
3992 
3993 #ifdef RTE_LIBRTE_ETHDEV_DEBUG
3994  RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
3995 #endif
3996  dev = &rte_eth_devices[port_id];
3997 #ifdef RTE_LIBRTE_ETHDEV_DEBUG
3998  if (queue_id >= dev->data->nb_rx_queues)
3999  return -ENODEV;
4000 #endif
4001  RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_descriptor_status, -ENOTSUP);
4002  rxq = dev->data->rx_queues[queue_id];
4003 
4004  return (*dev->dev_ops->rx_descriptor_status)(rxq, offset);
4005 }
4006 
4007 #define RTE_ETH_TX_DESC_FULL 0
4008 #define RTE_ETH_TX_DESC_DONE 1
4009 #define RTE_ETH_TX_DESC_UNAVAIL 2
4044 static inline int rte_eth_tx_descriptor_status(uint16_t port_id,
4045  uint16_t queue_id, uint16_t offset)
4046 {
4047  struct rte_eth_dev *dev;
4048  void *txq;
4049 
4050 #ifdef RTE_LIBRTE_ETHDEV_DEBUG
4051  RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
4052 #endif
4053  dev = &rte_eth_devices[port_id];
4054 #ifdef RTE_LIBRTE_ETHDEV_DEBUG
4055  if (queue_id >= dev->data->nb_tx_queues)
4056  return -ENODEV;
4057 #endif
4058  RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->tx_descriptor_status, -ENOTSUP);
4059  txq = dev->data->tx_queues[queue_id];
4060 
4061  return (*dev->dev_ops->tx_descriptor_status)(txq, offset);
4062 }
4063 
4130 static inline uint16_t
4131 rte_eth_tx_burst(uint16_t port_id, uint16_t queue_id,
4132  struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
4133 {
4134  struct rte_eth_dev *dev = &rte_eth_devices[port_id];
4135 
4136 #ifdef RTE_LIBRTE_ETHDEV_DEBUG
4137  RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0);
4138  RTE_FUNC_PTR_OR_ERR_RET(*dev->tx_pkt_burst, 0);
4139 
4140  if (queue_id >= dev->data->nb_tx_queues) {
4141  RTE_ETHDEV_LOG(ERR, "Invalid TX queue_id=%u\n", queue_id);
4142  return 0;
4143  }
4144 #endif
4145 
4146 #ifdef RTE_ETHDEV_RXTX_CALLBACKS
4147  struct rte_eth_rxtx_callback *cb = dev->pre_tx_burst_cbs[queue_id];
4148 
4149  if (unlikely(cb != NULL)) {
4150  do {
4151  nb_pkts = cb->fn.tx(port_id, queue_id, tx_pkts, nb_pkts,
4152  cb->param);
4153  cb = cb->next;
4154  } while (cb != NULL);
4155  }
4156 #endif
4157 
4158  return (*dev->tx_pkt_burst)(dev->data->tx_queues[queue_id], tx_pkts, nb_pkts);
4159 }
4160 
4214 #ifndef RTE_ETHDEV_TX_PREPARE_NOOP
4215 
4216 static inline uint16_t
4217 rte_eth_tx_prepare(uint16_t port_id, uint16_t queue_id,
4218  struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
4219 {
4220  struct rte_eth_dev *dev;
4221 
4222 #ifdef RTE_LIBRTE_ETHDEV_DEBUG
4223  if (!rte_eth_dev_is_valid_port(port_id)) {
4224  RTE_ETHDEV_LOG(ERR, "Invalid TX port_id=%u\n", port_id);
4225  rte_errno = EINVAL;
4226  return 0;
4227  }
4228 #endif
4229 
4230  dev = &rte_eth_devices[port_id];
4231 
4232 #ifdef RTE_LIBRTE_ETHDEV_DEBUG
4233  if (queue_id >= dev->data->nb_tx_queues) {
4234  RTE_ETHDEV_LOG(ERR, "Invalid TX queue_id=%u\n", queue_id);
4235  rte_errno = EINVAL;
4236  return 0;
4237  }
4238 #endif
4239 
4240  if (!dev->tx_pkt_prepare)
4241  return nb_pkts;
4242 
4243  return (*dev->tx_pkt_prepare)(dev->data->tx_queues[queue_id],
4244  tx_pkts, nb_pkts);
4245 }
4246 
4247 #else
4248 
4249 /*
4250  * Native NOOP operation for compilation targets which doesn't require any
4251  * preparations steps, and functional NOOP may introduce unnecessary performance
4252  * drop.
4253  *
4254  * Generally this is not a good idea to turn it on globally and didn't should
4255  * be used if behavior of tx_preparation can change.
4256  */
4257 
4258 static inline uint16_t
4259 rte_eth_tx_prepare(__rte_unused uint16_t port_id,
4260  __rte_unused uint16_t queue_id,
4261  __rte_unused struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
4262 {
4263  return nb_pkts;
4264 }
4265 
4266 #endif
4267 
4290 static inline uint16_t
4291 rte_eth_tx_buffer_flush(uint16_t port_id, uint16_t queue_id,
4292  struct rte_eth_dev_tx_buffer *buffer)
4293 {
4294  uint16_t sent;
4295  uint16_t to_send = buffer->length;
4296 
4297  if (to_send == 0)
4298  return 0;
4299 
4300  sent = rte_eth_tx_burst(port_id, queue_id, buffer->pkts, to_send);
4301 
4302  buffer->length = 0;
4303 
4304  /* All packets sent, or to be dealt with by callback below */
4305  if (unlikely(sent != to_send))
4306  buffer->error_callback(&buffer->pkts[sent],
4307  (uint16_t)(to_send - sent),
4308  buffer->error_userdata);
4309 
4310  return sent;
4311 }
4312 
4343 static __rte_always_inline uint16_t
4344 rte_eth_tx_buffer(uint16_t port_id, uint16_t queue_id,
4345  struct rte_eth_dev_tx_buffer *buffer, struct rte_mbuf *tx_pkt)
4346 {
4347  buffer->pkts[buffer->length++] = tx_pkt;
4348  if (buffer->length < buffer->size)
4349  return 0;
4350 
4351  return rte_eth_tx_buffer_flush(port_id, queue_id, buffer);
4352 }
4353 
4354 #ifdef __cplusplus
4355 }
4356 #endif
4357 
4358 #endif /* _RTE_ETHDEV_H_ */
ETH_MQ_RX_VMDQ_RSS
Definition: rte_ethdev.h:357
rte_eth_tx_buffer_init
int rte_eth_tx_buffer_init(struct rte_eth_dev_tx_buffer *buffer, uint16_t size)
rte_eth_dev_uc_hash_table_set
int rte_eth_dev_uc_hash_table_set(uint16_t port_id, struct ether_addr *addr, uint8_t on)
rte_eth_dcb_info
Definition: rte_ethdev.h:1208
rte_eth_dev_rx_offload_name
const char * rte_eth_dev_rx_offload_name(uint64_t offload)
rte_eth_dev_info_get
void rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info)
rte_eth_dev_mac_addr_add
int rte_eth_dev_mac_addr_add(uint16_t port_id, struct ether_addr *mac_addr, uint32_t pool)
rte_eth_dev_info::switch_info
struct rte_eth_switch_info switch_info
Definition: rte_ethdev.h:1133
RTE_FDIR_REPORT_STATUS_ALWAYS
Definition: rte_ethdev.h:851
rte_eth_fc_conf::high_water
uint32_t high_water
Definition: rte_ethdev.h:816
rte_eth_fc_conf::pause_time
uint16_t pause_time
Definition: rte_ethdev.h:818
rte_eth_vmdq_rx_conf::enable_default_pool
uint8_t enable_default_pool
Definition: rte_ethdev.h:700
rte_eth_rx_descriptor_status
static int rte_eth_rx_descriptor_status(uint16_t port_id, uint16_t queue_id, uint16_t offset)
Definition: rte_ethdev.h:3987
rte_eth_stats::obytes
uint64_t obytes
Definition: rte_ethdev.h:246
rte_eth_dev_set_vlan_offload
int rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask)
RTE_ETH_EVENT_DESTROY
Definition: rte_ethdev.h:2624
rte_eth_timesync_read_rx_timestamp
int rte_eth_timesync_read_rx_timestamp(uint16_t port_id, struct timespec *timestamp, uint32_t flags)
rte_eth_txmode::hw_vlan_reject_tagged
__extension__ uint8_t hw_vlan_reject_tagged
Definition: rte_ethdev.h:727
rte_eth_txmode::mq_mode
enum rte_eth_tx_mq_mode mq_mode
Definition: rte_ethdev.h:715
rte_eth_dev_adjust_nb_rx_tx_desc
int rte_eth_dev_adjust_nb_rx_tx_desc(uint16_t port_id, uint16_t *nb_rx_desc, uint16_t *nb_tx_desc)
rte_eth_l2_tunnel_conf
Definition: rte_eth_ctrl.h:816
rte_eth_dev_get_reg_info
int rte_eth_dev_get_reg_info(uint16_t port_id, struct rte_dev_reg_info *info)
rte_eth_vmdq_dcb_conf::default_pool
uint8_t default_pool
Definition: rte_ethdev.h:670
rte_eth_dev_vlan_filter
int rte_eth_dev_vlan_filter(uint16_t port_id, uint16_t vlan_id, int on)
rte_eth_dev_set_tx_queue_stats_mapping
int rte_eth_dev_set_tx_queue_stats_mapping(uint16_t port_id, uint16_t tx_queue_id, uint8_t stat_idx)
rte_eth_link_get
void rte_eth_link_get(uint16_t port_id, struct rte_eth_link *link)
rte_eth_rx_queue_count
static int rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)
Definition: rte_ethdev.h:3911
rte_eth_dev_set_eeprom
int rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)
rte_eth_conf::vmdq_tx_conf
struct rte_eth_vmdq_tx_conf vmdq_tx_conf
Definition: rte_ethdev.h:929
rte_eth_dev_close
void rte_eth_dev_close(uint16_t port_id)
rte_eth_tx_prepare
static uint16_t rte_eth_tx_prepare(uint16_t port_id, uint16_t queue_id, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
Definition: rte_ethdev.h:4217
rte_eth_rxconf
Definition: rte_ethdev.h:737
rte_eth_dev_info::rx_offload_capa
uint64_t rx_offload_capa
Definition: rte_ethdev.h:1099
rte_eth_switch_info::port_id
uint16_t port_id
Definition: rte_ethdev.h:1065
rte_eth_pfc_conf
Definition: rte_ethdev.h:830
rte_eth_iterator_init
int rte_eth_iterator_init(struct rte_dev_iterator *iter, const char *devargs)
rte_eth_dev_cb_fn
int(* rte_eth_dev_cb_fn)(uint16_t port_id, enum rte_eth_event_type event, void *cb_arg, void *ret_param)
Definition: rte_ethdev.h:2629
rte_eth_remove_rx_callback
int rte_eth_remove_rx_callback(uint16_t port_id, uint16_t queue_id, const struct rte_eth_rxtx_callback *user_cb)
rte_eth_dev_tx_buffer::size
uint16_t size
Definition: rte_ethdev.h:2433
rte_eth_thresh::pthresh
uint8_t pthresh
Definition: rte_ethdev.h:327
rte_eth_dev_portconf::burst_size
uint16_t burst_size
Definition: rte_ethdev.h:1048
rte_eth_dev_get_module_info
int __rte_experimental rte_eth_dev_get_module_info(uint16_t port_id, struct rte_eth_dev_module_info *modinfo)
rte_eth_dev_info::dev_capa
uint64_t dev_capa
Definition: rte_ethdev.h:1128
rte_eth_tx_mq_mode
rte_eth_tx_mq_mode
Definition: rte_ethdev.h:376
unlikely
#define unlikely(x)
Definition: rte_branch_prediction.h:38
rte_eth_vmdq_rx_conf::nb_pool_maps
uint8_t nb_pool_maps
Definition: rte_ethdev.h:703
rte_fdir_conf
Definition: rte_ethdev.h:860
rte_eth_led_on
int rte_eth_led_on(uint16_t port_id)
rte_eth_dev_info::driver_name
const char * driver_name
Definition: rte_ethdev.h:1086
rte_eth_udp_tunnel::udp_port
uint16_t udp_port
Definition: rte_ethdev.h:879
rte_eth_iterator_cleanup
void rte_eth_iterator_cleanup(struct rte_dev_iterator *iter)
rte_eth_dev_get_sec_ctx
void * rte_eth_dev_get_sec_ctx(uint16_t port_id)
RTE_ETH_EVENT_IPSEC
Definition: rte_ethdev.h:2625
rte_eth_allmulticast_enable
void rte_eth_allmulticast_enable(uint16_t port_id)
rte_rx_callback_fn
uint16_t(* rte_rx_callback_fn)(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[], uint16_t nb_pkts, uint16_t max_pkts, void *user_param)
Definition: rte_ethdev.h:1274
rte_eth_txq_info
Definition: rte_ethdev.h:1151
ETH_MQ_TX_NONE
Definition: rte_ethdev.h:377
rte_eth_rxq_info
Definition: rte_ethdev.h:1140
rte_eth_fc_conf::autoneg
uint8_t autoneg
Definition: rte_ethdev.h:822
ETH_DCB_NUM_USER_PRIORITIES
#define ETH_DCB_NUM_USER_PRIORITIES
Definition: rte_ethdev.h:539
rte_eth_dev_tx_buffer::length
uint16_t length
Definition: rte_ethdev.h:2434
rte_eth_event_ipsec_desc::subtype
enum rte_eth_event_ipsec_subtype subtype
Definition: rte_ethdev.h:2592
rte_eth_tx_queue_info_get
int rte_eth_tx_queue_info_get(uint16_t port_id, uint16_t queue_id, struct rte_eth_txq_info *qinfo)
rte_eth_dev_info::dev_flags
const uint32_t * dev_flags
Definition: rte_ethdev.h:1089
rte_eth_vmdq_rx_conf::nb_queue_pools
enum rte_eth_nb_pools nb_queue_pools
Definition: rte_ethdev.h:699
RTE_ETH_EVENT_IPSEC_SA_TIME_EXPIRY
Definition: rte_ethdev.h:2579
rte_eth_vmdq_rx_conf::enable_loop_back
uint8_t enable_loop_back
Definition: rte_ethdev.h:702
rte_log.h
rte_eth_stats::ierrors
uint64_t ierrors
Definition: rte_ethdev.h:251
rte_eth_tx_queue_setup
int rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id, uint16_t nb_tx_desc, unsigned int socket_id, const struct rte_eth_txconf *tx_conf)
rte_eth_dev_get_eeprom
int rte_eth_dev_get_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)
rte_eth_txconf
Definition: rte_ethdev.h:753
RTE_ETH_EVENT_INTR_RESET
Definition: rte_ethdev.h:2618
RTE_ETH_DEV_UNUSED
Definition: rte_ethdev.h:1306
rte_eth_dev_stop
void rte_eth_dev_stop(uint16_t port_id)
rte_eth_dev_info::nb_rx_queues
uint16_t nb_rx_queues
Definition: rte_ethdev.h:1121
rte_eth_dev_get_dcb_info
int rte_eth_dev_get_dcb_info(uint16_t port_id, struct rte_eth_dcb_info *dcb_info)
RTE_FC_RX_PAUSE
Definition: rte_ethdev.h:805
rte_eth_dev_configure
int rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_queue, uint16_t nb_tx_queue, const struct rte_eth_conf *eth_conf)
rte_eth_thresh
Definition: rte_ethdev.h:326
rte_eth_rxmode::max_rx_pkt_len
uint32_t max_rx_pkt_len
Definition: rte_ethdev.h:396
rte_eth_dev_tx_queue_stop
int rte_eth_dev_tx_queue_stop(uint16_t port_id, uint16_t tx_queue_id)
rte_eth_desc_lim::nb_seg_max
uint16_t nb_seg_max
Definition: rte_ethdev.h:784
ETH_16_POOLS
Definition: rte_ethdev.h:628
rte_eth_dev_info::max_rx_queues
uint16_t max_rx_queues
Definition: rte_ethdev.h:1092
rte_eth_dev_rx_queue_stop
int rte_eth_dev_rx_queue_stop(uint16_t port_id, uint16_t rx_queue_id)
rte_eth_thresh::hthresh
uint8_t hthresh
Definition: rte_ethdev.h:328
ETH_MQ_RX_NONE
Definition: rte_ethdev.h:345
rte_eth_rss_reta_entry64
Definition: rte_ethdev.h:606
rte_eth_dev_mac_addr_remove
int rte_eth_dev_mac_addr_remove(uint16_t port_id, struct ether_addr *mac_addr)
__rte_always_inline
#define __rte_always_inline
Definition: rte_common.h:146
rte_eth_dev_filter_ctrl
int rte_eth_dev_filter_ctrl(uint16_t port_id, enum rte_filter_type filter_type, enum rte_filter_op filter_op, void *arg)
rte_eth_conf::rx_adv_conf
struct rte_eth_conf::@117 rx_adv_conf
rte_eth_dev_default_mac_addr_set
int rte_eth_dev_default_mac_addr_set(uint16_t port_id, struct ether_addr *mac_addr)
rte_eth_dev_get_vlan_offload
int rte_eth_dev_get_vlan_offload(uint16_t port_id)
rte_eth_vlan_mirror::vlan_mask
uint64_t vlan_mask
Definition: rte_ethdev.h:584
rte_eth_rss_reta_entry64::reta
uint16_t reta[RTE_RETA_GROUP_SIZE]
Definition: rte_ethdev.h:609
rte_eth_dcb_info::nb_tcs
uint8_t nb_tcs
Definition: rte_ethdev.h:1209
rte_eth_stats::ipackets
uint64_t ipackets
Definition: rte_ethdev.h:243
rte_eth_dev_rx_intr_disable
int rte_eth_dev_rx_intr_disable(uint16_t port_id, uint16_t queue_id)
rte_eth_dev_set_mtu
int rte_eth_dev_set_mtu(uint16_t port_id, uint16_t mtu)
ETH_MQ_RX_DCB
Definition: rte_ethdev.h:350
rte_interrupts.h
rte_eth_dev_info::vmdq_pool_base
uint16_t vmdq_pool_base
Definition: rte_ethdev.h:1116
rte_fdir_conf::flex_conf
struct rte_eth_fdir_flex_conf flex_conf
Definition: rte_ethdev.h:867
rte_eth_conf::rxmode
struct rte_eth_rxmode rxmode
Definition: rte_ethdev.h:908
rte_eth_mirror_rule_reset
int rte_eth_mirror_rule_reset(uint16_t port_id, uint8_t rule_id)
rte_eth_conf::intr_conf
struct rte_intr_conf intr_conf
Definition: rte_ethdev.h:936
rte_eth_stats::rx_nombuf
uint64_t rx_nombuf
Definition: rte_ethdev.h:253
rte_eth_vmdq_dcb_conf::vlan_id
uint16_t vlan_id
Definition: rte_ethdev.h:673
rte_eth_dev_flow_ctrl_get
int rte_eth_dev_flow_ctrl_get(uint16_t port_id, struct rte_eth_fc_conf *fc_conf)
rte_eth_dev_fw_version_get
int rte_eth_dev_fw_version_get(uint16_t port_id, char *fw_version, size_t fw_size)
rte_eth_dev_rx_intr_ctl_q_get_fd
int __rte_experimental rte_eth_dev_rx_intr_ctl_q_get_fd(uint16_t port_id, uint16_t queue_id)
rte_eth_dev_count
__rte_deprecated uint16_t rte_eth_dev_count(void)
rte_eth_vmdq_dcb_conf::pools
uint64_t pools
Definition: rte_ethdev.h:674
rte_eth_pfc_conf::fc
struct rte_eth_fc_conf fc
Definition: rte_ethdev.h:831
rte_eth_xstat::value
uint64_t value
Definition: rte_ethdev.h:1170
rte_fdir_conf::pballoc
enum rte_fdir_pballoc_type pballoc
Definition: rte_ethdev.h:862
rte_eth_dev_count_total
uint16_t __rte_experimental rte_eth_dev_count_total(void)
ETH_VMDQ_MAX_VLAN_FILTERS
#define ETH_VMDQ_MAX_VLAN_FILTERS
Definition: rte_ethdev.h:538
rte_eth_dev_tx_buffer
Definition: rte_ethdev.h:2430
rte_filter_type
rte_filter_type
Definition: rte_eth_ctrl.h:63
rte_eth_event_ipsec_desc
Definition: rte_ethdev.h:2591
rte_eth_rxconf::rx_deferred_start
uint8_t rx_deferred_start
Definition: rte_ethdev.h:741
rte_eth_dev_owner_new
int __rte_experimental rte_eth_dev_owner_new(uint64_t *owner_id)
ETH_MIRROR_MAX_VLANS
#define ETH_MIRROR_MAX_VLANS
Definition: rte_ethdev.h:572
rte_eth_rxmode::mq_mode
enum rte_eth_rx_mq_mode mq_mode
Definition: rte_ethdev.h:395
rte_eth_rx_burst
static uint16_t rte_eth_rx_burst(uint16_t port_id, uint16_t queue_id, struct rte_mbuf **rx_pkts, const uint16_t nb_pkts)
Definition: rte_ethdev.h:3864
rte_eth_timesync_read_tx_timestamp
int rte_eth_timesync_read_tx_timestamp(uint16_t port_id, struct timespec *timestamp)
rte_eth_dev_portconf::ring_size
uint16_t ring_size
Definition: rte_ethdev.h:1049
rte_eth_dev_info::tx_queue_offload_capa
uint64_t tx_queue_offload_capa
Definition: rte_ethdev.h:1105
rte_ether.h
rte_mbuf
Definition: rte_mbuf.h:478
rte_eth_dev_info::tx_desc_lim
struct rte_eth_desc_lim tx_desc_lim
Definition: rte_ethdev.h:1118
rte_eth_dev_rss_hash_update
int rte_eth_dev_rss_hash_update(uint16_t port_id, struct rte_eth_rss_conf *rss_conf)
ETH_MQ_RX_VMDQ_DCB_RSS
Definition: rte_ethdev.h:361
rte_eth_dev_state
rte_eth_dev_state
Definition: rte_ethdev.h:1304
rte_mbuf::userdata
void * userdata
Definition: rte_mbuf.h:620
rte_eth_xstats_get
int rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats, unsigned int n)
rte_eth_nb_tcs
rte_eth_nb_tcs
Definition: rte_ethdev.h:617
RTE_FDIR_PBALLOC_256K
Definition: rte_ethdev.h:842
ether_addr
Definition: rte_ether.h:57
rte_eth_xstats_get_id_by_name
int rte_eth_xstats_get_id_by_name(uint16_t port_id, const char *xstat_name, uint64_t *id)
rte_eth_rss_conf::rss_key_len
uint8_t rss_key_len
Definition: rte_ethdev.h:444
rte_eth_dcb_tc_queue_mapping
Definition: rte_ethdev.h:1191
rte_eth_led_off
int rte_eth_led_off(uint16_t port_id)
rte_eth_add_tx_callback
const struct rte_eth_rxtx_callback * rte_eth_add_tx_callback(uint16_t port_id, uint16_t queue_id, rte_tx_callback_fn fn, void *user_param)
RTE_ETH_EVENT_UNKNOWN
Definition: rte_ethdev.h:2614
__rte_cache_min_aligned
#define __rte_cache_min_aligned
Definition: rte_memory.h:71
rte_eth_dev_tx_buffer::pkts
struct rte_mbuf * pkts[]
Definition: rte_ethdev.h:2435
rte_eth_dev_portconf::nb_queues
uint16_t nb_queues
Definition: rte_ethdev.h:1050
rte_eth_dev_udp_tunnel_port_delete
int rte_eth_dev_udp_tunnel_port_delete(uint16_t port_id, struct rte_eth_udp_tunnel *tunnel_udp)
rte_eth_dcb_info::tc_bws
uint8_t tc_bws[ETH_DCB_NUM_TCS]
Definition: rte_ethdev.h:1211
rte_eth_promiscuous_get
int rte_eth_promiscuous_get(uint16_t port_id)
rte_eth_macaddr_get
void rte_eth_macaddr_get(uint16_t port_id, struct ether_addr *mac_addr)
rte_eth_speed_bitflag
uint32_t rte_eth_speed_bitflag(uint32_t speed, int duplex)
rte_intr_conf
Definition: rte_ethdev.h:886
rte_errno.h
RTE_ETH_XSTATS_NAME_SIZE
#define RTE_ETH_XSTATS_NAME_SIZE
Definition: rte_ethdev.h:1157
rte_intr_conf::rmv
uint32_t rmv
Definition: rte_ethdev.h:892
RTE_FDIR_PBALLOC_128K
Definition: rte_ethdev.h:841
rte_eth_txconf::tx_thresh
struct rte_eth_thresh tx_thresh
Definition: rte_ethdev.h:754
rte_eth_rxmode::split_hdr_size
uint16_t split_hdr_size
Definition: rte_ethdev.h:397
rte_dev_iterator
Definition: rte_dev.h:254
rte_eth_dev_info::speed_capa
uint32_t speed_capa
Definition: rte_ethdev.h:1119
rte_eth_fc_conf::mac_ctrl_frame_fwd
uint8_t mac_ctrl_frame_fwd
Definition: rte_ethdev.h:821
rte_eth_dev_is_valid_port
int rte_eth_dev_is_valid_port(uint16_t port_id)
rte_fdir_conf::mode
enum rte_fdir_mode mode
Definition: rte_ethdev.h:861
rte_eth_dev_info::vmdq_queue_base
uint16_t vmdq_queue_base
Definition: rte_ethdev.h:1114
rte_eth_xstat::id
uint64_t id
Definition: rte_ethdev.h:1169
rte_eth_dev_rx_intr_ctl
int rte_eth_dev_rx_intr_ctl(uint16_t port_id, int epfd, int op, void *data)
rte_fdir_conf::drop_queue
uint8_t drop_queue
Definition: rte_ethdev.h:865
rte_eth_ctrl.h
rte_devargs.h
rte_eth_rx_descriptor_done
static int rte_eth_rx_descriptor_done(uint16_t port_id, uint16_t queue_id, uint16_t offset)
Definition: rte_ethdev.h:3940
rte_eth_stats_get
int rte_eth_stats_get(uint16_t port_id, struct rte_eth_stats *stats)
rte_eth_vmdq_dcb_conf::nb_pool_maps
uint8_t nb_pool_maps
Definition: rte_ethdev.h:671
rte_eth_mirror_conf::rule_type
uint8_t rule_type
Definition: rte_ethdev.h:593
rte_eth_dev_rss_reta_update
int rte_eth_dev_rss_reta_update(uint16_t port_id, struct rte_eth_rss_reta_entry64 *reta_conf, uint16_t reta_size)
RTE_FDIR_REPORT_STATUS
Definition: rte_ethdev.h:850
rte_eth_tx_burst
static uint16_t rte_eth_tx_burst(uint16_t port_id, uint16_t queue_id, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
Definition: rte_ethdev.h:4131
rte_eth_set_queue_rate_limit
int rte_eth_set_queue_rate_limit(uint16_t port_id, uint16_t queue_idx, uint16_t tx_rate)
rte_eth_dev_info::rx_desc_lim
struct rte_eth_desc_lim rx_desc_lim
Definition: rte_ethdev.h:1117
RTE_ETH_EVENT_INTR_LSC
Definition: rte_ethdev.h:2615
rte_eth_event_type
rte_eth_event_type
Definition: rte_ethdev.h:2613
rte_fdir_status_mode
rte_fdir_status_mode
Definition: rte_ethdev.h:848
rte_eth_mirror_conf::dst_pool
uint8_t dst_pool
Definition: rte_ethdev.h:594
rte_eth_dev_rx_intr_ctl_q
int rte_eth_dev_rx_intr_ctl_q(uint16_t port_id, uint16_t queue_id, int epfd, int op, void *data)
rte_eth_tx_done_cleanup
int rte_eth_tx_done_cleanup(uint16_t port_id, uint16_t queue_id, uint32_t free_cnt)
rte_eth_desc_lim::nb_max
uint16_t nb_max
Definition: rte_ethdev.h:772
rte_eth_dev_set_mc_addr_list
int rte_eth_dev_set_mc_addr_list(uint16_t port_id, struct ether_addr *mc_addr_set, uint32_t nb_mc_addr)
ETH_MQ_RX_RSS_FLAG
#define ETH_MQ_RX_RSS_FLAG
Definition: rte_ethdev.h:335
rte_eth_event_ipsec_desc::metadata
uint64_t metadata
Definition: rte_ethdev.h:2594
rte_eth_dev_rss_hash_conf_get
int rte_eth_dev_rss_hash_conf_get(uint16_t port_id, struct rte_eth_rss_conf *rss_conf)
rte_eth_dcb_info::prio_tc
uint8_t prio_tc[ETH_DCB_NUM_USER_PRIORITIES]
Definition: rte_ethdev.h:1210
rte_eth_desc_lim::nb_mtu_seg_max
uint16_t nb_mtu_seg_max
Definition: rte_ethdev.h:797
rte_eth_xstats_get_names
int rte_eth_xstats_get_names(uint16_t port_id, struct rte_eth_xstat_name *xstats_names, unsigned int size)
rte_vlan_filter_conf
Definition: rte_ethdev.h:421
rte_eth_udp_tunnel::prot_type
uint8_t prot_type
Definition: rte_ethdev.h:880
rte_eth_txconf::offloads
uint64_t offloads
Definition: rte_ethdev.h:765
rte_eth_timesync_write_time
int rte_eth_timesync_write_time(uint16_t port_id, const struct timespec *time)
rte_eth_conf::link_speeds
uint32_t link_speeds
Definition: rte_ethdev.h:901
rte_eth_fdir_masks
Definition: rte_eth_ctrl.h:588
rte_eth_rx_queue_info_get
int rte_eth_rx_queue_info_get(uint16_t port_id, uint16_t queue_id, struct rte_eth_rxq_info *qinfo)
rte_eth_rss_conf::rss_hf
uint64_t rss_hf
Definition: rte_ethdev.h:445
rte_eth_vlan_mirror
Definition: rte_ethdev.h:583
RTE_ETH_EVENT_MACSEC
Definition: rte_ethdev.h:2621
rte_eth_dev_flow_ctrl_set
int rte_eth_dev_flow_ctrl_set(uint16_t port_id, struct rte_eth_fc_conf *fc_conf)
rte_eth_vmdq_dcb_conf
Definition: rte_ethdev.h:667
rte_eth_stats_reset
int rte_eth_stats_reset(uint16_t port_id)
rte_eth_dev_start
int rte_eth_dev_start(uint16_t port_id)
rte_eth_dev_filter_supported
int rte_eth_dev_filter_supported(uint16_t port_id, enum rte_filter_type filter_type)
rte_eth_vmdq_rx_conf::default_pool
uint8_t default_pool
Definition: rte_ethdev.h:701
rte_eth_dev_rx_queue_start
int rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t rx_queue_id)
RTE_ETH_EVENT_IPSEC_SA_BYTE_EXPIRY
Definition: rte_ethdev.h:2581
rte_eth_dev_owner_get
int __rte_experimental rte_eth_dev_owner_get(const uint16_t port_id, struct rte_eth_dev_owner *owner)
rte_eth_conf::tx_adv_conf
union rte_eth_conf::@118 tx_adv_conf
rte_eth_dev_get_name_by_port
int rte_eth_dev_get_name_by_port(uint16_t port_id, char *name)
rte_fdir_mode
rte_fdir_mode
Definition: rte_eth_ctrl.h:658
rte_eth_rxconf::offloads
uint64_t offloads
Definition: rte_ethdev.h:747
rte_eth_dev_set_rx_queue_stats_mapping
int rte_eth_dev_set_rx_queue_stats_mapping(uint16_t port_id, uint16_t rx_queue_id, uint8_t stat_idx)
rte_eth_dev_priority_flow_ctrl_set
int rte_eth_dev_priority_flow_ctrl_set(uint16_t port_id, struct rte_eth_pfc_conf *pfc_conf)
rte_eth_dcb_tc_queue_mapping::tc_rxq
struct rte_eth_dcb_tc_queue_mapping::@119 tc_rxq[ETH_MAX_VMDQ_POOL][ETH_DCB_NUM_TCS]
rte_eth_rxconf::rx_free_thresh
uint16_t rx_free_thresh
Definition: rte_ethdev.h:739
rte_eth_tx_buffer_flush
static uint16_t rte_eth_tx_buffer_flush(uint16_t port_id, uint16_t queue_id, struct rte_eth_dev_tx_buffer *buffer)
Definition: rte_ethdev.h:4291
rte_eth_find_next_owned_by
uint64_t rte_eth_find_next_owned_by(uint16_t port_id, const uint64_t owner_id)
rte_eth_stats::q_errors
uint64_t q_errors[RTE_ETHDEV_QUEUE_STAT_CNTRS]
Definition: rte_ethdev.h:262
RTE_ETH_DEV_ATTACHED
Definition: rte_ethdev.h:1308
rte_eth_txconf::tx_free_thresh
uint16_t tx_free_thresh
Definition: rte_ethdev.h:756
rte_common.h
rte_eth_desc_lim::nb_min
uint16_t nb_min
Definition: rte_ethdev.h:773
rte_eth_switch_info::domain_id
uint16_t domain_id
Definition: rte_ethdev.h:1064
rte_eth_dev_callback_register
int rte_eth_dev_callback_register(uint16_t port_id, enum rte_eth_event_type event, rte_eth_dev_cb_fn cb_fn, void *cb_arg)
rte_eth_udp_tunnel
Definition: rte_ethdev.h:878
rte_eth_txmode::offloads
uint64_t offloads
Definition: rte_ethdev.h:721
rte_intr_conf::rxq
uint32_t rxq
Definition: rte_ethdev.h:890
ETH_MQ_TX_VMDQ_ONLY
Definition: rte_ethdev.h:380
rte_eth_desc_lim::nb_align
uint16_t nb_align
Definition: rte_ethdev.h:774
rte_eth_fc_conf::mode
enum rte_eth_fc_mode mode
Definition: rte_ethdev.h:820
rte_eth_promiscuous_disable
void rte_eth_promiscuous_disable(uint16_t port_id)
rte_eth_conf::lpbk_mode
uint32_t lpbk_mode
Definition: rte_ethdev.h:910
rte_eth_dev_module_info
Definition: rte_dev_info.h:34
rte_eth_dev_info::rx_queue_offload_capa
uint64_t rx_queue_offload_capa
Definition: rte_ethdev.h:1103
rte_eth_dev_info::reta_size
uint16_t reta_size
Definition: rte_ethdev.h:1107
rte_eth_dev_count_avail
uint16_t rte_eth_dev_count_avail(void)
rte_eth_vmdq_rx_conf
Definition: rte_ethdev.h:698
RTE_ETH_EVENT_VF_MBOX
Definition: rte_ethdev.h:2620
ETH_4_TCS
Definition: rte_ethdev.h:618
rte_eth_dev_info::default_txportconf
struct rte_eth_dev_portconf default_txportconf
Definition: rte_ethdev.h:1126
rte_eth_dev_info::default_rxportconf
struct rte_eth_dev_portconf default_rxportconf
Definition: rte_ethdev.h:1124
rte_eth_timesync_read_time
int rte_eth_timesync_read_time(uint16_t port_id, struct timespec *time)
rte_eth_xstat_name::name
char name[RTE_ETH_XSTATS_NAME_SIZE]
Definition: rte_ethdev.h:1181
rte_eth_vmdq_dcb_conf::pool_map
struct rte_eth_vmdq_dcb_conf::@115 pool_map[ETH_VMDQ_MAX_VLAN_FILTERS]
__rte_unused
#define __rte_unused
Definition: rte_common.h:81
rte_eth_tx_buffer_set_err_callback
int rte_eth_tx_buffer_set_err_callback(struct rte_eth_dev_tx_buffer *buffer, buffer_tx_error_fn callback, void *userdata)
rte_eth_rxmode::offloads
uint64_t offloads
Definition: rte_ethdev.h:403
rte_eth_dev_owner_delete
void __rte_experimental rte_eth_dev_owner_delete(const uint64_t owner_id)
rte_eth_switch_info
Definition: rte_ethdev.h:1062
rte_eth_timesync_disable
int rte_eth_timesync_disable(uint16_t port_id)
rte_eth_find_next
uint16_t rte_eth_find_next(uint16_t port_id)
rte_intr_conf::lsc
uint32_t lsc
Definition: rte_ethdev.h:888
rte_mempool
Definition: rte_mempool.h:213
ETH_8_POOLS
Definition: rte_ethdev.h:627
RTE_ETH_EVENT_MAX
Definition: rte_ethdev.h:2626
rte_eth_add_rx_callback
const struct rte_eth_rxtx_callback * rte_eth_add_rx_callback(uint16_t port_id, uint16_t queue_id, rte_rx_callback_fn fn, void *user_param)
ETH_MQ_RX_VMDQ_ONLY
Definition: rte_ethdev.h:355
RTE_FDIR_PBALLOC_64K
Definition: rte_ethdev.h:840
rte_fdir_pballoc_type
rte_fdir_pballoc_type
Definition: rte_ethdev.h:839
rte_eth_conf::dcb_tx_conf
struct rte_eth_dcb_tx_conf dcb_tx_conf
Definition: rte_ethdev.h:927
rte_eth_dev_is_removed
int __rte_experimental rte_eth_dev_is_removed(uint16_t port_id)
rte_fdir_conf::status
enum rte_fdir_status_mode status
Definition: rte_ethdev.h:863
ETH_MQ_TX_DCB
Definition: rte_ethdev.h:378
rte_eth_dev_set_vlan_pvid
int rte_eth_dev_set_vlan_pvid(uint16_t port_id, uint16_t pvid, int on)
rte_eth_rx_mq_mode
rte_eth_rx_mq_mode
Definition: rte_ethdev.h:343
ETH_VLAN_TYPE_INNER
Definition: rte_ethdev.h:412
rte_filter_op
rte_filter_op
Definition: rte_eth_ctrl.h:81
rte_eth_stats::imissed
uint64_t imissed
Definition: rte_ethdev.h:247
RTE_ETH_EVENT_NEW
Definition: rte_ethdev.h:2623
rte_eth_dev_get_module_eeprom
int __rte_experimental rte_eth_dev_get_module_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)
rte_eth_dev_owner_unset
int __rte_experimental rte_eth_dev_owner_unset(const uint16_t port_id, const uint64_t owner_id)
rte_eth_txmode::hw_vlan_insert_pvid
__extension__ uint8_t hw_vlan_insert_pvid
Definition: rte_ethdev.h:727
rte_eth_dev_info::flow_type_rss_offloads
uint64_t flow_type_rss_offloads
Definition: rte_ethdev.h:1111
RTE_ETH_EVENT_QUEUE_STATE
Definition: rte_ethdev.h:2616
rte_eth_conf::dcb_rx_conf
struct rte_eth_dcb_rx_conf dcb_rx_conf
Definition: rte_ethdev.h:919
rte_eth_fc_conf::send_xon
uint16_t send_xon
Definition: rte_ethdev.h:819
rte_eth_dev_tx_offload_name
const char * rte_eth_dev_tx_offload_name(uint64_t offload)
rte_eth_dev_get_eeprom_length
int rte_eth_dev_get_eeprom_length(uint16_t port_id)
ETH_VLAN_TYPE_OUTER
Definition: rte_ethdev.h:413
rte_eth_rx_queue_setup
int rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id, uint16_t nb_rx_desc, unsigned int socket_id, const struct rte_eth_rxconf *rx_conf, struct rte_mempool *mb_pool)
rte_eth_conf::rss_conf
struct rte_eth_rss_conf rss_conf
Definition: rte_ethdev.h:916
rte_eth_desc_lim
Definition: rte_ethdev.h:771
rte_eth_remove_tx_callback
int rte_eth_remove_tx_callback(uint16_t port_id, uint16_t queue_id, const struct rte_eth_rxtx_callback *user_cb)
rte_eth_xstats_get_names_by_id
int rte_eth_xstats_get_names_by_id(uint16_t port_id, struct rte_eth_xstat_name *xstats_names, unsigned int size, uint64_t *ids)
ETH_64_POOLS
Definition: rte_ethdev.h:630
rte_eth_dev_get_mtu
int rte_eth_dev_get_mtu(uint16_t port_id, uint16_t *mtu)
RTE_FC_FULL
Definition: rte_ethdev.h:807
rte_eth_rxmode
Definition: rte_ethdev.h:393
rte_eth_dev_rx_intr_enable
int rte_eth_dev_rx_intr_enable(uint16_t port_id, uint16_t queue_id)
ETH_MQ_TX_VMDQ_DCB
Definition: rte_ethdev.h:379
RTE_ETH_EVENT_IPSEC_ESN_OVERFLOW
Definition: rte_ethdev.h:2577
rte_eth_iterator_next
uint16_t rte_eth_iterator_next(struct rte_dev_iterator *iter)
rte_eth_timesync_adjust_time
int rte_eth_timesync_adjust_time(uint16_t port_id, int64_t delta)
rte_eth_vmdq_dcb_conf::enable_default_pool
uint8_t enable_default_pool
Definition: rte_ethdev.h:669
rte_eth_tx_buffer_drop_callback
void rte_eth_tx_buffer_drop_callback(struct rte_mbuf **pkts, uint16_t unsent, void *userdata)
rte_eth_promiscuous_enable
void rte_eth_promiscuous_enable(uint16_t port_id)
rte_eth_dev_info::default_rxconf
struct rte_eth_rxconf default_rxconf
Definition: rte_ethdev.h:1112
rte_eth_vmdq_dcb_conf::nb_queue_pools
enum rte_eth_nb_pools nb_queue_pools
Definition: rte_ethdev.h:668
rte_eth_vmdq_rx_conf::rx_mode
uint32_t rx_mode
Definition: rte_ethdev.h:704
rte_eth_dcb_tc_queue_mapping::tc_txq
struct rte_eth_dcb_tc_queue_mapping::@120 tc_txq[ETH_MAX_VMDQ_POOL][ETH_DCB_NUM_TCS]
rte_ethdev_core.h
rte_eth_dev_info::vmdq_queue_num
uint16_t vmdq_queue_num
Definition: rte_ethdev.h:1115
rte_eth_txmode::hw_vlan_reject_untagged
__extension__ uint8_t hw_vlan_reject_untagged
Definition: rte_ethdev.h:727
rte_eth_conf::vmdq_dcb_conf
struct rte_eth_vmdq_dcb_conf vmdq_dcb_conf
Definition: rte_ethdev.h:917
rte_eth_dev_pool_ops_supported
int rte_eth_dev_pool_ops_supported(uint16_t port_id, const char *pool)
RTE_FDIR_NO_REPORT_STATUS
Definition: rte_ethdev.h:849
rte_eth_allmulticast_get
int rte_eth_allmulticast_get(uint16_t port_id)
rte_eth_mirror_rule_set
int rte_eth_mirror_rule_set(uint16_t port_id, struct rte_eth_mirror_conf *mirror_conf, uint8_t rule_id, uint8_t on)
rte_eth_nb_pools
rte_eth_nb_pools
Definition: rte_ethdev.h:626
RTE_FC_NONE
Definition: rte_ethdev.h:804
rte_eth_stats::q_obytes
uint64_t q_obytes[RTE_ETHDEV_QUEUE_STAT_CNTRS]
Definition: rte_ethdev.h:260
rte_eth_xstats_reset
void rte_eth_xstats_reset(uint16_t port_id)
rte_eth_dev_info::hash_key_size
uint8_t hash_key_size
Definition: rte_ethdev.h:1109
rte_eth_dev_info::max_vmdq_pools
uint16_t max_vmdq_pools
Definition: rte_ethdev.h:1098
rte_eth_fdir_flex_conf
Definition: rte_eth_ctrl.h:646
rte_eth_dev_info::min_rx_bufsize
uint32_t min_rx_bufsize
Definition: rte_ethdev.h:1090
rte_eth_fc_conf
Definition: rte_ethdev.h:815
rte_eth_dev_l2_tunnel_eth_type_conf
int rte_eth_dev_l2_tunnel_eth_type_conf(uint16_t port_id, struct rte_eth_l2_tunnel_conf *l2_tunnel)
rte_eth_vmdq_rx_conf::vlan_id
uint16_t vlan_id
Definition: rte_ethdev.h:706
rte_eth_stats::opackets
uint64_t opackets
Definition: rte_ethdev.h:244
rte_eth_allmulticast_disable
void rte_eth_allmulticast_disable(uint16_t port_id)
rte_eth_dev_set_vlan_strip_on_queue
int rte_eth_dev_set_vlan_strip_on_queue(uint16_t port_id, uint16_t rx_queue_id, int on)
rte_eth_dev_reset
int rte_eth_dev_reset(uint16_t port_id)
rte_eth_tx_buffer_count_callback
void rte_eth_tx_buffer_count_callback(struct rte_mbuf **pkts, uint16_t unsent, void *userdata)
rte_eth_rss_conf
Definition: rte_ethdev.h:442
rte_eth_conf::txmode
struct rte_eth_txmode txmode
Definition: rte_ethdev.h:909
rte_eth_fc_conf::low_water
uint32_t low_water
Definition: rte_ethdev.h:817
rte_eth_rxq_info::mp
struct rte_mempool * mp
Definition: rte_ethdev.h:1141
ETH_MQ_RX_VMDQ_DCB
Definition: rte_ethdev.h:359
rte_eth_conf::dcb_capability_en
uint32_t dcb_capability_en
Definition: rte_ethdev.h:934
RTE_ETH_EVENT_IPSEC_MAX
Definition: rte_ethdev.h:2583
rte_eth_dev_info::max_rx_pktlen
uint32_t max_rx_pktlen
Definition: rte_ethdev.h:1091
rte_tx_callback_fn
uint16_t(* rte_tx_callback_fn)(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[], uint16_t nb_pkts, void *user_param)
Definition: rte_ethdev.h:1298
rte_eth_dev_info::if_index
unsigned int if_index
Definition: rte_ethdev.h:1087
rte_eth_dev_set_vlan_ether_type
int rte_eth_dev_set_vlan_ether_type(uint16_t port_id, enum rte_vlan_type vlan_type, uint16_t tag_type)
rte_eth_txmode
Definition: rte_ethdev.h:714
rte_eth_dcb_info::tc_queue
struct rte_eth_dcb_tc_queue_mapping tc_queue
Definition: rte_ethdev.h:1213
rte_eth_stats::q_ibytes
uint64_t q_ibytes[RTE_ETHDEV_QUEUE_STAT_CNTRS]
Definition: rte_ethdev.h:258
rte_eth_rss_conf::rss_key
uint8_t * rss_key
Definition: rte_ethdev.h:443
rte_eth_dev_info::default_txconf
struct rte_eth_txconf default_txconf
Definition: rte_ethdev.h:1113
RTE_ETH_DEV_REMOVED
Definition: rte_ethdev.h:1310
RTE_ETH_EVENT_IPSEC_UNKNOWN
Definition: rte_ethdev.h:2575
rte_eth_txq_info::nb_desc
uint16_t nb_desc
Definition: rte_ethdev.h:1153
RTE_FC_TX_PAUSE
Definition: rte_ethdev.h:806
rte_eth_dev_callback_unregister
int rte_eth_dev_callback_unregister(uint16_t port_id, enum rte_eth_event_type event, rte_eth_dev_cb_fn cb_fn, void *cb_arg)
rte_eth_dev_portconf
Definition: rte_ethdev.h:1047
rte_eth_dev_info::tx_offload_capa
uint64_t tx_offload_capa
Definition: rte_ethdev.h:1101
rte_eth_dev_set_link_up
int rte_eth_dev_set_link_up(uint16_t port_id)
rte_eth_rxq_info::nb_desc
uint16_t nb_desc
Definition: rte_ethdev.h:1144
rte_eth_dev_tx_queue_start
int rte_eth_dev_tx_queue_start(uint16_t port_id, uint16_t tx_queue_id)
rte_eth_dev_info
Definition: rte_ethdev.h:1084
rte_eth_dev_info::nb_tx_queues
uint16_t nb_tx_queues
Definition: rte_ethdev.h:1122
rte_eth_conf::vmdq_dcb_tx_conf
struct rte_eth_vmdq_dcb_tx_conf vmdq_dcb_tx_conf
Definition: rte_ethdev.h:925
rte_eth_stats::ibytes
uint64_t ibytes
Definition: rte_ethdev.h:245
rte_eth_txconf::tx_deferred_start
uint8_t tx_deferred_start
Definition: rte_ethdev.h:759
rte_eth_txq_info::conf
struct rte_eth_txconf conf
Definition: rte_ethdev.h:1152
rte_eth_conf
Definition: rte_ethdev.h:900
rte_eth_dev_socket_id
int rte_eth_dev_socket_id(uint16_t port_id)
rte_eth_stats::oerrors
uint64_t oerrors
Definition: rte_ethdev.h:252
rte_device
Definition: rte_dev.h:104
rte_eth_tx_buffer
static __rte_always_inline uint16_t rte_eth_tx_buffer(uint16_t port_id, uint16_t queue_id, struct rte_eth_dev_tx_buffer *buffer, struct rte_mbuf *tx_pkt)
Definition: rte_ethdev.h:4344
rte_eth_vmdq_rx_conf::pools
uint64_t pools
Definition: rte_ethdev.h:707
ETH_32_POOLS
Definition: rte_ethdev.h:629
rte_eth_stats
Definition: rte_ethdev.h:242
rte_eth_mirror_conf
Definition: rte_ethdev.h:592
rte_eth_dev_get_port_by_name
int rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id)
rte_eth_xstat_name
Definition: rte_ethdev.h:1180
rte_eth_xstat
Definition: rte_ethdev.h:1168
rte_eth_dev_udp_tunnel_port_add
int rte_eth_dev_udp_tunnel_port_add(uint16_t port_id, struct rte_eth_udp_tunnel *tunnel_udp)
rte_eth_dev_info::max_vfs
uint16_t max_vfs
Definition: rte_ethdev.h:1097
rte_eth_stats::q_ipackets
uint64_t q_ipackets[RTE_ETHDEV_QUEUE_STAT_CNTRS]
Definition: rte_ethdev.h:254
rte_eth_fc_mode
rte_eth_fc_mode
Definition: rte_ethdev.h:803
rte_eth_rss_reta_entry64::mask
uint64_t mask
Definition: rte_ethdev.h:607
rte_eth_rxq_info::scattered_rx
uint8_t scattered_rx
Definition: rte_ethdev.h:1143
ETH_MQ_RX_RSS
Definition: rte_ethdev.h:348
rte_eth_dev_uc_all_hash_table_set
int rte_eth_dev_uc_all_hash_table_set(uint16_t port_id, uint8_t on)
rte_eth_dev_info::max_tx_queues
uint16_t max_tx_queues
Definition: rte_ethdev.h:1093
ETH_8_TCS
Definition: rte_ethdev.h:619
rte_eth_conf::fdir_conf
struct rte_fdir_conf fdir_conf
Definition: rte_ethdev.h:935
rte_vlan_type
rte_vlan_type
Definition: rte_ethdev.h:410
rte_eth_rxconf::rx_thresh
struct rte_eth_thresh rx_thresh
Definition: rte_ethdev.h:738
rte_eth_add_first_rx_callback
const struct rte_eth_rxtx_callback * rte_eth_add_first_rx_callback(uint16_t port_id, uint16_t queue_id, rte_rx_callback_fn fn, void *user_param)
rte_eth_dev_get_supported_ptypes
int rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask, uint32_t *ptypes, int num)
RTE_ETH_EVENT_INTR_RMV
Definition: rte_ethdev.h:2622
rte_eth_rxq_info::conf
struct rte_eth_rxconf conf
Definition: rte_ethdev.h:1142
rte_eth_dev_owner_set
int __rte_experimental rte_eth_dev_owner_set(const uint16_t port_id, const struct rte_eth_dev_owner *owner)
rte_eth_xstats_get_by_id
int rte_eth_xstats_get_by_id(uint16_t port_id, const uint64_t *ids, uint64_t *values, unsigned int size)
rte_eth_vmdq_dcb_conf::dcb_tc
uint8_t dcb_tc[ETH_DCB_NUM_USER_PRIORITIES]
Definition: rte_ethdev.h:676
rte_eth_rxconf::rx_drop_en
uint8_t rx_drop_en
Definition: rte_ethdev.h:740
rte_eth_thresh::wthresh
uint8_t wthresh
Definition: rte_ethdev.h:329
rte_eth_mirror_conf::vlan
struct rte_eth_vlan_mirror vlan
Definition: rte_ethdev.h:597
rte_errno
#define rte_errno
Definition: rte_errno.h:29
rte_eth_mirror_conf::pool_mask
uint64_t pool_mask
Definition: rte_ethdev.h:595
rte_eth_txconf::tx_rs_thresh
uint16_t tx_rs_thresh
Definition: rte_ethdev.h:755
rte_eth_vmdq_rx_conf::pool_map
struct rte_eth_vmdq_rx_conf::@116 pool_map[ETH_VMDQ_MAX_VLAN_FILTERS]
rte_eth_timesync_enable
int rte_eth_timesync_enable(uint16_t port_id)
rte_eth_link_get_nowait
void rte_eth_link_get_nowait(uint16_t port_id, struct rte_eth_link *link)
rte_dev.h
ETH_MQ_RX_DCB_RSS
Definition: rte_ethdev.h:352
rte_eth_dev_l2_tunnel_offload_set
int rte_eth_dev_l2_tunnel_offload_set(uint16_t port_id, struct rte_eth_l2_tunnel_conf *l2_tunnel, uint32_t mask, uint8_t en)
rte_eth_dev_info::max_mac_addrs
uint32_t max_mac_addrs
Definition: rte_ethdev.h:1094
rte_eth_stats::q_opackets
uint64_t q_opackets[RTE_ETHDEV_QUEUE_STAT_CNTRS]
Definition: rte_ethdev.h:256
rte_eth_dev_set_link_down
int rte_eth_dev_set_link_down(uint16_t port_id)
rte_eth_conf::vmdq_rx_conf
struct rte_eth_vmdq_rx_conf vmdq_rx_conf
Definition: rte_ethdev.h:921
rte_eth_event_ipsec_subtype
rte_eth_event_ipsec_subtype
Definition: rte_ethdev.h:2574
rte_eth_dev_rss_reta_query
int rte_eth_dev_rss_reta_query(uint16_t port_id, struct rte_eth_rss_reta_entry64 *reta_conf, uint16_t reta_size)
rte_eth_pfc_conf::priority
uint8_t priority
Definition: rte_ethdev.h:832
rte_eth_switch_info::name
const char * name
Definition: rte_ethdev.h:1063