151 #define RTE_ETHDEV_HAS_LRO_SUPPORT 154 #ifdef RTE_LIBRTE_ETHDEV_DEBUG 155 #define RTE_ETHDEV_DEBUG_RX 156 #define RTE_ETHDEV_DEBUG_TX 160 #include <rte_compat.h> 168 #include <rte_config.h> 172 #include "rte_dev_info.h" 178 extern int rte_eth_dev_logtype;
179 #define RTE_LOGTYPE_ETHDEV rte_eth_dev_logtype 181 #define RTE_ETHDEV_LOG_LINE(level, ...) \ 182 RTE_LOG_LINE(level, ETHDEV, "" __VA_ARGS__) 247 #define RTE_ETH_FOREACH_MATCHING_DEV(id, devargs, iter) \ 248 for (rte_eth_iterator_init(iter, devargs), \ 249 id = rte_eth_iterator_next(iter); \ 250 id != RTE_MAX_ETHPORTS; \ 251 id = rte_eth_iterator_next(iter)) 280 #define RTE_ETH_LINK_SPEED_AUTONEG 0 281 #define RTE_ETH_LINK_SPEED_FIXED RTE_BIT32(0) 282 #define RTE_ETH_LINK_SPEED_10M_HD RTE_BIT32(1) 283 #define RTE_ETH_LINK_SPEED_10M RTE_BIT32(2) 284 #define RTE_ETH_LINK_SPEED_100M_HD RTE_BIT32(3) 285 #define RTE_ETH_LINK_SPEED_100M RTE_BIT32(4) 286 #define RTE_ETH_LINK_SPEED_1G RTE_BIT32(5) 287 #define RTE_ETH_LINK_SPEED_2_5G RTE_BIT32(6) 288 #define RTE_ETH_LINK_SPEED_5G RTE_BIT32(7) 289 #define RTE_ETH_LINK_SPEED_10G RTE_BIT32(8) 290 #define RTE_ETH_LINK_SPEED_20G RTE_BIT32(9) 291 #define RTE_ETH_LINK_SPEED_25G RTE_BIT32(10) 292 #define RTE_ETH_LINK_SPEED_40G RTE_BIT32(11) 293 #define RTE_ETH_LINK_SPEED_50G RTE_BIT32(12) 294 #define RTE_ETH_LINK_SPEED_56G RTE_BIT32(13) 295 #define RTE_ETH_LINK_SPEED_100G RTE_BIT32(14) 296 #define RTE_ETH_LINK_SPEED_200G RTE_BIT32(15) 297 #define RTE_ETH_LINK_SPEED_400G RTE_BIT32(16) 298 #define RTE_ETH_LINK_SPEED_800G RTE_BIT32(17) 304 #define RTE_ETH_SPEED_NUM_NONE 0 305 #define RTE_ETH_SPEED_NUM_10M 10 306 #define RTE_ETH_SPEED_NUM_100M 100 307 #define RTE_ETH_SPEED_NUM_1G 1000 308 #define RTE_ETH_SPEED_NUM_2_5G 2500 309 #define RTE_ETH_SPEED_NUM_5G 5000 310 #define RTE_ETH_SPEED_NUM_10G 10000 311 #define RTE_ETH_SPEED_NUM_20G 20000 312 #define RTE_ETH_SPEED_NUM_25G 25000 313 #define RTE_ETH_SPEED_NUM_40G 40000 314 #define RTE_ETH_SPEED_NUM_50G 50000 315 #define RTE_ETH_SPEED_NUM_56G 56000 316 #define RTE_ETH_SPEED_NUM_100G 100000 317 #define RTE_ETH_SPEED_NUM_200G 200000 318 #define RTE_ETH_SPEED_NUM_400G 400000 319 #define RTE_ETH_SPEED_NUM_800G 800000 320 #define RTE_ETH_SPEED_NUM_UNKNOWN UINT32_MAX 326 enum rte_eth_link_connector { 379 #define RTE_ETH_LINK_HALF_DUPLEX 0 380 #define RTE_ETH_LINK_FULL_DUPLEX 1 381 #define RTE_ETH_LINK_DOWN 0 382 #define RTE_ETH_LINK_UP 1 383 #define RTE_ETH_LINK_FIXED 0 384 #define RTE_ETH_LINK_AUTONEG 1 385 #define RTE_ETH_LINK_MAX_STR_LEN 40 389 #define RTE_ETH_SPEED_LANES_TO_CAPA(x) RTE_BIT32(x) 410 #define RTE_ETH_MQ_RX_RSS_FLAG RTE_BIT32(0) 411 #define RTE_ETH_MQ_RX_DCB_FLAG RTE_BIT32(1) 412 #define RTE_ETH_MQ_RX_VMDQ_FLAG RTE_BIT32(2) 419 enum rte_eth_rx_mq_mode { 477 RTE_ETH_VLAN_TYPE_UNKNOWN = 0,
480 RTE_ETH_VLAN_TYPE_MAX,
512 RTE_ETH_HASH_FUNCTION_MAX,
515 #define RTE_ETH_HASH_ALGO_TO_CAPA(x) RTE_BIT32(x) 516 #define RTE_ETH_HASH_ALGO_CAPA_MASK(x) RTE_BIT32(RTE_ETH_HASH_FUNCTION_ ## x) 553 #define RTE_ETH_FLOW_UNKNOWN 0 554 #define RTE_ETH_FLOW_RAW 1 555 #define RTE_ETH_FLOW_IPV4 2 556 #define RTE_ETH_FLOW_FRAG_IPV4 3 557 #define RTE_ETH_FLOW_NONFRAG_IPV4_TCP 4 558 #define RTE_ETH_FLOW_NONFRAG_IPV4_UDP 5 559 #define RTE_ETH_FLOW_NONFRAG_IPV4_SCTP 6 560 #define RTE_ETH_FLOW_NONFRAG_IPV4_OTHER 7 561 #define RTE_ETH_FLOW_IPV6 8 562 #define RTE_ETH_FLOW_FRAG_IPV6 9 563 #define RTE_ETH_FLOW_NONFRAG_IPV6_TCP 10 564 #define RTE_ETH_FLOW_NONFRAG_IPV6_UDP 11 565 #define RTE_ETH_FLOW_NONFRAG_IPV6_SCTP 12 566 #define RTE_ETH_FLOW_NONFRAG_IPV6_OTHER 13 567 #define RTE_ETH_FLOW_L2_PAYLOAD 14 568 #define RTE_ETH_FLOW_IPV6_EX 15 569 #define RTE_ETH_FLOW_IPV6_TCP_EX 16 570 #define RTE_ETH_FLOW_IPV6_UDP_EX 17 572 #define RTE_ETH_FLOW_PORT 18 573 #define RTE_ETH_FLOW_VXLAN 19 574 #define RTE_ETH_FLOW_GENEVE 20 575 #define RTE_ETH_FLOW_NVGRE 21 576 #define RTE_ETH_FLOW_VXLAN_GPE 22 577 #define RTE_ETH_FLOW_GTPU 23 578 #define RTE_ETH_FLOW_MAX 24 584 #define RTE_ETH_RSS_IPV4 RTE_BIT64(2) 585 #define RTE_ETH_RSS_FRAG_IPV4 RTE_BIT64(3) 586 #define RTE_ETH_RSS_NONFRAG_IPV4_TCP RTE_BIT64(4) 587 #define RTE_ETH_RSS_NONFRAG_IPV4_UDP RTE_BIT64(5) 588 #define RTE_ETH_RSS_NONFRAG_IPV4_SCTP RTE_BIT64(6) 589 #define RTE_ETH_RSS_NONFRAG_IPV4_OTHER RTE_BIT64(7) 590 #define RTE_ETH_RSS_IPV6 RTE_BIT64(8) 591 #define RTE_ETH_RSS_FRAG_IPV6 RTE_BIT64(9) 592 #define RTE_ETH_RSS_NONFRAG_IPV6_TCP RTE_BIT64(10) 593 #define RTE_ETH_RSS_NONFRAG_IPV6_UDP RTE_BIT64(11) 594 #define RTE_ETH_RSS_NONFRAG_IPV6_SCTP RTE_BIT64(12) 595 #define RTE_ETH_RSS_NONFRAG_IPV6_OTHER RTE_BIT64(13) 596 #define RTE_ETH_RSS_L2_PAYLOAD RTE_BIT64(14) 597 #define RTE_ETH_RSS_IPV6_EX RTE_BIT64(15) 598 #define RTE_ETH_RSS_IPV6_TCP_EX RTE_BIT64(16) 599 #define RTE_ETH_RSS_IPV6_UDP_EX RTE_BIT64(17) 600 #define RTE_ETH_RSS_PORT RTE_BIT64(18) 601 #define RTE_ETH_RSS_VXLAN RTE_BIT64(19) 602 #define RTE_ETH_RSS_GENEVE RTE_BIT64(20) 603 #define RTE_ETH_RSS_NVGRE RTE_BIT64(21) 604 #define RTE_ETH_RSS_GTPU RTE_BIT64(23) 605 #define RTE_ETH_RSS_ETH RTE_BIT64(24) 606 #define RTE_ETH_RSS_S_VLAN RTE_BIT64(25) 607 #define RTE_ETH_RSS_C_VLAN RTE_BIT64(26) 608 #define RTE_ETH_RSS_ESP RTE_BIT64(27) 609 #define RTE_ETH_RSS_AH RTE_BIT64(28) 610 #define RTE_ETH_RSS_L2TPV3 RTE_BIT64(29) 611 #define RTE_ETH_RSS_PFCP RTE_BIT64(30) 612 #define RTE_ETH_RSS_PPPOE RTE_BIT64(31) 613 #define RTE_ETH_RSS_ECPRI RTE_BIT64(32) 614 #define RTE_ETH_RSS_MPLS RTE_BIT64(33) 615 #define RTE_ETH_RSS_IPV4_CHKSUM RTE_BIT64(34) 629 #define RTE_ETH_RSS_L4_CHKSUM RTE_BIT64(35) 631 #define RTE_ETH_RSS_L2TPV2 RTE_BIT64(36) 632 #define RTE_ETH_RSS_IPV6_FLOW_LABEL RTE_BIT64(37) 635 #define RTE_ETH_RSS_IB_BTH RTE_BIT64(38) 646 #define RTE_ETH_RSS_L3_SRC_ONLY RTE_BIT64(63) 647 #define RTE_ETH_RSS_L3_DST_ONLY RTE_BIT64(62) 648 #define RTE_ETH_RSS_L4_SRC_ONLY RTE_BIT64(61) 649 #define RTE_ETH_RSS_L4_DST_ONLY RTE_BIT64(60) 650 #define RTE_ETH_RSS_L2_SRC_ONLY RTE_BIT64(59) 651 #define RTE_ETH_RSS_L2_DST_ONLY RTE_BIT64(58) 659 #define RTE_ETH_RSS_L3_PRE32 RTE_BIT64(57) 660 #define RTE_ETH_RSS_L3_PRE40 RTE_BIT64(56) 661 #define RTE_ETH_RSS_L3_PRE48 RTE_BIT64(55) 662 #define RTE_ETH_RSS_L3_PRE56 RTE_BIT64(54) 663 #define RTE_ETH_RSS_L3_PRE64 RTE_BIT64(53) 664 #define RTE_ETH_RSS_L3_PRE96 RTE_BIT64(52) 679 #define RTE_ETH_RSS_LEVEL_PMD_DEFAULT (UINT64_C(0) << 50) 685 #define RTE_ETH_RSS_LEVEL_OUTERMOST (UINT64_C(1) << 50) 691 #define RTE_ETH_RSS_LEVEL_INNERMOST (UINT64_C(2) << 50) 692 #define RTE_ETH_RSS_LEVEL_MASK (UINT64_C(3) << 50) 694 #define RTE_ETH_RSS_LEVEL(rss_hf) ((rss_hf & RTE_ETH_RSS_LEVEL_MASK) >> 50) 706 static inline uint64_t
709 if ((rss_hf & RTE_ETH_RSS_L3_SRC_ONLY) && (rss_hf & RTE_ETH_RSS_L3_DST_ONLY))
710 rss_hf &= ~(RTE_ETH_RSS_L3_SRC_ONLY | RTE_ETH_RSS_L3_DST_ONLY);
712 if ((rss_hf & RTE_ETH_RSS_L4_SRC_ONLY) && (rss_hf & RTE_ETH_RSS_L4_DST_ONLY))
713 rss_hf &= ~(RTE_ETH_RSS_L4_SRC_ONLY | RTE_ETH_RSS_L4_DST_ONLY);
718 #define RTE_ETH_RSS_IPV6_PRE32 ( \ 720 RTE_ETH_RSS_L3_PRE32) 722 #define RTE_ETH_RSS_IPV6_PRE40 ( \ 724 RTE_ETH_RSS_L3_PRE40) 726 #define RTE_ETH_RSS_IPV6_PRE48 ( \ 728 RTE_ETH_RSS_L3_PRE48) 730 #define RTE_ETH_RSS_IPV6_PRE56 ( \ 732 RTE_ETH_RSS_L3_PRE56) 734 #define RTE_ETH_RSS_IPV6_PRE64 ( \ 736 RTE_ETH_RSS_L3_PRE64) 738 #define RTE_ETH_RSS_IPV6_PRE96 ( \ 740 RTE_ETH_RSS_L3_PRE96) 742 #define RTE_ETH_RSS_IPV6_PRE32_UDP ( \ 743 RTE_ETH_RSS_NONFRAG_IPV6_UDP | \ 744 RTE_ETH_RSS_L3_PRE32) 746 #define RTE_ETH_RSS_IPV6_PRE40_UDP ( \ 747 RTE_ETH_RSS_NONFRAG_IPV6_UDP | \ 748 RTE_ETH_RSS_L3_PRE40) 750 #define RTE_ETH_RSS_IPV6_PRE48_UDP ( \ 751 RTE_ETH_RSS_NONFRAG_IPV6_UDP | \ 752 RTE_ETH_RSS_L3_PRE48) 754 #define RTE_ETH_RSS_IPV6_PRE56_UDP ( \ 755 RTE_ETH_RSS_NONFRAG_IPV6_UDP | \ 756 RTE_ETH_RSS_L3_PRE56) 758 #define RTE_ETH_RSS_IPV6_PRE64_UDP ( \ 759 RTE_ETH_RSS_NONFRAG_IPV6_UDP | \ 760 RTE_ETH_RSS_L3_PRE64) 762 #define RTE_ETH_RSS_IPV6_PRE96_UDP ( \ 763 RTE_ETH_RSS_NONFRAG_IPV6_UDP | \ 764 RTE_ETH_RSS_L3_PRE96) 766 #define RTE_ETH_RSS_IPV6_PRE32_TCP ( \ 767 RTE_ETH_RSS_NONFRAG_IPV6_TCP | \ 768 RTE_ETH_RSS_L3_PRE32) 770 #define RTE_ETH_RSS_IPV6_PRE40_TCP ( \ 771 RTE_ETH_RSS_NONFRAG_IPV6_TCP | \ 772 RTE_ETH_RSS_L3_PRE40) 774 #define RTE_ETH_RSS_IPV6_PRE48_TCP ( \ 775 RTE_ETH_RSS_NONFRAG_IPV6_TCP | \ 776 RTE_ETH_RSS_L3_PRE48) 778 #define RTE_ETH_RSS_IPV6_PRE56_TCP ( \ 779 RTE_ETH_RSS_NONFRAG_IPV6_TCP | \ 780 RTE_ETH_RSS_L3_PRE56) 782 #define RTE_ETH_RSS_IPV6_PRE64_TCP ( \ 783 RTE_ETH_RSS_NONFRAG_IPV6_TCP | \ 784 RTE_ETH_RSS_L3_PRE64) 786 #define RTE_ETH_RSS_IPV6_PRE96_TCP ( \ 787 RTE_ETH_RSS_NONFRAG_IPV6_TCP | \ 788 RTE_ETH_RSS_L3_PRE96) 790 #define RTE_ETH_RSS_IPV6_PRE32_SCTP ( \ 791 RTE_ETH_RSS_NONFRAG_IPV6_SCTP | \ 792 RTE_ETH_RSS_L3_PRE32) 794 #define RTE_ETH_RSS_IPV6_PRE40_SCTP ( \ 795 RTE_ETH_RSS_NONFRAG_IPV6_SCTP | \ 796 RTE_ETH_RSS_L3_PRE40) 798 #define RTE_ETH_RSS_IPV6_PRE48_SCTP ( \ 799 RTE_ETH_RSS_NONFRAG_IPV6_SCTP | \ 800 RTE_ETH_RSS_L3_PRE48) 802 #define RTE_ETH_RSS_IPV6_PRE56_SCTP ( \ 803 RTE_ETH_RSS_NONFRAG_IPV6_SCTP | \ 804 RTE_ETH_RSS_L3_PRE56) 806 #define RTE_ETH_RSS_IPV6_PRE64_SCTP ( \ 807 RTE_ETH_RSS_NONFRAG_IPV6_SCTP | \ 808 RTE_ETH_RSS_L3_PRE64) 810 #define RTE_ETH_RSS_IPV6_PRE96_SCTP ( \ 811 RTE_ETH_RSS_NONFRAG_IPV6_SCTP | \ 812 RTE_ETH_RSS_L3_PRE96) 814 #define RTE_ETH_RSS_IP ( \ 816 RTE_ETH_RSS_FRAG_IPV4 | \ 817 RTE_ETH_RSS_NONFRAG_IPV4_OTHER | \ 819 RTE_ETH_RSS_FRAG_IPV6 | \ 820 RTE_ETH_RSS_NONFRAG_IPV6_OTHER | \ 823 #define RTE_ETH_RSS_UDP ( \ 824 RTE_ETH_RSS_NONFRAG_IPV4_UDP | \ 825 RTE_ETH_RSS_NONFRAG_IPV6_UDP | \ 826 RTE_ETH_RSS_IPV6_UDP_EX) 828 #define RTE_ETH_RSS_TCP ( \ 829 RTE_ETH_RSS_NONFRAG_IPV4_TCP | \ 830 RTE_ETH_RSS_NONFRAG_IPV6_TCP | \ 831 RTE_ETH_RSS_IPV6_TCP_EX) 833 #define RTE_ETH_RSS_SCTP ( \ 834 RTE_ETH_RSS_NONFRAG_IPV4_SCTP | \ 835 RTE_ETH_RSS_NONFRAG_IPV6_SCTP) 837 #define RTE_ETH_RSS_TUNNEL ( \ 838 RTE_ETH_RSS_VXLAN | \ 839 RTE_ETH_RSS_GENEVE | \ 842 #define RTE_ETH_RSS_VLAN ( \ 843 RTE_ETH_RSS_S_VLAN | \ 847 #define RTE_ETH_RSS_PROTO_MASK ( \ 849 RTE_ETH_RSS_FRAG_IPV4 | \ 850 RTE_ETH_RSS_NONFRAG_IPV4_TCP | \ 851 RTE_ETH_RSS_NONFRAG_IPV4_UDP | \ 852 RTE_ETH_RSS_NONFRAG_IPV4_SCTP | \ 853 RTE_ETH_RSS_NONFRAG_IPV4_OTHER | \ 855 RTE_ETH_RSS_FRAG_IPV6 | \ 856 RTE_ETH_RSS_NONFRAG_IPV6_TCP | \ 857 RTE_ETH_RSS_NONFRAG_IPV6_UDP | \ 858 RTE_ETH_RSS_NONFRAG_IPV6_SCTP | \ 859 RTE_ETH_RSS_NONFRAG_IPV6_OTHER | \ 860 RTE_ETH_RSS_L2_PAYLOAD | \ 861 RTE_ETH_RSS_IPV6_EX | \ 862 RTE_ETH_RSS_IPV6_TCP_EX | \ 863 RTE_ETH_RSS_IPV6_UDP_EX | \ 865 RTE_ETH_RSS_VXLAN | \ 866 RTE_ETH_RSS_GENEVE | \ 867 RTE_ETH_RSS_NVGRE | \ 875 #define RTE_ETH_RSS_RETA_SIZE_64 64 876 #define RTE_ETH_RSS_RETA_SIZE_128 128 877 #define RTE_ETH_RSS_RETA_SIZE_256 256 878 #define RTE_ETH_RSS_RETA_SIZE_512 512 879 #define RTE_ETH_RETA_GROUP_SIZE 64 882 #define RTE_ETH_VMDQ_MAX_VLAN_FILTERS 64 883 #define RTE_ETH_DCB_NUM_USER_PRIORITIES 8 884 #define RTE_ETH_VMDQ_DCB_NUM_QUEUES 128 885 #define RTE_ETH_DCB_NUM_QUEUES 128 889 #define RTE_ETH_DCB_PG_SUPPORT RTE_BIT32(0) 890 #define RTE_ETH_DCB_PFC_SUPPORT RTE_BIT32(1) 894 #define RTE_ETH_VLAN_STRIP_OFFLOAD 0x0001 895 #define RTE_ETH_VLAN_FILTER_OFFLOAD 0x0002 896 #define RTE_ETH_VLAN_EXTEND_OFFLOAD 0x0004 897 #define RTE_ETH_QINQ_STRIP_OFFLOAD 0x0008 899 #define RTE_ETH_VLAN_STRIP_MASK 0x0001 900 #define RTE_ETH_VLAN_FILTER_MASK 0x0002 901 #define RTE_ETH_VLAN_EXTEND_MASK 0x0004 902 #define RTE_ETH_QINQ_STRIP_MASK 0x0008 903 #define RTE_ETH_VLAN_ID_MAX 0x0FFF 907 #define RTE_ETH_NUM_RECEIVE_MAC_ADDR 128 910 #define RTE_ETH_VMDQ_NUM_UC_HASH_ARRAY 128 916 #define RTE_ETH_VMDQ_ACCEPT_UNTAG RTE_BIT32(0) 918 #define RTE_ETH_VMDQ_ACCEPT_HASH_MC RTE_BIT32(1) 920 #define RTE_ETH_VMDQ_ACCEPT_HASH_UC RTE_BIT32(2) 922 #define RTE_ETH_VMDQ_ACCEPT_BROADCAST RTE_BIT32(3) 924 #define RTE_ETH_VMDQ_ACCEPT_MULTICAST RTE_BIT32(4) 937 uint16_t
reta[RTE_ETH_RETA_GROUP_SIZE];
961 struct rte_eth_dcb_rx_conf {
967 struct rte_eth_vmdq_dcb_tx_conf {
973 struct rte_eth_dcb_tx_conf {
979 struct rte_eth_vmdq_tx_conf {
1205 uint16_t rx_nmempool;
1272 #define RTE_ETH_MAX_HAIRPIN_PEERS 32 1486 RTE_ETH_TUNNEL_TYPE_NONE = 0,
1487 RTE_ETH_TUNNEL_TYPE_VXLAN,
1488 RTE_ETH_TUNNEL_TYPE_GENEVE,
1489 RTE_ETH_TUNNEL_TYPE_TEREDO,
1490 RTE_ETH_TUNNEL_TYPE_NVGRE,
1491 RTE_ETH_TUNNEL_TYPE_IP_IN_GRE,
1492 RTE_ETH_L2_TUNNEL_TYPE_E_TAG,
1493 RTE_ETH_TUNNEL_TYPE_VXLAN_GPE,
1494 RTE_ETH_TUNNEL_TYPE_ECPRI,
1495 RTE_ETH_TUNNEL_TYPE_MAX,
1535 #define rte_intr_conf rte_eth_intr_conf 1583 #define RTE_ETH_RX_OFFLOAD_VLAN_STRIP RTE_BIT64(0) 1584 #define RTE_ETH_RX_OFFLOAD_IPV4_CKSUM RTE_BIT64(1) 1585 #define RTE_ETH_RX_OFFLOAD_UDP_CKSUM RTE_BIT64(2) 1586 #define RTE_ETH_RX_OFFLOAD_TCP_CKSUM RTE_BIT64(3) 1587 #define RTE_ETH_RX_OFFLOAD_TCP_LRO RTE_BIT64(4) 1588 #define RTE_ETH_RX_OFFLOAD_QINQ_STRIP RTE_BIT64(5) 1589 #define RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM RTE_BIT64(6) 1590 #define RTE_ETH_RX_OFFLOAD_MACSEC_STRIP RTE_BIT64(7) 1591 #define RTE_ETH_RX_OFFLOAD_VLAN_FILTER RTE_BIT64(9) 1592 #define RTE_ETH_RX_OFFLOAD_VLAN_EXTEND RTE_BIT64(10) 1593 #define RTE_ETH_RX_OFFLOAD_SCATTER RTE_BIT64(13) 1599 #define RTE_ETH_RX_OFFLOAD_TIMESTAMP RTE_BIT64(14) 1600 #define RTE_ETH_RX_OFFLOAD_SECURITY RTE_BIT64(15) 1601 #define RTE_ETH_RX_OFFLOAD_KEEP_CRC RTE_BIT64(16) 1602 #define RTE_ETH_RX_OFFLOAD_SCTP_CKSUM RTE_BIT64(17) 1603 #define RTE_ETH_RX_OFFLOAD_OUTER_UDP_CKSUM RTE_BIT64(18) 1604 #define RTE_ETH_RX_OFFLOAD_RSS_HASH RTE_BIT64(19) 1605 #define RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT RTE_BIT64(20) 1607 #define RTE_ETH_RX_OFFLOAD_CHECKSUM (RTE_ETH_RX_OFFLOAD_IPV4_CKSUM | \ 1608 RTE_ETH_RX_OFFLOAD_UDP_CKSUM | \ 1609 RTE_ETH_RX_OFFLOAD_TCP_CKSUM) 1610 #define RTE_ETH_RX_OFFLOAD_VLAN (RTE_ETH_RX_OFFLOAD_VLAN_STRIP | \ 1611 RTE_ETH_RX_OFFLOAD_VLAN_FILTER | \ 1612 RTE_ETH_RX_OFFLOAD_VLAN_EXTEND | \ 1613 RTE_ETH_RX_OFFLOAD_QINQ_STRIP) 1623 #define RTE_ETH_TX_OFFLOAD_VLAN_INSERT RTE_BIT64(0) 1624 #define RTE_ETH_TX_OFFLOAD_IPV4_CKSUM RTE_BIT64(1) 1625 #define RTE_ETH_TX_OFFLOAD_UDP_CKSUM RTE_BIT64(2) 1626 #define RTE_ETH_TX_OFFLOAD_TCP_CKSUM RTE_BIT64(3) 1627 #define RTE_ETH_TX_OFFLOAD_SCTP_CKSUM RTE_BIT64(4) 1628 #define RTE_ETH_TX_OFFLOAD_TCP_TSO RTE_BIT64(5) 1629 #define RTE_ETH_TX_OFFLOAD_UDP_TSO RTE_BIT64(6) 1630 #define RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM RTE_BIT64(7) 1631 #define RTE_ETH_TX_OFFLOAD_QINQ_INSERT RTE_BIT64(8) 1632 #define RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO RTE_BIT64(9) 1633 #define RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO RTE_BIT64(10) 1634 #define RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO RTE_BIT64(11) 1635 #define RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO RTE_BIT64(12) 1636 #define RTE_ETH_TX_OFFLOAD_MACSEC_INSERT RTE_BIT64(13) 1641 #define RTE_ETH_TX_OFFLOAD_MT_LOCKFREE RTE_BIT64(14) 1643 #define RTE_ETH_TX_OFFLOAD_MULTI_SEGS RTE_BIT64(15) 1651 #define RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE RTE_BIT64(16) 1652 #define RTE_ETH_TX_OFFLOAD_SECURITY RTE_BIT64(17) 1658 #define RTE_ETH_TX_OFFLOAD_UDP_TNL_TSO RTE_BIT64(18) 1664 #define RTE_ETH_TX_OFFLOAD_IP_TNL_TSO RTE_BIT64(19) 1666 #define RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM RTE_BIT64(20) 1672 #define RTE_ETH_TX_OFFLOAD_SEND_ON_TIMESTAMP RTE_BIT64(21) 1682 #define RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP RTE_BIT64(0) 1684 #define RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP RTE_BIT64(1) 1694 #define RTE_ETH_DEV_CAPA_RXQ_SHARE RTE_BIT64(2) 1696 #define RTE_ETH_DEV_CAPA_FLOW_RULE_KEEP RTE_BIT64(3) 1698 #define RTE_ETH_DEV_CAPA_FLOW_SHARED_OBJECT_KEEP RTE_BIT64(4) 1706 #define RTE_ETH_DEV_FALLBACK_RX_RINGSIZE 512 1707 #define RTE_ETH_DEV_FALLBACK_TX_RINGSIZE 512 1708 #define RTE_ETH_DEV_FALLBACK_RX_NBQUEUES 1 1709 #define RTE_ETH_DEV_FALLBACK_TX_NBQUEUES 1 1726 #define RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID (UINT16_MAX) 1845 uint32_t rss_algo_capa;
1885 #define RTE_ETH_QUEUE_STATE_STOPPED 0 1886 #define RTE_ETH_QUEUE_STATE_STARTED 1 1887 #define RTE_ETH_QUEUE_STATE_HAIRPIN 2 1894 struct __rte_cache_min_aligned rte_eth_rxq_info { 1951 #define RTE_ETH_BURST_FLAG_PER_QUEUE RTE_BIT64(0) 1960 #define RTE_ETH_BURST_MODE_INFO_SIZE 1024 1961 char info[RTE_ETH_BURST_MODE_INFO_SIZE]; 1965 #define RTE_ETH_XSTATS_NAME_SIZE 64 1999 #define RTE_ETH_DCB_NUM_TCS 8 2000 #define RTE_ETH_MAX_VMDQ_POOL 64 2011 } tc_rxq[RTE_ETH_MAX_VMDQ_POOL][RTE_ETH_DCB_NUM_TCS];
2016 } tc_txq[RTE_ETH_MAX_VMDQ_POOL][RTE_ETH_DCB_NUM_TCS];
2026 uint8_t tc_bws[RTE_ETH_DCB_NUM_TCS];
2044 #define RTE_ETH_FEC_MODE_TO_CAPA(x) RTE_BIT32(x) 2047 #define RTE_ETH_FEC_MODE_CAPA_MASK(x) RTE_BIT32(RTE_ETH_FEC_ ## x) 2050 struct rte_eth_fec_capa {
2055 #define RTE_ETH_ALL RTE_MAX_ETHPORTS 2058 #define RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, retval) do { \ 2059 if (!rte_eth_dev_is_valid_port(port_id)) { \ 2060 RTE_ETHDEV_LOG_LINE(ERR, "Invalid port_id=%u", port_id); \ 2065 #define RTE_ETH_VALID_PORTID_OR_RET(port_id) do { \ 2066 if (!rte_eth_dev_is_valid_port(port_id)) { \ 2067 RTE_ETHDEV_LOG_LINE(ERR, "Invalid port_id=%u", port_id); \ 2095 struct rte_mbuf *pkts[], uint16_t nb_pkts, uint16_t max_pkts,
2119 struct rte_mbuf *pkts[], uint16_t nb_pkts,
void *user_param);
2133 struct rte_eth_dev_sriov {
2135 uint8_t nb_q_per_pool;
2136 uint16_t def_vmdq_idx;
2137 uint16_t def_pool_q_idx;
2139 #define RTE_ETH_DEV_SRIOV(dev) ((dev)->data->sriov) 2141 #define RTE_ETH_NAME_MAX_LEN RTE_DEV_NAME_MAX_LEN 2143 #define RTE_ETH_DEV_NO_OWNER 0 2145 #define RTE_ETH_MAX_OWNER_NAME_LEN 64 2147 struct rte_eth_dev_owner {
2149 char name[RTE_ETH_MAX_OWNER_NAME_LEN];
2157 #define RTE_ETH_DEV_FLOW_OPS_THREAD_SAFE RTE_BIT32(0) 2159 #define RTE_ETH_DEV_INTR_LSC RTE_BIT32(1) 2161 #define RTE_ETH_DEV_BONDING_MEMBER RTE_BIT32(2) 2163 #define RTE_ETH_DEV_INTR_RMV RTE_BIT32(3) 2165 #define RTE_ETH_DEV_REPRESENTOR RTE_BIT32(4) 2167 #define RTE_ETH_DEV_NOLIVE_MAC_ADDR RTE_BIT32(5) 2172 #define RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS RTE_BIT32(6) 2187 const uint64_t owner_id);
2192 #define RTE_ETH_FOREACH_DEV_OWNED_BY(p, o) \ 2193 for (p = rte_eth_find_next_owned_by(0, o); \ 2194 (unsigned int)p < (unsigned int)RTE_MAX_ETHPORTS; \ 2195 p = rte_eth_find_next_owned_by(p + 1, o)) 2210 #define RTE_ETH_FOREACH_DEV(p) \ 2211 RTE_ETH_FOREACH_DEV_OWNED_BY(p, RTE_ETH_DEV_NO_OWNER) 2226 const struct rte_device *parent);
2236 #define RTE_ETH_FOREACH_DEV_OF(port_id, parent) \ 2237 for (port_id = rte_eth_find_next_of(0, parent); \ 2238 port_id < RTE_MAX_ETHPORTS; \ 2239 port_id = rte_eth_find_next_of(port_id + 1, parent)) 2265 #define RTE_ETH_FOREACH_DEV_SIBLING(port_id, ref_port_id) \ 2266 for (port_id = rte_eth_find_next_sibling(0, ref_port_id); \ 2267 port_id < RTE_MAX_ETHPORTS; \ 2268 port_id = rte_eth_find_next_sibling(port_id + 1, ref_port_id)) 2293 const struct rte_eth_dev_owner *owner);
2306 const uint64_t owner_id);
2329 struct rte_eth_dev_owner *owner);
2440 uint16_t nb_tx_queue,
const struct rte_eth_conf *eth_conf);
2516 uint16_t nb_rx_desc,
unsigned int socket_id,
2549 (uint16_t port_id, uint16_t rx_queue_id, uint16_t nb_rx_desc,
2601 uint16_t nb_tx_desc,
unsigned int socket_id,
2631 (uint16_t port_id, uint16_t tx_queue_id, uint16_t nb_tx_desc,
2662 size_t len, uint32_t direction);
3412 uint64_t *values,
unsigned int size);
3501 uint16_t tx_queue_id, uint8_t stat_idx);
3523 uint16_t rx_queue_id,
3669 uint32_t *ptypes,
int num)
3703 uint32_t *set_ptypes,
unsigned int num);
3877 uint8_t avail_thresh);
3907 uint8_t *avail_thresh);
3909 typedef void (*buffer_tx_error_fn)(
struct rte_mbuf **unsent, uint16_t count,
3917 buffer_tx_error_fn error_callback;
3918 void *error_userdata;
3931 #define RTE_ETH_TX_BUFFER_SIZE(sz) \ 3932 (sizeof(struct rte_eth_dev_tx_buffer) + (sz) * sizeof(struct rte_mbuf *)) 3973 buffer_tx_error_fn callback,
void *userdata);
4427 int epfd,
int op,
void *data);
4506 struct rte_eth_fec_capa *speed_fec_capa,
4694 struct rte_ether_addr *mac_addr);
4714 struct rte_ether_addr *mac_addr);
4735 uint16_t reta_size);
4757 uint16_t reta_size);
4960 struct rte_eth_rxtx_callback;
4987 const struct rte_eth_rxtx_callback *
5017 const struct rte_eth_rxtx_callback *
5046 const struct rte_eth_rxtx_callback *
5084 const struct rte_eth_rxtx_callback *user_cb);
5120 const struct rte_eth_rxtx_callback *user_cb);
5255 struct rte_power_monitor_cond *pmc);
5424 struct rte_ether_addr *mc_addr_set,
5425 uint32_t nb_mc_addr);
5474 struct timespec *timestamp, uint32_t
flags);
5492 struct timespec *timestamp);
5696 uint16_t *nb_rx_desc,
5697 uint16_t *nb_tx_desc);
5764 char name[RTE_DEV_NAME_MAX_LEN];
5809 #define RTE_ETH_RX_METADATA_USER_FLAG RTE_BIT64(0) 5812 #define RTE_ETH_RX_METADATA_USER_MARK RTE_BIT64(1) 5815 #define RTE_ETH_RX_METADATA_TUNNEL_ID RTE_BIT64(2) 5859 #define RTE_ETH_DEV_REASSEMBLY_F_IPV4 (RTE_BIT32(0)) 5861 #define RTE_ETH_DEV_REASSEMBLY_F_IPV6 (RTE_BIT32(1)) 6030 uint16_t offset, uint16_t num, FILE *file);
6057 uint16_t offset, uint16_t num, FILE *file);
6122 uint8_t rsvd_obj_params[4];
6137 uint8_t rsvd_mode_params[4];
6256 uint16_t rte_eth_call_rx_callbacks(uint16_t port_id, uint16_t queue_id,
6257 struct rte_mbuf **rx_pkts, uint16_t nb_rx, uint16_t nb_pkts,
6347 static inline uint16_t
6349 struct rte_mbuf **rx_pkts,
const uint16_t nb_pkts)
6352 struct rte_eth_fp_ops *p;
6355 #ifdef RTE_ETHDEV_DEBUG_RX 6356 if (port_id >= RTE_MAX_ETHPORTS ||
6357 queue_id >= RTE_MAX_QUEUES_PER_PORT) {
6358 RTE_ETHDEV_LOG_LINE(ERR,
6359 "Invalid port_id=%u or queue_id=%u",
6366 p = &rte_eth_fp_ops[port_id];
6367 qd = p->rxq.data[queue_id];
6369 #ifdef RTE_ETHDEV_DEBUG_RX 6370 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0);
6373 RTE_ETHDEV_LOG_LINE(ERR,
"Invalid Rx queue_id=%u for port_id=%u",
6379 nb_rx = p->rx_pkt_burst(qd, rx_pkts, nb_pkts);
6383 #ifdef RTE_ETHDEV_RXTX_CALLBACKS 6393 cb = rte_atomic_load_explicit(&p->rxq.clbk[queue_id],
6394 rte_memory_order_relaxed);
6396 nb_rx = rte_eth_call_rx_callbacks(port_id, queue_id,
6397 rx_pkts, nb_rx, nb_pkts, cb);
6402 rte_ethdev_trace_rx_burst_nonempty(port_id, queue_id, (
void **)rx_pkts, nb_rx);
6404 rte_ethdev_trace_rx_burst_empty(port_id, queue_id, (
void **)rx_pkts);
6428 struct rte_eth_fp_ops *p;
6431 #ifdef RTE_ETHDEV_DEBUG_RX 6432 if (port_id >= RTE_MAX_ETHPORTS ||
6433 queue_id >= RTE_MAX_QUEUES_PER_PORT) {
6434 RTE_ETHDEV_LOG_LINE(ERR,
6435 "Invalid port_id=%u or queue_id=%u",
6442 p = &rte_eth_fp_ops[port_id];
6443 qd = p->rxq.data[queue_id];
6445 #ifdef RTE_ETHDEV_DEBUG_RX 6446 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
6451 return p->rx_queue_count(qd);
6457 #define RTE_ETH_RX_DESC_AVAIL 0 6458 #define RTE_ETH_RX_DESC_DONE 1 6459 #define RTE_ETH_RX_DESC_UNAVAIL 2 6499 struct rte_eth_fp_ops *p;
6502 #ifdef RTE_ETHDEV_DEBUG_RX 6503 if (port_id >= RTE_MAX_ETHPORTS ||
6504 queue_id >= RTE_MAX_QUEUES_PER_PORT) {
6505 RTE_ETHDEV_LOG_LINE(ERR,
6506 "Invalid port_id=%u or queue_id=%u",
6513 p = &rte_eth_fp_ops[port_id];
6514 qd = p->rxq.data[queue_id];
6516 #ifdef RTE_ETHDEV_DEBUG_RX 6517 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
6521 return p->rx_descriptor_status(qd, offset);
6527 #define RTE_ETH_TX_DESC_FULL 0 6528 #define RTE_ETH_TX_DESC_DONE 1 6529 #define RTE_ETH_TX_DESC_UNAVAIL 2 6565 static inline int rte_eth_tx_descriptor_status(uint16_t port_id, 6566 uint16_t queue_id, uint16_t offset)
6568 struct rte_eth_fp_ops *p;
6571 #ifdef RTE_ETHDEV_DEBUG_TX 6572 if (port_id >= RTE_MAX_ETHPORTS ||
6573 queue_id >= RTE_MAX_QUEUES_PER_PORT) {
6574 RTE_ETHDEV_LOG_LINE(ERR,
6575 "Invalid port_id=%u or queue_id=%u",
6582 p = &rte_eth_fp_ops[port_id];
6583 qd = p->txq.data[queue_id];
6585 #ifdef RTE_ETHDEV_DEBUG_TX 6586 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
6590 return p->tx_descriptor_status(qd, offset);
6612 uint16_t rte_eth_call_tx_callbacks(uint16_t port_id, uint16_t queue_id,
6613 struct rte_mbuf **tx_pkts, uint16_t nb_pkts,
void *opaque);
6686 static inline uint16_t
6688 struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
6690 struct rte_eth_fp_ops *p;
6693 #ifdef RTE_ETHDEV_DEBUG_TX 6694 if (port_id >= RTE_MAX_ETHPORTS ||
6695 queue_id >= RTE_MAX_QUEUES_PER_PORT) {
6696 RTE_ETHDEV_LOG_LINE(ERR,
6697 "Invalid port_id=%u or queue_id=%u",
6704 p = &rte_eth_fp_ops[port_id];
6705 qd = p->txq.data[queue_id];
6707 #ifdef RTE_ETHDEV_DEBUG_TX 6708 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0);
6711 RTE_ETHDEV_LOG_LINE(ERR,
"Invalid Tx queue_id=%u for port_id=%u",
6717 #ifdef RTE_ETHDEV_RXTX_CALLBACKS 6727 cb = rte_atomic_load_explicit(&p->txq.clbk[queue_id],
6728 rte_memory_order_relaxed);
6730 nb_pkts = rte_eth_call_tx_callbacks(port_id, queue_id,
6731 tx_pkts, nb_pkts, cb);
6735 uint16_t requested_pkts = nb_pkts;
6738 nb_pkts = p->tx_pkt_burst(qd, tx_pkts, nb_pkts);
6740 if (requested_pkts > nb_pkts)
6744 rte_ethdev_trace_tx_burst(port_id, queue_id, (
void **)tx_pkts, nb_pkts);
6801 #ifndef RTE_ETHDEV_TX_PREPARE_NOOP 6803 static inline uint16_t
6805 struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
6807 struct rte_eth_fp_ops *p;
6810 #ifdef RTE_ETHDEV_DEBUG_TX 6811 if (port_id >= RTE_MAX_ETHPORTS ||
6812 queue_id >= RTE_MAX_QUEUES_PER_PORT) {
6813 RTE_ETHDEV_LOG_LINE(ERR,
6814 "Invalid port_id=%u or queue_id=%u",
6822 p = &rte_eth_fp_ops[port_id];
6823 qd = p->txq.data[queue_id];
6825 #ifdef RTE_ETHDEV_DEBUG_TX 6827 RTE_ETHDEV_LOG_LINE(ERR,
"Invalid Tx port_id=%u", port_id);
6832 RTE_ETHDEV_LOG_LINE(ERR,
"Invalid Tx queue_id=%u for port_id=%u",
6841 return p->tx_pkt_prepare(qd, tx_pkts, nb_pkts);
6855 static inline uint16_t
6887 static inline uint16_t
6892 uint16_t to_send = buffer->
length;
6903 buffer->error_callback(&buffer->
pkts[sent],
6904 (uint16_t)(to_send - sent),
6905 buffer->error_userdata);
7005 static inline uint16_t
7007 uint16_t tx_port_id, uint16_t tx_queue_id,
7010 struct rte_eth_fp_ops *p1, *p2;
7014 #ifdef RTE_ETHDEV_DEBUG_TX 7015 if (tx_port_id >= RTE_MAX_ETHPORTS ||
7016 tx_queue_id >= RTE_MAX_QUEUES_PER_PORT) {
7017 RTE_ETHDEV_LOG_LINE(ERR,
7018 "Invalid tx_port_id=%u or tx_queue_id=%u",
7019 tx_port_id, tx_queue_id);
7025 p1 = &rte_eth_fp_ops[tx_port_id];
7026 qd1 = p1->txq.data[tx_queue_id];
7028 #ifdef RTE_ETHDEV_DEBUG_TX 7029 RTE_ETH_VALID_PORTID_OR_ERR_RET(tx_port_id, 0);
7032 RTE_ETHDEV_LOG_LINE(ERR,
"Invalid Tx queue_id=%u for port_id=%u",
7033 tx_queue_id, tx_port_id);
7038 #ifdef RTE_ETHDEV_DEBUG_RX 7039 if (rx_port_id >= RTE_MAX_ETHPORTS ||
7040 rx_queue_id >= RTE_MAX_QUEUES_PER_PORT) {
7041 RTE_ETHDEV_LOG_LINE(ERR,
"Invalid rx_port_id=%u or rx_queue_id=%u",
7042 rx_port_id, rx_queue_id);
7048 p2 = &rte_eth_fp_ops[rx_port_id];
7049 qd2 = p2->rxq.data[rx_queue_id];
7051 #ifdef RTE_ETHDEV_DEBUG_RX 7052 RTE_ETH_VALID_PORTID_OR_ERR_RET(rx_port_id, 0);
7055 RTE_ETHDEV_LOG_LINE(ERR,
"Invalid Rx queue_id=%u for port_id=%u",
7056 rx_queue_id, rx_port_id);
7064 nb_mbufs = p1->recycle_tx_mbufs_reuse(qd1, recycle_rxq_info);
7073 p2->recycle_rx_descriptors_refill(qd2, nb_mbufs);
7148 struct rte_eth_fp_ops *fops;
7152 #ifdef RTE_ETHDEV_DEBUG_TX 7154 RTE_ETHDEV_LOG_LINE(ERR,
"Invalid port_id=%u", port_id);
7158 if (queue_id >= RTE_MAX_QUEUES_PER_PORT) {
7159 RTE_ETHDEV_LOG_LINE(ERR,
"Invalid queue_id=%u for port_id=%u",
7166 fops = &rte_eth_fp_ops[port_id];
7167 qd = fops->txq.data[queue_id];
7169 #ifdef RTE_ETHDEV_DEBUG_TX 7171 RTE_ETHDEV_LOG_LINE(ERR,
"Invalid queue_id=%u for port_id=%u",
7176 rc = fops->tx_queue_count(qd);
7177 rte_eth_trace_tx_queue_count(port_id, queue_id, rc);
int rte_eth_dev_stop(uint16_t port_id)
struct rte_eth_vmdq_dcb_tx_conf vmdq_dcb_tx_conf
int rte_eth_dev_priority_flow_ctrl_set(uint16_t port_id, struct rte_eth_pfc_conf *pfc_conf)
int rte_eth_promiscuous_disable(uint16_t port_id)
__extension__ uint32_t multi_pools
int rte_eth_rx_burst_mode_get(uint16_t port_id, uint16_t queue_id, struct rte_eth_burst_mode *mode)
__rte_experimental int rte_eth_tx_descriptor_dump(uint16_t port_id, uint16_t queue_id, uint16_t offset, uint16_t num, FILE *file)
struct rte_eth_dev_portconf default_rxportconf
__rte_experimental const char * rte_eth_link_connector_to_str(enum rte_eth_link_connector link_connector)
#define __rte_always_inline
#define RTE_ETH_DCB_NUM_USER_PRIORITIES
uint16_t rte_eth_dev_count_avail(void)
int rte_eth_timesync_write_time(uint16_t port_id, const struct timespec *time)
rte_eth_event_macsec_type
char info[RTE_ETH_BURST_MODE_INFO_SIZE]
const uint32_t * dev_flags
int rte_eth_timesync_read_time(uint16_t port_id, struct timespec *time)
struct rte_eth_rxseg_capa rx_seg_capa
__rte_deprecated int rte_eth_dev_set_rx_queue_stats_mapping(uint16_t port_id, uint16_t rx_queue_id, uint8_t stat_idx)
uint64_t rte_eth_find_next_owned_by(uint16_t port_id, const uint64_t owner_id)
__rte_experimental int rte_eth_dev_priv_dump(uint16_t port_id, FILE *file)
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)
int rte_eth_dev_get_name_by_port(uint16_t port_id, char *name)
static uint16_t rte_eth_tx_prepare(uint16_t port_id, uint16_t queue_id, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
struct rte_device * device
struct rte_eth_vmdq_tx_conf vmdq_tx_conf
__rte_experimental int rte_eth_speed_lanes_get(uint16_t port_id, uint32_t *lanes)
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)
static __rte_experimental int rte_eth_tx_queue_count(uint16_t port_id, uint16_t queue_id)
struct rte_eth_thresh rx_thresh
uint16_t rte_eth_find_next(uint16_t port_id)
__rte_experimental int rte_eth_rx_descriptor_dump(uint16_t port_id, uint16_t queue_id, uint16_t offset, uint16_t num, FILE *file)
struct rte_eth_vmdq_rx_conf::@162 pool_map[RTE_ETH_VMDQ_MAX_VLAN_FILTERS]
int rte_eth_dev_set_vlan_pvid(uint16_t port_id, uint16_t pvid, int on)
int rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info) __rte_warn_unused_result
int rte_eth_led_off(uint16_t port_id)
int rte_eth_dev_udp_tunnel_port_delete(uint16_t port_id, struct rte_eth_udp_tunnel *tunnel_udp)
static int rte_eth_rx_descriptor_status(uint16_t port_id, uint16_t queue_id, uint16_t offset)
uint32_t locked_device_memory
__rte_experimental int rte_eth_dev_hairpin_capability_get(uint16_t port_id, struct rte_eth_hairpin_cap *cap)
__rte_experimental int rte_eth_dev_map_aggr_tx_affinity(uint16_t port_id, uint16_t tx_queue_id, uint8_t affinity)
int rte_eth_dev_rss_reta_update(uint16_t port_id, struct rte_eth_rss_reta_entry64 *reta_conf, uint16_t reta_size)
static __rte_experimental uint16_t rte_eth_recycle_mbufs(uint16_t rx_port_id, uint16_t rx_queue_id, uint16_t tx_port_id, uint16_t tx_queue_id, struct rte_eth_recycle_rxq_info *recycle_rxq_info)
int rte_eth_dev_rss_hash_update(uint16_t port_id, struct rte_eth_rss_conf *rss_conf)
__rte_experimental int rte_eth_fec_set(uint16_t port_id, uint32_t fec_capa)
uint64_t rx_queue_offload_capa
int rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats, unsigned int n)
__rte_experimental int rte_eth_read_clock(uint16_t port_id, uint64_t *clock)
__rte_experimental int rte_eth_dev_count_aggr_ports(uint16_t port_id)
int rte_eth_iterator_init(struct rte_dev_iterator *iter, const char *devargs)
int rte_eth_dev_rx_intr_ctl_q(uint16_t port_id, uint16_t queue_id, int epfd, int op, void *data)
int rte_eth_remove_rx_callback(uint16_t port_id, uint16_t queue_id, const struct rte_eth_rxtx_callback *user_cb)
enum rte_eth_tx_mq_mode mq_mode
int rte_eth_link_get(uint16_t port_id, struct rte_eth_link *link) __rte_warn_unused_result
int rte_eth_dev_uc_all_hash_table_set(uint16_t port_id, uint8_t on)
uint64_t tx_queue_offload_capa
uint8_t enable_default_pool
uint32_t max_hash_mac_addrs
int rte_eth_dev_rx_intr_ctl_q_get_fd(uint16_t port_id, uint16_t queue_id)
uint16_t rte_eth_find_next_sibling(uint16_t port_id_start, uint16_t ref_port_id)
int rte_eth_dev_get_eeprom_length(uint16_t port_id)
struct rte_eth_rss_conf rss_conf
int rte_eth_dev_close(uint16_t port_id)
int rte_eth_dev_rx_intr_enable(uint16_t port_id, uint16_t queue_id)
__rte_experimental int rte_eth_rx_avail_thresh_set(uint16_t port_id, uint16_t queue_id, uint8_t avail_thresh)
int rte_eth_tx_queue_info_get(uint16_t port_id, uint16_t queue_id, struct rte_eth_txq_info *qinfo)
__rte_experimental const char * rte_eth_dev_rss_algo_name(enum rte_eth_hash_function rss_algo)
int rte_eth_dev_owner_get(const uint16_t port_id, struct rte_eth_dev_owner *owner)
uint32_t dcb_capability_en
__rte_experimental int rte_eth_timesync_adjust_freq(uint16_t port_id, int64_t ppm)
struct rte_eth_switch_info switch_info
int rte_eth_dev_flow_ctrl_get(uint16_t port_id, struct rte_eth_fc_conf *fc_conf)
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)
int rte_eth_dev_rx_queue_stop(uint16_t port_id, uint16_t rx_queue_id)
int rte_eth_dev_pool_ops_supported(uint16_t port_id, const char *pool)
int rte_eth_dev_set_link_up(uint16_t port_id)
int rte_eth_timesync_read_rx_timestamp(uint16_t port_id, struct timespec *timestamp, uint32_t flags)
struct rte_eth_thresh tx_thresh
struct rte_eth_desc_lim rx_desc_lim
__rte_experimental int rte_eth_tx_queue_is_valid(uint16_t port_id, uint16_t queue_id)
int rte_eth_dev_get_vlan_offload(uint16_t port_id)
__rte_experimental int rte_eth_speed_lanes_get_capability(uint16_t port_id, struct rte_eth_speed_lanes_capa *speed_lanes_capa, unsigned int num)
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)
int rte_eth_tx_burst_mode_get(uint16_t port_id, uint16_t queue_id, struct rte_eth_burst_mode *mode)
int rte_eth_link_get_nowait(uint16_t port_id, struct rte_eth_link *link) __rte_warn_unused_result
uint8_t rx_deferred_start
__rte_experimental int rte_eth_dev_get_reg_info_ext(uint16_t port_id, struct rte_dev_reg_info *info)
int(* rte_eth_dev_cb_fn)(uint16_t port_id, enum rte_eth_event_type event, void *cb_arg, void *ret_param)
struct rte_eth_rxmode rxmode
enum rte_eth_nb_pools nb_queue_pools
#define RTE_ETH_MQ_RX_RSS_FLAG
uint32_t rte_eth_speed_bitflag(uint32_t speed, int duplex)
int rte_eth_dev_owner_set(const uint16_t port_id, const struct rte_eth_dev_owner *owner)
#define RTE_ETH_XSTATS_NAME_SIZE
int rte_eth_dev_rss_hash_conf_get(uint16_t port_id, struct rte_eth_rss_conf *rss_conf)
__rte_experimental int rte_eth_macaddrs_get(uint16_t port_id, struct rte_ether_addr *ma, unsigned int num)
struct rte_eth_desc_lim tx_desc_lim
int rte_eth_timesync_disable(uint16_t port_id)
int rte_eth_dev_default_mac_addr_set(uint16_t port_id, struct rte_ether_addr *mac_addr)
__rte_experimental int rte_eth_rx_avail_thresh_query(uint16_t port_id, uint16_t *queue_id, uint8_t *avail_thresh)
__rte_experimental int rte_eth_representor_info_get(uint16_t port_id, struct rte_eth_representor_info *info)
__rte_experimental int rte_eth_dev_priority_flow_ctrl_queue_configure(uint16_t port_id, struct rte_eth_pfc_queue_conf *pfc_queue_conf)
void rte_eth_iterator_cleanup(struct rte_dev_iterator *iter)
void * rte_eth_dev_get_sec_ctx(uint16_t port_id)
__rte_experimental int rte_eth_speed_lanes_set(uint16_t port_id, uint32_t speed_lanes)
__rte_experimental int rte_eth_fec_get_capability(uint16_t port_id, struct rte_eth_fec_capa *speed_fec_capa, unsigned int num)
struct rte_mempool ** rx_mempools
__rte_experimental int rte_eth_xstats_set_counter(uint16_t port_id, uint64_t id, int on_off)
int rte_eth_stats_reset(uint16_t port_id)
int rte_eth_allmulticast_enable(uint16_t port_id)
struct rte_eth_txconf default_txconf
__rte_experimental int rte_eth_get_monitor_addr(uint16_t port_id, uint16_t queue_id, struct rte_power_monitor_cond *pmc)
static void rte_mbuf_history_mark_bulk(struct rte_mbuf *const *mbufs, unsigned int count, enum rte_mbuf_history_op op)
uint32_t offset_align_log2
int rte_eth_dev_set_ptypes(uint16_t port_id, uint32_t ptype_mask, uint32_t *set_ptypes, unsigned int num)
void rte_eth_tx_buffer_drop_callback(struct rte_mbuf **pkts, uint16_t unsent, void *userdata)
int rte_eth_dev_udp_tunnel_port_add(uint16_t port_id, struct rte_eth_udp_tunnel *tunnel_udp)
struct rte_eth_dcb_rx_conf dcb_rx_conf
enum rte_eth_err_handle_mode err_handle_mode
struct rte_eth_vmdq_rx_conf vmdq_rx_conf
int rte_eth_timesync_adjust_time(uint16_t port_id, int64_t delta)
#define __rte_cache_min_aligned
__rte_experimental int rte_eth_dev_get_module_info(uint16_t port_id, struct rte_eth_dev_module_info *modinfo) __rte_warn_unused_result
uint16_t rte_eth_find_next_of(uint16_t port_id_start, const struct rte_device *parent)
enum rte_eth_rx_mq_mode mq_mode
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)
enum rte_eth_nb_pools nb_queue_pools
int rte_eth_dev_tx_queue_stop(uint16_t port_id, uint16_t tx_queue_id)
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)
int rte_eth_allmulticast_disable(uint16_t port_id)
int rte_eth_dev_set_vlan_strip_on_queue(uint16_t port_id, uint16_t rx_queue_id, int on)
int rte_eth_dev_start(uint16_t port_id)
__rte_experimental int rte_eth_cman_config_get(uint16_t port_id, struct rte_eth_cman_config *config)
__rte_experimental int rte_eth_ip_reassembly_capability_get(uint16_t port_id, struct rte_eth_ip_reassembly_params *capa)
int rte_eth_dev_reset(uint16_t port_id)
int rte_eth_xstats_get_by_id(uint16_t port_id, const uint64_t *ids, uint64_t *values, unsigned int size)
#define RTE_ETH_MQ_RX_DCB_FLAG
struct rte_eth_dcb_tx_conf dcb_tx_conf
__rte_experimental int rte_eth_dev_get_module_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info) __rte_warn_unused_result
enum rte_eth_fc_mode mode_capa
__rte_experimental int rte_eth_ip_reassembly_conf_get(uint16_t port_id, struct rte_eth_ip_reassembly_params *conf)
int rte_eth_dev_rx_intr_disable(uint16_t port_id, uint16_t queue_id)
int rte_eth_tx_buffer_set_err_callback(struct rte_eth_dev_tx_buffer *buffer, buffer_tx_error_fn callback, void *userdata)
__rte_experimental int rte_eth_buffer_split_get_supported_hdr_ptypes(uint16_t port_id, uint32_t *ptypes, int num) __rte_warn_unused_result
void rte_eth_tx_buffer_count_callback(struct rte_mbuf **pkts, uint16_t unsent, void *userdata)
struct rte_eth_conf::@165 rx_adv_conf
int rte_eth_remove_tx_callback(uint16_t port_id, uint16_t queue_id, const struct rte_eth_rxtx_callback *user_cb)
int rte_eth_dev_is_removed(uint16_t port_id)
uint16_t(* rte_tx_callback_fn)(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[], uint16_t nb_pkts, void *user_param)
__rte_deprecated int rte_eth_dev_set_tx_queue_stats_mapping(uint16_t port_id, uint16_t tx_queue_id, uint8_t stat_idx)
__rte_experimental int rte_eth_link_to_str(char *str, size_t len, const struct rte_eth_link *eth_link)
int rte_eth_dev_adjust_nb_rx_tx_desc(uint16_t port_id, uint16_t *nb_rx_desc, uint16_t *nb_tx_desc)
int rte_eth_dev_mac_addr_remove(uint16_t port_id, struct rte_ether_addr *mac_addr)
__rte_experimental int rte_eth_recycle_rx_queue_info_get(uint16_t port_id, uint16_t queue_id, struct rte_eth_recycle_rxq_info *recycle_rxq_info)
__rte_experimental int rte_eth_dev_priority_flow_ctrl_queue_info_get(uint16_t port_id, struct rte_eth_pfc_queue_info *pfc_queue_info)
int rte_eth_dev_owner_unset(const uint16_t port_id, const uint64_t owner_id)
int rte_eth_dev_mac_addr_add(uint16_t port_id, struct rte_ether_addr *mac_addr, uint32_t pool)
int rte_eth_dev_tx_queue_start(uint16_t port_id, uint16_t tx_queue_id)
struct rte_mbuf * next_frag
int rte_eth_xstats_reset(uint16_t port_id)
#define RTE_ETH_MQ_RX_VMDQ_FLAG
__rte_experimental int rte_eth_hairpin_get_peer_ports(uint16_t port_id, uint16_t *peer_ports, size_t len, uint32_t direction)
struct rte_eth_vmdq_dcb_conf::@161 pool_map[RTE_ETH_VMDQ_MAX_VLAN_FILTERS]
uint16_t refill_requirement
int rte_eth_xstats_get_id_by_name(uint16_t port_id, const char *xstat_name, uint64_t *id)
int rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id)
__extension__ uint8_t hw_vlan_insert_pvid
enum rte_eth_fc_mode mode
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)
uint64_t flow_type_rss_offloads
#define RTE_ETH_VMDQ_MAX_VLAN_FILTERS
uint16_t rte_eth_dev_count_total(void)
int rte_eth_promiscuous_enable(uint16_t port_id)
int rte_eth_dev_rx_intr_ctl(uint16_t port_id, int epfd, int op, void *data)
__rte_experimental int rte_eth_dev_conf_get(uint16_t port_id, struct rte_eth_conf *dev_conf) __rte_warn_unused_result
union rte_eth_rxseg * rx_seg
int rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask, uint32_t *ptypes, int num) __rte_warn_unused_result
int rte_eth_dev_owner_new(uint64_t *owner_id)
struct rte_eth_dev_portconf default_txportconf
const char * rte_eth_dev_tx_offload_name(uint64_t offload)
int rte_eth_dev_fw_version_get(uint16_t port_id, char *fw_version, size_t fw_size) __rte_warn_unused_result
__rte_experimental int rte_eth_fec_get(uint16_t port_id, uint32_t *fec_capa)
int rte_eth_dev_owner_delete(const uint64_t owner_id)
rte_eth_event_macsec_subtype
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)
__extension__ uint8_t hw_vlan_reject_untagged
int rte_eth_dev_set_mc_addr_list(uint16_t port_id, struct rte_ether_addr *mc_addr_set, uint32_t nb_mc_addr)
uint32_t use_locked_device_memory
union rte_eth_conf::@166 tx_adv_conf
int rte_eth_dev_get_dcb_info(uint16_t port_id, struct rte_eth_dcb_info *dcb_info)
rte_eth_event_ipsec_subtype
struct rte_eth_intr_conf intr_conf
int rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)
__rte_experimental const char * rte_eth_link_speed_to_str(uint32_t link_speed)
static int rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)
int rte_eth_rx_queue_info_get(uint16_t port_id, uint16_t queue_id, struct rte_eth_rxq_info *qinfo)
__rte_experimental int rte_eth_find_rss_algo(const char *name, uint32_t *algo)
int rte_eth_dev_socket_id(uint16_t port_id)
int rte_eth_set_queue_rate_limit(uint16_t port_id, uint16_t queue_idx, uint32_t tx_rate)
struct rte_mbuf ** mbuf_ring
uint8_t enable_default_pool
int rte_eth_dev_vlan_filter(uint16_t port_id, uint16_t vlan_id, int on)
int rte_eth_dev_set_mtu(uint16_t port_id, uint16_t mtu)
int rte_eth_dev_set_vlan_ether_type(uint16_t port_id, enum rte_vlan_type vlan_type, uint16_t tag_type)
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)
__rte_experimental int rte_eth_xstats_query_state(uint16_t port_id, uint64_t id)
__rte_experimental const char * rte_eth_dev_capability_name(uint64_t capability)
__rte_experimental int rte_eth_rx_hairpin_queue_setup(uint16_t port_id, uint16_t rx_queue_id, uint16_t nb_rx_desc, const struct rte_eth_hairpin_conf *conf)
static uint64_t rte_eth_rss_hf_refine(uint64_t rss_hf)
__rte_experimental int rte_eth_hairpin_bind(uint16_t tx_port, uint16_t rx_port)
__rte_experimental int rte_eth_ip_reassembly_conf_set(uint16_t port_id, const struct rte_eth_ip_reassembly_params *conf)
int rte_eth_dev_uc_hash_table_set(uint16_t port_id, struct rte_ether_addr *addr, uint8_t on)
__rte_experimental int rte_eth_cman_config_init(uint16_t port_id, struct rte_eth_cman_config *config)
int rte_eth_rx_metadata_negotiate(uint16_t port_id, uint64_t *features)
int rte_eth_dev_rss_reta_query(uint16_t port_id, struct rte_eth_rss_reta_entry64 *reta_conf, uint16_t reta_size)
int rte_eth_promiscuous_get(uint16_t port_id)
int rte_eth_led_on(uint16_t port_id)
int rte_eth_timesync_read_tx_timestamp(uint16_t port_id, struct timespec *timestamp)
__extension__ uint8_t hw_vlan_reject_tagged
__rte_experimental int rte_eth_rx_queue_is_valid(uint16_t port_id, uint16_t queue_id)
int rte_eth_stats_get(uint16_t port_id, struct rte_eth_stats *stats)
__rte_experimental int rte_eth_cman_config_set(uint16_t port_id, const struct rte_eth_cman_config *config)
__rte_experimental int rte_eth_tx_hairpin_queue_setup(uint16_t port_id, uint16_t tx_queue_id, uint16_t nb_tx_desc, const struct rte_eth_hairpin_conf *conf)
uint8_t mac_ctrl_frame_fwd
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)
int rte_eth_dev_get_reg_info(uint16_t port_id, struct rte_dev_reg_info *info) __rte_warn_unused_result
enum rte_eth_fc_mode mode
int rte_eth_dev_get_mtu(uint16_t port_id, uint16_t *mtu)
struct rte_eth_vmdq_dcb_conf vmdq_dcb_conf
uint8_t dcb_tc[RTE_ETH_DCB_NUM_USER_PRIORITIES]
uint8_t tx_deferred_start
int rte_eth_tx_buffer_init(struct rte_eth_dev_tx_buffer *buffer, uint16_t size)
uint32_t max_lro_pkt_size
int rte_eth_xstats_get_names(uint16_t port_id, struct rte_eth_xstat_name *xstats_names, unsigned int size)
struct rte_eth_fc_conf fc
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)
int rte_eth_tx_done_cleanup(uint16_t port_id, uint16_t queue_id, uint32_t free_cnt)
int rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask)
struct rte_eth_txmode txmode
int rte_eth_allmulticast_get(uint16_t port_id)
int rte_eth_dev_is_valid_port(uint16_t port_id)
int rte_eth_macaddr_get(uint16_t port_id, struct rte_ether_addr *mac_addr)
#define __rte_warn_unused_result
uint32_t max_lro_pkt_size
int rte_eth_timesync_enable(uint16_t port_id)
struct rte_eth_rxconf default_rxconf
static uint16_t rte_eth_tx_burst(uint16_t port_id, uint16_t queue_id, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
struct rte_eth_hairpin_queue_cap tx_cap
__rte_experimental int rte_eth_cman_info_get(uint16_t port_id, struct rte_eth_cman_info *info)
int rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t rx_queue_id)
int rte_eth_dev_set_link_down(uint16_t port_id)
int rte_eth_dev_flow_ctrl_set(uint16_t port_id, struct rte_eth_fc_conf *fc_conf)
uint16_t rte_eth_iterator_next(struct rte_dev_iterator *iter)
__rte_experimental int rte_eth_hairpin_unbind(uint16_t tx_port, uint16_t rx_port)
struct rte_eth_hairpin_queue_cap rx_cap
int rte_eth_dev_get_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)
const char * rte_eth_dev_rx_offload_name(uint64_t offload)
static uint16_t rte_eth_tx_buffer_flush(uint16_t port_id, uint16_t queue_id, struct rte_eth_dev_tx_buffer *buffer)
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)