DPDK 26.11.0-rc4
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
148#include <stdint.h>
149
150/* Use this macro to check if LRO API is supported */
151#define RTE_ETHDEV_HAS_LRO_SUPPORT
152
153/* Alias RTE_LIBRTE_ETHDEV_DEBUG for backward compatibility. */
154#ifdef RTE_LIBRTE_ETHDEV_DEBUG
155#define RTE_ETHDEV_DEBUG_RX
156#define RTE_ETHDEV_DEBUG_TX
157#endif
158
159#include <rte_cman.h>
160#include <rte_compat.h>
161#include <rte_log.h>
162#include <rte_interrupts.h>
163#include <rte_dev.h>
164#include <rte_devargs.h>
165#include <rte_bitops.h>
166#include <rte_errno.h>
167#include <rte_common.h>
168#include <rte_config.h>
169#include <rte_power_intrinsics.h>
170
171#include "rte_ethdev_trace_fp.h"
172#include "rte_dev_info.h"
173
174#ifdef __cplusplus
175extern "C" {
176#endif
177
178extern int rte_eth_dev_logtype;
179#define RTE_LOGTYPE_ETHDEV rte_eth_dev_logtype
180
181#define RTE_ETHDEV_LOG_LINE(level, ...) \
182 RTE_LOG_LINE(level, ETHDEV, "" __VA_ARGS__)
183
184struct rte_mbuf;
185
202int rte_eth_iterator_init(struct rte_dev_iterator *iter, const char *devargs);
203
219
233
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))
252
263 uint64_t ipackets;
264 uint64_t opackets;
265 uint64_t ibytes;
266 uint64_t obytes;
271 uint64_t imissed;
272 uint64_t ierrors;
273 uint64_t oerrors;
274 uint64_t rx_nombuf;
275};
276
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)
299#define RTE_ETH_LINK_SPEED_1600G RTE_BIT32(18)
305#define RTE_ETH_SPEED_NUM_NONE 0
306#define RTE_ETH_SPEED_NUM_10M 10
307#define RTE_ETH_SPEED_NUM_100M 100
308#define RTE_ETH_SPEED_NUM_1G 1000
309#define RTE_ETH_SPEED_NUM_2_5G 2500
310#define RTE_ETH_SPEED_NUM_5G 5000
311#define RTE_ETH_SPEED_NUM_10G 10000
312#define RTE_ETH_SPEED_NUM_20G 20000
313#define RTE_ETH_SPEED_NUM_25G 25000
314#define RTE_ETH_SPEED_NUM_40G 40000
315#define RTE_ETH_SPEED_NUM_50G 50000
316#define RTE_ETH_SPEED_NUM_56G 56000
317#define RTE_ETH_SPEED_NUM_100G 100000
318#define RTE_ETH_SPEED_NUM_200G 200000
319#define RTE_ETH_SPEED_NUM_400G 400000
320#define RTE_ETH_SPEED_NUM_800G 800000
321#define RTE_ETH_SPEED_NUM_1600G 1600000
322#define RTE_ETH_SPEED_NUM_UNKNOWN UINT32_MAX
359};
360
365 union {
366 RTE_ATOMIC(uint64_t) val64;
367 __extension__
368 struct {
369 uint32_t link_speed;
370 uint16_t link_duplex : 1;
371 uint16_t link_autoneg : 1;
372 uint16_t link_status : 1;
373 uint16_t link_connector : 6;
374 };
375 };
376};
377
381#define RTE_ETH_LINK_HALF_DUPLEX 0
382#define RTE_ETH_LINK_FULL_DUPLEX 1
383#define RTE_ETH_LINK_DOWN 0
384#define RTE_ETH_LINK_UP 1
385#define RTE_ETH_LINK_FIXED 0
386#define RTE_ETH_LINK_AUTONEG 1
387#define RTE_ETH_LINK_MAX_STR_LEN 40
391#define RTE_ETH_SPEED_LANES_TO_CAPA(x) RTE_BIT32(x)
392
395 uint32_t speed;
396 uint32_t capa;
397};
398
404 uint8_t pthresh;
405 uint8_t hthresh;
406 uint8_t wthresh;
407};
408
412#define RTE_ETH_MQ_RX_RSS_FLAG RTE_BIT32(0)
413#define RTE_ETH_MQ_RX_DCB_FLAG RTE_BIT32(1)
414#define RTE_ETH_MQ_RX_VMDQ_FLAG RTE_BIT32(2)
424
431
441};
442
452};
453
460 uint32_t mtu;
468 uint64_t offloads;
469
470 uint64_t reserved_64s[2];
471 void *reserved_ptrs[2];
472};
473
479 RTE_ETH_VLAN_TYPE_UNKNOWN = 0,
482 RTE_ETH_VLAN_TYPE_MAX,
483};
484
490 uint64_t ids[64];
491};
492
514 RTE_ETH_HASH_FUNCTION_MAX,
515};
516
517#define RTE_ETH_HASH_ALGO_TO_CAPA(x) RTE_BIT32(x)
518#define RTE_ETH_HASH_ALGO_CAPA_MASK(x) RTE_BIT32(RTE_ETH_HASH_FUNCTION_ ## x)
519
537 uint8_t *rss_key;
538 uint8_t rss_key_len;
543 uint64_t rss_hf;
545};
546
547/*
548 * A packet can be identified by hardware as different flow types. Different
549 * NIC hardware may support different flow types.
550 * Basically, the NIC hardware identifies the flow type as deep protocol as
551 * possible, and exclusively. For example, if a packet is identified as
552 * 'RTE_ETH_FLOW_NONFRAG_IPV4_TCP', it will not be any of other flow types,
553 * though it is an actual IPV4 packet.
554 */
555#define RTE_ETH_FLOW_UNKNOWN 0
556#define RTE_ETH_FLOW_RAW 1
557#define RTE_ETH_FLOW_IPV4 2
558#define RTE_ETH_FLOW_FRAG_IPV4 3
559#define RTE_ETH_FLOW_NONFRAG_IPV4_TCP 4
560#define RTE_ETH_FLOW_NONFRAG_IPV4_UDP 5
561#define RTE_ETH_FLOW_NONFRAG_IPV4_SCTP 6
562#define RTE_ETH_FLOW_NONFRAG_IPV4_OTHER 7
563#define RTE_ETH_FLOW_IPV6 8
564#define RTE_ETH_FLOW_FRAG_IPV6 9
565#define RTE_ETH_FLOW_NONFRAG_IPV6_TCP 10
566#define RTE_ETH_FLOW_NONFRAG_IPV6_UDP 11
567#define RTE_ETH_FLOW_NONFRAG_IPV6_SCTP 12
568#define RTE_ETH_FLOW_NONFRAG_IPV6_OTHER 13
569#define RTE_ETH_FLOW_L2_PAYLOAD 14
570#define RTE_ETH_FLOW_IPV6_EX 15
571#define RTE_ETH_FLOW_IPV6_TCP_EX 16
572#define RTE_ETH_FLOW_IPV6_UDP_EX 17
574#define RTE_ETH_FLOW_PORT 18
575#define RTE_ETH_FLOW_VXLAN 19
576#define RTE_ETH_FLOW_GENEVE 20
577#define RTE_ETH_FLOW_NVGRE 21
578#define RTE_ETH_FLOW_VXLAN_GPE 22
579#define RTE_ETH_FLOW_GTPU 23
580#define RTE_ETH_FLOW_MAX 24
581
582/*
583 * Below macros are defined for RSS offload types, they can be used to
584 * fill rte_eth_rss_conf.rss_hf or rte_flow_action_rss.types.
585 */
586#define RTE_ETH_RSS_IPV4 RTE_BIT64(2)
587#define RTE_ETH_RSS_FRAG_IPV4 RTE_BIT64(3)
588#define RTE_ETH_RSS_NONFRAG_IPV4_TCP RTE_BIT64(4)
589#define RTE_ETH_RSS_NONFRAG_IPV4_UDP RTE_BIT64(5)
590#define RTE_ETH_RSS_NONFRAG_IPV4_SCTP RTE_BIT64(6)
591#define RTE_ETH_RSS_NONFRAG_IPV4_OTHER RTE_BIT64(7)
592#define RTE_ETH_RSS_IPV6 RTE_BIT64(8)
593#define RTE_ETH_RSS_FRAG_IPV6 RTE_BIT64(9)
594#define RTE_ETH_RSS_NONFRAG_IPV6_TCP RTE_BIT64(10)
595#define RTE_ETH_RSS_NONFRAG_IPV6_UDP RTE_BIT64(11)
596#define RTE_ETH_RSS_NONFRAG_IPV6_SCTP RTE_BIT64(12)
597#define RTE_ETH_RSS_NONFRAG_IPV6_OTHER RTE_BIT64(13)
598#define RTE_ETH_RSS_L2_PAYLOAD RTE_BIT64(14)
599#define RTE_ETH_RSS_IPV6_EX RTE_BIT64(15)
600#define RTE_ETH_RSS_IPV6_TCP_EX RTE_BIT64(16)
601#define RTE_ETH_RSS_IPV6_UDP_EX RTE_BIT64(17)
602#define RTE_ETH_RSS_PORT RTE_BIT64(18)
603#define RTE_ETH_RSS_VXLAN RTE_BIT64(19)
604#define RTE_ETH_RSS_GENEVE RTE_BIT64(20)
605#define RTE_ETH_RSS_NVGRE RTE_BIT64(21)
606#define RTE_ETH_RSS_GTPU RTE_BIT64(23)
607#define RTE_ETH_RSS_ETH RTE_BIT64(24)
608#define RTE_ETH_RSS_S_VLAN RTE_BIT64(25)
609#define RTE_ETH_RSS_C_VLAN RTE_BIT64(26)
610#define RTE_ETH_RSS_ESP RTE_BIT64(27)
611#define RTE_ETH_RSS_AH RTE_BIT64(28)
612#define RTE_ETH_RSS_L2TPV3 RTE_BIT64(29)
613#define RTE_ETH_RSS_PFCP RTE_BIT64(30)
614#define RTE_ETH_RSS_PPPOE RTE_BIT64(31)
615#define RTE_ETH_RSS_ECPRI RTE_BIT64(32)
616#define RTE_ETH_RSS_MPLS RTE_BIT64(33)
617#define RTE_ETH_RSS_IPV4_CHKSUM RTE_BIT64(34)
618
631#define RTE_ETH_RSS_L4_CHKSUM RTE_BIT64(35)
632
633#define RTE_ETH_RSS_L2TPV2 RTE_BIT64(36)
634#define RTE_ETH_RSS_IPV6_FLOW_LABEL RTE_BIT64(37)
635
637#define RTE_ETH_RSS_IB_BTH RTE_BIT64(38)
638
639/*
640 * We use the following macros to combine with above RTE_ETH_RSS_* for
641 * more specific input set selection. These bits are defined starting
642 * from the high end of the 64 bits.
643 * Note: If we use above RTE_ETH_RSS_* without SRC/DST_ONLY, it represents
644 * both SRC and DST are taken into account. If SRC_ONLY and DST_ONLY of
645 * the same level are used simultaneously, it is the same case as none of
646 * them are added.
647 */
648#define RTE_ETH_RSS_L3_SRC_ONLY RTE_BIT64(63)
649#define RTE_ETH_RSS_L3_DST_ONLY RTE_BIT64(62)
650#define RTE_ETH_RSS_L4_SRC_ONLY RTE_BIT64(61)
651#define RTE_ETH_RSS_L4_DST_ONLY RTE_BIT64(60)
652#define RTE_ETH_RSS_L2_SRC_ONLY RTE_BIT64(59)
653#define RTE_ETH_RSS_L2_DST_ONLY RTE_BIT64(58)
654
655/*
656 * Only select IPV6 address prefix as RSS input set according to
657 * https://tools.ietf.org/html/rfc6052
658 * Must be combined with RTE_ETH_RSS_IPV6, RTE_ETH_RSS_NONFRAG_IPV6_UDP,
659 * RTE_ETH_RSS_NONFRAG_IPV6_TCP, RTE_ETH_RSS_NONFRAG_IPV6_SCTP.
660 */
661#define RTE_ETH_RSS_L3_PRE32 RTE_BIT64(57)
662#define RTE_ETH_RSS_L3_PRE40 RTE_BIT64(56)
663#define RTE_ETH_RSS_L3_PRE48 RTE_BIT64(55)
664#define RTE_ETH_RSS_L3_PRE56 RTE_BIT64(54)
665#define RTE_ETH_RSS_L3_PRE64 RTE_BIT64(53)
666#define RTE_ETH_RSS_L3_PRE96 RTE_BIT64(52)
667
668/*
669 * Use the following macros to combine with the above layers
670 * to choose inner and outer layers or both for RSS computation.
671 * Bits 50 and 51 are reserved for this.
672 */
673
681#define RTE_ETH_RSS_LEVEL_PMD_DEFAULT (UINT64_C(0) << 50)
682
687#define RTE_ETH_RSS_LEVEL_OUTERMOST (UINT64_C(1) << 50)
688
693#define RTE_ETH_RSS_LEVEL_INNERMOST (UINT64_C(2) << 50)
694#define RTE_ETH_RSS_LEVEL_MASK (UINT64_C(3) << 50)
695
696#define RTE_ETH_RSS_LEVEL(rss_hf) ((rss_hf & RTE_ETH_RSS_LEVEL_MASK) >> 50)
697
708static inline uint64_t
709rte_eth_rss_hf_refine(uint64_t rss_hf)
710{
711 if ((rss_hf & RTE_ETH_RSS_L3_SRC_ONLY) && (rss_hf & RTE_ETH_RSS_L3_DST_ONLY))
712 rss_hf &= ~(RTE_ETH_RSS_L3_SRC_ONLY | RTE_ETH_RSS_L3_DST_ONLY);
713
714 if ((rss_hf & RTE_ETH_RSS_L4_SRC_ONLY) && (rss_hf & RTE_ETH_RSS_L4_DST_ONLY))
715 rss_hf &= ~(RTE_ETH_RSS_L4_SRC_ONLY | RTE_ETH_RSS_L4_DST_ONLY);
716
717 return rss_hf;
718}
719
720#define RTE_ETH_RSS_IPV6_PRE32 ( \
721 RTE_ETH_RSS_IPV6 | \
722 RTE_ETH_RSS_L3_PRE32)
723
724#define RTE_ETH_RSS_IPV6_PRE40 ( \
725 RTE_ETH_RSS_IPV6 | \
726 RTE_ETH_RSS_L3_PRE40)
727
728#define RTE_ETH_RSS_IPV6_PRE48 ( \
729 RTE_ETH_RSS_IPV6 | \
730 RTE_ETH_RSS_L3_PRE48)
731
732#define RTE_ETH_RSS_IPV6_PRE56 ( \
733 RTE_ETH_RSS_IPV6 | \
734 RTE_ETH_RSS_L3_PRE56)
735
736#define RTE_ETH_RSS_IPV6_PRE64 ( \
737 RTE_ETH_RSS_IPV6 | \
738 RTE_ETH_RSS_L3_PRE64)
739
740#define RTE_ETH_RSS_IPV6_PRE96 ( \
741 RTE_ETH_RSS_IPV6 | \
742 RTE_ETH_RSS_L3_PRE96)
743
744#define RTE_ETH_RSS_IPV6_PRE32_UDP ( \
745 RTE_ETH_RSS_NONFRAG_IPV6_UDP | \
746 RTE_ETH_RSS_L3_PRE32)
747
748#define RTE_ETH_RSS_IPV6_PRE40_UDP ( \
749 RTE_ETH_RSS_NONFRAG_IPV6_UDP | \
750 RTE_ETH_RSS_L3_PRE40)
751
752#define RTE_ETH_RSS_IPV6_PRE48_UDP ( \
753 RTE_ETH_RSS_NONFRAG_IPV6_UDP | \
754 RTE_ETH_RSS_L3_PRE48)
755
756#define RTE_ETH_RSS_IPV6_PRE56_UDP ( \
757 RTE_ETH_RSS_NONFRAG_IPV6_UDP | \
758 RTE_ETH_RSS_L3_PRE56)
759
760#define RTE_ETH_RSS_IPV6_PRE64_UDP ( \
761 RTE_ETH_RSS_NONFRAG_IPV6_UDP | \
762 RTE_ETH_RSS_L3_PRE64)
763
764#define RTE_ETH_RSS_IPV6_PRE96_UDP ( \
765 RTE_ETH_RSS_NONFRAG_IPV6_UDP | \
766 RTE_ETH_RSS_L3_PRE96)
767
768#define RTE_ETH_RSS_IPV6_PRE32_TCP ( \
769 RTE_ETH_RSS_NONFRAG_IPV6_TCP | \
770 RTE_ETH_RSS_L3_PRE32)
771
772#define RTE_ETH_RSS_IPV6_PRE40_TCP ( \
773 RTE_ETH_RSS_NONFRAG_IPV6_TCP | \
774 RTE_ETH_RSS_L3_PRE40)
775
776#define RTE_ETH_RSS_IPV6_PRE48_TCP ( \
777 RTE_ETH_RSS_NONFRAG_IPV6_TCP | \
778 RTE_ETH_RSS_L3_PRE48)
779
780#define RTE_ETH_RSS_IPV6_PRE56_TCP ( \
781 RTE_ETH_RSS_NONFRAG_IPV6_TCP | \
782 RTE_ETH_RSS_L3_PRE56)
783
784#define RTE_ETH_RSS_IPV6_PRE64_TCP ( \
785 RTE_ETH_RSS_NONFRAG_IPV6_TCP | \
786 RTE_ETH_RSS_L3_PRE64)
787
788#define RTE_ETH_RSS_IPV6_PRE96_TCP ( \
789 RTE_ETH_RSS_NONFRAG_IPV6_TCP | \
790 RTE_ETH_RSS_L3_PRE96)
791
792#define RTE_ETH_RSS_IPV6_PRE32_SCTP ( \
793 RTE_ETH_RSS_NONFRAG_IPV6_SCTP | \
794 RTE_ETH_RSS_L3_PRE32)
795
796#define RTE_ETH_RSS_IPV6_PRE40_SCTP ( \
797 RTE_ETH_RSS_NONFRAG_IPV6_SCTP | \
798 RTE_ETH_RSS_L3_PRE40)
799
800#define RTE_ETH_RSS_IPV6_PRE48_SCTP ( \
801 RTE_ETH_RSS_NONFRAG_IPV6_SCTP | \
802 RTE_ETH_RSS_L3_PRE48)
803
804#define RTE_ETH_RSS_IPV6_PRE56_SCTP ( \
805 RTE_ETH_RSS_NONFRAG_IPV6_SCTP | \
806 RTE_ETH_RSS_L3_PRE56)
807
808#define RTE_ETH_RSS_IPV6_PRE64_SCTP ( \
809 RTE_ETH_RSS_NONFRAG_IPV6_SCTP | \
810 RTE_ETH_RSS_L3_PRE64)
811
812#define RTE_ETH_RSS_IPV6_PRE96_SCTP ( \
813 RTE_ETH_RSS_NONFRAG_IPV6_SCTP | \
814 RTE_ETH_RSS_L3_PRE96)
815
816#define RTE_ETH_RSS_IP ( \
817 RTE_ETH_RSS_IPV4 | \
818 RTE_ETH_RSS_FRAG_IPV4 | \
819 RTE_ETH_RSS_NONFRAG_IPV4_OTHER | \
820 RTE_ETH_RSS_IPV6 | \
821 RTE_ETH_RSS_FRAG_IPV6 | \
822 RTE_ETH_RSS_NONFRAG_IPV6_OTHER | \
823 RTE_ETH_RSS_IPV6_EX)
824
825#define RTE_ETH_RSS_UDP ( \
826 RTE_ETH_RSS_NONFRAG_IPV4_UDP | \
827 RTE_ETH_RSS_NONFRAG_IPV6_UDP | \
828 RTE_ETH_RSS_IPV6_UDP_EX)
829
830#define RTE_ETH_RSS_TCP ( \
831 RTE_ETH_RSS_NONFRAG_IPV4_TCP | \
832 RTE_ETH_RSS_NONFRAG_IPV6_TCP | \
833 RTE_ETH_RSS_IPV6_TCP_EX)
834
835#define RTE_ETH_RSS_SCTP ( \
836 RTE_ETH_RSS_NONFRAG_IPV4_SCTP | \
837 RTE_ETH_RSS_NONFRAG_IPV6_SCTP)
838
839#define RTE_ETH_RSS_TUNNEL ( \
840 RTE_ETH_RSS_VXLAN | \
841 RTE_ETH_RSS_GENEVE | \
842 RTE_ETH_RSS_NVGRE)
843
844#define RTE_ETH_RSS_VLAN ( \
845 RTE_ETH_RSS_S_VLAN | \
846 RTE_ETH_RSS_C_VLAN)
847
849#define RTE_ETH_RSS_PROTO_MASK ( \
850 RTE_ETH_RSS_IPV4 | \
851 RTE_ETH_RSS_FRAG_IPV4 | \
852 RTE_ETH_RSS_NONFRAG_IPV4_TCP | \
853 RTE_ETH_RSS_NONFRAG_IPV4_UDP | \
854 RTE_ETH_RSS_NONFRAG_IPV4_SCTP | \
855 RTE_ETH_RSS_NONFRAG_IPV4_OTHER | \
856 RTE_ETH_RSS_IPV6 | \
857 RTE_ETH_RSS_FRAG_IPV6 | \
858 RTE_ETH_RSS_NONFRAG_IPV6_TCP | \
859 RTE_ETH_RSS_NONFRAG_IPV6_UDP | \
860 RTE_ETH_RSS_NONFRAG_IPV6_SCTP | \
861 RTE_ETH_RSS_NONFRAG_IPV6_OTHER | \
862 RTE_ETH_RSS_L2_PAYLOAD | \
863 RTE_ETH_RSS_IPV6_EX | \
864 RTE_ETH_RSS_IPV6_TCP_EX | \
865 RTE_ETH_RSS_IPV6_UDP_EX | \
866 RTE_ETH_RSS_PORT | \
867 RTE_ETH_RSS_VXLAN | \
868 RTE_ETH_RSS_GENEVE | \
869 RTE_ETH_RSS_NVGRE | \
870 RTE_ETH_RSS_MPLS)
871
872/*
873 * Definitions used for redirection table entry size.
874 * Some RSS RETA sizes may not be supported by some drivers, check the
875 * documentation or the description of relevant functions for more details.
876 */
877#define RTE_ETH_RSS_RETA_SIZE_64 64
878#define RTE_ETH_RSS_RETA_SIZE_128 128
879#define RTE_ETH_RSS_RETA_SIZE_256 256
880#define RTE_ETH_RSS_RETA_SIZE_512 512
881#define RTE_ETH_RETA_GROUP_SIZE 64
882
884#define RTE_ETH_VMDQ_MAX_VLAN_FILTERS 64
885#define RTE_ETH_DCB_NUM_USER_PRIORITIES 8
886#define RTE_ETH_VMDQ_DCB_NUM_QUEUES 128
887#define RTE_ETH_DCB_NUM_QUEUES 128
891#define RTE_ETH_DCB_PG_SUPPORT RTE_BIT32(0)
892#define RTE_ETH_DCB_PFC_SUPPORT RTE_BIT32(1)
896#define RTE_ETH_VLAN_STRIP_OFFLOAD 0x0001
897#define RTE_ETH_VLAN_FILTER_OFFLOAD 0x0002
898#define RTE_ETH_VLAN_EXTEND_OFFLOAD 0x0004
899#define RTE_ETH_QINQ_STRIP_OFFLOAD 0x0008
901#define RTE_ETH_VLAN_STRIP_MASK 0x0001
902#define RTE_ETH_VLAN_FILTER_MASK 0x0002
903#define RTE_ETH_VLAN_EXTEND_MASK 0x0004
904#define RTE_ETH_QINQ_STRIP_MASK 0x0008
905#define RTE_ETH_VLAN_ID_MAX 0x0FFF
912#define RTE_ETH_VMDQ_ACCEPT_UNTAG RTE_BIT32(0)
914#define RTE_ETH_VMDQ_ACCEPT_HASH_MC RTE_BIT32(1)
916#define RTE_ETH_VMDQ_ACCEPT_HASH_UC RTE_BIT32(2)
918#define RTE_ETH_VMDQ_ACCEPT_BROADCAST RTE_BIT32(3)
920#define RTE_ETH_VMDQ_ACCEPT_MULTICAST RTE_BIT32(4)
931 uint64_t mask;
933 uint16_t reta[RTE_ETH_RETA_GROUP_SIZE];
934};
935
942 RTE_ETH_8_TCS = 8
944
953 RTE_ETH_64_POOLS = 64
955
956/* This structure may be extended in future. */
957struct rte_eth_dcb_rx_conf {
958 enum rte_eth_nb_tcs nb_tcs;
960 uint8_t dcb_tc[RTE_ETH_DCB_NUM_USER_PRIORITIES];
961};
962
963struct rte_eth_vmdq_dcb_tx_conf {
964 enum rte_eth_nb_pools nb_queue_pools;
966 uint8_t dcb_tc[RTE_ETH_DCB_NUM_USER_PRIORITIES];
967};
968
969struct rte_eth_dcb_tx_conf {
970 enum rte_eth_nb_tcs nb_tcs;
972 uint8_t dcb_tc[RTE_ETH_DCB_NUM_USER_PRIORITIES];
973};
974
975struct rte_eth_vmdq_tx_conf {
976 enum rte_eth_nb_pools nb_queue_pools;
977};
978
993 uint8_t default_pool;
994 uint8_t nb_pool_maps;
995 struct {
996 uint16_t vlan_id;
997 uint64_t pools;
1001};
1002
1027 uint32_t rx_mode;
1028 struct {
1029 uint16_t vlan_id;
1030 uint64_t pools;
1032};
1033
1044 uint64_t offloads;
1045
1046 uint16_t pvid;
1047 __extension__
1048 uint8_t
1054
1055 uint64_t reserved_64s[2];
1056 void *reserved_ptrs[2];
1057};
1058
1128 uint16_t length;
1129 uint16_t offset;
1141 uint32_t proto_hdr;
1142};
1143
1148 /* The settings for buffer split offload. */
1149 struct rte_eth_rxseg_split split;
1150 /* The other features settings should be added here. */
1151};
1152
1159 uint8_t rx_drop_en;
1161 uint16_t rx_nseg;
1168 uint16_t share_group;
1169 uint16_t share_qid;
1175 uint64_t offloads;
1184
1205 uint16_t rx_nmempool;
1207 uint64_t reserved_64s[2];
1208 void *reserved_ptrs[2];
1209};
1210
1216 uint16_t tx_rs_thresh;
1226 uint64_t offloads;
1227
1228 uint64_t reserved_64s[2];
1229 void *reserved_ptrs[2];
1230};
1231
1241
1246 uint32_t rte_memory:1;
1247
1248 uint32_t reserved:30;
1249};
1250
1258 uint16_t max_rx_2_tx;
1260 uint16_t max_tx_2_rx;
1261 uint16_t max_nb_desc;
1264};
1265
1266#define RTE_ETH_MAX_HAIRPIN_PEERS 32
1267
1272 uint16_t port;
1273 uint16_t queue;
1274};
1275
1280 uint32_t peer_count:16;
1291 uint32_t tx_explicit:1;
1292
1304 uint32_t manual_bind:1;
1305
1318
1330 uint32_t use_rte_memory:1;
1331
1342 uint32_t force_memory:1;
1343
1344 uint32_t reserved:11;
1346 struct rte_eth_hairpin_peer peers[RTE_ETH_MAX_HAIRPIN_PEERS];
1347};
1348
1353 uint16_t nb_max;
1354 uint16_t nb_min;
1355 uint16_t nb_align;
1365 uint16_t nb_seg_max;
1366
1379};
1380
1390
1397 uint32_t high_water;
1398 uint32_t low_water;
1399 uint16_t pause_time;
1400 uint16_t send_xon;
1403 uint8_t autoneg;
1404};
1405
1413 uint8_t priority;
1414};
1415
1423 uint8_t tc_max;
1426};
1427
1445 struct {
1446 uint16_t tx_qid;
1450 uint8_t tc;
1451 } rx_pause; /* Valid when (mode == FC_RX_PAUSE || mode == FC_FULL) */
1452
1453 struct {
1454 uint16_t pause_time;
1455 uint16_t rx_qid;
1459 uint8_t tc;
1460 } tx_pause; /* Valid when (mode == FC_TX_PAUSE || mode == FC_FULL) */
1461};
1462
1468 RTE_ETH_TUNNEL_TYPE_NONE = 0,
1469 RTE_ETH_TUNNEL_TYPE_VXLAN,
1470 RTE_ETH_TUNNEL_TYPE_GENEVE,
1471 RTE_ETH_TUNNEL_TYPE_TEREDO,
1472 RTE_ETH_TUNNEL_TYPE_NVGRE,
1473 RTE_ETH_TUNNEL_TYPE_IP_IN_GRE,
1474 RTE_ETH_L2_TUNNEL_TYPE_E_TAG,
1475 RTE_ETH_TUNNEL_TYPE_VXLAN_GPE,
1476 RTE_ETH_TUNNEL_TYPE_ECPRI,
1477 RTE_ETH_TUNNEL_TYPE_MAX,
1478};
1479
1480#ifdef __cplusplus
1481}
1482#endif
1483
1484/* Deprecated API file for rte_eth_dev_filter_* functions */
1485#include "rte_eth_ctrl.h"
1486
1487#ifdef __cplusplus
1488extern "C" {
1489#endif
1490
1501 uint16_t udp_port;
1502 uint8_t prot_type;
1503};
1504
1510 uint32_t lsc:1;
1512 uint32_t rxq:1;
1514 uint32_t rmv:1;
1515};
1516
1517#define rte_intr_conf rte_eth_intr_conf
1518
1525 uint32_t link_speeds;
1534 uint32_t lpbk_mode;
1539 struct {
1544 struct rte_eth_dcb_rx_conf dcb_rx_conf;
1548 union {
1550 struct rte_eth_vmdq_dcb_tx_conf vmdq_dcb_tx_conf;
1552 struct rte_eth_dcb_tx_conf dcb_tx_conf;
1554 struct rte_eth_vmdq_tx_conf vmdq_tx_conf;
1560};
1561
1565#define RTE_ETH_RX_OFFLOAD_VLAN_STRIP RTE_BIT64(0)
1566#define RTE_ETH_RX_OFFLOAD_IPV4_CKSUM RTE_BIT64(1)
1567#define RTE_ETH_RX_OFFLOAD_UDP_CKSUM RTE_BIT64(2)
1568#define RTE_ETH_RX_OFFLOAD_TCP_CKSUM RTE_BIT64(3)
1569#define RTE_ETH_RX_OFFLOAD_TCP_LRO RTE_BIT64(4)
1570#define RTE_ETH_RX_OFFLOAD_QINQ_STRIP RTE_BIT64(5)
1571#define RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM RTE_BIT64(6)
1572#define RTE_ETH_RX_OFFLOAD_MACSEC_STRIP RTE_BIT64(7)
1573#define RTE_ETH_RX_OFFLOAD_VLAN_FILTER RTE_BIT64(9)
1574#define RTE_ETH_RX_OFFLOAD_VLAN_EXTEND RTE_BIT64(10)
1575#define RTE_ETH_RX_OFFLOAD_SCATTER RTE_BIT64(13)
1581#define RTE_ETH_RX_OFFLOAD_TIMESTAMP RTE_BIT64(14)
1582#define RTE_ETH_RX_OFFLOAD_SECURITY RTE_BIT64(15)
1583#define RTE_ETH_RX_OFFLOAD_KEEP_CRC RTE_BIT64(16)
1584#define RTE_ETH_RX_OFFLOAD_SCTP_CKSUM RTE_BIT64(17)
1585#define RTE_ETH_RX_OFFLOAD_OUTER_UDP_CKSUM RTE_BIT64(18)
1586#define RTE_ETH_RX_OFFLOAD_RSS_HASH RTE_BIT64(19)
1587#define RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT RTE_BIT64(20)
1588
1589#define RTE_ETH_RX_OFFLOAD_CHECKSUM (RTE_ETH_RX_OFFLOAD_IPV4_CKSUM | \
1590 RTE_ETH_RX_OFFLOAD_UDP_CKSUM | \
1591 RTE_ETH_RX_OFFLOAD_TCP_CKSUM)
1592#define RTE_ETH_RX_OFFLOAD_VLAN (RTE_ETH_RX_OFFLOAD_VLAN_STRIP | \
1593 RTE_ETH_RX_OFFLOAD_VLAN_FILTER | \
1594 RTE_ETH_RX_OFFLOAD_VLAN_EXTEND | \
1595 RTE_ETH_RX_OFFLOAD_QINQ_STRIP)
1596
1597/*
1598 * If new Rx offloads are defined, they also must be
1599 * mentioned in rte_rx_offload_names in rte_ethdev.c file.
1600 */
1601
1605#define RTE_ETH_TX_OFFLOAD_VLAN_INSERT RTE_BIT64(0)
1606#define RTE_ETH_TX_OFFLOAD_IPV4_CKSUM RTE_BIT64(1)
1607#define RTE_ETH_TX_OFFLOAD_UDP_CKSUM RTE_BIT64(2)
1608#define RTE_ETH_TX_OFFLOAD_TCP_CKSUM RTE_BIT64(3)
1609#define RTE_ETH_TX_OFFLOAD_SCTP_CKSUM RTE_BIT64(4)
1610#define RTE_ETH_TX_OFFLOAD_TCP_TSO RTE_BIT64(5)
1611#define RTE_ETH_TX_OFFLOAD_UDP_TSO RTE_BIT64(6)
1612#define RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM RTE_BIT64(7)
1613#define RTE_ETH_TX_OFFLOAD_QINQ_INSERT RTE_BIT64(8)
1614#define RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO RTE_BIT64(9)
1615#define RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO RTE_BIT64(10)
1616#define RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO RTE_BIT64(11)
1617#define RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO RTE_BIT64(12)
1618#define RTE_ETH_TX_OFFLOAD_MACSEC_INSERT RTE_BIT64(13)
1623#define RTE_ETH_TX_OFFLOAD_MT_LOCKFREE RTE_BIT64(14)
1625#define RTE_ETH_TX_OFFLOAD_MULTI_SEGS RTE_BIT64(15)
1633#define RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE RTE_BIT64(16)
1634#define RTE_ETH_TX_OFFLOAD_SECURITY RTE_BIT64(17)
1640#define RTE_ETH_TX_OFFLOAD_UDP_TNL_TSO RTE_BIT64(18)
1646#define RTE_ETH_TX_OFFLOAD_IP_TNL_TSO RTE_BIT64(19)
1648#define RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM RTE_BIT64(20)
1654#define RTE_ETH_TX_OFFLOAD_SEND_ON_TIMESTAMP RTE_BIT64(21)
1655/*
1656 * If new Tx offloads are defined, they also must be
1657 * mentioned in rte_tx_offload_names in rte_ethdev.c file.
1658 */
1659
1664#define RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP RTE_BIT64(0)
1666#define RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP RTE_BIT64(1)
1676#define RTE_ETH_DEV_CAPA_RXQ_SHARE RTE_BIT64(2)
1678#define RTE_ETH_DEV_CAPA_FLOW_RULE_KEEP RTE_BIT64(3)
1680#define RTE_ETH_DEV_CAPA_FLOW_SHARED_OBJECT_KEEP RTE_BIT64(4)
1683/*
1684 * Fallback default preferred Rx/Tx port parameters.
1685 * These are used if an application requests default parameters
1686 * but the PMD does not provide preferred values.
1687 */
1688#define RTE_ETH_DEV_FALLBACK_RX_RINGSIZE 512
1689#define RTE_ETH_DEV_FALLBACK_TX_RINGSIZE 512
1690#define RTE_ETH_DEV_FALLBACK_RX_NBQUEUES 1
1691#define RTE_ETH_DEV_FALLBACK_TX_NBQUEUES 1
1692
1699 uint16_t burst_size;
1700 uint16_t ring_size;
1701 uint16_t nb_queues;
1702};
1703
1708#define RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID (UINT16_MAX)
1709
1714 const char *name;
1715 uint16_t domain_id;
1723 uint16_t port_id;
1729 uint16_t rx_domain;
1730};
1731
1738 __extension__
1739 uint32_t multi_pools:1;
1740 uint32_t offset_allowed:1;
1742 uint32_t selective_rx:1;
1743 uint16_t max_nseg;
1744 uint16_t reserved;
1745};
1746
1759};
1760
1778};
1779
1786 struct rte_device *device;
1787 const char *driver_name;
1788 unsigned int if_index;
1790 uint16_t min_mtu;
1791 uint16_t max_mtu;
1792 const uint32_t *dev_flags;
1802 uint32_t max_rx_pktlen;
1805 uint16_t max_rx_queues;
1806 uint16_t max_tx_queues;
1807 uint32_t max_mac_addrs;
1810 uint16_t max_vfs;
1822 uint16_t reta_size;
1824 uint32_t rss_algo_capa;
1834 uint32_t speed_capa;
1836 uint16_t nb_rx_queues;
1837 uint16_t nb_tx_queues;
1850 uint64_t dev_capa;
1858
1859 uint64_t reserved_64s[2];
1860 void *reserved_ptrs[2];
1861};
1862
1864#define RTE_ETH_QUEUE_STATE_STOPPED 0
1865#define RTE_ETH_QUEUE_STATE_STARTED 1
1866#define RTE_ETH_QUEUE_STATE_HAIRPIN 2
1874 struct rte_mempool *mp;
1875 struct rte_eth_rxconf conf;
1877 uint8_t queue_state;
1878 uint16_t nb_desc;
1879 uint16_t rx_buf_size;
1887};
1888
1894 struct rte_eth_txconf conf;
1895 uint16_t nb_desc;
1896 uint8_t queue_state;
1897};
1898
1906 struct rte_mempool *mp;
1907 uint16_t *refill_head;
1908 uint16_t *receive_tail;
1918};
1919
1920/* Generic Burst mode flag definition, values can be ORed. */
1921
1927#define RTE_ETH_BURST_FLAG_PER_QUEUE RTE_BIT64(0)
1928
1934 uint64_t flags;
1936#define RTE_ETH_BURST_MODE_INFO_SIZE 1024
1938};
1939
1941#define RTE_ETH_XSTATS_NAME_SIZE 64
1942
1953 uint64_t id;
1954 uint64_t value;
1955};
1956
1973};
1974
1975#define RTE_ETH_DCB_NUM_TCS 8
1976#define RTE_ETH_MAX_VMDQ_POOL 64
1977
1984 struct {
1985 uint16_t base;
1986 uint16_t nb_queue;
1987 } tc_rxq[RTE_ETH_MAX_VMDQ_POOL][RTE_ETH_DCB_NUM_TCS];
1989 struct {
1990 uint16_t base;
1991 uint16_t nb_queue;
1992 } tc_txq[RTE_ETH_MAX_VMDQ_POOL][RTE_ETH_DCB_NUM_TCS];
1993};
1994
2000 uint8_t nb_tcs;
2002 uint8_t tc_bws[RTE_ETH_DCB_NUM_TCS];
2005};
2006
2017};
2018
2019/* Translate from FEC mode to FEC capa */
2020#define RTE_ETH_FEC_MODE_TO_CAPA(x) RTE_BIT32(x)
2021
2022/* This macro indicates FEC capa mask */
2023#define RTE_ETH_FEC_MODE_CAPA_MASK(x) RTE_BIT32(RTE_ETH_FEC_ ## x)
2024
2025/* A structure used to get capabilities per link speed */
2026struct rte_eth_fec_capa {
2027 uint32_t speed;
2028 uint32_t capa;
2029};
2030
2031#define RTE_ETH_ALL RTE_MAX_ETHPORTS
2032
2033/* Macros to check for valid port */
2034#define RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, retval) do { \
2035 if (!rte_eth_dev_is_valid_port(port_id)) { \
2036 RTE_ETHDEV_LOG_LINE(ERR, "Invalid port_id=%u", port_id); \
2037 return retval; \
2038 } \
2039} while (0)
2040
2041#define RTE_ETH_VALID_PORTID_OR_RET(port_id) do { \
2042 if (!rte_eth_dev_is_valid_port(port_id)) { \
2043 RTE_ETHDEV_LOG_LINE(ERR, "Invalid port_id=%u", port_id); \
2044 return; \
2045 } \
2046} while (0)
2047
2070typedef uint16_t (*rte_rx_callback_fn)(uint16_t port_id, uint16_t queue,
2071 struct rte_mbuf *pkts[], uint16_t nb_pkts, uint16_t max_pkts,
2072 void *user_param);
2073
2094typedef uint16_t (*rte_tx_callback_fn)(uint16_t port_id, uint16_t queue,
2095 struct rte_mbuf *pkts[], uint16_t nb_pkts, void *user_param);
2096
2107};
2108
2109struct rte_eth_dev_sriov {
2110 uint8_t active;
2111 uint8_t nb_q_per_pool;
2112 uint16_t def_vmdq_idx;
2113 uint16_t def_pool_q_idx;
2114};
2115#define RTE_ETH_DEV_SRIOV(dev) ((dev)->data->sriov)
2116
2117#define RTE_ETH_NAME_MAX_LEN RTE_DEV_NAME_MAX_LEN
2118
2119#define RTE_ETH_DEV_NO_OWNER 0
2120
2121#define RTE_ETH_MAX_OWNER_NAME_LEN 64
2122
2123struct rte_eth_dev_owner {
2124 uint64_t id;
2125 char name[RTE_ETH_MAX_OWNER_NAME_LEN];
2126};
2127
2133#define RTE_ETH_DEV_FLOW_OPS_THREAD_SAFE RTE_BIT32(0)
2135#define RTE_ETH_DEV_INTR_LSC RTE_BIT32(1)
2137#define RTE_ETH_DEV_BONDING_MEMBER RTE_BIT32(2)
2139#define RTE_ETH_DEV_INTR_RMV RTE_BIT32(3)
2141#define RTE_ETH_DEV_REPRESENTOR RTE_BIT32(4)
2143#define RTE_ETH_DEV_NOLIVE_MAC_ADDR RTE_BIT32(5)
2148#define RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS RTE_BIT32(6)
2162uint64_t rte_eth_find_next_owned_by(uint16_t port_id,
2163 const uint64_t owner_id);
2164
2168#define RTE_ETH_FOREACH_DEV_OWNED_BY(p, o) \
2169 for (p = rte_eth_find_next_owned_by(0, o); \
2170 (unsigned int)p < (unsigned int)RTE_MAX_ETHPORTS; \
2171 p = rte_eth_find_next_owned_by(p + 1, o))
2172
2181uint16_t rte_eth_find_next(uint16_t port_id);
2182
2186#define RTE_ETH_FOREACH_DEV(p) \
2187 RTE_ETH_FOREACH_DEV_OWNED_BY(p, RTE_ETH_DEV_NO_OWNER)
2188
2200uint16_t
2201rte_eth_find_next_of(uint16_t port_id_start,
2202 const struct rte_device *parent);
2203
2212#define RTE_ETH_FOREACH_DEV_OF(port_id, parent) \
2213 for (port_id = rte_eth_find_next_of(0, parent); \
2214 port_id < RTE_MAX_ETHPORTS; \
2215 port_id = rte_eth_find_next_of(port_id + 1, parent))
2216
2228uint16_t
2229rte_eth_find_next_sibling(uint16_t port_id_start, uint16_t ref_port_id);
2230
2241#define RTE_ETH_FOREACH_DEV_SIBLING(port_id, ref_port_id) \
2242 for (port_id = rte_eth_find_next_sibling(0, ref_port_id); \
2243 port_id < RTE_MAX_ETHPORTS; \
2244 port_id = rte_eth_find_next_sibling(port_id + 1, ref_port_id))
2245
2256int rte_eth_dev_owner_new(uint64_t *owner_id);
2257
2268int rte_eth_dev_owner_set(const uint16_t port_id,
2269 const struct rte_eth_dev_owner *owner);
2270
2281int rte_eth_dev_owner_unset(const uint16_t port_id,
2282 const uint64_t owner_id);
2283
2292int rte_eth_dev_owner_delete(const uint64_t owner_id);
2293
2304int rte_eth_dev_owner_get(const uint16_t port_id,
2305 struct rte_eth_dev_owner *owner);
2306
2318
2328
2340uint32_t rte_eth_speed_bitflag(uint32_t speed, int duplex);
2341
2350const char *rte_eth_dev_rx_offload_name(uint64_t offload);
2351
2360const char *rte_eth_dev_tx_offload_name(uint64_t offload);
2361
2370const char *rte_eth_dev_capability_name(uint64_t capability);
2371
2411int rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_queue,
2412 uint16_t nb_tx_queue, const struct rte_eth_conf *eth_conf);
2413
2422int
2423rte_eth_dev_is_removed(uint16_t port_id);
2424
2487int rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
2488 uint16_t nb_rx_desc, unsigned int socket_id,
2489 const struct rte_eth_rxconf *rx_conf,
2490 struct rte_mempool *mb_pool);
2491
2517 (uint16_t port_id, uint16_t rx_queue_id, uint16_t nb_rx_desc,
2518 const struct rte_eth_hairpin_conf *conf);
2519
2568int rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
2569 uint16_t nb_tx_desc, unsigned int socket_id,
2570 const struct rte_eth_txconf *tx_conf);
2571
2595 (uint16_t port_id, uint16_t tx_queue_id, uint16_t nb_tx_desc,
2596 const struct rte_eth_hairpin_conf *conf);
2597
2621int rte_eth_hairpin_get_peer_ports(uint16_t port_id, uint16_t *peer_ports,
2622 size_t len, uint32_t direction);
2623
2643int rte_eth_hairpin_bind(uint16_t tx_port, uint16_t rx_port);
2644
2666int rte_eth_hairpin_unbind(uint16_t tx_port, uint16_t rx_port);
2667
2680int rte_eth_dev_count_aggr_ports(uint16_t port_id);
2681
2706int rte_eth_dev_map_aggr_tx_affinity(uint16_t port_id, uint16_t tx_queue_id,
2707 uint8_t affinity);
2708
2721int rte_eth_dev_socket_id(uint16_t port_id);
2722
2732int rte_eth_dev_is_valid_port(uint16_t port_id);
2733
2747int rte_eth_rx_queue_is_valid(uint16_t port_id, uint16_t queue_id);
2748
2762int rte_eth_tx_queue_is_valid(uint16_t port_id, uint16_t queue_id);
2763
2781int rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t rx_queue_id);
2782
2799int rte_eth_dev_rx_queue_stop(uint16_t port_id, uint16_t rx_queue_id);
2800
2818int rte_eth_dev_tx_queue_start(uint16_t port_id, uint16_t tx_queue_id);
2819
2836int rte_eth_dev_tx_queue_stop(uint16_t port_id, uint16_t tx_queue_id);
2837
2861int rte_eth_dev_start(uint16_t port_id);
2862
2876int rte_eth_dev_stop(uint16_t port_id);
2877
2890int rte_eth_dev_set_link_up(uint16_t port_id);
2891
2901int rte_eth_dev_set_link_down(uint16_t port_id);
2902
2913int rte_eth_dev_close(uint16_t port_id);
2914
2952int rte_eth_dev_reset(uint16_t port_id);
2953
2965int rte_eth_promiscuous_enable(uint16_t port_id);
2966
2978int rte_eth_promiscuous_disable(uint16_t port_id);
2979
2990int rte_eth_promiscuous_get(uint16_t port_id);
2991
3003int rte_eth_allmulticast_enable(uint16_t port_id);
3004
3016int rte_eth_allmulticast_disable(uint16_t port_id);
3017
3028int rte_eth_allmulticast_get(uint16_t port_id);
3029
3047int rte_eth_link_get(uint16_t port_id, struct rte_eth_link *link)
3049
3064int rte_eth_link_get_nowait(uint16_t port_id, struct rte_eth_link *link)
3066
3077const char *rte_eth_link_speed_to_str(uint32_t link_speed);
3078
3090__rte_experimental
3092
3108int rte_eth_link_to_str(char *str, size_t len,
3109 const struct rte_eth_link *eth_link);
3110
3128int rte_eth_speed_lanes_get(uint16_t port_id, uint32_t *lanes);
3129
3148int rte_eth_speed_lanes_set(uint16_t port_id, uint32_t speed_lanes);
3149
3170 struct rte_eth_speed_lanes_capa *speed_lanes_capa,
3171 unsigned int num);
3172
3190int rte_eth_stats_get(uint16_t port_id, struct rte_eth_stats *stats);
3191
3203int rte_eth_stats_reset(uint16_t port_id);
3204
3234int rte_eth_xstats_get_names(uint16_t port_id,
3235 struct rte_eth_xstat_name *xstats_names,
3236 unsigned int size);
3237
3271int rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats,
3272 unsigned int n);
3273
3298int
3300 struct rte_eth_xstat_name *xstats_names, unsigned int size,
3301 uint64_t *ids);
3302
3327int rte_eth_xstats_get_by_id(uint16_t port_id, const uint64_t *ids,
3328 uint64_t *values, unsigned int size);
3329
3349int rte_eth_xstats_get_id_by_name(uint16_t port_id, const char *xstat_name,
3350 uint64_t *id);
3351
3366__rte_experimental
3367int rte_eth_xstats_set_counter(uint16_t port_id, uint64_t id, int on_off);
3368
3380__rte_experimental
3381int rte_eth_xstats_query_state(uint16_t port_id, uint64_t id);
3382
3395int rte_eth_xstats_reset(uint16_t port_id);
3396
3410int rte_eth_macaddr_get(uint16_t port_id, struct rte_ether_addr *mac_addr);
3411
3429int rte_eth_macaddrs_get(uint16_t port_id, struct rte_ether_addr *ma,
3430 unsigned int num);
3431
3451int rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info)
3453
3466int rte_eth_dev_conf_get(uint16_t port_id, struct rte_eth_conf *dev_conf)
3468
3489int rte_eth_dev_fw_version_get(uint16_t port_id, char *fw_version, size_t fw_size)
3491
3531int rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
3532 uint32_t *ptypes, int num)
3534
3565int rte_eth_dev_set_ptypes(uint16_t port_id, uint32_t ptype_mask,
3566 uint32_t *set_ptypes, unsigned int num);
3567
3580int rte_eth_dev_get_mtu(uint16_t port_id, uint16_t *mtu);
3581
3599int rte_eth_dev_set_mtu(uint16_t port_id, uint16_t mtu);
3600
3620int rte_eth_dev_vlan_filter(uint16_t port_id, uint16_t vlan_id, int on);
3621
3640int rte_eth_dev_set_vlan_strip_on_queue(uint16_t port_id, uint16_t rx_queue_id,
3641 int on);
3642
3660 enum rte_vlan_type vlan_type,
3661 uint16_t tag_type);
3662
3680int rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask);
3681
3695int rte_eth_dev_get_vlan_offload(uint16_t port_id);
3696
3711int rte_eth_dev_set_vlan_pvid(uint16_t port_id, uint16_t pvid, int on);
3712
3735int rte_eth_rx_avail_thresh_set(uint16_t port_id, uint16_t queue_id,
3736 uint8_t avail_thresh);
3737
3761int rte_eth_rx_avail_thresh_query(uint16_t port_id, uint16_t *queue_id,
3762 uint8_t *avail_thresh);
3763
3764typedef void (*buffer_tx_error_fn)(struct rte_mbuf **unsent, uint16_t count,
3765 void *userdata);
3766
3772 buffer_tx_error_fn error_callback;
3773 void *error_userdata;
3774 uint16_t size;
3775 uint16_t length;
3777 struct rte_mbuf *pkts[];
3778};
3779
3786#define RTE_ETH_TX_BUFFER_SIZE(sz) \
3787 (sizeof(struct rte_eth_dev_tx_buffer) + (sz) * sizeof(struct rte_mbuf *))
3788
3799int
3800rte_eth_tx_buffer_init(struct rte_eth_dev_tx_buffer *buffer, uint16_t size);
3801
3826int
3828 buffer_tx_error_fn callback, void *userdata);
3829
3852void
3853rte_eth_tx_buffer_drop_callback(struct rte_mbuf **pkts, uint16_t unsent,
3854 void *userdata);
3855
3879void
3880rte_eth_tx_buffer_count_callback(struct rte_mbuf **pkts, uint16_t unsent,
3881 void *userdata);
3882
3908int
3909rte_eth_tx_done_cleanup(uint16_t port_id, uint16_t queue_id, uint32_t free_cnt);
3910
3943};
3944
3964};
3965
3984 uint64_t metadata;
3985};
3986
4025
4050 uint64_t metadata;
4051};
4052
4136
4150typedef int (*rte_eth_dev_cb_fn)(uint16_t port_id,
4151 enum rte_eth_event_type event, void *cb_arg, void *ret_param);
4152
4171 enum rte_eth_event_type event,
4172 rte_eth_dev_cb_fn cb_fn, void *cb_arg);
4173
4193 enum rte_eth_event_type event,
4194 rte_eth_dev_cb_fn cb_fn, void *cb_arg);
4195
4217int rte_eth_dev_rx_intr_enable(uint16_t port_id, uint16_t queue_id);
4218
4239int rte_eth_dev_rx_intr_disable(uint16_t port_id, uint16_t queue_id);
4240
4258int rte_eth_dev_rx_intr_ctl(uint16_t port_id, int epfd, int op, void *data);
4259
4281int rte_eth_dev_rx_intr_ctl_q(uint16_t port_id, uint16_t queue_id,
4282 int epfd, int op, void *data);
4283
4298int
4299rte_eth_dev_rx_intr_ctl_q_get_fd(uint16_t port_id, uint16_t queue_id);
4300
4314int rte_eth_led_on(uint16_t port_id);
4315
4329int rte_eth_led_off(uint16_t port_id);
4330
4356int rte_eth_fec_get_capability(uint16_t port_id,
4357 struct rte_eth_fec_capa *speed_fec_capa,
4358 unsigned int num);
4359
4377int rte_eth_fec_get(uint16_t port_id, uint32_t *fec_capa);
4378
4399int rte_eth_fec_set(uint16_t port_id, uint32_t fec_capa);
4400
4415int rte_eth_dev_flow_ctrl_get(uint16_t port_id,
4416 struct rte_eth_fc_conf *fc_conf);
4417
4432int rte_eth_dev_flow_ctrl_set(uint16_t port_id,
4433 struct rte_eth_fc_conf *fc_conf);
4434
4451 struct rte_eth_pfc_conf *pfc_conf);
4452
4471int rte_eth_dev_mac_addr_add(uint16_t port_id, struct rte_ether_addr *mac_addr,
4472 uint32_t pool);
4473
4489 struct rte_eth_pfc_queue_info *pfc_queue_info);
4490
4512 struct rte_eth_pfc_queue_conf *pfc_queue_conf);
4513
4528int rte_eth_dev_mac_addr_remove(uint16_t port_id,
4529 struct rte_ether_addr *mac_addr);
4530
4549 struct rte_ether_addr *mac_addr);
4550
4568int rte_eth_dev_rss_reta_update(uint16_t port_id,
4569 struct rte_eth_rss_reta_entry64 *reta_conf,
4570 uint16_t reta_size);
4571
4590int rte_eth_dev_rss_reta_query(uint16_t port_id,
4591 struct rte_eth_rss_reta_entry64 *reta_conf,
4592 uint16_t reta_size);
4593
4613int rte_eth_dev_uc_hash_table_set(uint16_t port_id, struct rte_ether_addr *addr,
4614 uint8_t on);
4615
4634int rte_eth_dev_uc_all_hash_table_set(uint16_t port_id, uint8_t on);
4635
4652int rte_eth_set_queue_rate_limit(uint16_t port_id, uint16_t queue_idx,
4653 uint32_t tx_rate);
4654
4675__rte_experimental
4676int rte_eth_get_queue_rate_limit(uint16_t port_id, uint16_t queue_idx,
4677 uint32_t *tx_rate);
4678
4693int rte_eth_dev_rss_hash_update(uint16_t port_id,
4694 struct rte_eth_rss_conf *rss_conf);
4695
4711int
4713 struct rte_eth_rss_conf *rss_conf);
4714
4724const char *
4726
4740int
4741rte_eth_find_rss_algo(const char *name, uint32_t *algo);
4742
4767int
4769 struct rte_eth_udp_tunnel *tunnel_udp);
4770
4790int
4792 struct rte_eth_udp_tunnel *tunnel_udp);
4793
4808int rte_eth_dev_get_dcb_info(uint16_t port_id,
4809 struct rte_eth_dcb_info *dcb_info);
4810
4811struct rte_eth_rxtx_callback;
4812
4838const struct rte_eth_rxtx_callback *
4839rte_eth_add_rx_callback(uint16_t port_id, uint16_t queue_id,
4840 rte_rx_callback_fn fn, void *user_param);
4841
4868const struct rte_eth_rxtx_callback *
4869rte_eth_add_first_rx_callback(uint16_t port_id, uint16_t queue_id,
4870 rte_rx_callback_fn fn, void *user_param);
4871
4897const struct rte_eth_rxtx_callback *
4898rte_eth_add_tx_callback(uint16_t port_id, uint16_t queue_id,
4899 rte_tx_callback_fn fn, void *user_param);
4900
4934int rte_eth_remove_rx_callback(uint16_t port_id, uint16_t queue_id,
4935 const struct rte_eth_rxtx_callback *user_cb);
4936
4970int rte_eth_remove_tx_callback(uint16_t port_id, uint16_t queue_id,
4971 const struct rte_eth_rxtx_callback *user_cb);
4972
4992int rte_eth_rx_queue_info_get(uint16_t port_id, uint16_t queue_id,
4993 struct rte_eth_rxq_info *qinfo);
4994
5014int rte_eth_tx_queue_info_get(uint16_t port_id, uint16_t queue_id,
5015 struct rte_eth_txq_info *qinfo);
5016
5035 uint16_t queue_id,
5036 struct rte_eth_recycle_rxq_info *recycle_rxq_info);
5037
5056int rte_eth_rx_burst_mode_get(uint16_t port_id, uint16_t queue_id,
5057 struct rte_eth_burst_mode *mode);
5058
5077int rte_eth_tx_burst_mode_get(uint16_t port_id, uint16_t queue_id,
5078 struct rte_eth_burst_mode *mode);
5079
5097int rte_eth_get_monitor_addr(uint16_t port_id, uint16_t queue_id,
5098 struct rte_power_monitor_cond *pmc);
5099
5126int rte_eth_dev_get_reg_info_ext(uint16_t port_id, struct rte_dev_reg_info *info);
5127
5146int rte_eth_dev_get_reg_info(uint16_t port_id, struct rte_dev_reg_info *info)
5148
5161int rte_eth_dev_get_eeprom_length(uint16_t port_id);
5162
5179int rte_eth_dev_get_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info);
5180
5197int rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info);
5198
5214int
5217
5234int
5235rte_eth_dev_get_module_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)
5237
5254typedef void (*rte_eth_module_eeprom_field_cb)(const char *name,
5255 const char *value, void *arg);
5256
5290__rte_experimental
5291int
5292rte_eth_module_eeprom_parse(uint32_t type, const uint8_t *data, uint32_t length,
5293 rte_eth_module_eeprom_field_cb cb, void *arg);
5294
5314int rte_eth_dev_set_mc_addr_list(uint16_t port_id,
5315 struct rte_ether_addr *mc_addr_set,
5316 uint32_t nb_mc_addr);
5317
5330int rte_eth_timesync_enable(uint16_t port_id);
5331
5344int rte_eth_timesync_disable(uint16_t port_id);
5345
5365 struct timespec *timestamp, uint32_t flags);
5366
5383 struct timespec *timestamp);
5384
5402int rte_eth_timesync_adjust_time(uint16_t port_id, int64_t delta);
5403
5444int rte_eth_timesync_adjust_freq(uint16_t port_id, int64_t ppm);
5445
5461int rte_eth_timesync_read_time(uint16_t port_id, struct timespec *time);
5462
5481int rte_eth_timesync_write_time(uint16_t port_id, const struct timespec *time);
5482
5525int
5526rte_eth_read_clock(uint16_t port_id, uint64_t *clock);
5527
5543int
5544rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id);
5545
5568int
5569rte_eth_dev_get_name_by_port(uint16_t port_id, char *name, size_t size);
5570
5588 uint16_t *nb_rx_desc,
5589 uint16_t *nb_tx_desc);
5590
5605int
5606rte_eth_dev_pool_ops_supported(uint16_t port_id, const char *pool);
5607
5617void *
5618rte_eth_dev_get_sec_ctx(uint16_t port_id);
5619
5633 struct rte_eth_hairpin_cap *cap);
5634
5641 int pf;
5642 __extension__
5643 union {
5644 int vf;
5645 int sf;
5646 };
5647 uint32_t id_base;
5648 uint32_t id_end;
5649 char name[RTE_DEV_NAME_MAX_LEN];
5650};
5651
5656 uint16_t controller;
5657 uint16_t pf;
5659 uint32_t nb_ranges;
5661};
5662
5686int rte_eth_representor_info_get(uint16_t port_id,
5687 struct rte_eth_representor_info *info);
5688
5690#define RTE_ETH_RX_METADATA_USER_FLAG RTE_BIT64(0)
5691
5693#define RTE_ETH_RX_METADATA_USER_MARK RTE_BIT64(1)
5694
5696#define RTE_ETH_RX_METADATA_TUNNEL_ID RTE_BIT64(2)
5697
5737int rte_eth_rx_metadata_negotiate(uint16_t port_id, uint64_t *features);
5738
5740#define RTE_ETH_DEV_REASSEMBLY_F_IPV4 (RTE_BIT32(0))
5742#define RTE_ETH_DEV_REASSEMBLY_F_IPV6 (RTE_BIT32(1))
5743
5754 uint32_t timeout_ms;
5756 uint16_t max_frags;
5761 uint16_t flags;
5762};
5763
5782 struct rte_eth_ip_reassembly_params *capa);
5783
5803 struct rte_eth_ip_reassembly_params *conf);
5804
5832 const struct rte_eth_ip_reassembly_params *conf);
5833
5841typedef struct {
5848 uint16_t time_spent;
5850 uint16_t nb_frags;
5852
5868int rte_eth_dev_priv_dump(uint16_t port_id, FILE *file);
5869
5890int rte_eth_rx_descriptor_dump(uint16_t port_id, uint16_t queue_id,
5891 uint16_t offset, uint16_t num, FILE *file);
5892
5913int rte_eth_tx_descriptor_dump(uint16_t port_id, uint16_t queue_id,
5914 uint16_t offset, uint16_t num, FILE *file);
5915
5916
5917/* Congestion management */
5918
5928};
5929
5948 uint8_t rsvd[8];
5949};
5950
5959 union {
5966 uint16_t rx_queue;
5974 } obj_param;
5975 union {
5989 } mode_param;
5990};
5991
6006int rte_eth_cman_info_get(uint16_t port_id, struct rte_eth_cman_info *info);
6007
6022int rte_eth_cman_config_init(uint16_t port_id, struct rte_eth_cman_config *config);
6023
6037int rte_eth_cman_config_set(uint16_t port_id, const struct rte_eth_cman_config *config);
6038
6056int rte_eth_cman_config_get(uint16_t port_id, struct rte_eth_cman_config *config);
6057
6058#ifdef __cplusplus
6059}
6060#endif
6061
6062#include <rte_ethdev_core.h>
6063
6064#ifdef __cplusplus
6065extern "C" {
6066#endif
6067
6091uint16_t rte_eth_call_rx_callbacks(uint16_t port_id, uint16_t queue_id,
6092 struct rte_mbuf **rx_pkts, uint16_t nb_rx, uint16_t nb_pkts,
6093 void *opaque);
6094
6182static inline uint16_t
6183rte_eth_rx_burst(uint16_t port_id, uint16_t queue_id,
6184 struct rte_mbuf **rx_pkts, const uint16_t nb_pkts)
6185{
6186 uint16_t nb_rx;
6187 struct rte_eth_fp_ops *p;
6188 void *qd;
6189
6190#ifdef RTE_ETHDEV_DEBUG_RX
6191 if (port_id >= RTE_MAX_ETHPORTS ||
6192 queue_id >= RTE_MAX_QUEUES_PER_PORT) {
6193 RTE_ETHDEV_LOG_LINE(ERR,
6194 "Invalid port_id=%u or queue_id=%u",
6195 port_id, queue_id);
6196 return 0;
6197 }
6198#endif
6199
6200 /* fetch pointer to queue data */
6201 p = &rte_eth_fp_ops[port_id];
6202 qd = p->rxq.data[queue_id];
6203
6204#ifdef RTE_ETHDEV_DEBUG_RX
6205 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0);
6206
6207 if (qd == NULL) {
6208 RTE_ETHDEV_LOG_LINE(ERR, "Invalid Rx queue_id=%u for port_id=%u",
6209 queue_id, port_id);
6210 return 0;
6211 }
6212#endif
6213
6214 nb_rx = p->rx_pkt_burst(qd, rx_pkts, nb_pkts);
6215
6217
6218#ifdef RTE_ETHDEV_RXTX_CALLBACKS
6219 {
6220 void *cb;
6221
6222 /* rte_memory_order_release memory order was used when the
6223 * call back was inserted into the list.
6224 * Since there is a clear dependency between loading
6225 * cb and cb->fn/cb->next, rte_memory_order_acquire memory order is
6226 * not required.
6227 */
6228 cb = rte_atomic_load_explicit(&p->rxq.clbk[queue_id],
6229 rte_memory_order_relaxed);
6230 if (unlikely(cb != NULL))
6231 nb_rx = rte_eth_call_rx_callbacks(port_id, queue_id,
6232 rx_pkts, nb_rx, nb_pkts, cb);
6233 }
6234#endif
6235
6236 if (unlikely(nb_rx))
6237 rte_ethdev_trace_rx_burst_nonempty(port_id, queue_id, (void **)rx_pkts, nb_rx);
6238 else
6239 rte_ethdev_trace_rx_burst_empty(port_id, queue_id, (void **)rx_pkts);
6240 return nb_rx;
6241}
6242
6260static inline int
6261rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)
6262{
6263 struct rte_eth_fp_ops *p;
6264 void *qd;
6265
6266#ifdef RTE_ETHDEV_DEBUG_RX
6267 if (port_id >= RTE_MAX_ETHPORTS ||
6268 queue_id >= RTE_MAX_QUEUES_PER_PORT) {
6269 RTE_ETHDEV_LOG_LINE(ERR,
6270 "Invalid port_id=%u or queue_id=%u",
6271 port_id, queue_id);
6272 return -EINVAL;
6273 }
6274#endif
6275
6276 /* fetch pointer to queue data */
6277 p = &rte_eth_fp_ops[port_id];
6278 qd = p->rxq.data[queue_id];
6279
6280#ifdef RTE_ETHDEV_DEBUG_RX
6281 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
6282 if (qd == NULL)
6283 return -EINVAL;
6284#endif
6285
6286 return p->rx_queue_count(qd);
6287}
6288
6292#define RTE_ETH_RX_DESC_AVAIL 0
6293#define RTE_ETH_RX_DESC_DONE 1
6294#define RTE_ETH_RX_DESC_UNAVAIL 2
6330static inline int
6331rte_eth_rx_descriptor_status(uint16_t port_id, uint16_t queue_id,
6332 uint16_t offset)
6333{
6334 struct rte_eth_fp_ops *p;
6335 void *qd;
6336
6337#ifdef RTE_ETHDEV_DEBUG_RX
6338 if (port_id >= RTE_MAX_ETHPORTS ||
6339 queue_id >= RTE_MAX_QUEUES_PER_PORT) {
6340 RTE_ETHDEV_LOG_LINE(ERR,
6341 "Invalid port_id=%u or queue_id=%u",
6342 port_id, queue_id);
6343 return -EINVAL;
6344 }
6345#endif
6346
6347 /* fetch pointer to queue data */
6348 p = &rte_eth_fp_ops[port_id];
6349 qd = p->rxq.data[queue_id];
6350
6351#ifdef RTE_ETHDEV_DEBUG_RX
6352 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
6353 if (qd == NULL)
6354 return -ENODEV;
6355#endif
6356 return p->rx_descriptor_status(qd, offset);
6357}
6358
6362#define RTE_ETH_TX_DESC_FULL 0
6363#define RTE_ETH_TX_DESC_DONE 1
6364#define RTE_ETH_TX_DESC_UNAVAIL 2
6400static inline int rte_eth_tx_descriptor_status(uint16_t port_id,
6401 uint16_t queue_id, uint16_t offset)
6402{
6403 struct rte_eth_fp_ops *p;
6404 void *qd;
6405
6406#ifdef RTE_ETHDEV_DEBUG_TX
6407 if (port_id >= RTE_MAX_ETHPORTS ||
6408 queue_id >= RTE_MAX_QUEUES_PER_PORT) {
6409 RTE_ETHDEV_LOG_LINE(ERR,
6410 "Invalid port_id=%u or queue_id=%u",
6411 port_id, queue_id);
6412 return -EINVAL;
6413 }
6414#endif
6415
6416 /* fetch pointer to queue data */
6417 p = &rte_eth_fp_ops[port_id];
6418 qd = p->txq.data[queue_id];
6419
6420#ifdef RTE_ETHDEV_DEBUG_TX
6421 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
6422 if (qd == NULL)
6423 return -ENODEV;
6424#endif
6425 return p->tx_descriptor_status(qd, offset);
6426}
6427
6447uint16_t rte_eth_call_tx_callbacks(uint16_t port_id, uint16_t queue_id,
6448 struct rte_mbuf **tx_pkts, uint16_t nb_pkts, void *opaque);
6449
6521static inline uint16_t
6522rte_eth_tx_burst(uint16_t port_id, uint16_t queue_id,
6523 struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
6524{
6525 struct rte_eth_fp_ops *p;
6526 void *qd;
6527
6528#ifdef RTE_ETHDEV_DEBUG_TX
6529 if (port_id >= RTE_MAX_ETHPORTS ||
6530 queue_id >= RTE_MAX_QUEUES_PER_PORT) {
6531 RTE_ETHDEV_LOG_LINE(ERR,
6532 "Invalid port_id=%u or queue_id=%u",
6533 port_id, queue_id);
6534 return 0;
6535 }
6536#endif
6537
6538 /* fetch pointer to queue data */
6539 p = &rte_eth_fp_ops[port_id];
6540 qd = p->txq.data[queue_id];
6541
6542#ifdef RTE_ETHDEV_DEBUG_TX
6543 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0);
6544
6545 if (qd == NULL) {
6546 RTE_ETHDEV_LOG_LINE(ERR, "Invalid Tx queue_id=%u for port_id=%u",
6547 queue_id, port_id);
6548 return 0;
6549 }
6550#endif
6551
6552#ifdef RTE_ETHDEV_RXTX_CALLBACKS
6553 {
6554 void *cb;
6555
6556 /* rte_memory_order_release memory order was used when the
6557 * call back was inserted into the list.
6558 * Since there is a clear dependency between loading
6559 * cb and cb->fn/cb->next, rte_memory_order_acquire memory order is
6560 * not required.
6561 */
6562 cb = rte_atomic_load_explicit(&p->txq.clbk[queue_id],
6563 rte_memory_order_relaxed);
6564 if (unlikely(cb != NULL))
6565 nb_pkts = rte_eth_call_tx_callbacks(port_id, queue_id,
6566 tx_pkts, nb_pkts, cb);
6567 }
6568#endif
6569
6570 uint16_t requested_pkts = nb_pkts;
6572
6573 nb_pkts = p->tx_pkt_burst(qd, tx_pkts, nb_pkts);
6574
6575 if (requested_pkts > nb_pkts)
6576 rte_mbuf_history_mark_bulk(tx_pkts + nb_pkts,
6577 requested_pkts - nb_pkts, RTE_MBUF_HISTORY_OP_TX_BUSY);
6578
6579 rte_ethdev_trace_tx_burst(port_id, queue_id, (void **)tx_pkts, nb_pkts);
6580 return nb_pkts;
6581}
6582
6636#ifndef RTE_ETHDEV_TX_PREPARE_NOOP
6637
6638static inline uint16_t
6639rte_eth_tx_prepare(uint16_t port_id, uint16_t queue_id,
6640 struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
6641{
6642 struct rte_eth_fp_ops *p;
6643 void *qd;
6644
6645#ifdef RTE_ETHDEV_DEBUG_TX
6646 if (port_id >= RTE_MAX_ETHPORTS ||
6647 queue_id >= RTE_MAX_QUEUES_PER_PORT) {
6648 RTE_ETHDEV_LOG_LINE(ERR,
6649 "Invalid port_id=%u or queue_id=%u",
6650 port_id, queue_id);
6651 rte_errno = ENODEV;
6652 return 0;
6653 }
6654#endif
6655
6656 /* fetch pointer to queue data */
6657 p = &rte_eth_fp_ops[port_id];
6658 qd = p->txq.data[queue_id];
6659
6660#ifdef RTE_ETHDEV_DEBUG_TX
6661 if (!rte_eth_dev_is_valid_port(port_id)) {
6662 RTE_ETHDEV_LOG_LINE(ERR, "Invalid Tx port_id=%u", port_id);
6663 rte_errno = ENODEV;
6664 return 0;
6665 }
6666 if (qd == NULL) {
6667 RTE_ETHDEV_LOG_LINE(ERR, "Invalid Tx queue_id=%u for port_id=%u",
6668 queue_id, port_id);
6669 rte_errno = EINVAL;
6670 return 0;
6671 }
6672#endif
6673
6675
6676 return p->tx_pkt_prepare(qd, tx_pkts, nb_pkts);
6677}
6678
6679#else
6680
6681/*
6682 * Native NOOP operation for compilation targets which doesn't require any
6683 * preparations steps, and functional NOOP may introduce unnecessary performance
6684 * drop.
6685 *
6686 * Generally this is not a good idea to turn it on globally and didn't should
6687 * be used if behavior of tx_preparation can change.
6688 */
6689
6690static inline uint16_t
6691rte_eth_tx_prepare(__rte_unused uint16_t port_id,
6692 __rte_unused uint16_t queue_id,
6693 __rte_unused struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
6694{
6695 return nb_pkts;
6696}
6697
6698#endif
6699
6722static inline uint16_t
6723rte_eth_tx_buffer_flush(uint16_t port_id, uint16_t queue_id,
6724 struct rte_eth_dev_tx_buffer *buffer)
6725{
6726 uint16_t sent;
6727 uint16_t to_send = buffer->length;
6728
6729 if (to_send == 0)
6730 return 0;
6731
6732 sent = rte_eth_tx_burst(port_id, queue_id, buffer->pkts, to_send);
6733
6734 buffer->length = 0;
6735
6736 /* All packets sent, or to be dealt with by callback below */
6737 if (unlikely(sent != to_send))
6738 buffer->error_callback(&buffer->pkts[sent],
6739 (uint16_t)(to_send - sent),
6740 buffer->error_userdata);
6741
6742 return sent;
6743}
6744
6775static __rte_always_inline uint16_t
6776rte_eth_tx_buffer(uint16_t port_id, uint16_t queue_id,
6777 struct rte_eth_dev_tx_buffer *buffer, struct rte_mbuf *tx_pkt)
6778{
6779 buffer->pkts[buffer->length++] = tx_pkt;
6780 if (buffer->length < buffer->size)
6781 return 0;
6782
6783 return rte_eth_tx_buffer_flush(port_id, queue_id, buffer);
6784}
6785
6836static inline uint16_t
6837rte_eth_recycle_mbufs(uint16_t rx_port_id, uint16_t rx_queue_id,
6838 uint16_t tx_port_id, uint16_t tx_queue_id,
6839 struct rte_eth_recycle_rxq_info *recycle_rxq_info)
6840{
6841 struct rte_eth_fp_ops *p1, *p2;
6842 void *qd1, *qd2;
6843 uint16_t nb_mbufs;
6844
6845#ifdef RTE_ETHDEV_DEBUG_TX
6846 if (tx_port_id >= RTE_MAX_ETHPORTS ||
6847 tx_queue_id >= RTE_MAX_QUEUES_PER_PORT) {
6848 RTE_ETHDEV_LOG_LINE(ERR,
6849 "Invalid tx_port_id=%u or tx_queue_id=%u",
6850 tx_port_id, tx_queue_id);
6851 return 0;
6852 }
6853#endif
6854
6855 /* fetch pointer to Tx queue data */
6856 p1 = &rte_eth_fp_ops[tx_port_id];
6857 qd1 = p1->txq.data[tx_queue_id];
6858
6859#ifdef RTE_ETHDEV_DEBUG_TX
6860 RTE_ETH_VALID_PORTID_OR_ERR_RET(tx_port_id, 0);
6861
6862 if (qd1 == NULL) {
6863 RTE_ETHDEV_LOG_LINE(ERR, "Invalid Tx queue_id=%u for port_id=%u",
6864 tx_queue_id, tx_port_id);
6865 return 0;
6866 }
6867#endif
6868
6869#ifdef RTE_ETHDEV_DEBUG_RX
6870 if (rx_port_id >= RTE_MAX_ETHPORTS ||
6871 rx_queue_id >= RTE_MAX_QUEUES_PER_PORT) {
6872 RTE_ETHDEV_LOG_LINE(ERR, "Invalid rx_port_id=%u or rx_queue_id=%u",
6873 rx_port_id, rx_queue_id);
6874 return 0;
6875 }
6876#endif
6877
6878 /* fetch pointer to Rx queue data */
6879 p2 = &rte_eth_fp_ops[rx_port_id];
6880 qd2 = p2->rxq.data[rx_queue_id];
6881
6882#ifdef RTE_ETHDEV_DEBUG_RX
6883 RTE_ETH_VALID_PORTID_OR_ERR_RET(rx_port_id, 0);
6884
6885 if (qd2 == NULL) {
6886 RTE_ETHDEV_LOG_LINE(ERR, "Invalid Rx queue_id=%u for port_id=%u",
6887 rx_queue_id, rx_port_id);
6888 return 0;
6889 }
6890#endif
6891
6892 /* Copy used *rte_mbuf* buffer pointers from Tx mbuf ring
6893 * into Rx mbuf ring.
6894 */
6895 nb_mbufs = p1->recycle_tx_mbufs_reuse(qd1, recycle_rxq_info);
6896
6897 /* If no recycling mbufs, return 0. */
6898 if (nb_mbufs == 0)
6899 return 0;
6900
6901 /* Replenish the Rx descriptors with the recycling
6902 * into Rx mbuf ring.
6903 */
6904 p2->recycle_rx_descriptors_refill(qd2, nb_mbufs);
6905
6906 return nb_mbufs;
6907}
6908
6934int rte_eth_buffer_split_get_supported_hdr_ptypes(uint16_t port_id, uint32_t *ptypes, int num)
6936
6968static inline int
6969rte_eth_tx_queue_count(uint16_t port_id, uint16_t queue_id)
6970{
6971 struct rte_eth_fp_ops *fops;
6972 void *qd;
6973 int rc;
6974
6975#ifdef RTE_ETHDEV_DEBUG_TX
6976 if (port_id >= RTE_MAX_ETHPORTS || !rte_eth_dev_is_valid_port(port_id)) {
6977 RTE_ETHDEV_LOG_LINE(ERR, "Invalid port_id=%u", port_id);
6978 return -ENODEV;
6979 }
6980
6981 if (queue_id >= RTE_MAX_QUEUES_PER_PORT) {
6982 RTE_ETHDEV_LOG_LINE(ERR, "Invalid queue_id=%u for port_id=%u",
6983 queue_id, port_id);
6984 return -EINVAL;
6985 }
6986#endif
6987
6988 /* Fetch pointer to Tx queue data */
6989 fops = &rte_eth_fp_ops[port_id];
6990 qd = fops->txq.data[queue_id];
6991
6992#ifdef RTE_ETHDEV_DEBUG_TX
6993 if (qd == NULL) {
6994 RTE_ETHDEV_LOG_LINE(ERR, "Invalid queue_id=%u for port_id=%u",
6995 queue_id, port_id);
6996 return -EINVAL;
6997 }
6998#endif
6999 rc = fops->tx_queue_count(qd);
7000 rte_eth_trace_tx_queue_count(port_id, queue_id, rc);
7001 return rc;
7002}
7003
7004#ifdef __cplusplus
7005}
7006#endif
7007
7008#endif /* _RTE_ETHDEV_H_ */
#define RTE_BIT32(nr)
Definition: rte_bitops.h:44
#define unlikely(x)
rte_cman_mode
Definition: rte_cman.h:16
#define __rte_cache_min_aligned
Definition: rte_common.h:942
#define __rte_unused
Definition: rte_common.h:276
#define __rte_always_inline
Definition: rte_common.h:534
#define __rte_warn_unused_result
Definition: rte_common.h:509
#define rte_errno
Definition: rte_errno.h:29
rte_eth_nb_pools
Definition: rte_ethdev.h:949
@ RTE_ETH_64_POOLS
Definition: rte_ethdev.h:953
@ RTE_ETH_32_POOLS
Definition: rte_ethdev.h:952
@ RTE_ETH_8_POOLS
Definition: rte_ethdev.h:950
@ RTE_ETH_16_POOLS
Definition: rte_ethdev.h:951
int rte_eth_speed_lanes_get(uint16_t port_id, uint32_t *lanes)
rte_eth_event_ipsec_subtype
Definition: rte_ethdev.h:3991
@ RTE_ETH_EVENT_IPSEC_PMD_ERROR_END
Definition: rte_ethdev.h:3995
@ RTE_ETH_EVENT_IPSEC_UNKNOWN
Definition: rte_ethdev.h:3997
@ RTE_ETH_EVENT_IPSEC_MAX
Definition: rte_ethdev.h:4023
@ RTE_ETH_EVENT_IPSEC_SA_PKT_EXPIRY
Definition: rte_ethdev.h:4011
@ RTE_ETH_EVENT_IPSEC_ESN_OVERFLOW
Definition: rte_ethdev.h:3999
@ RTE_ETH_EVENT_IPSEC_SA_BYTE_HARD_EXPIRY
Definition: rte_ethdev.h:4016
@ RTE_ETH_EVENT_IPSEC_PMD_ERROR_START
Definition: rte_ethdev.h:3993
@ RTE_ETH_EVENT_IPSEC_SA_BYTE_EXPIRY
Definition: rte_ethdev.h:4006
@ RTE_ETH_EVENT_IPSEC_SA_TIME_EXPIRY
Definition: rte_ethdev.h:4001
@ RTE_ETH_EVENT_IPSEC_SA_PKT_HARD_EXPIRY
Definition: rte_ethdev.h:4021
int rte_eth_timesync_write_time(uint16_t port_id, const struct timespec *time)
int rte_eth_dev_is_removed(uint16_t port_id)
int rte_eth_tx_done_cleanup(uint16_t port_id, uint16_t queue_id, uint32_t free_cnt)
int rte_eth_timesync_read_rx_timestamp(uint16_t port_id, struct timespec *timestamp, uint32_t flags)
int rte_eth_representor_info_get(uint16_t port_id, struct rte_eth_representor_info *info)
static uint64_t rte_eth_rss_hf_refine(uint64_t rss_hf)
Definition: rte_ethdev.h:709
void(* rte_eth_module_eeprom_field_cb)(const char *name, const char *value, void *arg)
Definition: rte_ethdev.h:5254
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:6776
void rte_eth_iterator_cleanup(struct rte_dev_iterator *iter)
int rte_eth_cman_info_get(uint16_t port_id, struct rte_eth_cman_info *info)
int rte_eth_timesync_adjust_time(uint16_t port_id, int64_t delta)
int rte_eth_dev_set_link_down(uint16_t port_id)
int rte_eth_buffer_split_get_supported_hdr_ptypes(uint16_t port_id, uint32_t *ptypes, int num) __rte_warn_unused_result
int rte_eth_tx_descriptor_dump(uint16_t port_id, uint16_t queue_id, uint16_t offset, uint16_t num, FILE *file)
rte_eth_event_macsec_subtype
Definition: rte_ethdev.h:3915
@ RTE_ETH_SUBEVENT_MACSEC_UNKNOWN
Definition: rte_ethdev.h:3917
@ RTE_ETH_SUBEVENT_MACSEC_RX_SECTAG_E_EQ0_C_EQ1
Definition: rte_ethdev.h:3927
@ RTE_ETH_SUBEVENT_MACSEC_RX_SECTAG_SL_GTE48
Definition: rte_ethdev.h:3932
@ RTE_ETH_SUBEVENT_MACSEC_RX_SECTAG_SC_EQ1_SCB_EQ1
Definition: rte_ethdev.h:3942
@ RTE_ETH_SUBEVENT_MACSEC_RX_SECTAG_ES_EQ1_SC_EQ1
Definition: rte_ethdev.h:3937
@ RTE_ETH_SUBEVENT_MACSEC_RX_SECTAG_V_EQ1
Definition: rte_ethdev.h:3922
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_rx_intr_ctl_q(uint16_t port_id, uint16_t queue_id, int epfd, int op, void *data)
rte_eth_event_type
Definition: rte_ethdev.h:4056
@ RTE_ETH_EVENT_RECOVERY_FAILED
Definition: rte_ethdev.h:4133
@ RTE_ETH_EVENT_UNKNOWN
Definition: rte_ethdev.h:4057
@ RTE_ETH_EVENT_VF_MBOX
Definition: rte_ethdev.h:4063
@ RTE_ETH_EVENT_IPSEC
Definition: rte_ethdev.h:4074
@ RTE_ETH_EVENT_INTR_RESET
Definition: rte_ethdev.h:4062
@ RTE_ETH_EVENT_INTR_RMV
Definition: rte_ethdev.h:4065
@ RTE_ETH_EVENT_ERR_RECOVERING
Definition: rte_ethdev.h:4097
@ RTE_ETH_EVENT_MACSEC
Definition: rte_ethdev.h:4064
@ RTE_ETH_EVENT_RECOVERY_SUCCESS
Definition: rte_ethdev.h:4128
@ RTE_ETH_EVENT_DESTROY
Definition: rte_ethdev.h:4073
@ RTE_ETH_EVENT_FLOW_AGED
Definition: rte_ethdev.h:4075
@ RTE_ETH_EVENT_QUEUE_STATE
Definition: rte_ethdev.h:4060
@ RTE_ETH_EVENT_INTR_LSC
Definition: rte_ethdev.h:4058
@ RTE_ETH_EVENT_MAX
Definition: rte_ethdev.h:4134
@ RTE_ETH_EVENT_RX_AVAIL_THRESH
Definition: rte_ethdev.h:4080
@ RTE_ETH_EVENT_NEW
Definition: rte_ethdev.h:4072
int rte_eth_rx_burst_mode_get(uint16_t port_id, uint16_t queue_id, struct rte_eth_burst_mode *mode)
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)
int rte_eth_dev_is_valid_port(uint16_t port_id)
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_eth_cman_obj
Definition: rte_ethdev.h:5920
@ RTE_ETH_CMAN_OBJ_RX_QUEUE_MEMPOOL
Definition: rte_ethdev.h:5927
@ RTE_ETH_CMAN_OBJ_RX_QUEUE
Definition: rte_ethdev.h:5922
int rte_eth_hairpin_get_peer_ports(uint16_t port_id, uint16_t *peer_ports, size_t len, uint32_t direction)
int rte_eth_rx_descriptor_dump(uint16_t port_id, uint16_t queue_id, uint16_t offset, uint16_t num, FILE *file)
#define RTE_ETH_DCB_NUM_USER_PRIORITIES
Definition: rte_ethdev.h:885
int rte_eth_dev_reset(uint16_t port_id)
int rte_eth_dev_get_module_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info) __rte_warn_unused_result
#define RTE_ETH_BURST_MODE_INFO_SIZE
Definition: rte_ethdev.h:1936
int rte_eth_read_clock(uint16_t port_id, uint64_t *clock)
int rte_eth_allmulticast_disable(uint16_t port_id)
int rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats, unsigned int n)
int rte_eth_speed_lanes_set(uint16_t port_id, uint32_t speed_lanes)
rte_eth_dev_state
Definition: rte_ethdev.h:2100
@ RTE_ETH_DEV_ATTACHED
Definition: rte_ethdev.h:2104
@ RTE_ETH_DEV_UNUSED
Definition: rte_ethdev.h:2102
@ RTE_ETH_DEV_REMOVED
Definition: rte_ethdev.h:2106
int rte_eth_dev_get_reg_info_ext(uint16_t port_id, struct rte_dev_reg_info *info)
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)
int rte_eth_dev_owner_get(const uint16_t port_id, struct rte_eth_dev_owner *owner)
int rte_eth_dev_get_mtu(uint16_t port_id, uint16_t *mtu)
int rte_eth_dev_flow_ctrl_set(uint16_t port_id, struct rte_eth_fc_conf *fc_conf)
int rte_eth_dev_priv_dump(uint16_t port_id, FILE *file)
int rte_eth_dev_rss_reta_update(uint16_t port_id, struct rte_eth_rss_reta_entry64 *reta_conf, uint16_t reta_size)
rte_eth_link_connector
Definition: rte_ethdev.h:328
@ RTE_ETH_LINK_CONNECTOR_XAUI
Definition: rte_ethdev.h:342
@ RTE_ETH_LINK_CONNECTOR_SFP_DD
Definition: rte_ethdev.h:348
@ RTE_ETH_LINK_CONNECTOR_GAUI
Definition: rte_ethdev.h:341
@ RTE_ETH_LINK_CONNECTOR_MII
Definition: rte_ethdev.h:332
@ RTE_ETH_LINK_CONNECTOR_XLAUI
Definition: rte_ethdev.h:340
@ RTE_ETH_LINK_CONNECTOR_QSFP
Definition: rte_ethdev.h:349
@ RTE_ETH_LINK_CONNECTOR_SFP28
Definition: rte_ethdev.h:347
@ RTE_ETH_LINK_CONNECTOR_OTHER
Definition: rte_ethdev.h:354
@ RTE_ETH_LINK_CONNECTOR_AUI
Definition: rte_ethdev.h:331
@ RTE_ETH_LINK_CONNECTOR_SGMII
Definition: rte_ethdev.h:336
@ RTE_ETH_LINK_CONNECTOR_SFP
Definition: rte_ethdev.h:345
@ RTE_ETH_LINK_CONNECTOR_QSFP_PLUS
Definition: rte_ethdev.h:350
@ RTE_ETH_LINK_CONNECTOR_TP
Definition: rte_ethdev.h:330
@ RTE_ETH_LINK_CONNECTOR_QSFP28
Definition: rte_ethdev.h:351
@ RTE_ETH_LINK_CONNECTOR_DAC
Definition: rte_ethdev.h:335
@ RTE_ETH_LINK_CONNECTOR_QSFP56
Definition: rte_ethdev.h:352
@ RTE_ETH_LINK_CONNECTOR_QSFP_DD
Definition: rte_ethdev.h:353
@ RTE_ETH_LINK_CONNECTOR_SFI
Definition: rte_ethdev.h:339
@ RTE_ETH_LINK_CONNECTOR_CAUI
Definition: rte_ethdev.h:343
@ RTE_ETH_LINK_CONNECTOR_XFI
Definition: rte_ethdev.h:338
@ RTE_ETH_LINK_CONNECTOR_LAUI
Definition: rte_ethdev.h:344
@ RTE_ETH_LINK_CONNECTOR_FIBER
Definition: rte_ethdev.h:333
@ RTE_ETH_LINK_CONNECTOR_SFP_PLUS
Definition: rte_ethdev.h:346
@ RTE_ETH_LINK_CONNECTOR_QSGMII
Definition: rte_ethdev.h:337
@ RTE_ETH_LINK_CONNECTOR_NONE
Definition: rte_ethdev.h:329
@ RTE_ETH_LINK_CONNECTOR_BNC
Definition: rte_ethdev.h:334
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:6183
rte_eth_fec_mode
Definition: rte_ethdev.h:2011
@ RTE_ETH_FEC_NOFEC
Definition: rte_ethdev.h:2012
@ RTE_ETH_FEC_BASER
Definition: rte_ethdev.h:2014
@ RTE_ETH_FEC_AUTO
Definition: rte_ethdev.h:2013
@ RTE_ETH_FEC_RS
Definition: rte_ethdev.h:2015
@ RTE_ETH_FEC_LLRS
Definition: rte_ethdev.h:2016
int rte_eth_xstats_get_names(uint16_t port_id, struct rte_eth_xstat_name *xstats_names, unsigned int size)
int rte_eth_dev_uc_all_hash_table_set(uint16_t port_id, uint8_t on)
int rte_eth_dev_get_reg_info(uint16_t port_id, struct rte_dev_reg_info *info) __rte_warn_unused_result
rte_eth_err_handle_mode
Definition: rte_ethdev.h:1764
@ RTE_ETH_ERROR_HANDLE_MODE_PASSIVE
Definition: rte_ethdev.h:1771
@ RTE_ETH_ERROR_HANDLE_MODE_NONE
Definition: rte_ethdev.h:1766
@ RTE_ETH_ERROR_HANDLE_MODE_PROACTIVE
Definition: rte_ethdev.h:1777
const char * rte_eth_link_speed_to_str(uint32_t link_speed)
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)
int rte_eth_find_rss_algo(const char *name, uint32_t *algo)
int rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info) __rte_warn_unused_result
rte_eth_tx_mq_mode
Definition: rte_ethdev.h:447
@ RTE_ETH_MQ_TX_DCB
Definition: rte_ethdev.h:449
@ RTE_ETH_MQ_TX_VMDQ_DCB
Definition: rte_ethdev.h:450
@ RTE_ETH_MQ_TX_VMDQ_ONLY
Definition: rte_ethdev.h:451
@ RTE_ETH_MQ_TX_NONE
Definition: rte_ethdev.h:448
int rte_eth_promiscuous_get(uint16_t port_id)
__rte_experimental int rte_eth_xstats_set_counter(uint16_t port_id, uint64_t id, int on_off)
static 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)
Definition: rte_ethdev.h:6837
uint64_t rte_eth_find_next_owned_by(uint16_t port_id, const uint64_t owner_id)
int rte_eth_led_off(uint16_t port_id)
int rte_eth_dev_flow_ctrl_get(uint16_t port_id, struct rte_eth_fc_conf *fc_conf)
int rte_eth_dev_set_link_up(uint16_t port_id)
int rte_eth_dev_map_aggr_tx_affinity(uint16_t port_id, uint16_t tx_queue_id, uint8_t affinity)
uint16_t rte_eth_find_next(uint16_t port_id)
rte_eth_rx_mq_mode
Definition: rte_ethdev.h:421
@ RTE_ETH_MQ_RX_DCB_RSS
Definition: rte_ethdev.h:430
@ RTE_ETH_MQ_RX_VMDQ_DCB_RSS
Definition: rte_ethdev.h:439
@ RTE_ETH_MQ_RX_DCB
Definition: rte_ethdev.h:428
@ RTE_ETH_MQ_RX_VMDQ_DCB
Definition: rte_ethdev.h:437
@ RTE_ETH_MQ_RX_VMDQ_RSS
Definition: rte_ethdev.h:435
@ RTE_ETH_MQ_RX_NONE
Definition: rte_ethdev.h:423
@ RTE_ETH_MQ_RX_RSS
Definition: rte_ethdev.h:426
@ RTE_ETH_MQ_RX_VMDQ_ONLY
Definition: rte_ethdev.h:433
int rte_eth_link_get_nowait(uint16_t port_id, struct rte_eth_link *link) __rte_warn_unused_result
int rte_eth_allmulticast_get(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)
int rte_eth_dev_get_module_info(uint16_t port_id, struct rte_eth_dev_module_info *modinfo) __rte_warn_unused_result
int rte_eth_allmulticast_enable(uint16_t port_id)
int rte_eth_rx_metadata_negotiate(uint16_t port_id, uint64_t *features)
int rte_eth_promiscuous_enable(uint16_t port_id)
rte_eth_representor_type
Definition: rte_ethdev.h:1754
@ RTE_ETH_REPRESENTOR_PF
Definition: rte_ethdev.h:1758
@ RTE_ETH_REPRESENTOR_VF
Definition: rte_ethdev.h:1756
@ RTE_ETH_REPRESENTOR_SF
Definition: rte_ethdev.h:1757
@ RTE_ETH_REPRESENTOR_NONE
Definition: rte_ethdev.h:1755
int rte_eth_timesync_enable(uint16_t port_id)
int rte_eth_dev_rss_hash_conf_get(uint16_t port_id, struct rte_eth_rss_conf *rss_conf)
#define RTE_ETH_VMDQ_MAX_VLAN_FILTERS
Definition: rte_ethdev.h:884
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_rx_avail_thresh_set(uint16_t port_id, uint16_t queue_id, uint8_t avail_thresh)
int rte_eth_dev_priority_flow_ctrl_set(uint16_t port_id, struct rte_eth_pfc_conf *pfc_conf)
int rte_eth_dev_vlan_filter(uint16_t port_id, uint16_t vlan_id, int on)
int rte_eth_dev_udp_tunnel_port_add(uint16_t port_id, struct rte_eth_udp_tunnel *tunnel_udp)
int rte_eth_dev_get_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)
uint16_t rte_eth_iterator_next(struct rte_dev_iterator *iter)
int rte_eth_dev_conf_get(uint16_t port_id, struct rte_eth_conf *dev_conf) __rte_warn_unused_result
int rte_eth_dev_set_vlan_strip_on_queue(uint16_t port_id, uint16_t rx_queue_id, int on)
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_dev_stop(uint16_t port_id)
int rte_eth_dev_hairpin_capability_get(uint16_t port_id, struct rte_eth_hairpin_cap *cap)
int rte_eth_timesync_disable(uint16_t port_id)
int rte_eth_ip_reassembly_capability_get(uint16_t port_id, struct rte_eth_ip_reassembly_params *capa)
int rte_eth_cman_config_init(uint16_t port_id, struct rte_eth_cman_config *config)
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:2070
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:6639
int rte_eth_hairpin_bind(uint16_t tx_port, uint16_t rx_port)
rte_eth_tunnel_type
Definition: rte_ethdev.h:1467
int rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)
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_queue_is_valid(uint16_t port_id, uint16_t queue_id)
__rte_experimental int rte_eth_get_queue_rate_limit(uint16_t port_id, uint16_t queue_idx, uint32_t *tx_rate)
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)
int rte_eth_promiscuous_disable(uint16_t port_id)
int rte_eth_dev_count_aggr_ports(uint16_t port_id)
int rte_eth_remove_rx_callback(uint16_t port_id, uint16_t queue_id, const struct rte_eth_rxtx_callback *user_cb)
int rte_eth_cman_config_get(uint16_t port_id, struct rte_eth_cman_config *config)
int rte_eth_dev_rx_intr_disable(uint16_t port_id, uint16_t queue_id)
int rte_eth_dev_tx_queue_stop(uint16_t port_id, uint16_t tx_queue_id)
__rte_experimental const char * rte_eth_link_connector_to_str(enum rte_eth_link_connector link_connector)
int rte_eth_dev_owner_delete(const uint64_t owner_id)
int rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask)
int rte_eth_dev_set_vlan_pvid(uint16_t port_id, uint16_t pvid, int on)
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:6522
int rte_eth_dev_rx_intr_ctl_q_get_fd(uint16_t port_id, uint16_t queue_id)
__rte_experimental int rte_eth_xstats_query_state(uint16_t port_id, uint64_t id)
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:4150
int rte_eth_dev_rx_intr_enable(uint16_t port_id, uint16_t queue_id)
int rte_eth_dev_get_eeprom_length(uint16_t port_id)
int rte_eth_ip_reassembly_conf_get(uint16_t port_id, struct rte_eth_ip_reassembly_params *conf)
int rte_eth_macaddr_get(uint16_t port_id, struct rte_ether_addr *mac_addr)
int rte_eth_rx_avail_thresh_query(uint16_t port_id, uint16_t *queue_id, uint8_t *avail_thresh)
int rte_eth_dev_default_mac_addr_set(uint16_t port_id, struct rte_ether_addr *mac_addr)
int rte_eth_dev_set_mtu(uint16_t port_id, uint16_t mtu)
__rte_experimental int rte_eth_module_eeprom_parse(uint32_t type, const uint8_t *data, uint32_t length, rte_eth_module_eeprom_field_cb cb, void *arg)
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)
#define RTE_ETH_MQ_RX_DCB_FLAG
Definition: rte_ethdev.h:413
uint16_t rte_eth_find_next_sibling(uint16_t port_id_start, uint16_t ref_port_id)
int rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask, uint32_t *ptypes, int num) __rte_warn_unused_result
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_dev_priority_flow_ctrl_queue_configure(uint16_t port_id, struct rte_eth_pfc_queue_conf *pfc_queue_conf)
int rte_eth_xstats_get_id_by_name(uint16_t port_id, const char *xstat_name, uint64_t *id)
uint16_t rte_eth_dev_count_avail(void)
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_fc_mode
Definition: rte_ethdev.h:1384
@ RTE_ETH_FC_TX_PAUSE
Definition: rte_ethdev.h:1387
@ RTE_ETH_FC_RX_PAUSE
Definition: rte_ethdev.h:1386
@ RTE_ETH_FC_NONE
Definition: rte_ethdev.h:1385
@ RTE_ETH_FC_FULL
Definition: rte_ethdev.h:1388
rte_eth_event_macsec_type
Definition: rte_ethdev.h:3949
@ RTE_ETH_EVENT_MACSEC_RX_SA_PN_HARD_EXP
Definition: rte_ethdev.h:3955
@ RTE_ETH_EVENT_MACSEC_SA_NOT_VALID
Definition: rte_ethdev.h:3963
@ RTE_ETH_EVENT_MACSEC_RX_SA_PN_SOFT_EXP
Definition: rte_ethdev.h:3957
@ RTE_ETH_EVENT_MACSEC_UNKNOWN
Definition: rte_ethdev.h:3951
@ RTE_ETH_EVENT_MACSEC_TX_SA_PN_HARD_EXP
Definition: rte_ethdev.h:3959
@ RTE_ETH_EVENT_MACSEC_SECTAG_VAL_ERR
Definition: rte_ethdev.h:3953
@ RTE_ETH_EVENT_MACSEC_TX_SA_PN_SOFT_EXP
Definition: rte_ethdev.h:3961
int rte_eth_led_on(uint16_t port_id)
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_dev_get_port_by_name(const char *name, uint16_t *port_id)
int rte_eth_get_monitor_addr(uint16_t port_id, uint16_t queue_id, struct rte_power_monitor_cond *pmc)
int rte_eth_dev_set_mc_addr_list(uint16_t port_id, struct rte_ether_addr *mc_addr_set, uint32_t nb_mc_addr)
int rte_eth_iterator_init(struct rte_dev_iterator *iter, const char *devargs)
int rte_eth_tx_burst_mode_get(uint16_t port_id, uint16_t queue_id, struct rte_eth_burst_mode *mode)
int rte_eth_tx_buffer_set_err_callback(struct rte_eth_dev_tx_buffer *buffer, buffer_tx_error_fn callback, void *userdata)
int rte_eth_dev_mac_addr_add(uint16_t port_id, struct rte_ether_addr *mac_addr, uint32_t pool)
int rte_eth_dev_uc_hash_table_set(uint16_t port_id, struct rte_ether_addr *addr, uint8_t on)
int rte_eth_dev_owner_set(const uint16_t port_id, const struct rte_eth_dev_owner *owner)
uint32_t rte_eth_speed_bitflag(uint32_t speed, int duplex)
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_get_vlan_offload(uint16_t port_id)
const char * rte_eth_dev_capability_name(uint64_t capability)
#define RTE_ETH_MQ_RX_RSS_FLAG
Definition: rte_ethdev.h:412
int rte_eth_dev_pool_ops_supported(uint16_t port_id, const char *pool)
static int rte_eth_tx_queue_count(uint16_t port_id, uint16_t queue_id)
Definition: rte_ethdev.h:6969
int rte_eth_rx_queue_info_get(uint16_t port_id, uint16_t queue_id, struct rte_eth_rxq_info *qinfo)
int rte_eth_link_to_str(char *str, size_t len, const struct rte_eth_link *eth_link)
int rte_eth_dev_rx_intr_ctl(uint16_t port_id, int epfd, int op, void *data)
void * rte_eth_dev_get_sec_ctx(uint16_t port_id)
int rte_eth_link_get(uint16_t port_id, struct rte_eth_link *link) __rte_warn_unused_result
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)
int rte_eth_dev_close(uint16_t port_id)
void rte_eth_tx_buffer_count_callback(struct rte_mbuf **pkts, uint16_t unsent, void *userdata)
int rte_eth_dev_owner_unset(const uint16_t port_id, const uint64_t owner_id)
int rte_eth_tx_queue_info_get(uint16_t port_id, uint16_t queue_id, struct rte_eth_txq_info *qinfo)
const char * rte_eth_dev_rx_offload_name(uint64_t offload)
int rte_eth_dev_udp_tunnel_port_delete(uint16_t port_id, struct rte_eth_udp_tunnel *tunnel_udp)
int rte_eth_tx_buffer_init(struct rte_eth_dev_tx_buffer *buffer, uint16_t size)
int rte_eth_fec_get_capability(uint16_t port_id, struct rte_eth_fec_capa *speed_fec_capa, unsigned int num)
#define RTE_ETH_MQ_RX_VMDQ_FLAG
Definition: rte_ethdev.h:414
int rte_eth_speed_lanes_get_capability(uint16_t port_id, struct rte_eth_speed_lanes_capa *speed_lanes_capa, unsigned int num)
void rte_eth_tx_buffer_drop_callback(struct rte_mbuf **pkts, uint16_t unsent, void *userdata)
int rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t rx_queue_id)
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:6723
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)
int rte_eth_macaddrs_get(uint16_t port_id, struct rte_ether_addr *ma, unsigned int num)
int rte_eth_dev_socket_id(uint16_t port_id)
int rte_eth_dev_tx_queue_start(uint16_t port_id, uint16_t tx_queue_id)
int rte_eth_dev_adjust_nb_rx_tx_desc(uint16_t port_id, uint16_t *nb_rx_desc, uint16_t *nb_tx_desc)
static int rte_eth_rx_descriptor_status(uint16_t port_id, uint16_t queue_id, uint16_t offset)
Definition: rte_ethdev.h:6331
static int rte_eth_tx_descriptor_status(uint16_t port_id, uint16_t queue_id, uint16_t offset)
Definition: rte_ethdev.h:6400
int rte_eth_dev_get_dcb_info(uint16_t port_id, struct rte_eth_dcb_info *dcb_info)
int rte_eth_dev_rss_hash_update(uint16_t port_id, struct rte_eth_rss_conf *rss_conf)
int rte_eth_dev_owner_new(uint64_t *owner_id)
int rte_eth_dev_set_ptypes(uint16_t port_id, uint32_t ptype_mask, uint32_t *set_ptypes, unsigned int num)
int rte_eth_timesync_read_time(uint16_t port_id, struct timespec *time)
const char * rte_eth_dev_rss_algo_name(enum rte_eth_hash_function rss_algo)
int rte_eth_dev_mac_addr_remove(uint16_t port_id, struct rte_ether_addr *mac_addr)
int rte_eth_rx_queue_is_valid(uint16_t port_id, uint16_t queue_id)
int rte_eth_xstats_reset(uint16_t port_id)
int rte_eth_timesync_adjust_freq(uint16_t port_id, int64_t ppm)
int rte_eth_stats_get(uint16_t port_id, struct rte_eth_stats *stats)
int rte_eth_set_queue_rate_limit(uint16_t port_id, uint16_t queue_idx, uint32_t tx_rate)
int rte_eth_dev_fw_version_get(uint16_t port_id, char *fw_version, size_t fw_size) __rte_warn_unused_result
int rte_eth_ip_reassembly_conf_set(uint16_t port_id, const struct rte_eth_ip_reassembly_params *conf)
int rte_eth_timesync_read_tx_timestamp(uint16_t port_id, struct timespec *timestamp)
uint16_t rte_eth_find_next_of(uint16_t port_id_start, const struct rte_device *parent)
int rte_eth_fec_get(uint16_t port_id, uint32_t *fec_capa)
rte_vlan_type
Definition: rte_ethdev.h:478
@ RTE_ETH_VLAN_TYPE_OUTER
Definition: rte_ethdev.h:481
@ RTE_ETH_VLAN_TYPE_INNER
Definition: rte_ethdev.h:480
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:2094
const char * rte_eth_dev_tx_offload_name(uint64_t offload)
rte_eth_hash_function
Definition: rte_ethdev.h:496
@ RTE_ETH_HASH_FUNCTION_DEFAULT
Definition: rte_ethdev.h:498
@ RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ_SORT
Definition: rte_ethdev.h:513
@ RTE_ETH_HASH_FUNCTION_SIMPLE_XOR
Definition: rte_ethdev.h:500
@ RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ
Definition: rte_ethdev.h:506
@ RTE_ETH_HASH_FUNCTION_TOEPLITZ
Definition: rte_ethdev.h:499
int rte_eth_hairpin_unbind(uint16_t tx_port, uint16_t rx_port)
uint16_t rte_eth_dev_count_total(void)
#define RTE_ETH_XSTATS_NAME_SIZE
Definition: rte_ethdev.h:1941
int rte_eth_dev_rx_queue_stop(uint16_t port_id, uint16_t rx_queue_id)
int rte_eth_stats_reset(uint16_t port_id)
static int rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)
Definition: rte_ethdev.h:6261
int rte_eth_fec_set(uint16_t port_id, uint32_t fec_capa)
int rte_eth_dev_get_name_by_port(uint16_t port_id, char *name, size_t size)
rte_eth_nb_tcs
Definition: rte_ethdev.h:940
@ RTE_ETH_4_TCS
Definition: rte_ethdev.h:941
@ RTE_ETH_8_TCS
Definition: rte_ethdev.h:942
int rte_eth_cman_config_set(uint16_t port_id, const struct rte_eth_cman_config *config)
int rte_eth_dev_start(uint16_t port_id)
@ RTE_MBUF_HISTORY_OP_TX_BUSY
@ RTE_MBUF_HISTORY_OP_RX
@ RTE_MBUF_HISTORY_OP_TX
@ RTE_MBUF_HISTORY_OP_TX_PREP
static void rte_mbuf_history_mark_bulk(struct rte_mbuf *const *mbufs, unsigned int count, enum rte_mbuf_history_op op)
char info[RTE_ETH_BURST_MODE_INFO_SIZE]
Definition: rte_ethdev.h:1937
uint8_t rsvd_mode_params[4]
Definition: rte_ethdev.h:5988
enum rte_eth_cman_obj obj
Definition: rte_ethdev.h:5956
struct rte_cman_red_params red
Definition: rte_ethdev.h:5981
uint8_t rsvd_obj_params[4]
Definition: rte_ethdev.h:5973
enum rte_cman_mode mode
Definition: rte_ethdev.h:5958
uint8_t rsvd[8]
Definition: rte_ethdev.h:5948
uint64_t modes_supported
Definition: rte_ethdev.h:5938
uint64_t objs_supported
Definition: rte_ethdev.h:5943
struct rte_eth_intr_conf intr_conf
Definition: rte_ethdev.h:1559
struct rte_eth_vmdq_rx_conf vmdq_rx_conf
Definition: rte_ethdev.h:1546
struct rte_eth_txmode txmode
Definition: rte_ethdev.h:1533
struct rte_eth_rxmode rxmode
Definition: rte_ethdev.h:1532
struct rte_eth_vmdq_dcb_conf vmdq_dcb_conf
Definition: rte_ethdev.h:1542
uint32_t lpbk_mode
Definition: rte_ethdev.h:1534
struct rte_eth_conf::@185 rx_adv_conf
uint32_t dcb_capability_en
Definition: rte_ethdev.h:1558
struct rte_eth_vmdq_dcb_tx_conf vmdq_dcb_tx_conf
Definition: rte_ethdev.h:1550
union rte_eth_conf::@186 tx_adv_conf
uint32_t link_speeds
Definition: rte_ethdev.h:1525
struct rte_eth_rss_conf rss_conf
Definition: rte_ethdev.h:1540
struct rte_eth_dcb_tx_conf dcb_tx_conf
Definition: rte_ethdev.h:1552
struct rte_eth_dcb_rx_conf dcb_rx_conf
Definition: rte_ethdev.h:1544
struct rte_eth_vmdq_tx_conf vmdq_tx_conf
Definition: rte_ethdev.h:1554
uint8_t tc_bws[RTE_ETH_DCB_NUM_TCS]
Definition: rte_ethdev.h:2002
uint8_t prio_tc[RTE_ETH_DCB_NUM_USER_PRIORITIES]
Definition: rte_ethdev.h:2001
struct rte_eth_dcb_tc_queue_mapping tc_queue
Definition: rte_ethdev.h:2004
struct rte_eth_dcb_tc_queue_mapping::@188 tc_txq[RTE_ETH_MAX_VMDQ_POOL][RTE_ETH_DCB_NUM_TCS]
struct rte_eth_dcb_tc_queue_mapping::@187 tc_rxq[RTE_ETH_MAX_VMDQ_POOL][RTE_ETH_DCB_NUM_TCS]
uint16_t nb_mtu_seg_max
Definition: rte_ethdev.h:1378
uint16_t nb_seg_max
Definition: rte_ethdev.h:1365
uint16_t nb_align
Definition: rte_ethdev.h:1355
uint32_t max_rx_bufsize
Definition: rte_ethdev.h:1801
uint32_t max_hash_mac_addrs
Definition: rte_ethdev.h:1809
struct rte_eth_desc_lim rx_desc_lim
Definition: rte_ethdev.h:1832
unsigned int if_index
Definition: rte_ethdev.h:1788
uint16_t max_rx_queues
Definition: rte_ethdev.h:1805
uint64_t dev_capa
Definition: rte_ethdev.h:1850
uint16_t vmdq_queue_num
Definition: rte_ethdev.h:1830
uint32_t min_rx_bufsize
Definition: rte_ethdev.h:1794
uint16_t max_tx_queues
Definition: rte_ethdev.h:1806
struct rte_eth_txconf default_txconf
Definition: rte_ethdev.h:1828
uint16_t max_vmdq_pools
Definition: rte_ethdev.h:1811
struct rte_device * device
Definition: rte_ethdev.h:1786
struct rte_eth_rxconf default_rxconf
Definition: rte_ethdev.h:1827
uint16_t nb_tx_queues
Definition: rte_ethdev.h:1837
enum rte_eth_err_handle_mode err_handle_mode
Definition: rte_ethdev.h:1857
uint32_t max_rx_pktlen
Definition: rte_ethdev.h:1802
uint16_t max_mtu
Definition: rte_ethdev.h:1791
uint32_t max_lro_pkt_size
Definition: rte_ethdev.h:1804
uint16_t vmdq_queue_base
Definition: rte_ethdev.h:1829
void * reserved_ptrs[2]
Definition: rte_ethdev.h:1860
uint64_t reserved_64s[2]
Definition: rte_ethdev.h:1859
uint64_t tx_queue_offload_capa
Definition: rte_ethdev.h:1820
uint16_t vmdq_pool_base
Definition: rte_ethdev.h:1831
uint16_t min_mtu
Definition: rte_ethdev.h:1790
uint16_t reta_size
Definition: rte_ethdev.h:1822
struct rte_eth_desc_lim tx_desc_lim
Definition: rte_ethdev.h:1833
uint64_t flow_type_rss_offloads
Definition: rte_ethdev.h:1826
uint16_t max_rx_mempools
Definition: rte_ethdev.h:1844
uint16_t max_vfs
Definition: rte_ethdev.h:1810
struct rte_eth_dev_portconf default_txportconf
Definition: rte_ethdev.h:1848
uint64_t tx_offload_capa
Definition: rte_ethdev.h:1816
const char * driver_name
Definition: rte_ethdev.h:1787
uint8_t hash_key_size
Definition: rte_ethdev.h:1823
uint32_t speed_capa
Definition: rte_ethdev.h:1834
struct rte_eth_dev_portconf default_rxportconf
Definition: rte_ethdev.h:1846
struct rte_eth_switch_info switch_info
Definition: rte_ethdev.h:1855
struct rte_eth_rxseg_capa rx_seg_capa
Definition: rte_ethdev.h:1812
uint64_t rx_queue_offload_capa
Definition: rte_ethdev.h:1818
uint64_t rx_offload_capa
Definition: rte_ethdev.h:1814
uint16_t nb_rx_queues
Definition: rte_ethdev.h:1836
uint32_t max_mac_addrs
Definition: rte_ethdev.h:1807
const uint32_t * dev_flags
Definition: rte_ethdev.h:1792
struct rte_mbuf * pkts[]
Definition: rte_ethdev.h:3777
enum rte_eth_event_ipsec_subtype subtype
Definition: rte_ethdev.h:4032
enum rte_eth_event_macsec_type type
Definition: rte_ethdev.h:3972
enum rte_eth_event_macsec_subtype subtype
Definition: rte_ethdev.h:3974
uint32_t low_water
Definition: rte_ethdev.h:1398
uint16_t send_xon
Definition: rte_ethdev.h:1400
enum rte_eth_fc_mode mode
Definition: rte_ethdev.h:1401
uint32_t high_water
Definition: rte_ethdev.h:1397
uint16_t pause_time
Definition: rte_ethdev.h:1399
uint8_t mac_ctrl_frame_fwd
Definition: rte_ethdev.h:1402
uint16_t max_nb_queues
Definition: rte_ethdev.h:1256
struct rte_eth_hairpin_queue_cap tx_cap
Definition: rte_ethdev.h:1263
struct rte_eth_hairpin_queue_cap rx_cap
Definition: rte_ethdev.h:1262
uint32_t use_locked_device_memory
Definition: rte_ethdev.h:1317
struct rte_eth_fc_conf fc
Definition: rte_ethdev.h:1412
enum rte_eth_fc_mode mode
Definition: rte_ethdev.h:1443
enum rte_eth_fc_mode mode_capa
Definition: rte_ethdev.h:1425
struct rte_mempool * mp
Definition: rte_ethdev.h:1906
struct rte_mbuf ** mbuf_ring
Definition: rte_ethdev.h:1905
struct rte_eth_representor_range ranges[]
Definition: rte_ethdev.h:5660
enum rte_eth_representor_type type
Definition: rte_ethdev.h:5639
char name[RTE_DEV_NAME_MAX_LEN]
Definition: rte_ethdev.h:5649
uint8_t * rss_key
Definition: rte_ethdev.h:537
uint8_t rss_key_len
Definition: rte_ethdev.h:538
enum rte_eth_hash_function algorithm
Definition: rte_ethdev.h:544
uint64_t rss_hf
Definition: rte_ethdev.h:543
uint16_t reta[RTE_ETH_RETA_GROUP_SIZE]
Definition: rte_ethdev.h:933
struct rte_eth_thresh rx_thresh
Definition: rte_ethdev.h:1157
uint64_t offloads
Definition: rte_ethdev.h:1175
void * reserved_ptrs[2]
Definition: rte_ethdev.h:1208
uint64_t reserved_64s[2]
Definition: rte_ethdev.h:1207
uint8_t rx_deferred_start
Definition: rte_ethdev.h:1160
uint16_t share_group
Definition: rte_ethdev.h:1168
uint8_t rx_drop_en
Definition: rte_ethdev.h:1159
uint16_t share_qid
Definition: rte_ethdev.h:1169
union rte_eth_rxseg * rx_seg
Definition: rte_ethdev.h:1183
struct rte_mempool ** rx_mempools
Definition: rte_ethdev.h:1204
uint16_t rx_nseg
Definition: rte_ethdev.h:1161
uint16_t rx_free_thresh
Definition: rte_ethdev.h:1158
uint32_t mtu
Definition: rte_ethdev.h:460
uint32_t max_lro_pkt_size
Definition: rte_ethdev.h:462
uint64_t offloads
Definition: rte_ethdev.h:468
void * reserved_ptrs[2]
Definition: rte_ethdev.h:471
uint64_t reserved_64s[2]
Definition: rte_ethdev.h:470
enum rte_eth_rx_mq_mode mq_mode
Definition: rte_ethdev.h:459
uint8_t scattered_rx
Definition: rte_ethdev.h:1876
struct rte_mempool * mp
Definition: rte_ethdev.h:1874
uint8_t queue_state
Definition: rte_ethdev.h:1877
uint8_t avail_thresh
Definition: rte_ethdev.h:1886
uint16_t nb_desc
Definition: rte_ethdev.h:1878
uint16_t rx_buf_size
Definition: rte_ethdev.h:1879
__extension__ uint32_t multi_pools
Definition: rte_ethdev.h:1739
uint32_t selective_rx
Definition: rte_ethdev.h:1742
uint32_t offset_allowed
Definition: rte_ethdev.h:1740
uint32_t offset_align_log2
Definition: rte_ethdev.h:1741
struct rte_mempool * mp
Definition: rte_ethdev.h:1127
uint64_t imissed
Definition: rte_ethdev.h:271
uint64_t obytes
Definition: rte_ethdev.h:266
uint64_t opackets
Definition: rte_ethdev.h:264
uint64_t rx_nombuf
Definition: rte_ethdev.h:274
uint64_t ibytes
Definition: rte_ethdev.h:265
uint64_t ierrors
Definition: rte_ethdev.h:272
uint64_t ipackets
Definition: rte_ethdev.h:263
uint64_t oerrors
Definition: rte_ethdev.h:273
const char * name
Definition: rte_ethdev.h:1714
uint8_t hthresh
Definition: rte_ethdev.h:405
uint8_t pthresh
Definition: rte_ethdev.h:404
uint8_t wthresh
Definition: rte_ethdev.h:406
uint8_t tx_deferred_start
Definition: rte_ethdev.h:1220
uint64_t offloads
Definition: rte_ethdev.h:1226
void * reserved_ptrs[2]
Definition: rte_ethdev.h:1229
uint64_t reserved_64s[2]
Definition: rte_ethdev.h:1228
struct rte_eth_thresh tx_thresh
Definition: rte_ethdev.h:1215
uint16_t tx_rs_thresh
Definition: rte_ethdev.h:1216
uint16_t tx_free_thresh
Definition: rte_ethdev.h:1217
uint64_t offloads
Definition: rte_ethdev.h:1044
__extension__ uint8_t hw_vlan_insert_pvid
Definition: rte_ethdev.h:1053
void * reserved_ptrs[2]
Definition: rte_ethdev.h:1056
__extension__ uint8_t hw_vlan_reject_tagged
Definition: rte_ethdev.h:1049
uint64_t reserved_64s[2]
Definition: rte_ethdev.h:1055
__extension__ uint8_t hw_vlan_reject_untagged
Definition: rte_ethdev.h:1051
enum rte_eth_tx_mq_mode mq_mode
Definition: rte_ethdev.h:1038
uint8_t queue_state
Definition: rte_ethdev.h:1896
uint16_t nb_desc
Definition: rte_ethdev.h:1895
enum rte_eth_nb_pools nb_queue_pools
Definition: rte_ethdev.h:991
uint8_t dcb_tc[RTE_ETH_DCB_NUM_USER_PRIORITIES]
Definition: rte_ethdev.h:1000
struct rte_eth_vmdq_dcb_conf::@181 pool_map[RTE_ETH_VMDQ_MAX_VLAN_FILTERS]
uint8_t enable_default_pool
Definition: rte_ethdev.h:992
enum rte_eth_nb_pools nb_queue_pools
Definition: rte_ethdev.h:1022
struct rte_eth_vmdq_rx_conf::@182 pool_map[RTE_ETH_VMDQ_MAX_VLAN_FILTERS]
uint8_t enable_default_pool
Definition: rte_ethdev.h:1023
char name[RTE_ETH_XSTATS_NAME_SIZE]
Definition: rte_ethdev.h:1972
uint64_t value
Definition: rte_ethdev.h:1954
uint64_t id
Definition: rte_ethdev.h:1953