DPDK 26.11.0-rc1
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)
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
357};
358
363 union {
364 RTE_ATOMIC(uint64_t) val64;
365 __extension__
366 struct {
367 uint32_t link_speed;
368 uint16_t link_duplex : 1;
369 uint16_t link_autoneg : 1;
370 uint16_t link_status : 1;
371 uint16_t link_connector : 6;
372 };
373 };
374};
375
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)
390
393 uint32_t speed;
394 uint32_t capa;
395};
396
402 uint8_t pthresh;
403 uint8_t hthresh;
404 uint8_t wthresh;
405};
406
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)
422
429
439};
440
450};
451
458 uint32_t mtu;
466 uint64_t offloads;
467
468 uint64_t reserved_64s[2];
469 void *reserved_ptrs[2];
470};
471
477 RTE_ETH_VLAN_TYPE_UNKNOWN = 0,
480 RTE_ETH_VLAN_TYPE_MAX,
481};
482
488 uint64_t ids[64];
489};
490
512 RTE_ETH_HASH_FUNCTION_MAX,
513};
514
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)
517
535 uint8_t *rss_key;
536 uint8_t rss_key_len;
541 uint64_t rss_hf;
543};
544
545/*
546 * A packet can be identified by hardware as different flow types. Different
547 * NIC hardware may support different flow types.
548 * Basically, the NIC hardware identifies the flow type as deep protocol as
549 * possible, and exclusively. For example, if a packet is identified as
550 * 'RTE_ETH_FLOW_NONFRAG_IPV4_TCP', it will not be any of other flow types,
551 * though it is an actual IPV4 packet.
552 */
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
579
580/*
581 * Below macros are defined for RSS offload types, they can be used to
582 * fill rte_eth_rss_conf.rss_hf or rte_flow_action_rss.types.
583 */
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)
616
629#define RTE_ETH_RSS_L4_CHKSUM RTE_BIT64(35)
630
631#define RTE_ETH_RSS_L2TPV2 RTE_BIT64(36)
632#define RTE_ETH_RSS_IPV6_FLOW_LABEL RTE_BIT64(37)
633
635#define RTE_ETH_RSS_IB_BTH RTE_BIT64(38)
636
637/*
638 * We use the following macros to combine with above RTE_ETH_RSS_* for
639 * more specific input set selection. These bits are defined starting
640 * from the high end of the 64 bits.
641 * Note: If we use above RTE_ETH_RSS_* without SRC/DST_ONLY, it represents
642 * both SRC and DST are taken into account. If SRC_ONLY and DST_ONLY of
643 * the same level are used simultaneously, it is the same case as none of
644 * them are added.
645 */
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)
652
653/*
654 * Only select IPV6 address prefix as RSS input set according to
655 * https://tools.ietf.org/html/rfc6052
656 * Must be combined with RTE_ETH_RSS_IPV6, RTE_ETH_RSS_NONFRAG_IPV6_UDP,
657 * RTE_ETH_RSS_NONFRAG_IPV6_TCP, RTE_ETH_RSS_NONFRAG_IPV6_SCTP.
658 */
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)
665
666/*
667 * Use the following macros to combine with the above layers
668 * to choose inner and outer layers or both for RSS computation.
669 * Bits 50 and 51 are reserved for this.
670 */
671
679#define RTE_ETH_RSS_LEVEL_PMD_DEFAULT (UINT64_C(0) << 50)
680
685#define RTE_ETH_RSS_LEVEL_OUTERMOST (UINT64_C(1) << 50)
686
691#define RTE_ETH_RSS_LEVEL_INNERMOST (UINT64_C(2) << 50)
692#define RTE_ETH_RSS_LEVEL_MASK (UINT64_C(3) << 50)
693
694#define RTE_ETH_RSS_LEVEL(rss_hf) ((rss_hf & RTE_ETH_RSS_LEVEL_MASK) >> 50)
695
706static inline uint64_t
707rte_eth_rss_hf_refine(uint64_t rss_hf)
708{
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);
711
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);
714
715 return rss_hf;
716}
717
718#define RTE_ETH_RSS_IPV6_PRE32 ( \
719 RTE_ETH_RSS_IPV6 | \
720 RTE_ETH_RSS_L3_PRE32)
721
722#define RTE_ETH_RSS_IPV6_PRE40 ( \
723 RTE_ETH_RSS_IPV6 | \
724 RTE_ETH_RSS_L3_PRE40)
725
726#define RTE_ETH_RSS_IPV6_PRE48 ( \
727 RTE_ETH_RSS_IPV6 | \
728 RTE_ETH_RSS_L3_PRE48)
729
730#define RTE_ETH_RSS_IPV6_PRE56 ( \
731 RTE_ETH_RSS_IPV6 | \
732 RTE_ETH_RSS_L3_PRE56)
733
734#define RTE_ETH_RSS_IPV6_PRE64 ( \
735 RTE_ETH_RSS_IPV6 | \
736 RTE_ETH_RSS_L3_PRE64)
737
738#define RTE_ETH_RSS_IPV6_PRE96 ( \
739 RTE_ETH_RSS_IPV6 | \
740 RTE_ETH_RSS_L3_PRE96)
741
742#define RTE_ETH_RSS_IPV6_PRE32_UDP ( \
743 RTE_ETH_RSS_NONFRAG_IPV6_UDP | \
744 RTE_ETH_RSS_L3_PRE32)
745
746#define RTE_ETH_RSS_IPV6_PRE40_UDP ( \
747 RTE_ETH_RSS_NONFRAG_IPV6_UDP | \
748 RTE_ETH_RSS_L3_PRE40)
749
750#define RTE_ETH_RSS_IPV6_PRE48_UDP ( \
751 RTE_ETH_RSS_NONFRAG_IPV6_UDP | \
752 RTE_ETH_RSS_L3_PRE48)
753
754#define RTE_ETH_RSS_IPV6_PRE56_UDP ( \
755 RTE_ETH_RSS_NONFRAG_IPV6_UDP | \
756 RTE_ETH_RSS_L3_PRE56)
757
758#define RTE_ETH_RSS_IPV6_PRE64_UDP ( \
759 RTE_ETH_RSS_NONFRAG_IPV6_UDP | \
760 RTE_ETH_RSS_L3_PRE64)
761
762#define RTE_ETH_RSS_IPV6_PRE96_UDP ( \
763 RTE_ETH_RSS_NONFRAG_IPV6_UDP | \
764 RTE_ETH_RSS_L3_PRE96)
765
766#define RTE_ETH_RSS_IPV6_PRE32_TCP ( \
767 RTE_ETH_RSS_NONFRAG_IPV6_TCP | \
768 RTE_ETH_RSS_L3_PRE32)
769
770#define RTE_ETH_RSS_IPV6_PRE40_TCP ( \
771 RTE_ETH_RSS_NONFRAG_IPV6_TCP | \
772 RTE_ETH_RSS_L3_PRE40)
773
774#define RTE_ETH_RSS_IPV6_PRE48_TCP ( \
775 RTE_ETH_RSS_NONFRAG_IPV6_TCP | \
776 RTE_ETH_RSS_L3_PRE48)
777
778#define RTE_ETH_RSS_IPV6_PRE56_TCP ( \
779 RTE_ETH_RSS_NONFRAG_IPV6_TCP | \
780 RTE_ETH_RSS_L3_PRE56)
781
782#define RTE_ETH_RSS_IPV6_PRE64_TCP ( \
783 RTE_ETH_RSS_NONFRAG_IPV6_TCP | \
784 RTE_ETH_RSS_L3_PRE64)
785
786#define RTE_ETH_RSS_IPV6_PRE96_TCP ( \
787 RTE_ETH_RSS_NONFRAG_IPV6_TCP | \
788 RTE_ETH_RSS_L3_PRE96)
789
790#define RTE_ETH_RSS_IPV6_PRE32_SCTP ( \
791 RTE_ETH_RSS_NONFRAG_IPV6_SCTP | \
792 RTE_ETH_RSS_L3_PRE32)
793
794#define RTE_ETH_RSS_IPV6_PRE40_SCTP ( \
795 RTE_ETH_RSS_NONFRAG_IPV6_SCTP | \
796 RTE_ETH_RSS_L3_PRE40)
797
798#define RTE_ETH_RSS_IPV6_PRE48_SCTP ( \
799 RTE_ETH_RSS_NONFRAG_IPV6_SCTP | \
800 RTE_ETH_RSS_L3_PRE48)
801
802#define RTE_ETH_RSS_IPV6_PRE56_SCTP ( \
803 RTE_ETH_RSS_NONFRAG_IPV6_SCTP | \
804 RTE_ETH_RSS_L3_PRE56)
805
806#define RTE_ETH_RSS_IPV6_PRE64_SCTP ( \
807 RTE_ETH_RSS_NONFRAG_IPV6_SCTP | \
808 RTE_ETH_RSS_L3_PRE64)
809
810#define RTE_ETH_RSS_IPV6_PRE96_SCTP ( \
811 RTE_ETH_RSS_NONFRAG_IPV6_SCTP | \
812 RTE_ETH_RSS_L3_PRE96)
813
814#define RTE_ETH_RSS_IP ( \
815 RTE_ETH_RSS_IPV4 | \
816 RTE_ETH_RSS_FRAG_IPV4 | \
817 RTE_ETH_RSS_NONFRAG_IPV4_OTHER | \
818 RTE_ETH_RSS_IPV6 | \
819 RTE_ETH_RSS_FRAG_IPV6 | \
820 RTE_ETH_RSS_NONFRAG_IPV6_OTHER | \
821 RTE_ETH_RSS_IPV6_EX)
822
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)
827
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)
832
833#define RTE_ETH_RSS_SCTP ( \
834 RTE_ETH_RSS_NONFRAG_IPV4_SCTP | \
835 RTE_ETH_RSS_NONFRAG_IPV6_SCTP)
836
837#define RTE_ETH_RSS_TUNNEL ( \
838 RTE_ETH_RSS_VXLAN | \
839 RTE_ETH_RSS_GENEVE | \
840 RTE_ETH_RSS_NVGRE)
841
842#define RTE_ETH_RSS_VLAN ( \
843 RTE_ETH_RSS_S_VLAN | \
844 RTE_ETH_RSS_C_VLAN)
845
847#define RTE_ETH_RSS_PROTO_MASK ( \
848 RTE_ETH_RSS_IPV4 | \
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 | \
854 RTE_ETH_RSS_IPV6 | \
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 | \
864 RTE_ETH_RSS_PORT | \
865 RTE_ETH_RSS_VXLAN | \
866 RTE_ETH_RSS_GENEVE | \
867 RTE_ETH_RSS_NVGRE | \
868 RTE_ETH_RSS_MPLS)
869
870/*
871 * Definitions used for redirection table entry size.
872 * Some RSS RETA sizes may not be supported by some drivers, check the
873 * documentation or the description of relevant functions for more details.
874 */
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
880
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
910#define RTE_ETH_VMDQ_ACCEPT_UNTAG RTE_BIT32(0)
912#define RTE_ETH_VMDQ_ACCEPT_HASH_MC RTE_BIT32(1)
914#define RTE_ETH_VMDQ_ACCEPT_HASH_UC RTE_BIT32(2)
916#define RTE_ETH_VMDQ_ACCEPT_BROADCAST RTE_BIT32(3)
918#define RTE_ETH_VMDQ_ACCEPT_MULTICAST RTE_BIT32(4)
929 uint64_t mask;
931 uint16_t reta[RTE_ETH_RETA_GROUP_SIZE];
932};
933
940 RTE_ETH_8_TCS = 8
942
951 RTE_ETH_64_POOLS = 64
953
954/* This structure may be extended in future. */
955struct rte_eth_dcb_rx_conf {
956 enum rte_eth_nb_tcs nb_tcs;
958 uint8_t dcb_tc[RTE_ETH_DCB_NUM_USER_PRIORITIES];
959};
960
961struct rte_eth_vmdq_dcb_tx_conf {
962 enum rte_eth_nb_pools nb_queue_pools;
964 uint8_t dcb_tc[RTE_ETH_DCB_NUM_USER_PRIORITIES];
965};
966
967struct rte_eth_dcb_tx_conf {
968 enum rte_eth_nb_tcs nb_tcs;
970 uint8_t dcb_tc[RTE_ETH_DCB_NUM_USER_PRIORITIES];
971};
972
973struct rte_eth_vmdq_tx_conf {
974 enum rte_eth_nb_pools nb_queue_pools;
975};
976
991 uint8_t default_pool;
992 uint8_t nb_pool_maps;
993 struct {
994 uint16_t vlan_id;
995 uint64_t pools;
999};
1000
1025 uint32_t rx_mode;
1026 struct {
1027 uint16_t vlan_id;
1028 uint64_t pools;
1030};
1031
1042 uint64_t offloads;
1043
1044 uint16_t pvid;
1045 __extension__
1046 uint8_t
1052
1053 uint64_t reserved_64s[2];
1054 void *reserved_ptrs[2];
1055};
1056
1126 uint16_t length;
1127 uint16_t offset;
1139 uint32_t proto_hdr;
1140};
1141
1146 /* The settings for buffer split offload. */
1147 struct rte_eth_rxseg_split split;
1148 /* The other features settings should be added here. */
1149};
1150
1157 uint8_t rx_drop_en;
1159 uint16_t rx_nseg;
1166 uint16_t share_group;
1167 uint16_t share_qid;
1173 uint64_t offloads;
1182
1203 uint16_t rx_nmempool;
1205 uint64_t reserved_64s[2];
1206 void *reserved_ptrs[2];
1207};
1208
1214 uint16_t tx_rs_thresh;
1224 uint64_t offloads;
1225
1226 uint64_t reserved_64s[2];
1227 void *reserved_ptrs[2];
1228};
1229
1239
1244 uint32_t rte_memory:1;
1245
1246 uint32_t reserved:30;
1247};
1248
1256 uint16_t max_rx_2_tx;
1258 uint16_t max_tx_2_rx;
1259 uint16_t max_nb_desc;
1262};
1263
1264#define RTE_ETH_MAX_HAIRPIN_PEERS 32
1265
1270 uint16_t port;
1271 uint16_t queue;
1272};
1273
1278 uint32_t peer_count:16;
1289 uint32_t tx_explicit:1;
1290
1302 uint32_t manual_bind:1;
1303
1316
1328 uint32_t use_rte_memory:1;
1329
1340 uint32_t force_memory:1;
1341
1342 uint32_t reserved:11;
1344 struct rte_eth_hairpin_peer peers[RTE_ETH_MAX_HAIRPIN_PEERS];
1345};
1346
1351 uint16_t nb_max;
1352 uint16_t nb_min;
1353 uint16_t nb_align;
1363 uint16_t nb_seg_max;
1364
1377};
1378
1388
1395 uint32_t high_water;
1396 uint32_t low_water;
1397 uint16_t pause_time;
1398 uint16_t send_xon;
1401 uint8_t autoneg;
1402};
1403
1411 uint8_t priority;
1412};
1413
1421 uint8_t tc_max;
1424};
1425
1443 struct {
1444 uint16_t tx_qid;
1448 uint8_t tc;
1449 } rx_pause; /* Valid when (mode == FC_RX_PAUSE || mode == FC_FULL) */
1450
1451 struct {
1452 uint16_t pause_time;
1453 uint16_t rx_qid;
1457 uint8_t tc;
1458 } tx_pause; /* Valid when (mode == FC_TX_PAUSE || mode == FC_FULL) */
1459};
1460
1466 RTE_ETH_TUNNEL_TYPE_NONE = 0,
1467 RTE_ETH_TUNNEL_TYPE_VXLAN,
1468 RTE_ETH_TUNNEL_TYPE_GENEVE,
1469 RTE_ETH_TUNNEL_TYPE_TEREDO,
1470 RTE_ETH_TUNNEL_TYPE_NVGRE,
1471 RTE_ETH_TUNNEL_TYPE_IP_IN_GRE,
1472 RTE_ETH_L2_TUNNEL_TYPE_E_TAG,
1473 RTE_ETH_TUNNEL_TYPE_VXLAN_GPE,
1474 RTE_ETH_TUNNEL_TYPE_ECPRI,
1475 RTE_ETH_TUNNEL_TYPE_MAX,
1476};
1477
1478#ifdef __cplusplus
1479}
1480#endif
1481
1482/* Deprecated API file for rte_eth_dev_filter_* functions */
1483#include "rte_eth_ctrl.h"
1484
1485#ifdef __cplusplus
1486extern "C" {
1487#endif
1488
1499 uint16_t udp_port;
1500 uint8_t prot_type;
1501};
1502
1508 uint32_t lsc:1;
1510 uint32_t rxq:1;
1512 uint32_t rmv:1;
1513};
1514
1515#define rte_intr_conf rte_eth_intr_conf
1516
1523 uint32_t link_speeds;
1532 uint32_t lpbk_mode;
1537 struct {
1542 struct rte_eth_dcb_rx_conf dcb_rx_conf;
1546 union {
1548 struct rte_eth_vmdq_dcb_tx_conf vmdq_dcb_tx_conf;
1550 struct rte_eth_dcb_tx_conf dcb_tx_conf;
1552 struct rte_eth_vmdq_tx_conf vmdq_tx_conf;
1558};
1559
1563#define RTE_ETH_RX_OFFLOAD_VLAN_STRIP RTE_BIT64(0)
1564#define RTE_ETH_RX_OFFLOAD_IPV4_CKSUM RTE_BIT64(1)
1565#define RTE_ETH_RX_OFFLOAD_UDP_CKSUM RTE_BIT64(2)
1566#define RTE_ETH_RX_OFFLOAD_TCP_CKSUM RTE_BIT64(3)
1567#define RTE_ETH_RX_OFFLOAD_TCP_LRO RTE_BIT64(4)
1568#define RTE_ETH_RX_OFFLOAD_QINQ_STRIP RTE_BIT64(5)
1569#define RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM RTE_BIT64(6)
1570#define RTE_ETH_RX_OFFLOAD_MACSEC_STRIP RTE_BIT64(7)
1571#define RTE_ETH_RX_OFFLOAD_VLAN_FILTER RTE_BIT64(9)
1572#define RTE_ETH_RX_OFFLOAD_VLAN_EXTEND RTE_BIT64(10)
1573#define RTE_ETH_RX_OFFLOAD_SCATTER RTE_BIT64(13)
1579#define RTE_ETH_RX_OFFLOAD_TIMESTAMP RTE_BIT64(14)
1580#define RTE_ETH_RX_OFFLOAD_SECURITY RTE_BIT64(15)
1581#define RTE_ETH_RX_OFFLOAD_KEEP_CRC RTE_BIT64(16)
1582#define RTE_ETH_RX_OFFLOAD_SCTP_CKSUM RTE_BIT64(17)
1583#define RTE_ETH_RX_OFFLOAD_OUTER_UDP_CKSUM RTE_BIT64(18)
1584#define RTE_ETH_RX_OFFLOAD_RSS_HASH RTE_BIT64(19)
1585#define RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT RTE_BIT64(20)
1586
1587#define RTE_ETH_RX_OFFLOAD_CHECKSUM (RTE_ETH_RX_OFFLOAD_IPV4_CKSUM | \
1588 RTE_ETH_RX_OFFLOAD_UDP_CKSUM | \
1589 RTE_ETH_RX_OFFLOAD_TCP_CKSUM)
1590#define RTE_ETH_RX_OFFLOAD_VLAN (RTE_ETH_RX_OFFLOAD_VLAN_STRIP | \
1591 RTE_ETH_RX_OFFLOAD_VLAN_FILTER | \
1592 RTE_ETH_RX_OFFLOAD_VLAN_EXTEND | \
1593 RTE_ETH_RX_OFFLOAD_QINQ_STRIP)
1594
1595/*
1596 * If new Rx offloads are defined, they also must be
1597 * mentioned in rte_rx_offload_names in rte_ethdev.c file.
1598 */
1599
1603#define RTE_ETH_TX_OFFLOAD_VLAN_INSERT RTE_BIT64(0)
1604#define RTE_ETH_TX_OFFLOAD_IPV4_CKSUM RTE_BIT64(1)
1605#define RTE_ETH_TX_OFFLOAD_UDP_CKSUM RTE_BIT64(2)
1606#define RTE_ETH_TX_OFFLOAD_TCP_CKSUM RTE_BIT64(3)
1607#define RTE_ETH_TX_OFFLOAD_SCTP_CKSUM RTE_BIT64(4)
1608#define RTE_ETH_TX_OFFLOAD_TCP_TSO RTE_BIT64(5)
1609#define RTE_ETH_TX_OFFLOAD_UDP_TSO RTE_BIT64(6)
1610#define RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM RTE_BIT64(7)
1611#define RTE_ETH_TX_OFFLOAD_QINQ_INSERT RTE_BIT64(8)
1612#define RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO RTE_BIT64(9)
1613#define RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO RTE_BIT64(10)
1614#define RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO RTE_BIT64(11)
1615#define RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO RTE_BIT64(12)
1616#define RTE_ETH_TX_OFFLOAD_MACSEC_INSERT RTE_BIT64(13)
1621#define RTE_ETH_TX_OFFLOAD_MT_LOCKFREE RTE_BIT64(14)
1623#define RTE_ETH_TX_OFFLOAD_MULTI_SEGS RTE_BIT64(15)
1631#define RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE RTE_BIT64(16)
1632#define RTE_ETH_TX_OFFLOAD_SECURITY RTE_BIT64(17)
1638#define RTE_ETH_TX_OFFLOAD_UDP_TNL_TSO RTE_BIT64(18)
1644#define RTE_ETH_TX_OFFLOAD_IP_TNL_TSO RTE_BIT64(19)
1646#define RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM RTE_BIT64(20)
1652#define RTE_ETH_TX_OFFLOAD_SEND_ON_TIMESTAMP RTE_BIT64(21)
1653/*
1654 * If new Tx offloads are defined, they also must be
1655 * mentioned in rte_tx_offload_names in rte_ethdev.c file.
1656 */
1657
1662#define RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP RTE_BIT64(0)
1664#define RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP RTE_BIT64(1)
1674#define RTE_ETH_DEV_CAPA_RXQ_SHARE RTE_BIT64(2)
1676#define RTE_ETH_DEV_CAPA_FLOW_RULE_KEEP RTE_BIT64(3)
1678#define RTE_ETH_DEV_CAPA_FLOW_SHARED_OBJECT_KEEP RTE_BIT64(4)
1681/*
1682 * Fallback default preferred Rx/Tx port parameters.
1683 * These are used if an application requests default parameters
1684 * but the PMD does not provide preferred values.
1685 */
1686#define RTE_ETH_DEV_FALLBACK_RX_RINGSIZE 512
1687#define RTE_ETH_DEV_FALLBACK_TX_RINGSIZE 512
1688#define RTE_ETH_DEV_FALLBACK_RX_NBQUEUES 1
1689#define RTE_ETH_DEV_FALLBACK_TX_NBQUEUES 1
1690
1697 uint16_t burst_size;
1698 uint16_t ring_size;
1699 uint16_t nb_queues;
1700};
1701
1706#define RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID (UINT16_MAX)
1707
1712 const char *name;
1713 uint16_t domain_id;
1721 uint16_t port_id;
1727 uint16_t rx_domain;
1728};
1729
1736 __extension__
1737 uint32_t multi_pools:1;
1738 uint32_t offset_allowed:1;
1740 uint32_t selective_rx:1;
1741 uint16_t max_nseg;
1742 uint16_t reserved;
1743};
1744
1757};
1758
1776};
1777
1784 struct rte_device *device;
1785 const char *driver_name;
1786 unsigned int if_index;
1788 uint16_t min_mtu;
1789 uint16_t max_mtu;
1790 const uint32_t *dev_flags;
1800 uint32_t max_rx_pktlen;
1803 uint16_t max_rx_queues;
1804 uint16_t max_tx_queues;
1805 uint32_t max_mac_addrs;
1808 uint16_t max_vfs;
1820 uint16_t reta_size;
1822 uint32_t rss_algo_capa;
1832 uint32_t speed_capa;
1834 uint16_t nb_rx_queues;
1835 uint16_t nb_tx_queues;
1848 uint64_t dev_capa;
1856
1857 uint64_t reserved_64s[2];
1858 void *reserved_ptrs[2];
1859};
1860
1862#define RTE_ETH_QUEUE_STATE_STOPPED 0
1863#define RTE_ETH_QUEUE_STATE_STARTED 1
1864#define RTE_ETH_QUEUE_STATE_HAIRPIN 2
1872 struct rte_mempool *mp;
1873 struct rte_eth_rxconf conf;
1875 uint8_t queue_state;
1876 uint16_t nb_desc;
1877 uint16_t rx_buf_size;
1885};
1886
1892 struct rte_eth_txconf conf;
1893 uint16_t nb_desc;
1894 uint8_t queue_state;
1895};
1896
1904 struct rte_mempool *mp;
1905 uint16_t *refill_head;
1906 uint16_t *receive_tail;
1916};
1917
1918/* Generic Burst mode flag definition, values can be ORed. */
1919
1925#define RTE_ETH_BURST_FLAG_PER_QUEUE RTE_BIT64(0)
1926
1932 uint64_t flags;
1934#define RTE_ETH_BURST_MODE_INFO_SIZE 1024
1936};
1937
1939#define RTE_ETH_XSTATS_NAME_SIZE 64
1940
1951 uint64_t id;
1952 uint64_t value;
1953};
1954
1971};
1972
1973#define RTE_ETH_DCB_NUM_TCS 8
1974#define RTE_ETH_MAX_VMDQ_POOL 64
1975
1982 struct {
1983 uint16_t base;
1984 uint16_t nb_queue;
1985 } tc_rxq[RTE_ETH_MAX_VMDQ_POOL][RTE_ETH_DCB_NUM_TCS];
1987 struct {
1988 uint16_t base;
1989 uint16_t nb_queue;
1990 } tc_txq[RTE_ETH_MAX_VMDQ_POOL][RTE_ETH_DCB_NUM_TCS];
1991};
1992
1998 uint8_t nb_tcs;
2000 uint8_t tc_bws[RTE_ETH_DCB_NUM_TCS];
2003};
2004
2015};
2016
2017/* Translate from FEC mode to FEC capa */
2018#define RTE_ETH_FEC_MODE_TO_CAPA(x) RTE_BIT32(x)
2019
2020/* This macro indicates FEC capa mask */
2021#define RTE_ETH_FEC_MODE_CAPA_MASK(x) RTE_BIT32(RTE_ETH_FEC_ ## x)
2022
2023/* A structure used to get capabilities per link speed */
2024struct rte_eth_fec_capa {
2025 uint32_t speed;
2026 uint32_t capa;
2027};
2028
2029#define RTE_ETH_ALL RTE_MAX_ETHPORTS
2030
2031/* Macros to check for valid port */
2032#define RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, retval) do { \
2033 if (!rte_eth_dev_is_valid_port(port_id)) { \
2034 RTE_ETHDEV_LOG_LINE(ERR, "Invalid port_id=%u", port_id); \
2035 return retval; \
2036 } \
2037} while (0)
2038
2039#define RTE_ETH_VALID_PORTID_OR_RET(port_id) do { \
2040 if (!rte_eth_dev_is_valid_port(port_id)) { \
2041 RTE_ETHDEV_LOG_LINE(ERR, "Invalid port_id=%u", port_id); \
2042 return; \
2043 } \
2044} while (0)
2045
2068typedef uint16_t (*rte_rx_callback_fn)(uint16_t port_id, uint16_t queue,
2069 struct rte_mbuf *pkts[], uint16_t nb_pkts, uint16_t max_pkts,
2070 void *user_param);
2071
2092typedef uint16_t (*rte_tx_callback_fn)(uint16_t port_id, uint16_t queue,
2093 struct rte_mbuf *pkts[], uint16_t nb_pkts, void *user_param);
2094
2105};
2106
2107struct rte_eth_dev_sriov {
2108 uint8_t active;
2109 uint8_t nb_q_per_pool;
2110 uint16_t def_vmdq_idx;
2111 uint16_t def_pool_q_idx;
2112};
2113#define RTE_ETH_DEV_SRIOV(dev) ((dev)->data->sriov)
2114
2115#define RTE_ETH_NAME_MAX_LEN RTE_DEV_NAME_MAX_LEN
2116
2117#define RTE_ETH_DEV_NO_OWNER 0
2118
2119#define RTE_ETH_MAX_OWNER_NAME_LEN 64
2120
2121struct rte_eth_dev_owner {
2122 uint64_t id;
2123 char name[RTE_ETH_MAX_OWNER_NAME_LEN];
2124};
2125
2131#define RTE_ETH_DEV_FLOW_OPS_THREAD_SAFE RTE_BIT32(0)
2133#define RTE_ETH_DEV_INTR_LSC RTE_BIT32(1)
2135#define RTE_ETH_DEV_BONDING_MEMBER RTE_BIT32(2)
2137#define RTE_ETH_DEV_INTR_RMV RTE_BIT32(3)
2139#define RTE_ETH_DEV_REPRESENTOR RTE_BIT32(4)
2141#define RTE_ETH_DEV_NOLIVE_MAC_ADDR RTE_BIT32(5)
2146#define RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS RTE_BIT32(6)
2160uint64_t rte_eth_find_next_owned_by(uint16_t port_id,
2161 const uint64_t owner_id);
2162
2166#define RTE_ETH_FOREACH_DEV_OWNED_BY(p, o) \
2167 for (p = rte_eth_find_next_owned_by(0, o); \
2168 (unsigned int)p < (unsigned int)RTE_MAX_ETHPORTS; \
2169 p = rte_eth_find_next_owned_by(p + 1, o))
2170
2179uint16_t rte_eth_find_next(uint16_t port_id);
2180
2184#define RTE_ETH_FOREACH_DEV(p) \
2185 RTE_ETH_FOREACH_DEV_OWNED_BY(p, RTE_ETH_DEV_NO_OWNER)
2186
2198uint16_t
2199rte_eth_find_next_of(uint16_t port_id_start,
2200 const struct rte_device *parent);
2201
2210#define RTE_ETH_FOREACH_DEV_OF(port_id, parent) \
2211 for (port_id = rte_eth_find_next_of(0, parent); \
2212 port_id < RTE_MAX_ETHPORTS; \
2213 port_id = rte_eth_find_next_of(port_id + 1, parent))
2214
2226uint16_t
2227rte_eth_find_next_sibling(uint16_t port_id_start, uint16_t ref_port_id);
2228
2239#define RTE_ETH_FOREACH_DEV_SIBLING(port_id, ref_port_id) \
2240 for (port_id = rte_eth_find_next_sibling(0, ref_port_id); \
2241 port_id < RTE_MAX_ETHPORTS; \
2242 port_id = rte_eth_find_next_sibling(port_id + 1, ref_port_id))
2243
2254int rte_eth_dev_owner_new(uint64_t *owner_id);
2255
2266int rte_eth_dev_owner_set(const uint16_t port_id,
2267 const struct rte_eth_dev_owner *owner);
2268
2279int rte_eth_dev_owner_unset(const uint16_t port_id,
2280 const uint64_t owner_id);
2281
2290int rte_eth_dev_owner_delete(const uint64_t owner_id);
2291
2302int rte_eth_dev_owner_get(const uint16_t port_id,
2303 struct rte_eth_dev_owner *owner);
2304
2316
2326
2338uint32_t rte_eth_speed_bitflag(uint32_t speed, int duplex);
2339
2348const char *rte_eth_dev_rx_offload_name(uint64_t offload);
2349
2358const char *rte_eth_dev_tx_offload_name(uint64_t offload);
2359
2368const char *rte_eth_dev_capability_name(uint64_t capability);
2369
2409int rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_queue,
2410 uint16_t nb_tx_queue, const struct rte_eth_conf *eth_conf);
2411
2420int
2421rte_eth_dev_is_removed(uint16_t port_id);
2422
2485int rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
2486 uint16_t nb_rx_desc, unsigned int socket_id,
2487 const struct rte_eth_rxconf *rx_conf,
2488 struct rte_mempool *mb_pool);
2489
2515 (uint16_t port_id, uint16_t rx_queue_id, uint16_t nb_rx_desc,
2516 const struct rte_eth_hairpin_conf *conf);
2517
2566int rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
2567 uint16_t nb_tx_desc, unsigned int socket_id,
2568 const struct rte_eth_txconf *tx_conf);
2569
2593 (uint16_t port_id, uint16_t tx_queue_id, uint16_t nb_tx_desc,
2594 const struct rte_eth_hairpin_conf *conf);
2595
2619int rte_eth_hairpin_get_peer_ports(uint16_t port_id, uint16_t *peer_ports,
2620 size_t len, uint32_t direction);
2621
2641int rte_eth_hairpin_bind(uint16_t tx_port, uint16_t rx_port);
2642
2664int rte_eth_hairpin_unbind(uint16_t tx_port, uint16_t rx_port);
2665
2678int rte_eth_dev_count_aggr_ports(uint16_t port_id);
2679
2704int rte_eth_dev_map_aggr_tx_affinity(uint16_t port_id, uint16_t tx_queue_id,
2705 uint8_t affinity);
2706
2719int rte_eth_dev_socket_id(uint16_t port_id);
2720
2730int rte_eth_dev_is_valid_port(uint16_t port_id);
2731
2745int rte_eth_rx_queue_is_valid(uint16_t port_id, uint16_t queue_id);
2746
2760int rte_eth_tx_queue_is_valid(uint16_t port_id, uint16_t queue_id);
2761
2779int rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t rx_queue_id);
2780
2797int rte_eth_dev_rx_queue_stop(uint16_t port_id, uint16_t rx_queue_id);
2798
2816int rte_eth_dev_tx_queue_start(uint16_t port_id, uint16_t tx_queue_id);
2817
2834int rte_eth_dev_tx_queue_stop(uint16_t port_id, uint16_t tx_queue_id);
2835
2859int rte_eth_dev_start(uint16_t port_id);
2860
2874int rte_eth_dev_stop(uint16_t port_id);
2875
2888int rte_eth_dev_set_link_up(uint16_t port_id);
2889
2899int rte_eth_dev_set_link_down(uint16_t port_id);
2900
2911int rte_eth_dev_close(uint16_t port_id);
2912
2950int rte_eth_dev_reset(uint16_t port_id);
2951
2963int rte_eth_promiscuous_enable(uint16_t port_id);
2964
2976int rte_eth_promiscuous_disable(uint16_t port_id);
2977
2988int rte_eth_promiscuous_get(uint16_t port_id);
2989
3001int rte_eth_allmulticast_enable(uint16_t port_id);
3002
3014int rte_eth_allmulticast_disable(uint16_t port_id);
3015
3026int rte_eth_allmulticast_get(uint16_t port_id);
3027
3045int rte_eth_link_get(uint16_t port_id, struct rte_eth_link *link)
3047
3062int rte_eth_link_get_nowait(uint16_t port_id, struct rte_eth_link *link)
3064
3075const char *rte_eth_link_speed_to_str(uint32_t link_speed);
3076
3088__rte_experimental
3090
3106int rte_eth_link_to_str(char *str, size_t len,
3107 const struct rte_eth_link *eth_link);
3108
3126int rte_eth_speed_lanes_get(uint16_t port_id, uint32_t *lanes);
3127
3146int rte_eth_speed_lanes_set(uint16_t port_id, uint32_t speed_lanes);
3147
3168 struct rte_eth_speed_lanes_capa *speed_lanes_capa,
3169 unsigned int num);
3170
3188int rte_eth_stats_get(uint16_t port_id, struct rte_eth_stats *stats);
3189
3201int rte_eth_stats_reset(uint16_t port_id);
3202
3232int rte_eth_xstats_get_names(uint16_t port_id,
3233 struct rte_eth_xstat_name *xstats_names,
3234 unsigned int size);
3235
3269int rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats,
3270 unsigned int n);
3271
3296int
3298 struct rte_eth_xstat_name *xstats_names, unsigned int size,
3299 uint64_t *ids);
3300
3325int rte_eth_xstats_get_by_id(uint16_t port_id, const uint64_t *ids,
3326 uint64_t *values, unsigned int size);
3327
3347int rte_eth_xstats_get_id_by_name(uint16_t port_id, const char *xstat_name,
3348 uint64_t *id);
3349
3364__rte_experimental
3365int rte_eth_xstats_set_counter(uint16_t port_id, uint64_t id, int on_off);
3366
3378__rte_experimental
3379int rte_eth_xstats_query_state(uint16_t port_id, uint64_t id);
3380
3393int rte_eth_xstats_reset(uint16_t port_id);
3394
3408int rte_eth_macaddr_get(uint16_t port_id, struct rte_ether_addr *mac_addr);
3409
3427int rte_eth_macaddrs_get(uint16_t port_id, struct rte_ether_addr *ma,
3428 unsigned int num);
3429
3449int rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info)
3451
3464int rte_eth_dev_conf_get(uint16_t port_id, struct rte_eth_conf *dev_conf)
3466
3487int rte_eth_dev_fw_version_get(uint16_t port_id, char *fw_version, size_t fw_size)
3489
3529int rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
3530 uint32_t *ptypes, int num)
3532
3563int rte_eth_dev_set_ptypes(uint16_t port_id, uint32_t ptype_mask,
3564 uint32_t *set_ptypes, unsigned int num);
3565
3578int rte_eth_dev_get_mtu(uint16_t port_id, uint16_t *mtu);
3579
3597int rte_eth_dev_set_mtu(uint16_t port_id, uint16_t mtu);
3598
3618int rte_eth_dev_vlan_filter(uint16_t port_id, uint16_t vlan_id, int on);
3619
3638int rte_eth_dev_set_vlan_strip_on_queue(uint16_t port_id, uint16_t rx_queue_id,
3639 int on);
3640
3658 enum rte_vlan_type vlan_type,
3659 uint16_t tag_type);
3660
3678int rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask);
3679
3693int rte_eth_dev_get_vlan_offload(uint16_t port_id);
3694
3709int rte_eth_dev_set_vlan_pvid(uint16_t port_id, uint16_t pvid, int on);
3710
3733int rte_eth_rx_avail_thresh_set(uint16_t port_id, uint16_t queue_id,
3734 uint8_t avail_thresh);
3735
3759int rte_eth_rx_avail_thresh_query(uint16_t port_id, uint16_t *queue_id,
3760 uint8_t *avail_thresh);
3761
3762typedef void (*buffer_tx_error_fn)(struct rte_mbuf **unsent, uint16_t count,
3763 void *userdata);
3764
3770 buffer_tx_error_fn error_callback;
3771 void *error_userdata;
3772 uint16_t size;
3773 uint16_t length;
3775 struct rte_mbuf *pkts[];
3776};
3777
3784#define RTE_ETH_TX_BUFFER_SIZE(sz) \
3785 (sizeof(struct rte_eth_dev_tx_buffer) + (sz) * sizeof(struct rte_mbuf *))
3786
3797int
3798rte_eth_tx_buffer_init(struct rte_eth_dev_tx_buffer *buffer, uint16_t size);
3799
3824int
3826 buffer_tx_error_fn callback, void *userdata);
3827
3850void
3851rte_eth_tx_buffer_drop_callback(struct rte_mbuf **pkts, uint16_t unsent,
3852 void *userdata);
3853
3877void
3878rte_eth_tx_buffer_count_callback(struct rte_mbuf **pkts, uint16_t unsent,
3879 void *userdata);
3880
3906int
3907rte_eth_tx_done_cleanup(uint16_t port_id, uint16_t queue_id, uint32_t free_cnt);
3908
3941};
3942
3962};
3963
3982 uint64_t metadata;
3983};
3984
4023
4048 uint64_t metadata;
4049};
4050
4134
4148typedef int (*rte_eth_dev_cb_fn)(uint16_t port_id,
4149 enum rte_eth_event_type event, void *cb_arg, void *ret_param);
4150
4169 enum rte_eth_event_type event,
4170 rte_eth_dev_cb_fn cb_fn, void *cb_arg);
4171
4191 enum rte_eth_event_type event,
4192 rte_eth_dev_cb_fn cb_fn, void *cb_arg);
4193
4215int rte_eth_dev_rx_intr_enable(uint16_t port_id, uint16_t queue_id);
4216
4237int rte_eth_dev_rx_intr_disable(uint16_t port_id, uint16_t queue_id);
4238
4256int rte_eth_dev_rx_intr_ctl(uint16_t port_id, int epfd, int op, void *data);
4257
4279int rte_eth_dev_rx_intr_ctl_q(uint16_t port_id, uint16_t queue_id,
4280 int epfd, int op, void *data);
4281
4296int
4297rte_eth_dev_rx_intr_ctl_q_get_fd(uint16_t port_id, uint16_t queue_id);
4298
4312int rte_eth_led_on(uint16_t port_id);
4313
4327int rte_eth_led_off(uint16_t port_id);
4328
4354int rte_eth_fec_get_capability(uint16_t port_id,
4355 struct rte_eth_fec_capa *speed_fec_capa,
4356 unsigned int num);
4357
4375int rte_eth_fec_get(uint16_t port_id, uint32_t *fec_capa);
4376
4397int rte_eth_fec_set(uint16_t port_id, uint32_t fec_capa);
4398
4413int rte_eth_dev_flow_ctrl_get(uint16_t port_id,
4414 struct rte_eth_fc_conf *fc_conf);
4415
4430int rte_eth_dev_flow_ctrl_set(uint16_t port_id,
4431 struct rte_eth_fc_conf *fc_conf);
4432
4449 struct rte_eth_pfc_conf *pfc_conf);
4450
4469int rte_eth_dev_mac_addr_add(uint16_t port_id, struct rte_ether_addr *mac_addr,
4470 uint32_t pool);
4471
4487 struct rte_eth_pfc_queue_info *pfc_queue_info);
4488
4510 struct rte_eth_pfc_queue_conf *pfc_queue_conf);
4511
4526int rte_eth_dev_mac_addr_remove(uint16_t port_id,
4527 struct rte_ether_addr *mac_addr);
4528
4547 struct rte_ether_addr *mac_addr);
4548
4566int rte_eth_dev_rss_reta_update(uint16_t port_id,
4567 struct rte_eth_rss_reta_entry64 *reta_conf,
4568 uint16_t reta_size);
4569
4588int rte_eth_dev_rss_reta_query(uint16_t port_id,
4589 struct rte_eth_rss_reta_entry64 *reta_conf,
4590 uint16_t reta_size);
4591
4611int rte_eth_dev_uc_hash_table_set(uint16_t port_id, struct rte_ether_addr *addr,
4612 uint8_t on);
4613
4632int rte_eth_dev_uc_all_hash_table_set(uint16_t port_id, uint8_t on);
4633
4650int rte_eth_set_queue_rate_limit(uint16_t port_id, uint16_t queue_idx,
4651 uint32_t tx_rate);
4652
4673__rte_experimental
4674int rte_eth_get_queue_rate_limit(uint16_t port_id, uint16_t queue_idx,
4675 uint32_t *tx_rate);
4676
4691int rte_eth_dev_rss_hash_update(uint16_t port_id,
4692 struct rte_eth_rss_conf *rss_conf);
4693
4709int
4711 struct rte_eth_rss_conf *rss_conf);
4712
4722const char *
4724
4738int
4739rte_eth_find_rss_algo(const char *name, uint32_t *algo);
4740
4765int
4767 struct rte_eth_udp_tunnel *tunnel_udp);
4768
4788int
4790 struct rte_eth_udp_tunnel *tunnel_udp);
4791
4806int rte_eth_dev_get_dcb_info(uint16_t port_id,
4807 struct rte_eth_dcb_info *dcb_info);
4808
4809struct rte_eth_rxtx_callback;
4810
4836const struct rte_eth_rxtx_callback *
4837rte_eth_add_rx_callback(uint16_t port_id, uint16_t queue_id,
4838 rte_rx_callback_fn fn, void *user_param);
4839
4866const struct rte_eth_rxtx_callback *
4867rte_eth_add_first_rx_callback(uint16_t port_id, uint16_t queue_id,
4868 rte_rx_callback_fn fn, void *user_param);
4869
4895const struct rte_eth_rxtx_callback *
4896rte_eth_add_tx_callback(uint16_t port_id, uint16_t queue_id,
4897 rte_tx_callback_fn fn, void *user_param);
4898
4932int rte_eth_remove_rx_callback(uint16_t port_id, uint16_t queue_id,
4933 const struct rte_eth_rxtx_callback *user_cb);
4934
4968int rte_eth_remove_tx_callback(uint16_t port_id, uint16_t queue_id,
4969 const struct rte_eth_rxtx_callback *user_cb);
4970
4990int rte_eth_rx_queue_info_get(uint16_t port_id, uint16_t queue_id,
4991 struct rte_eth_rxq_info *qinfo);
4992
5012int rte_eth_tx_queue_info_get(uint16_t port_id, uint16_t queue_id,
5013 struct rte_eth_txq_info *qinfo);
5014
5033 uint16_t queue_id,
5034 struct rte_eth_recycle_rxq_info *recycle_rxq_info);
5035
5054int rte_eth_rx_burst_mode_get(uint16_t port_id, uint16_t queue_id,
5055 struct rte_eth_burst_mode *mode);
5056
5075int rte_eth_tx_burst_mode_get(uint16_t port_id, uint16_t queue_id,
5076 struct rte_eth_burst_mode *mode);
5077
5095int rte_eth_get_monitor_addr(uint16_t port_id, uint16_t queue_id,
5096 struct rte_power_monitor_cond *pmc);
5097
5124int rte_eth_dev_get_reg_info_ext(uint16_t port_id, struct rte_dev_reg_info *info);
5125
5144int rte_eth_dev_get_reg_info(uint16_t port_id, struct rte_dev_reg_info *info)
5146
5159int rte_eth_dev_get_eeprom_length(uint16_t port_id);
5160
5177int rte_eth_dev_get_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info);
5178
5195int rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info);
5196
5212int
5215
5232int
5233rte_eth_dev_get_module_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)
5235
5252typedef void (*rte_eth_module_eeprom_field_cb)(const char *name,
5253 const char *value, void *arg);
5254
5288__rte_experimental
5289int
5290rte_eth_module_eeprom_parse(uint32_t type, const uint8_t *data, uint32_t length,
5291 rte_eth_module_eeprom_field_cb cb, void *arg);
5292
5312int rte_eth_dev_set_mc_addr_list(uint16_t port_id,
5313 struct rte_ether_addr *mc_addr_set,
5314 uint32_t nb_mc_addr);
5315
5328int rte_eth_timesync_enable(uint16_t port_id);
5329
5342int rte_eth_timesync_disable(uint16_t port_id);
5343
5363 struct timespec *timestamp, uint32_t flags);
5364
5381 struct timespec *timestamp);
5382
5400int rte_eth_timesync_adjust_time(uint16_t port_id, int64_t delta);
5401
5442int rte_eth_timesync_adjust_freq(uint16_t port_id, int64_t ppm);
5443
5459int rte_eth_timesync_read_time(uint16_t port_id, struct timespec *time);
5460
5479int rte_eth_timesync_write_time(uint16_t port_id, const struct timespec *time);
5480
5523int
5524rte_eth_read_clock(uint16_t port_id, uint64_t *clock);
5525
5541int
5542rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id);
5543
5560int
5561rte_eth_dev_get_name_by_port(uint16_t port_id, char *name);
5562
5580 uint16_t *nb_rx_desc,
5581 uint16_t *nb_tx_desc);
5582
5597int
5598rte_eth_dev_pool_ops_supported(uint16_t port_id, const char *pool);
5599
5609void *
5610rte_eth_dev_get_sec_ctx(uint16_t port_id);
5611
5625 struct rte_eth_hairpin_cap *cap);
5626
5633 int pf;
5634 __extension__
5635 union {
5636 int vf;
5637 int sf;
5638 };
5639 uint32_t id_base;
5640 uint32_t id_end;
5641 char name[RTE_DEV_NAME_MAX_LEN];
5642};
5643
5648 uint16_t controller;
5649 uint16_t pf;
5651 uint32_t nb_ranges;
5653};
5654
5678int rte_eth_representor_info_get(uint16_t port_id,
5679 struct rte_eth_representor_info *info);
5680
5682#define RTE_ETH_RX_METADATA_USER_FLAG RTE_BIT64(0)
5683
5685#define RTE_ETH_RX_METADATA_USER_MARK RTE_BIT64(1)
5686
5688#define RTE_ETH_RX_METADATA_TUNNEL_ID RTE_BIT64(2)
5689
5729int rte_eth_rx_metadata_negotiate(uint16_t port_id, uint64_t *features);
5730
5732#define RTE_ETH_DEV_REASSEMBLY_F_IPV4 (RTE_BIT32(0))
5734#define RTE_ETH_DEV_REASSEMBLY_F_IPV6 (RTE_BIT32(1))
5735
5746 uint32_t timeout_ms;
5748 uint16_t max_frags;
5753 uint16_t flags;
5754};
5755
5774 struct rte_eth_ip_reassembly_params *capa);
5775
5795 struct rte_eth_ip_reassembly_params *conf);
5796
5824 const struct rte_eth_ip_reassembly_params *conf);
5825
5833typedef struct {
5840 uint16_t time_spent;
5842 uint16_t nb_frags;
5844
5860int rte_eth_dev_priv_dump(uint16_t port_id, FILE *file);
5861
5882int rte_eth_rx_descriptor_dump(uint16_t port_id, uint16_t queue_id,
5883 uint16_t offset, uint16_t num, FILE *file);
5884
5905int rte_eth_tx_descriptor_dump(uint16_t port_id, uint16_t queue_id,
5906 uint16_t offset, uint16_t num, FILE *file);
5907
5908
5909/* Congestion management */
5910
5920};
5921
5940 uint8_t rsvd[8];
5941};
5942
5951 union {
5958 uint16_t rx_queue;
5966 } obj_param;
5967 union {
5981 } mode_param;
5982};
5983
5998int rte_eth_cman_info_get(uint16_t port_id, struct rte_eth_cman_info *info);
5999
6014int rte_eth_cman_config_init(uint16_t port_id, struct rte_eth_cman_config *config);
6015
6029int rte_eth_cman_config_set(uint16_t port_id, const struct rte_eth_cman_config *config);
6030
6048int rte_eth_cman_config_get(uint16_t port_id, struct rte_eth_cman_config *config);
6049
6050#ifdef __cplusplus
6051}
6052#endif
6053
6054#include <rte_ethdev_core.h>
6055
6056#ifdef __cplusplus
6057extern "C" {
6058#endif
6059
6083uint16_t rte_eth_call_rx_callbacks(uint16_t port_id, uint16_t queue_id,
6084 struct rte_mbuf **rx_pkts, uint16_t nb_rx, uint16_t nb_pkts,
6085 void *opaque);
6086
6174static inline uint16_t
6175rte_eth_rx_burst(uint16_t port_id, uint16_t queue_id,
6176 struct rte_mbuf **rx_pkts, const uint16_t nb_pkts)
6177{
6178 uint16_t nb_rx;
6179 struct rte_eth_fp_ops *p;
6180 void *qd;
6181
6182#ifdef RTE_ETHDEV_DEBUG_RX
6183 if (port_id >= RTE_MAX_ETHPORTS ||
6184 queue_id >= RTE_MAX_QUEUES_PER_PORT) {
6185 RTE_ETHDEV_LOG_LINE(ERR,
6186 "Invalid port_id=%u or queue_id=%u",
6187 port_id, queue_id);
6188 return 0;
6189 }
6190#endif
6191
6192 /* fetch pointer to queue data */
6193 p = &rte_eth_fp_ops[port_id];
6194 qd = p->rxq.data[queue_id];
6195
6196#ifdef RTE_ETHDEV_DEBUG_RX
6197 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0);
6198
6199 if (qd == NULL) {
6200 RTE_ETHDEV_LOG_LINE(ERR, "Invalid Rx queue_id=%u for port_id=%u",
6201 queue_id, port_id);
6202 return 0;
6203 }
6204#endif
6205
6206 nb_rx = p->rx_pkt_burst(qd, rx_pkts, nb_pkts);
6207
6209
6210#ifdef RTE_ETHDEV_RXTX_CALLBACKS
6211 {
6212 void *cb;
6213
6214 /* rte_memory_order_release memory order was used when the
6215 * call back was inserted into the list.
6216 * Since there is a clear dependency between loading
6217 * cb and cb->fn/cb->next, rte_memory_order_acquire memory order is
6218 * not required.
6219 */
6220 cb = rte_atomic_load_explicit(&p->rxq.clbk[queue_id],
6221 rte_memory_order_relaxed);
6222 if (unlikely(cb != NULL))
6223 nb_rx = rte_eth_call_rx_callbacks(port_id, queue_id,
6224 rx_pkts, nb_rx, nb_pkts, cb);
6225 }
6226#endif
6227
6228 if (unlikely(nb_rx))
6229 rte_ethdev_trace_rx_burst_nonempty(port_id, queue_id, (void **)rx_pkts, nb_rx);
6230 else
6231 rte_ethdev_trace_rx_burst_empty(port_id, queue_id, (void **)rx_pkts);
6232 return nb_rx;
6233}
6234
6252static inline int
6253rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)
6254{
6255 struct rte_eth_fp_ops *p;
6256 void *qd;
6257
6258#ifdef RTE_ETHDEV_DEBUG_RX
6259 if (port_id >= RTE_MAX_ETHPORTS ||
6260 queue_id >= RTE_MAX_QUEUES_PER_PORT) {
6261 RTE_ETHDEV_LOG_LINE(ERR,
6262 "Invalid port_id=%u or queue_id=%u",
6263 port_id, queue_id);
6264 return -EINVAL;
6265 }
6266#endif
6267
6268 /* fetch pointer to queue data */
6269 p = &rte_eth_fp_ops[port_id];
6270 qd = p->rxq.data[queue_id];
6271
6272#ifdef RTE_ETHDEV_DEBUG_RX
6273 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
6274 if (qd == NULL)
6275 return -EINVAL;
6276#endif
6277
6278 return p->rx_queue_count(qd);
6279}
6280
6284#define RTE_ETH_RX_DESC_AVAIL 0
6285#define RTE_ETH_RX_DESC_DONE 1
6286#define RTE_ETH_RX_DESC_UNAVAIL 2
6322static inline int
6323rte_eth_rx_descriptor_status(uint16_t port_id, uint16_t queue_id,
6324 uint16_t offset)
6325{
6326 struct rte_eth_fp_ops *p;
6327 void *qd;
6328
6329#ifdef RTE_ETHDEV_DEBUG_RX
6330 if (port_id >= RTE_MAX_ETHPORTS ||
6331 queue_id >= RTE_MAX_QUEUES_PER_PORT) {
6332 RTE_ETHDEV_LOG_LINE(ERR,
6333 "Invalid port_id=%u or queue_id=%u",
6334 port_id, queue_id);
6335 return -EINVAL;
6336 }
6337#endif
6338
6339 /* fetch pointer to queue data */
6340 p = &rte_eth_fp_ops[port_id];
6341 qd = p->rxq.data[queue_id];
6342
6343#ifdef RTE_ETHDEV_DEBUG_RX
6344 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
6345 if (qd == NULL)
6346 return -ENODEV;
6347#endif
6348 return p->rx_descriptor_status(qd, offset);
6349}
6350
6354#define RTE_ETH_TX_DESC_FULL 0
6355#define RTE_ETH_TX_DESC_DONE 1
6356#define RTE_ETH_TX_DESC_UNAVAIL 2
6392static inline int rte_eth_tx_descriptor_status(uint16_t port_id,
6393 uint16_t queue_id, uint16_t offset)
6394{
6395 struct rte_eth_fp_ops *p;
6396 void *qd;
6397
6398#ifdef RTE_ETHDEV_DEBUG_TX
6399 if (port_id >= RTE_MAX_ETHPORTS ||
6400 queue_id >= RTE_MAX_QUEUES_PER_PORT) {
6401 RTE_ETHDEV_LOG_LINE(ERR,
6402 "Invalid port_id=%u or queue_id=%u",
6403 port_id, queue_id);
6404 return -EINVAL;
6405 }
6406#endif
6407
6408 /* fetch pointer to queue data */
6409 p = &rte_eth_fp_ops[port_id];
6410 qd = p->txq.data[queue_id];
6411
6412#ifdef RTE_ETHDEV_DEBUG_TX
6413 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
6414 if (qd == NULL)
6415 return -ENODEV;
6416#endif
6417 return p->tx_descriptor_status(qd, offset);
6418}
6419
6439uint16_t rte_eth_call_tx_callbacks(uint16_t port_id, uint16_t queue_id,
6440 struct rte_mbuf **tx_pkts, uint16_t nb_pkts, void *opaque);
6441
6513static inline uint16_t
6514rte_eth_tx_burst(uint16_t port_id, uint16_t queue_id,
6515 struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
6516{
6517 struct rte_eth_fp_ops *p;
6518 void *qd;
6519
6520#ifdef RTE_ETHDEV_DEBUG_TX
6521 if (port_id >= RTE_MAX_ETHPORTS ||
6522 queue_id >= RTE_MAX_QUEUES_PER_PORT) {
6523 RTE_ETHDEV_LOG_LINE(ERR,
6524 "Invalid port_id=%u or queue_id=%u",
6525 port_id, queue_id);
6526 return 0;
6527 }
6528#endif
6529
6530 /* fetch pointer to queue data */
6531 p = &rte_eth_fp_ops[port_id];
6532 qd = p->txq.data[queue_id];
6533
6534#ifdef RTE_ETHDEV_DEBUG_TX
6535 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0);
6536
6537 if (qd == NULL) {
6538 RTE_ETHDEV_LOG_LINE(ERR, "Invalid Tx queue_id=%u for port_id=%u",
6539 queue_id, port_id);
6540 return 0;
6541 }
6542#endif
6543
6544#ifdef RTE_ETHDEV_RXTX_CALLBACKS
6545 {
6546 void *cb;
6547
6548 /* rte_memory_order_release memory order was used when the
6549 * call back was inserted into the list.
6550 * Since there is a clear dependency between loading
6551 * cb and cb->fn/cb->next, rte_memory_order_acquire memory order is
6552 * not required.
6553 */
6554 cb = rte_atomic_load_explicit(&p->txq.clbk[queue_id],
6555 rte_memory_order_relaxed);
6556 if (unlikely(cb != NULL))
6557 nb_pkts = rte_eth_call_tx_callbacks(port_id, queue_id,
6558 tx_pkts, nb_pkts, cb);
6559 }
6560#endif
6561
6562 uint16_t requested_pkts = nb_pkts;
6564
6565 nb_pkts = p->tx_pkt_burst(qd, tx_pkts, nb_pkts);
6566
6567 if (requested_pkts > nb_pkts)
6568 rte_mbuf_history_mark_bulk(tx_pkts + nb_pkts,
6569 requested_pkts - nb_pkts, RTE_MBUF_HISTORY_OP_TX_BUSY);
6570
6571 rte_ethdev_trace_tx_burst(port_id, queue_id, (void **)tx_pkts, nb_pkts);
6572 return nb_pkts;
6573}
6574
6628#ifndef RTE_ETHDEV_TX_PREPARE_NOOP
6629
6630static inline uint16_t
6631rte_eth_tx_prepare(uint16_t port_id, uint16_t queue_id,
6632 struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
6633{
6634 struct rte_eth_fp_ops *p;
6635 void *qd;
6636
6637#ifdef RTE_ETHDEV_DEBUG_TX
6638 if (port_id >= RTE_MAX_ETHPORTS ||
6639 queue_id >= RTE_MAX_QUEUES_PER_PORT) {
6640 RTE_ETHDEV_LOG_LINE(ERR,
6641 "Invalid port_id=%u or queue_id=%u",
6642 port_id, queue_id);
6643 rte_errno = ENODEV;
6644 return 0;
6645 }
6646#endif
6647
6648 /* fetch pointer to queue data */
6649 p = &rte_eth_fp_ops[port_id];
6650 qd = p->txq.data[queue_id];
6651
6652#ifdef RTE_ETHDEV_DEBUG_TX
6653 if (!rte_eth_dev_is_valid_port(port_id)) {
6654 RTE_ETHDEV_LOG_LINE(ERR, "Invalid Tx port_id=%u", port_id);
6655 rte_errno = ENODEV;
6656 return 0;
6657 }
6658 if (qd == NULL) {
6659 RTE_ETHDEV_LOG_LINE(ERR, "Invalid Tx queue_id=%u for port_id=%u",
6660 queue_id, port_id);
6661 rte_errno = EINVAL;
6662 return 0;
6663 }
6664#endif
6665
6667
6668 return p->tx_pkt_prepare(qd, tx_pkts, nb_pkts);
6669}
6670
6671#else
6672
6673/*
6674 * Native NOOP operation for compilation targets which doesn't require any
6675 * preparations steps, and functional NOOP may introduce unnecessary performance
6676 * drop.
6677 *
6678 * Generally this is not a good idea to turn it on globally and didn't should
6679 * be used if behavior of tx_preparation can change.
6680 */
6681
6682static inline uint16_t
6683rte_eth_tx_prepare(__rte_unused uint16_t port_id,
6684 __rte_unused uint16_t queue_id,
6685 __rte_unused struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
6686{
6687 return nb_pkts;
6688}
6689
6690#endif
6691
6714static inline uint16_t
6715rte_eth_tx_buffer_flush(uint16_t port_id, uint16_t queue_id,
6716 struct rte_eth_dev_tx_buffer *buffer)
6717{
6718 uint16_t sent;
6719 uint16_t to_send = buffer->length;
6720
6721 if (to_send == 0)
6722 return 0;
6723
6724 sent = rte_eth_tx_burst(port_id, queue_id, buffer->pkts, to_send);
6725
6726 buffer->length = 0;
6727
6728 /* All packets sent, or to be dealt with by callback below */
6729 if (unlikely(sent != to_send))
6730 buffer->error_callback(&buffer->pkts[sent],
6731 (uint16_t)(to_send - sent),
6732 buffer->error_userdata);
6733
6734 return sent;
6735}
6736
6767static __rte_always_inline uint16_t
6768rte_eth_tx_buffer(uint16_t port_id, uint16_t queue_id,
6769 struct rte_eth_dev_tx_buffer *buffer, struct rte_mbuf *tx_pkt)
6770{
6771 buffer->pkts[buffer->length++] = tx_pkt;
6772 if (buffer->length < buffer->size)
6773 return 0;
6774
6775 return rte_eth_tx_buffer_flush(port_id, queue_id, buffer);
6776}
6777
6828static inline uint16_t
6829rte_eth_recycle_mbufs(uint16_t rx_port_id, uint16_t rx_queue_id,
6830 uint16_t tx_port_id, uint16_t tx_queue_id,
6831 struct rte_eth_recycle_rxq_info *recycle_rxq_info)
6832{
6833 struct rte_eth_fp_ops *p1, *p2;
6834 void *qd1, *qd2;
6835 uint16_t nb_mbufs;
6836
6837#ifdef RTE_ETHDEV_DEBUG_TX
6838 if (tx_port_id >= RTE_MAX_ETHPORTS ||
6839 tx_queue_id >= RTE_MAX_QUEUES_PER_PORT) {
6840 RTE_ETHDEV_LOG_LINE(ERR,
6841 "Invalid tx_port_id=%u or tx_queue_id=%u",
6842 tx_port_id, tx_queue_id);
6843 return 0;
6844 }
6845#endif
6846
6847 /* fetch pointer to Tx queue data */
6848 p1 = &rte_eth_fp_ops[tx_port_id];
6849 qd1 = p1->txq.data[tx_queue_id];
6850
6851#ifdef RTE_ETHDEV_DEBUG_TX
6852 RTE_ETH_VALID_PORTID_OR_ERR_RET(tx_port_id, 0);
6853
6854 if (qd1 == NULL) {
6855 RTE_ETHDEV_LOG_LINE(ERR, "Invalid Tx queue_id=%u for port_id=%u",
6856 tx_queue_id, tx_port_id);
6857 return 0;
6858 }
6859#endif
6860
6861#ifdef RTE_ETHDEV_DEBUG_RX
6862 if (rx_port_id >= RTE_MAX_ETHPORTS ||
6863 rx_queue_id >= RTE_MAX_QUEUES_PER_PORT) {
6864 RTE_ETHDEV_LOG_LINE(ERR, "Invalid rx_port_id=%u or rx_queue_id=%u",
6865 rx_port_id, rx_queue_id);
6866 return 0;
6867 }
6868#endif
6869
6870 /* fetch pointer to Rx queue data */
6871 p2 = &rte_eth_fp_ops[rx_port_id];
6872 qd2 = p2->rxq.data[rx_queue_id];
6873
6874#ifdef RTE_ETHDEV_DEBUG_RX
6875 RTE_ETH_VALID_PORTID_OR_ERR_RET(rx_port_id, 0);
6876
6877 if (qd2 == NULL) {
6878 RTE_ETHDEV_LOG_LINE(ERR, "Invalid Rx queue_id=%u for port_id=%u",
6879 rx_queue_id, rx_port_id);
6880 return 0;
6881 }
6882#endif
6883
6884 /* Copy used *rte_mbuf* buffer pointers from Tx mbuf ring
6885 * into Rx mbuf ring.
6886 */
6887 nb_mbufs = p1->recycle_tx_mbufs_reuse(qd1, recycle_rxq_info);
6888
6889 /* If no recycling mbufs, return 0. */
6890 if (nb_mbufs == 0)
6891 return 0;
6892
6893 /* Replenish the Rx descriptors with the recycling
6894 * into Rx mbuf ring.
6895 */
6896 p2->recycle_rx_descriptors_refill(qd2, nb_mbufs);
6897
6898 return nb_mbufs;
6899}
6900
6926int rte_eth_buffer_split_get_supported_hdr_ptypes(uint16_t port_id, uint32_t *ptypes, int num)
6928
6960static inline int
6961rte_eth_tx_queue_count(uint16_t port_id, uint16_t queue_id)
6962{
6963 struct rte_eth_fp_ops *fops;
6964 void *qd;
6965 int rc;
6966
6967#ifdef RTE_ETHDEV_DEBUG_TX
6968 if (port_id >= RTE_MAX_ETHPORTS || !rte_eth_dev_is_valid_port(port_id)) {
6969 RTE_ETHDEV_LOG_LINE(ERR, "Invalid port_id=%u", port_id);
6970 return -ENODEV;
6971 }
6972
6973 if (queue_id >= RTE_MAX_QUEUES_PER_PORT) {
6974 RTE_ETHDEV_LOG_LINE(ERR, "Invalid queue_id=%u for port_id=%u",
6975 queue_id, port_id);
6976 return -EINVAL;
6977 }
6978#endif
6979
6980 /* Fetch pointer to Tx queue data */
6981 fops = &rte_eth_fp_ops[port_id];
6982 qd = fops->txq.data[queue_id];
6983
6984#ifdef RTE_ETHDEV_DEBUG_TX
6985 if (qd == NULL) {
6986 RTE_ETHDEV_LOG_LINE(ERR, "Invalid queue_id=%u for port_id=%u",
6987 queue_id, port_id);
6988 return -EINVAL;
6989 }
6990#endif
6991 rc = fops->tx_queue_count(qd);
6992 rte_eth_trace_tx_queue_count(port_id, queue_id, rc);
6993 return rc;
6994}
6995
6996#ifdef __cplusplus
6997}
6998#endif
6999
7000#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:947
@ RTE_ETH_64_POOLS
Definition: rte_ethdev.h:951
@ RTE_ETH_32_POOLS
Definition: rte_ethdev.h:950
@ RTE_ETH_8_POOLS
Definition: rte_ethdev.h:948
@ RTE_ETH_16_POOLS
Definition: rte_ethdev.h:949
int rte_eth_speed_lanes_get(uint16_t port_id, uint32_t *lanes)
rte_eth_event_ipsec_subtype
Definition: rte_ethdev.h:3989
@ RTE_ETH_EVENT_IPSEC_PMD_ERROR_END
Definition: rte_ethdev.h:3993
@ RTE_ETH_EVENT_IPSEC_UNKNOWN
Definition: rte_ethdev.h:3995
@ RTE_ETH_EVENT_IPSEC_MAX
Definition: rte_ethdev.h:4021
@ RTE_ETH_EVENT_IPSEC_SA_PKT_EXPIRY
Definition: rte_ethdev.h:4009
@ RTE_ETH_EVENT_IPSEC_ESN_OVERFLOW
Definition: rte_ethdev.h:3997
@ RTE_ETH_EVENT_IPSEC_SA_BYTE_HARD_EXPIRY
Definition: rte_ethdev.h:4014
@ RTE_ETH_EVENT_IPSEC_PMD_ERROR_START
Definition: rte_ethdev.h:3991
@ RTE_ETH_EVENT_IPSEC_SA_BYTE_EXPIRY
Definition: rte_ethdev.h:4004
@ RTE_ETH_EVENT_IPSEC_SA_TIME_EXPIRY
Definition: rte_ethdev.h:3999
@ RTE_ETH_EVENT_IPSEC_SA_PKT_HARD_EXPIRY
Definition: rte_ethdev.h:4019
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:707
void(* rte_eth_module_eeprom_field_cb)(const char *name, const char *value, void *arg)
Definition: rte_ethdev.h:5252
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:6768
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:3913
@ RTE_ETH_SUBEVENT_MACSEC_UNKNOWN
Definition: rte_ethdev.h:3915
@ RTE_ETH_SUBEVENT_MACSEC_RX_SECTAG_E_EQ0_C_EQ1
Definition: rte_ethdev.h:3925
@ RTE_ETH_SUBEVENT_MACSEC_RX_SECTAG_SL_GTE48
Definition: rte_ethdev.h:3930
@ RTE_ETH_SUBEVENT_MACSEC_RX_SECTAG_SC_EQ1_SCB_EQ1
Definition: rte_ethdev.h:3940
@ RTE_ETH_SUBEVENT_MACSEC_RX_SECTAG_ES_EQ1_SC_EQ1
Definition: rte_ethdev.h:3935
@ RTE_ETH_SUBEVENT_MACSEC_RX_SECTAG_V_EQ1
Definition: rte_ethdev.h:3920
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:4054
@ RTE_ETH_EVENT_RECOVERY_FAILED
Definition: rte_ethdev.h:4131
@ RTE_ETH_EVENT_UNKNOWN
Definition: rte_ethdev.h:4055
@ RTE_ETH_EVENT_VF_MBOX
Definition: rte_ethdev.h:4061
@ RTE_ETH_EVENT_IPSEC
Definition: rte_ethdev.h:4072
@ RTE_ETH_EVENT_INTR_RESET
Definition: rte_ethdev.h:4060
@ RTE_ETH_EVENT_INTR_RMV
Definition: rte_ethdev.h:4063
@ RTE_ETH_EVENT_ERR_RECOVERING
Definition: rte_ethdev.h:4095
@ RTE_ETH_EVENT_MACSEC
Definition: rte_ethdev.h:4062
@ RTE_ETH_EVENT_RECOVERY_SUCCESS
Definition: rte_ethdev.h:4126
@ RTE_ETH_EVENT_DESTROY
Definition: rte_ethdev.h:4071
@ RTE_ETH_EVENT_FLOW_AGED
Definition: rte_ethdev.h:4073
@ RTE_ETH_EVENT_QUEUE_STATE
Definition: rte_ethdev.h:4058
@ RTE_ETH_EVENT_INTR_LSC
Definition: rte_ethdev.h:4056
@ RTE_ETH_EVENT_MAX
Definition: rte_ethdev.h:4132
@ RTE_ETH_EVENT_RX_AVAIL_THRESH
Definition: rte_ethdev.h:4078
@ RTE_ETH_EVENT_NEW
Definition: rte_ethdev.h:4070
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:5912
@ RTE_ETH_CMAN_OBJ_RX_QUEUE_MEMPOOL
Definition: rte_ethdev.h:5919
@ RTE_ETH_CMAN_OBJ_RX_QUEUE
Definition: rte_ethdev.h:5914
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:883
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:1934
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:2098
@ RTE_ETH_DEV_ATTACHED
Definition: rte_ethdev.h:2102
@ RTE_ETH_DEV_UNUSED
Definition: rte_ethdev.h:2100
@ RTE_ETH_DEV_REMOVED
Definition: rte_ethdev.h:2104
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:326
@ RTE_ETH_LINK_CONNECTOR_XAUI
Definition: rte_ethdev.h:340
@ RTE_ETH_LINK_CONNECTOR_SFP_DD
Definition: rte_ethdev.h:346
@ RTE_ETH_LINK_CONNECTOR_GAUI
Definition: rte_ethdev.h:339
@ RTE_ETH_LINK_CONNECTOR_MII
Definition: rte_ethdev.h:330
@ RTE_ETH_LINK_CONNECTOR_XLAUI
Definition: rte_ethdev.h:338
@ RTE_ETH_LINK_CONNECTOR_QSFP
Definition: rte_ethdev.h:347
@ RTE_ETH_LINK_CONNECTOR_SFP28
Definition: rte_ethdev.h:345
@ RTE_ETH_LINK_CONNECTOR_OTHER
Definition: rte_ethdev.h:352
@ RTE_ETH_LINK_CONNECTOR_AUI
Definition: rte_ethdev.h:329
@ RTE_ETH_LINK_CONNECTOR_SGMII
Definition: rte_ethdev.h:334
@ RTE_ETH_LINK_CONNECTOR_SFP
Definition: rte_ethdev.h:343
@ RTE_ETH_LINK_CONNECTOR_QSFP_PLUS
Definition: rte_ethdev.h:348
@ RTE_ETH_LINK_CONNECTOR_TP
Definition: rte_ethdev.h:328
@ RTE_ETH_LINK_CONNECTOR_QSFP28
Definition: rte_ethdev.h:349
@ RTE_ETH_LINK_CONNECTOR_DAC
Definition: rte_ethdev.h:333
@ RTE_ETH_LINK_CONNECTOR_QSFP56
Definition: rte_ethdev.h:350
@ RTE_ETH_LINK_CONNECTOR_QSFP_DD
Definition: rte_ethdev.h:351
@ RTE_ETH_LINK_CONNECTOR_SFI
Definition: rte_ethdev.h:337
@ RTE_ETH_LINK_CONNECTOR_CAUI
Definition: rte_ethdev.h:341
@ RTE_ETH_LINK_CONNECTOR_XFI
Definition: rte_ethdev.h:336
@ RTE_ETH_LINK_CONNECTOR_LAUI
Definition: rte_ethdev.h:342
@ RTE_ETH_LINK_CONNECTOR_FIBER
Definition: rte_ethdev.h:331
@ RTE_ETH_LINK_CONNECTOR_SFP_PLUS
Definition: rte_ethdev.h:344
@ RTE_ETH_LINK_CONNECTOR_QSGMII
Definition: rte_ethdev.h:335
@ RTE_ETH_LINK_CONNECTOR_NONE
Definition: rte_ethdev.h:327
@ RTE_ETH_LINK_CONNECTOR_BNC
Definition: rte_ethdev.h:332
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:6175
rte_eth_fec_mode
Definition: rte_ethdev.h:2009
@ RTE_ETH_FEC_NOFEC
Definition: rte_ethdev.h:2010
@ RTE_ETH_FEC_BASER
Definition: rte_ethdev.h:2012
@ RTE_ETH_FEC_AUTO
Definition: rte_ethdev.h:2011
@ RTE_ETH_FEC_RS
Definition: rte_ethdev.h:2013
@ RTE_ETH_FEC_LLRS
Definition: rte_ethdev.h:2014
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:1762
@ RTE_ETH_ERROR_HANDLE_MODE_PASSIVE
Definition: rte_ethdev.h:1769
@ RTE_ETH_ERROR_HANDLE_MODE_NONE
Definition: rte_ethdev.h:1764
@ RTE_ETH_ERROR_HANDLE_MODE_PROACTIVE
Definition: rte_ethdev.h:1775
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:445
@ RTE_ETH_MQ_TX_DCB
Definition: rte_ethdev.h:447
@ RTE_ETH_MQ_TX_VMDQ_DCB
Definition: rte_ethdev.h:448
@ RTE_ETH_MQ_TX_VMDQ_ONLY
Definition: rte_ethdev.h:449
@ RTE_ETH_MQ_TX_NONE
Definition: rte_ethdev.h:446
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:6829
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:419
@ RTE_ETH_MQ_RX_DCB_RSS
Definition: rte_ethdev.h:428
@ RTE_ETH_MQ_RX_VMDQ_DCB_RSS
Definition: rte_ethdev.h:437
@ RTE_ETH_MQ_RX_DCB
Definition: rte_ethdev.h:426
@ RTE_ETH_MQ_RX_VMDQ_DCB
Definition: rte_ethdev.h:435
@ RTE_ETH_MQ_RX_VMDQ_RSS
Definition: rte_ethdev.h:433
@ RTE_ETH_MQ_RX_NONE
Definition: rte_ethdev.h:421
@ RTE_ETH_MQ_RX_RSS
Definition: rte_ethdev.h:424
@ RTE_ETH_MQ_RX_VMDQ_ONLY
Definition: rte_ethdev.h:431
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:1752
@ RTE_ETH_REPRESENTOR_PF
Definition: rte_ethdev.h:1756
@ RTE_ETH_REPRESENTOR_VF
Definition: rte_ethdev.h:1754
@ RTE_ETH_REPRESENTOR_SF
Definition: rte_ethdev.h:1755
@ RTE_ETH_REPRESENTOR_NONE
Definition: rte_ethdev.h:1753
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:882
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:2068
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:6631
int rte_eth_hairpin_bind(uint16_t tx_port, uint16_t rx_port)
rte_eth_tunnel_type
Definition: rte_ethdev.h:1465
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:6514
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:4148
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:411
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:1382
@ RTE_ETH_FC_TX_PAUSE
Definition: rte_ethdev.h:1385
@ RTE_ETH_FC_RX_PAUSE
Definition: rte_ethdev.h:1384
@ RTE_ETH_FC_NONE
Definition: rte_ethdev.h:1383
@ RTE_ETH_FC_FULL
Definition: rte_ethdev.h:1386
rte_eth_event_macsec_type
Definition: rte_ethdev.h:3947
@ RTE_ETH_EVENT_MACSEC_RX_SA_PN_HARD_EXP
Definition: rte_ethdev.h:3953
@ RTE_ETH_EVENT_MACSEC_SA_NOT_VALID
Definition: rte_ethdev.h:3961
@ RTE_ETH_EVENT_MACSEC_RX_SA_PN_SOFT_EXP
Definition: rte_ethdev.h:3955
@ RTE_ETH_EVENT_MACSEC_UNKNOWN
Definition: rte_ethdev.h:3949
@ RTE_ETH_EVENT_MACSEC_TX_SA_PN_HARD_EXP
Definition: rte_ethdev.h:3957
@ RTE_ETH_EVENT_MACSEC_SECTAG_VAL_ERR
Definition: rte_ethdev.h:3951
@ RTE_ETH_EVENT_MACSEC_TX_SA_PN_SOFT_EXP
Definition: rte_ethdev.h:3959
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:410
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:6961
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:412
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:6715
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:6323
static int rte_eth_tx_descriptor_status(uint16_t port_id, uint16_t queue_id, uint16_t offset)
Definition: rte_ethdev.h:6392
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:476
@ RTE_ETH_VLAN_TYPE_OUTER
Definition: rte_ethdev.h:479
@ RTE_ETH_VLAN_TYPE_INNER
Definition: rte_ethdev.h:478
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:2092
const char * rte_eth_dev_tx_offload_name(uint64_t offload)
rte_eth_hash_function
Definition: rte_ethdev.h:494
@ RTE_ETH_HASH_FUNCTION_DEFAULT
Definition: rte_ethdev.h:496
@ RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ_SORT
Definition: rte_ethdev.h:511
@ RTE_ETH_HASH_FUNCTION_SIMPLE_XOR
Definition: rte_ethdev.h:498
@ RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ
Definition: rte_ethdev.h:504
@ RTE_ETH_HASH_FUNCTION_TOEPLITZ
Definition: rte_ethdev.h:497
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:1939
int rte_eth_dev_get_name_by_port(uint16_t port_id, char *name)
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:6253
int rte_eth_fec_set(uint16_t port_id, uint32_t fec_capa)
rte_eth_nb_tcs
Definition: rte_ethdev.h:938
@ RTE_ETH_4_TCS
Definition: rte_ethdev.h:939
@ RTE_ETH_8_TCS
Definition: rte_ethdev.h:940
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:1935
uint8_t rsvd_mode_params[4]
Definition: rte_ethdev.h:5980
enum rte_eth_cman_obj obj
Definition: rte_ethdev.h:5948
struct rte_cman_red_params red
Definition: rte_ethdev.h:5973
uint8_t rsvd_obj_params[4]
Definition: rte_ethdev.h:5965
enum rte_cman_mode mode
Definition: rte_ethdev.h:5950
uint8_t rsvd[8]
Definition: rte_ethdev.h:5940
uint64_t modes_supported
Definition: rte_ethdev.h:5930
uint64_t objs_supported
Definition: rte_ethdev.h:5935
struct rte_eth_intr_conf intr_conf
Definition: rte_ethdev.h:1557
struct rte_eth_vmdq_rx_conf vmdq_rx_conf
Definition: rte_ethdev.h:1544
struct rte_eth_txmode txmode
Definition: rte_ethdev.h:1531
struct rte_eth_rxmode rxmode
Definition: rte_ethdev.h:1530
struct rte_eth_vmdq_dcb_conf vmdq_dcb_conf
Definition: rte_ethdev.h:1540
union rte_eth_conf::@176 tx_adv_conf
uint32_t lpbk_mode
Definition: rte_ethdev.h:1532
uint32_t dcb_capability_en
Definition: rte_ethdev.h:1556
struct rte_eth_vmdq_dcb_tx_conf vmdq_dcb_tx_conf
Definition: rte_ethdev.h:1548
struct rte_eth_conf::@175 rx_adv_conf
uint32_t link_speeds
Definition: rte_ethdev.h:1523
struct rte_eth_rss_conf rss_conf
Definition: rte_ethdev.h:1538
struct rte_eth_dcb_tx_conf dcb_tx_conf
Definition: rte_ethdev.h:1550
struct rte_eth_dcb_rx_conf dcb_rx_conf
Definition: rte_ethdev.h:1542
struct rte_eth_vmdq_tx_conf vmdq_tx_conf
Definition: rte_ethdev.h:1552
uint8_t tc_bws[RTE_ETH_DCB_NUM_TCS]
Definition: rte_ethdev.h:2000
uint8_t prio_tc[RTE_ETH_DCB_NUM_USER_PRIORITIES]
Definition: rte_ethdev.h:1999
struct rte_eth_dcb_tc_queue_mapping tc_queue
Definition: rte_ethdev.h:2002
struct rte_eth_dcb_tc_queue_mapping::@177 tc_rxq[RTE_ETH_MAX_VMDQ_POOL][RTE_ETH_DCB_NUM_TCS]
struct rte_eth_dcb_tc_queue_mapping::@178 tc_txq[RTE_ETH_MAX_VMDQ_POOL][RTE_ETH_DCB_NUM_TCS]
uint16_t nb_mtu_seg_max
Definition: rte_ethdev.h:1376
uint16_t nb_seg_max
Definition: rte_ethdev.h:1363
uint16_t nb_align
Definition: rte_ethdev.h:1353
uint32_t max_rx_bufsize
Definition: rte_ethdev.h:1799
uint32_t max_hash_mac_addrs
Definition: rte_ethdev.h:1807
struct rte_eth_desc_lim rx_desc_lim
Definition: rte_ethdev.h:1830
unsigned int if_index
Definition: rte_ethdev.h:1786
uint16_t max_rx_queues
Definition: rte_ethdev.h:1803
uint64_t dev_capa
Definition: rte_ethdev.h:1848
uint16_t vmdq_queue_num
Definition: rte_ethdev.h:1828
uint32_t min_rx_bufsize
Definition: rte_ethdev.h:1792
uint16_t max_tx_queues
Definition: rte_ethdev.h:1804
struct rte_eth_txconf default_txconf
Definition: rte_ethdev.h:1826
uint16_t max_vmdq_pools
Definition: rte_ethdev.h:1809
struct rte_device * device
Definition: rte_ethdev.h:1784
struct rte_eth_rxconf default_rxconf
Definition: rte_ethdev.h:1825
uint16_t nb_tx_queues
Definition: rte_ethdev.h:1835
enum rte_eth_err_handle_mode err_handle_mode
Definition: rte_ethdev.h:1855
uint32_t max_rx_pktlen
Definition: rte_ethdev.h:1800
uint16_t max_mtu
Definition: rte_ethdev.h:1789
uint32_t max_lro_pkt_size
Definition: rte_ethdev.h:1802
uint16_t vmdq_queue_base
Definition: rte_ethdev.h:1827
void * reserved_ptrs[2]
Definition: rte_ethdev.h:1858
uint64_t reserved_64s[2]
Definition: rte_ethdev.h:1857
uint64_t tx_queue_offload_capa
Definition: rte_ethdev.h:1818
uint16_t vmdq_pool_base
Definition: rte_ethdev.h:1829
uint16_t min_mtu
Definition: rte_ethdev.h:1788
uint16_t reta_size
Definition: rte_ethdev.h:1820
struct rte_eth_desc_lim tx_desc_lim
Definition: rte_ethdev.h:1831
uint64_t flow_type_rss_offloads
Definition: rte_ethdev.h:1824
uint16_t max_rx_mempools
Definition: rte_ethdev.h:1842
uint16_t max_vfs
Definition: rte_ethdev.h:1808
struct rte_eth_dev_portconf default_txportconf
Definition: rte_ethdev.h:1846
uint64_t tx_offload_capa
Definition: rte_ethdev.h:1814
const char * driver_name
Definition: rte_ethdev.h:1785
uint8_t hash_key_size
Definition: rte_ethdev.h:1821
uint32_t speed_capa
Definition: rte_ethdev.h:1832
struct rte_eth_dev_portconf default_rxportconf
Definition: rte_ethdev.h:1844
struct rte_eth_switch_info switch_info
Definition: rte_ethdev.h:1853
struct rte_eth_rxseg_capa rx_seg_capa
Definition: rte_ethdev.h:1810
uint64_t rx_queue_offload_capa
Definition: rte_ethdev.h:1816
uint64_t rx_offload_capa
Definition: rte_ethdev.h:1812
uint16_t nb_rx_queues
Definition: rte_ethdev.h:1834
uint32_t max_mac_addrs
Definition: rte_ethdev.h:1805
const uint32_t * dev_flags
Definition: rte_ethdev.h:1790
struct rte_mbuf * pkts[]
Definition: rte_ethdev.h:3775
enum rte_eth_event_ipsec_subtype subtype
Definition: rte_ethdev.h:4030
enum rte_eth_event_macsec_type type
Definition: rte_ethdev.h:3970
enum rte_eth_event_macsec_subtype subtype
Definition: rte_ethdev.h:3972
uint32_t low_water
Definition: rte_ethdev.h:1396
uint16_t send_xon
Definition: rte_ethdev.h:1398
enum rte_eth_fc_mode mode
Definition: rte_ethdev.h:1399
uint32_t high_water
Definition: rte_ethdev.h:1395
uint16_t pause_time
Definition: rte_ethdev.h:1397
uint8_t mac_ctrl_frame_fwd
Definition: rte_ethdev.h:1400
uint16_t max_nb_queues
Definition: rte_ethdev.h:1254
struct rte_eth_hairpin_queue_cap tx_cap
Definition: rte_ethdev.h:1261
struct rte_eth_hairpin_queue_cap rx_cap
Definition: rte_ethdev.h:1260
uint32_t use_locked_device_memory
Definition: rte_ethdev.h:1315
struct rte_eth_fc_conf fc
Definition: rte_ethdev.h:1410
enum rte_eth_fc_mode mode
Definition: rte_ethdev.h:1441
enum rte_eth_fc_mode mode_capa
Definition: rte_ethdev.h:1423
struct rte_mempool * mp
Definition: rte_ethdev.h:1904
struct rte_mbuf ** mbuf_ring
Definition: rte_ethdev.h:1903
struct rte_eth_representor_range ranges[]
Definition: rte_ethdev.h:5652
enum rte_eth_representor_type type
Definition: rte_ethdev.h:5631
char name[RTE_DEV_NAME_MAX_LEN]
Definition: rte_ethdev.h:5641
uint8_t * rss_key
Definition: rte_ethdev.h:535
uint8_t rss_key_len
Definition: rte_ethdev.h:536
enum rte_eth_hash_function algorithm
Definition: rte_ethdev.h:542
uint64_t rss_hf
Definition: rte_ethdev.h:541
uint16_t reta[RTE_ETH_RETA_GROUP_SIZE]
Definition: rte_ethdev.h:931
struct rte_eth_thresh rx_thresh
Definition: rte_ethdev.h:1155
uint64_t offloads
Definition: rte_ethdev.h:1173
void * reserved_ptrs[2]
Definition: rte_ethdev.h:1206
uint64_t reserved_64s[2]
Definition: rte_ethdev.h:1205
uint8_t rx_deferred_start
Definition: rte_ethdev.h:1158
uint16_t share_group
Definition: rte_ethdev.h:1166
uint8_t rx_drop_en
Definition: rte_ethdev.h:1157
uint16_t share_qid
Definition: rte_ethdev.h:1167
union rte_eth_rxseg * rx_seg
Definition: rte_ethdev.h:1181
struct rte_mempool ** rx_mempools
Definition: rte_ethdev.h:1202
uint16_t rx_nseg
Definition: rte_ethdev.h:1159
uint16_t rx_free_thresh
Definition: rte_ethdev.h:1156
uint32_t mtu
Definition: rte_ethdev.h:458
uint32_t max_lro_pkt_size
Definition: rte_ethdev.h:460
uint64_t offloads
Definition: rte_ethdev.h:466
void * reserved_ptrs[2]
Definition: rte_ethdev.h:469
uint64_t reserved_64s[2]
Definition: rte_ethdev.h:468
enum rte_eth_rx_mq_mode mq_mode
Definition: rte_ethdev.h:457
uint8_t scattered_rx
Definition: rte_ethdev.h:1874
struct rte_mempool * mp
Definition: rte_ethdev.h:1872
uint8_t queue_state
Definition: rte_ethdev.h:1875
uint8_t avail_thresh
Definition: rte_ethdev.h:1884
uint16_t nb_desc
Definition: rte_ethdev.h:1876
uint16_t rx_buf_size
Definition: rte_ethdev.h:1877
__extension__ uint32_t multi_pools
Definition: rte_ethdev.h:1737
uint32_t selective_rx
Definition: rte_ethdev.h:1740
uint32_t offset_allowed
Definition: rte_ethdev.h:1738
uint32_t offset_align_log2
Definition: rte_ethdev.h:1739
struct rte_mempool * mp
Definition: rte_ethdev.h:1125
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:1712
uint8_t hthresh
Definition: rte_ethdev.h:403
uint8_t pthresh
Definition: rte_ethdev.h:402
uint8_t wthresh
Definition: rte_ethdev.h:404
uint8_t tx_deferred_start
Definition: rte_ethdev.h:1218
uint64_t offloads
Definition: rte_ethdev.h:1224
void * reserved_ptrs[2]
Definition: rte_ethdev.h:1227
uint64_t reserved_64s[2]
Definition: rte_ethdev.h:1226
struct rte_eth_thresh tx_thresh
Definition: rte_ethdev.h:1213
uint16_t tx_rs_thresh
Definition: rte_ethdev.h:1214
uint16_t tx_free_thresh
Definition: rte_ethdev.h:1215
uint64_t offloads
Definition: rte_ethdev.h:1042
__extension__ uint8_t hw_vlan_insert_pvid
Definition: rte_ethdev.h:1051
void * reserved_ptrs[2]
Definition: rte_ethdev.h:1054
__extension__ uint8_t hw_vlan_reject_tagged
Definition: rte_ethdev.h:1047
uint64_t reserved_64s[2]
Definition: rte_ethdev.h:1053
__extension__ uint8_t hw_vlan_reject_untagged
Definition: rte_ethdev.h:1049
enum rte_eth_tx_mq_mode mq_mode
Definition: rte_ethdev.h:1036
uint8_t queue_state
Definition: rte_ethdev.h:1894
uint16_t nb_desc
Definition: rte_ethdev.h:1893
enum rte_eth_nb_pools nb_queue_pools
Definition: rte_ethdev.h:989
uint8_t dcb_tc[RTE_ETH_DCB_NUM_USER_PRIORITIES]
Definition: rte_ethdev.h:998
struct rte_eth_vmdq_dcb_conf::@171 pool_map[RTE_ETH_VMDQ_MAX_VLAN_FILTERS]
uint8_t enable_default_pool
Definition: rte_ethdev.h:990
enum rte_eth_nb_pools nb_queue_pools
Definition: rte_ethdev.h:1020
struct rte_eth_vmdq_rx_conf::@172 pool_map[RTE_ETH_VMDQ_MAX_VLAN_FILTERS]
uint8_t enable_default_pool
Definition: rte_ethdev.h:1021
char name[RTE_ETH_XSTATS_NAME_SIZE]
Definition: rte_ethdev.h:1970
uint64_t value
Definition: rte_ethdev.h:1952
uint64_t id
Definition: rte_ethdev.h:1951