DPDK  26.07.0
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
175 extern "C" {
176 #endif
177 
178 extern 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 
184 struct rte_mbuf;
185 
202 int rte_eth_iterator_init(struct rte_dev_iterator *iter, const char *devargs);
203 
218 uint16_t rte_eth_iterator_next(struct rte_dev_iterator *iter);
219 
232 void rte_eth_iterator_cleanup(struct rte_dev_iterator *iter);
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
326 enum rte_eth_link_connector {
357 };
358 
362 struct rte_eth_link {
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)
419 enum rte_eth_rx_mq_mode {
420 
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
571 
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 
706 static inline uint64_t
707 rte_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
906 /* Definitions used for receive MAC address */
907 #define RTE_ETH_NUM_RECEIVE_MAC_ADDR 128
909 /* Definitions used for unicast hash */
910 #define RTE_ETH_VMDQ_NUM_UC_HASH_ARRAY 128
916 #define RTE_ETH_VMDQ_ACCEPT_UNTAG RTE_BIT32(0)
917 
918 #define RTE_ETH_VMDQ_ACCEPT_HASH_MC RTE_BIT32(1)
919 
920 #define RTE_ETH_VMDQ_ACCEPT_HASH_UC RTE_BIT32(2)
921 
922 #define RTE_ETH_VMDQ_ACCEPT_BROADCAST RTE_BIT32(3)
923 
924 #define RTE_ETH_VMDQ_ACCEPT_MULTICAST RTE_BIT32(4)
925 
935  uint64_t mask;
937  uint16_t reta[RTE_ETH_RETA_GROUP_SIZE];
938 };
939 
947 };
948 
958 };
959 
960 /* This structure may be extended in future. */
961 struct rte_eth_dcb_rx_conf {
962  enum rte_eth_nb_tcs nb_tcs;
964  uint8_t dcb_tc[RTE_ETH_DCB_NUM_USER_PRIORITIES];
965 };
966 
967 struct rte_eth_vmdq_dcb_tx_conf {
968  enum rte_eth_nb_pools nb_queue_pools;
970  uint8_t dcb_tc[RTE_ETH_DCB_NUM_USER_PRIORITIES];
971 };
972 
973 struct rte_eth_dcb_tx_conf {
974  enum rte_eth_nb_tcs nb_tcs;
976  uint8_t dcb_tc[RTE_ETH_DCB_NUM_USER_PRIORITIES];
977 };
978 
979 struct rte_eth_vmdq_tx_conf {
980  enum rte_eth_nb_pools nb_queue_pools;
981 };
982 
997  uint8_t default_pool;
998  uint8_t nb_pool_maps;
999  struct {
1000  uint16_t vlan_id;
1001  uint64_t pools;
1005 };
1006 
1028  uint8_t default_pool;
1030  uint8_t nb_pool_maps;
1031  uint32_t rx_mode;
1032  struct {
1033  uint16_t vlan_id;
1034  uint64_t pools;
1036 };
1037 
1048  uint64_t offloads;
1049 
1050  uint16_t pvid;
1051  __extension__
1052  uint8_t
1057  hw_vlan_insert_pvid : 1;
1058 
1059  uint64_t reserved_64s[2];
1060  void *reserved_ptrs[2];
1061 };
1062 
1134  struct rte_mempool *mp;
1135  uint16_t length;
1136  uint16_t offset;
1148  uint32_t proto_hdr;
1149 };
1150 
1158  /* The settings for buffer split offload. */
1159  struct rte_eth_rxseg_split split;
1160  /* The other features settings should be added here. */
1161 };
1162 
1168  uint16_t rx_free_thresh;
1169  uint8_t rx_drop_en;
1171  uint16_t rx_nseg;
1178  uint16_t share_group;
1179  uint16_t share_qid;
1185  uint64_t offloads;
1194 
1215  uint16_t rx_nmempool;
1217  uint64_t reserved_64s[2];
1218  void *reserved_ptrs[2];
1219 };
1220 
1226  uint16_t tx_rs_thresh;
1227  uint16_t tx_free_thresh;
1236  uint64_t offloads;
1237 
1238  uint64_t reserved_64s[2];
1239  void *reserved_ptrs[2];
1240 };
1241 
1254 
1259  uint32_t rte_memory:1;
1260 
1261  uint32_t reserved:30;
1262 };
1263 
1272  uint16_t max_nb_queues;
1274  uint16_t max_rx_2_tx;
1276  uint16_t max_tx_2_rx;
1277  uint16_t max_nb_desc;
1280 };
1281 
1282 #define RTE_ETH_MAX_HAIRPIN_PEERS 32
1283 
1291  uint16_t port;
1292  uint16_t queue;
1293 };
1294 
1302  uint32_t peer_count:16;
1313  uint32_t tx_explicit:1;
1314 
1326  uint32_t manual_bind:1;
1327 
1340 
1352  uint32_t use_rte_memory:1;
1353 
1364  uint32_t force_memory:1;
1365 
1366  uint32_t reserved:11;
1368  struct rte_eth_hairpin_peer peers[RTE_ETH_MAX_HAIRPIN_PEERS];
1369 };
1370 
1375  uint16_t nb_max;
1376  uint16_t nb_min;
1377  uint16_t nb_align;
1387  uint16_t nb_seg_max;
1388 
1400  uint16_t nb_mtu_seg_max;
1401 };
1402 
1411 };
1412 
1419  uint32_t high_water;
1420  uint32_t low_water;
1421  uint16_t pause_time;
1422  uint16_t send_xon;
1425  uint8_t autoneg;
1426 };
1427 
1435  uint8_t priority;
1436 };
1437 
1448  uint8_t tc_max;
1451 };
1452 
1473  struct {
1474  uint16_t tx_qid;
1478  uint8_t tc;
1479  } rx_pause; /* Valid when (mode == FC_RX_PAUSE || mode == FC_FULL) */
1480 
1481  struct {
1482  uint16_t pause_time;
1483  uint16_t rx_qid;
1487  uint8_t tc;
1488  } tx_pause; /* Valid when (mode == FC_TX_PAUSE || mode == FC_FULL) */
1489 };
1490 
1496  RTE_ETH_TUNNEL_TYPE_NONE = 0,
1497  RTE_ETH_TUNNEL_TYPE_VXLAN,
1498  RTE_ETH_TUNNEL_TYPE_GENEVE,
1499  RTE_ETH_TUNNEL_TYPE_TEREDO,
1500  RTE_ETH_TUNNEL_TYPE_NVGRE,
1501  RTE_ETH_TUNNEL_TYPE_IP_IN_GRE,
1502  RTE_ETH_L2_TUNNEL_TYPE_E_TAG,
1503  RTE_ETH_TUNNEL_TYPE_VXLAN_GPE,
1504  RTE_ETH_TUNNEL_TYPE_ECPRI,
1505  RTE_ETH_TUNNEL_TYPE_MAX,
1506 };
1507 
1508 #ifdef __cplusplus
1509 }
1510 #endif
1511 
1512 /* Deprecated API file for rte_eth_dev_filter_* functions */
1513 #include "rte_eth_ctrl.h"
1514 
1515 #ifdef __cplusplus
1516 extern "C" {
1517 #endif
1518 
1529  uint16_t udp_port;
1530  uint8_t prot_type;
1531 };
1532 
1538  uint32_t lsc:1;
1540  uint32_t rxq:1;
1542  uint32_t rmv:1;
1543 };
1544 
1545 #define rte_intr_conf rte_eth_intr_conf
1546 
1553  uint32_t link_speeds;
1562  uint32_t lpbk_mode;
1567  struct {
1572  struct rte_eth_dcb_rx_conf dcb_rx_conf;
1575  } rx_adv_conf;
1576  union {
1578  struct rte_eth_vmdq_dcb_tx_conf vmdq_dcb_tx_conf;
1580  struct rte_eth_dcb_tx_conf dcb_tx_conf;
1582  struct rte_eth_vmdq_tx_conf vmdq_tx_conf;
1583  } tx_adv_conf;
1588 };
1589 
1593 #define RTE_ETH_RX_OFFLOAD_VLAN_STRIP RTE_BIT64(0)
1594 #define RTE_ETH_RX_OFFLOAD_IPV4_CKSUM RTE_BIT64(1)
1595 #define RTE_ETH_RX_OFFLOAD_UDP_CKSUM RTE_BIT64(2)
1596 #define RTE_ETH_RX_OFFLOAD_TCP_CKSUM RTE_BIT64(3)
1597 #define RTE_ETH_RX_OFFLOAD_TCP_LRO RTE_BIT64(4)
1598 #define RTE_ETH_RX_OFFLOAD_QINQ_STRIP RTE_BIT64(5)
1599 #define RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM RTE_BIT64(6)
1600 #define RTE_ETH_RX_OFFLOAD_MACSEC_STRIP RTE_BIT64(7)
1601 #define RTE_ETH_RX_OFFLOAD_VLAN_FILTER RTE_BIT64(9)
1602 #define RTE_ETH_RX_OFFLOAD_VLAN_EXTEND RTE_BIT64(10)
1603 #define RTE_ETH_RX_OFFLOAD_SCATTER RTE_BIT64(13)
1604 
1609 #define RTE_ETH_RX_OFFLOAD_TIMESTAMP RTE_BIT64(14)
1610 #define RTE_ETH_RX_OFFLOAD_SECURITY RTE_BIT64(15)
1611 #define RTE_ETH_RX_OFFLOAD_KEEP_CRC RTE_BIT64(16)
1612 #define RTE_ETH_RX_OFFLOAD_SCTP_CKSUM RTE_BIT64(17)
1613 #define RTE_ETH_RX_OFFLOAD_OUTER_UDP_CKSUM RTE_BIT64(18)
1614 #define RTE_ETH_RX_OFFLOAD_RSS_HASH RTE_BIT64(19)
1615 #define RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT RTE_BIT64(20)
1616 
1617 #define RTE_ETH_RX_OFFLOAD_CHECKSUM (RTE_ETH_RX_OFFLOAD_IPV4_CKSUM | \
1618  RTE_ETH_RX_OFFLOAD_UDP_CKSUM | \
1619  RTE_ETH_RX_OFFLOAD_TCP_CKSUM)
1620 #define RTE_ETH_RX_OFFLOAD_VLAN (RTE_ETH_RX_OFFLOAD_VLAN_STRIP | \
1621  RTE_ETH_RX_OFFLOAD_VLAN_FILTER | \
1622  RTE_ETH_RX_OFFLOAD_VLAN_EXTEND | \
1623  RTE_ETH_RX_OFFLOAD_QINQ_STRIP)
1624 
1625 /*
1626  * If new Rx offloads are defined, they also must be
1627  * mentioned in rte_rx_offload_names in rte_ethdev.c file.
1628  */
1629 
1633 #define RTE_ETH_TX_OFFLOAD_VLAN_INSERT RTE_BIT64(0)
1634 #define RTE_ETH_TX_OFFLOAD_IPV4_CKSUM RTE_BIT64(1)
1635 #define RTE_ETH_TX_OFFLOAD_UDP_CKSUM RTE_BIT64(2)
1636 #define RTE_ETH_TX_OFFLOAD_TCP_CKSUM RTE_BIT64(3)
1637 #define RTE_ETH_TX_OFFLOAD_SCTP_CKSUM RTE_BIT64(4)
1638 #define RTE_ETH_TX_OFFLOAD_TCP_TSO RTE_BIT64(5)
1639 #define RTE_ETH_TX_OFFLOAD_UDP_TSO RTE_BIT64(6)
1640 #define RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM RTE_BIT64(7)
1641 #define RTE_ETH_TX_OFFLOAD_QINQ_INSERT RTE_BIT64(8)
1642 #define RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO RTE_BIT64(9)
1643 #define RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO RTE_BIT64(10)
1644 #define RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO RTE_BIT64(11)
1645 #define RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO RTE_BIT64(12)
1646 #define RTE_ETH_TX_OFFLOAD_MACSEC_INSERT RTE_BIT64(13)
1647 
1651 #define RTE_ETH_TX_OFFLOAD_MT_LOCKFREE RTE_BIT64(14)
1652 
1653 #define RTE_ETH_TX_OFFLOAD_MULTI_SEGS RTE_BIT64(15)
1654 
1661 #define RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE RTE_BIT64(16)
1662 #define RTE_ETH_TX_OFFLOAD_SECURITY RTE_BIT64(17)
1663 
1668 #define RTE_ETH_TX_OFFLOAD_UDP_TNL_TSO RTE_BIT64(18)
1669 
1674 #define RTE_ETH_TX_OFFLOAD_IP_TNL_TSO RTE_BIT64(19)
1675 
1676 #define RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM RTE_BIT64(20)
1677 
1682 #define RTE_ETH_TX_OFFLOAD_SEND_ON_TIMESTAMP RTE_BIT64(21)
1683 /*
1684  * If new Tx offloads are defined, they also must be
1685  * mentioned in rte_tx_offload_names in rte_ethdev.c file.
1686  */
1687 
1692 #define RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP RTE_BIT64(0)
1693 
1694 #define RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP RTE_BIT64(1)
1695 
1704 #define RTE_ETH_DEV_CAPA_RXQ_SHARE RTE_BIT64(2)
1705 
1706 #define RTE_ETH_DEV_CAPA_FLOW_RULE_KEEP RTE_BIT64(3)
1707 
1708 #define RTE_ETH_DEV_CAPA_FLOW_SHARED_OBJECT_KEEP RTE_BIT64(4)
1709 
1711 /*
1712  * Fallback default preferred Rx/Tx port parameters.
1713  * These are used if an application requests default parameters
1714  * but the PMD does not provide preferred values.
1715  */
1716 #define RTE_ETH_DEV_FALLBACK_RX_RINGSIZE 512
1717 #define RTE_ETH_DEV_FALLBACK_TX_RINGSIZE 512
1718 #define RTE_ETH_DEV_FALLBACK_RX_NBQUEUES 1
1719 #define RTE_ETH_DEV_FALLBACK_TX_NBQUEUES 1
1720 
1727  uint16_t burst_size;
1728  uint16_t ring_size;
1729  uint16_t nb_queues;
1730 };
1731 
1736 #define RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID (UINT16_MAX)
1737 
1742  const char *name;
1743  uint16_t domain_id;
1751  uint16_t port_id;
1757  uint16_t rx_domain;
1758 };
1759 
1769  __extension__
1770  uint32_t multi_pools:1;
1771  uint32_t offset_allowed:1;
1772  uint32_t offset_align_log2:4;
1773  uint32_t selective_rx:1;
1774  uint16_t max_nseg;
1775  uint16_t reserved;
1776 };
1777 
1790 };
1791 
1812 };
1813 
1820  struct rte_device *device;
1821  const char *driver_name;
1822  unsigned int if_index;
1824  uint16_t min_mtu;
1825  uint16_t max_mtu;
1826  const uint32_t *dev_flags;
1828  uint32_t min_rx_bufsize;
1835  uint32_t max_rx_bufsize;
1836  uint32_t max_rx_pktlen;
1839  uint16_t max_rx_queues;
1840  uint16_t max_tx_queues;
1841  uint32_t max_mac_addrs;
1844  uint16_t max_vfs;
1845  uint16_t max_vmdq_pools;
1856  uint16_t reta_size;
1857  uint8_t hash_key_size;
1858  uint32_t rss_algo_capa;
1863  uint16_t vmdq_queue_base;
1864  uint16_t vmdq_queue_num;
1865  uint16_t vmdq_pool_base;
1868  uint32_t speed_capa;
1870  uint16_t nb_rx_queues;
1871  uint16_t nb_tx_queues;
1884  uint64_t dev_capa;
1892 
1893  uint64_t reserved_64s[2];
1894  void *reserved_ptrs[2];
1895 };
1896 
1898 #define RTE_ETH_QUEUE_STATE_STOPPED 0
1899 #define RTE_ETH_QUEUE_STATE_STARTED 1
1900 #define RTE_ETH_QUEUE_STATE_HAIRPIN 2
1907 struct __rte_cache_min_aligned rte_eth_rxq_info {
1908  struct rte_mempool *mp;
1909  struct rte_eth_rxconf conf;
1910  uint8_t scattered_rx;
1911  uint8_t queue_state;
1912  uint16_t nb_desc;
1913  uint16_t rx_buf_size;
1920  uint8_t avail_thresh;
1921 };
1922 
1928  struct rte_eth_txconf conf;
1929  uint16_t nb_desc;
1930  uint8_t queue_state;
1931 };
1932 
1942  struct rte_mbuf **mbuf_ring;
1943  struct rte_mempool *mp;
1944  uint16_t *refill_head;
1945  uint16_t *receive_tail;
1946  uint16_t mbuf_ring_size;
1955 };
1956 
1957 /* Generic Burst mode flag definition, values can be ORed. */
1958 
1964 #define RTE_ETH_BURST_FLAG_PER_QUEUE RTE_BIT64(0)
1965 
1971  uint64_t flags;
1973 #define RTE_ETH_BURST_MODE_INFO_SIZE 1024
1974  char info[RTE_ETH_BURST_MODE_INFO_SIZE];
1975 };
1976 
1978 #define RTE_ETH_XSTATS_NAME_SIZE 64
1979 
1990  uint64_t id;
1991  uint64_t value;
1992 };
1993 
2010 };
2011 
2012 #define RTE_ETH_DCB_NUM_TCS 8
2013 #define RTE_ETH_MAX_VMDQ_POOL 64
2014 
2021  struct {
2022  uint16_t base;
2023  uint16_t nb_queue;
2024  } tc_rxq[RTE_ETH_MAX_VMDQ_POOL][RTE_ETH_DCB_NUM_TCS];
2026  struct {
2027  uint16_t base;
2028  uint16_t nb_queue;
2029  } tc_txq[RTE_ETH_MAX_VMDQ_POOL][RTE_ETH_DCB_NUM_TCS];
2030 };
2031 
2037  uint8_t nb_tcs;
2039  uint8_t tc_bws[RTE_ETH_DCB_NUM_TCS];
2042 };
2043 
2054 };
2055 
2056 /* Translate from FEC mode to FEC capa */
2057 #define RTE_ETH_FEC_MODE_TO_CAPA(x) RTE_BIT32(x)
2058 
2059 /* This macro indicates FEC capa mask */
2060 #define RTE_ETH_FEC_MODE_CAPA_MASK(x) RTE_BIT32(RTE_ETH_FEC_ ## x)
2061 
2062 /* A structure used to get capabilities per link speed */
2063 struct rte_eth_fec_capa {
2064  uint32_t speed;
2065  uint32_t capa;
2066 };
2067 
2068 #define RTE_ETH_ALL RTE_MAX_ETHPORTS
2069 
2070 /* Macros to check for valid port */
2071 #define RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, retval) do { \
2072  if (!rte_eth_dev_is_valid_port(port_id)) { \
2073  RTE_ETHDEV_LOG_LINE(ERR, "Invalid port_id=%u", port_id); \
2074  return retval; \
2075  } \
2076 } while (0)
2077 
2078 #define RTE_ETH_VALID_PORTID_OR_RET(port_id) do { \
2079  if (!rte_eth_dev_is_valid_port(port_id)) { \
2080  RTE_ETHDEV_LOG_LINE(ERR, "Invalid port_id=%u", port_id); \
2081  return; \
2082  } \
2083 } while (0)
2084 
2107 typedef uint16_t (*rte_rx_callback_fn)(uint16_t port_id, uint16_t queue,
2108  struct rte_mbuf *pkts[], uint16_t nb_pkts, uint16_t max_pkts,
2109  void *user_param);
2110 
2131 typedef uint16_t (*rte_tx_callback_fn)(uint16_t port_id, uint16_t queue,
2132  struct rte_mbuf *pkts[], uint16_t nb_pkts, void *user_param);
2133 
2144 };
2145 
2146 struct rte_eth_dev_sriov {
2147  uint8_t active;
2148  uint8_t nb_q_per_pool;
2149  uint16_t def_vmdq_idx;
2150  uint16_t def_pool_q_idx;
2151 };
2152 #define RTE_ETH_DEV_SRIOV(dev) ((dev)->data->sriov)
2153 
2154 #define RTE_ETH_NAME_MAX_LEN RTE_DEV_NAME_MAX_LEN
2155 
2156 #define RTE_ETH_DEV_NO_OWNER 0
2157 
2158 #define RTE_ETH_MAX_OWNER_NAME_LEN 64
2159 
2160 struct rte_eth_dev_owner {
2161  uint64_t id;
2162  char name[RTE_ETH_MAX_OWNER_NAME_LEN];
2163 };
2164 
2170 #define RTE_ETH_DEV_FLOW_OPS_THREAD_SAFE RTE_BIT32(0)
2171 
2172 #define RTE_ETH_DEV_INTR_LSC RTE_BIT32(1)
2173 
2174 #define RTE_ETH_DEV_BONDING_MEMBER RTE_BIT32(2)
2175 
2176 #define RTE_ETH_DEV_INTR_RMV RTE_BIT32(3)
2177 
2178 #define RTE_ETH_DEV_REPRESENTOR RTE_BIT32(4)
2179 
2180 #define RTE_ETH_DEV_NOLIVE_MAC_ADDR RTE_BIT32(5)
2181 
2185 #define RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS RTE_BIT32(6)
2186 
2199 uint64_t rte_eth_find_next_owned_by(uint16_t port_id,
2200  const uint64_t owner_id);
2201 
2205 #define RTE_ETH_FOREACH_DEV_OWNED_BY(p, o) \
2206  for (p = rte_eth_find_next_owned_by(0, o); \
2207  (unsigned int)p < (unsigned int)RTE_MAX_ETHPORTS; \
2208  p = rte_eth_find_next_owned_by(p + 1, o))
2209 
2218 uint16_t rte_eth_find_next(uint16_t port_id);
2219 
2223 #define RTE_ETH_FOREACH_DEV(p) \
2224  RTE_ETH_FOREACH_DEV_OWNED_BY(p, RTE_ETH_DEV_NO_OWNER)
2225 
2237 uint16_t
2238 rte_eth_find_next_of(uint16_t port_id_start,
2239  const struct rte_device *parent);
2240 
2249 #define RTE_ETH_FOREACH_DEV_OF(port_id, parent) \
2250  for (port_id = rte_eth_find_next_of(0, parent); \
2251  port_id < RTE_MAX_ETHPORTS; \
2252  port_id = rte_eth_find_next_of(port_id + 1, parent))
2253 
2265 uint16_t
2266 rte_eth_find_next_sibling(uint16_t port_id_start, uint16_t ref_port_id);
2267 
2278 #define RTE_ETH_FOREACH_DEV_SIBLING(port_id, ref_port_id) \
2279  for (port_id = rte_eth_find_next_sibling(0, ref_port_id); \
2280  port_id < RTE_MAX_ETHPORTS; \
2281  port_id = rte_eth_find_next_sibling(port_id + 1, ref_port_id))
2282 
2293 int rte_eth_dev_owner_new(uint64_t *owner_id);
2294 
2305 int rte_eth_dev_owner_set(const uint16_t port_id,
2306  const struct rte_eth_dev_owner *owner);
2307 
2318 int rte_eth_dev_owner_unset(const uint16_t port_id,
2319  const uint64_t owner_id);
2320 
2329 int rte_eth_dev_owner_delete(const uint64_t owner_id);
2330 
2341 int rte_eth_dev_owner_get(const uint16_t port_id,
2342  struct rte_eth_dev_owner *owner);
2343 
2354 uint16_t rte_eth_dev_count_avail(void);
2355 
2364 uint16_t rte_eth_dev_count_total(void);
2365 
2377 uint32_t rte_eth_speed_bitflag(uint32_t speed, int duplex);
2378 
2387 const char *rte_eth_dev_rx_offload_name(uint64_t offload);
2388 
2397 const char *rte_eth_dev_tx_offload_name(uint64_t offload);
2398 
2410 __rte_experimental
2411 const char *rte_eth_dev_capability_name(uint64_t capability);
2412 
2452 int rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_queue,
2453  uint16_t nb_tx_queue, const struct rte_eth_conf *eth_conf);
2454 
2463 int
2464 rte_eth_dev_is_removed(uint16_t port_id);
2465 
2528 int rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
2529  uint16_t nb_rx_desc, unsigned int socket_id,
2530  const struct rte_eth_rxconf *rx_conf,
2531  struct rte_mempool *mb_pool);
2532 
2560 __rte_experimental
2562  (uint16_t port_id, uint16_t rx_queue_id, uint16_t nb_rx_desc,
2563  const struct rte_eth_hairpin_conf *conf);
2564 
2613 int rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
2614  uint16_t nb_tx_desc, unsigned int socket_id,
2615  const struct rte_eth_txconf *tx_conf);
2616 
2642 __rte_experimental
2644  (uint16_t port_id, uint16_t tx_queue_id, uint16_t nb_tx_desc,
2645  const struct rte_eth_hairpin_conf *conf);
2646 
2673 __rte_experimental
2674 int rte_eth_hairpin_get_peer_ports(uint16_t port_id, uint16_t *peer_ports,
2675  size_t len, uint32_t direction);
2676 
2699 __rte_experimental
2700 int rte_eth_hairpin_bind(uint16_t tx_port, uint16_t rx_port);
2701 
2726 __rte_experimental
2727 int rte_eth_hairpin_unbind(uint16_t tx_port, uint16_t rx_port);
2728 
2744 __rte_experimental
2745 int rte_eth_dev_count_aggr_ports(uint16_t port_id);
2746 
2774 __rte_experimental
2775 int rte_eth_dev_map_aggr_tx_affinity(uint16_t port_id, uint16_t tx_queue_id,
2776  uint8_t affinity);
2777 
2790 int rte_eth_dev_socket_id(uint16_t port_id);
2791 
2801 int rte_eth_dev_is_valid_port(uint16_t port_id);
2802 
2819 __rte_experimental
2820 int rte_eth_rx_queue_is_valid(uint16_t port_id, uint16_t queue_id);
2821 
2838 __rte_experimental
2839 int rte_eth_tx_queue_is_valid(uint16_t port_id, uint16_t queue_id);
2840 
2858 int rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t rx_queue_id);
2859 
2876 int rte_eth_dev_rx_queue_stop(uint16_t port_id, uint16_t rx_queue_id);
2877 
2895 int rte_eth_dev_tx_queue_start(uint16_t port_id, uint16_t tx_queue_id);
2896 
2913 int rte_eth_dev_tx_queue_stop(uint16_t port_id, uint16_t tx_queue_id);
2914 
2938 int rte_eth_dev_start(uint16_t port_id);
2939 
2953 int rte_eth_dev_stop(uint16_t port_id);
2954 
2967 int rte_eth_dev_set_link_up(uint16_t port_id);
2968 
2978 int rte_eth_dev_set_link_down(uint16_t port_id);
2979 
2990 int rte_eth_dev_close(uint16_t port_id);
2991 
3029 int rte_eth_dev_reset(uint16_t port_id);
3030 
3042 int rte_eth_promiscuous_enable(uint16_t port_id);
3043 
3055 int rte_eth_promiscuous_disable(uint16_t port_id);
3056 
3067 int rte_eth_promiscuous_get(uint16_t port_id);
3068 
3080 int rte_eth_allmulticast_enable(uint16_t port_id);
3081 
3093 int rte_eth_allmulticast_disable(uint16_t port_id);
3094 
3105 int rte_eth_allmulticast_get(uint16_t port_id);
3106 
3124 int rte_eth_link_get(uint16_t port_id, struct rte_eth_link *link)
3126 
3141 int rte_eth_link_get_nowait(uint16_t port_id, struct rte_eth_link *link)
3143 
3157 __rte_experimental
3158 const char *rte_eth_link_speed_to_str(uint32_t link_speed);
3159 
3171 __rte_experimental
3172 const char *rte_eth_link_connector_to_str(enum rte_eth_link_connector link_connector);
3173 
3192 __rte_experimental
3193 int rte_eth_link_to_str(char *str, size_t len,
3194  const struct rte_eth_link *eth_link);
3195 
3216 __rte_experimental
3217 int rte_eth_speed_lanes_get(uint16_t port_id, uint32_t *lanes);
3218 
3240 __rte_experimental
3241 int rte_eth_speed_lanes_set(uint16_t port_id, uint32_t speed_lanes);
3242 
3265 __rte_experimental
3266 int rte_eth_speed_lanes_get_capability(uint16_t port_id,
3267  struct rte_eth_speed_lanes_capa *speed_lanes_capa,
3268  unsigned int num);
3269 
3287 int rte_eth_stats_get(uint16_t port_id, struct rte_eth_stats *stats);
3288 
3300 int rte_eth_stats_reset(uint16_t port_id);
3301 
3331 int rte_eth_xstats_get_names(uint16_t port_id,
3332  struct rte_eth_xstat_name *xstats_names,
3333  unsigned int size);
3334 
3368 int rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats,
3369  unsigned int n);
3370 
3395 int
3396 rte_eth_xstats_get_names_by_id(uint16_t port_id,
3397  struct rte_eth_xstat_name *xstats_names, unsigned int size,
3398  uint64_t *ids);
3399 
3424 int rte_eth_xstats_get_by_id(uint16_t port_id, const uint64_t *ids,
3425  uint64_t *values, unsigned int size);
3426 
3446 int rte_eth_xstats_get_id_by_name(uint16_t port_id, const char *xstat_name,
3447  uint64_t *id);
3448 
3463 __rte_experimental
3464 int rte_eth_xstats_set_counter(uint16_t port_id, uint64_t id, int on_off);
3465 
3477 __rte_experimental
3478 int rte_eth_xstats_query_state(uint16_t port_id, uint64_t id);
3479 
3492 int rte_eth_xstats_reset(uint16_t port_id);
3493 
3512 __rte_deprecated
3513 int rte_eth_dev_set_tx_queue_stats_mapping(uint16_t port_id,
3514  uint16_t tx_queue_id, uint8_t stat_idx);
3515 
3534 __rte_deprecated
3535 int rte_eth_dev_set_rx_queue_stats_mapping(uint16_t port_id,
3536  uint16_t rx_queue_id,
3537  uint8_t stat_idx);
3538 
3552 int rte_eth_macaddr_get(uint16_t port_id, struct rte_ether_addr *mac_addr);
3553 
3574 __rte_experimental
3575 int rte_eth_macaddrs_get(uint16_t port_id, struct rte_ether_addr *ma,
3576  unsigned int num);
3577 
3597 int rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info)
3599 
3615 __rte_experimental
3616 int rte_eth_dev_conf_get(uint16_t port_id, struct rte_eth_conf *dev_conf)
3618 
3639 int rte_eth_dev_fw_version_get(uint16_t port_id, char *fw_version, size_t fw_size)
3641 
3681 int rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
3682  uint32_t *ptypes, int num)
3684 
3715 int rte_eth_dev_set_ptypes(uint16_t port_id, uint32_t ptype_mask,
3716  uint32_t *set_ptypes, unsigned int num);
3717 
3730 int rte_eth_dev_get_mtu(uint16_t port_id, uint16_t *mtu);
3731 
3749 int rte_eth_dev_set_mtu(uint16_t port_id, uint16_t mtu);
3750 
3770 int rte_eth_dev_vlan_filter(uint16_t port_id, uint16_t vlan_id, int on);
3771 
3790 int rte_eth_dev_set_vlan_strip_on_queue(uint16_t port_id, uint16_t rx_queue_id,
3791  int on);
3792 
3809 int rte_eth_dev_set_vlan_ether_type(uint16_t port_id,
3810  enum rte_vlan_type vlan_type,
3811  uint16_t tag_type);
3812 
3830 int rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask);
3831 
3845 int rte_eth_dev_get_vlan_offload(uint16_t port_id);
3846 
3861 int rte_eth_dev_set_vlan_pvid(uint16_t port_id, uint16_t pvid, int on);
3862 
3888 __rte_experimental
3889 int rte_eth_rx_avail_thresh_set(uint16_t port_id, uint16_t queue_id,
3890  uint8_t avail_thresh);
3891 
3918 __rte_experimental
3919 int rte_eth_rx_avail_thresh_query(uint16_t port_id, uint16_t *queue_id,
3920  uint8_t *avail_thresh);
3921 
3922 typedef void (*buffer_tx_error_fn)(struct rte_mbuf **unsent, uint16_t count,
3923  void *userdata);
3924 
3930  buffer_tx_error_fn error_callback;
3931  void *error_userdata;
3932  uint16_t size;
3933  uint16_t length;
3935  struct rte_mbuf *pkts[];
3936 };
3937 
3944 #define RTE_ETH_TX_BUFFER_SIZE(sz) \
3945  (sizeof(struct rte_eth_dev_tx_buffer) + (sz) * sizeof(struct rte_mbuf *))
3946 
3957 int
3958 rte_eth_tx_buffer_init(struct rte_eth_dev_tx_buffer *buffer, uint16_t size);
3959 
3984 int
3986  buffer_tx_error_fn callback, void *userdata);
3987 
4010 void
4011 rte_eth_tx_buffer_drop_callback(struct rte_mbuf **pkts, uint16_t unsent,
4012  void *userdata);
4013 
4037 void
4038 rte_eth_tx_buffer_count_callback(struct rte_mbuf **pkts, uint16_t unsent,
4039  void *userdata);
4040 
4066 int
4067 rte_eth_tx_done_cleanup(uint16_t port_id, uint16_t queue_id, uint32_t free_cnt);
4068 
4101 };
4102 
4122 };
4123 
4142  uint64_t metadata;
4143 };
4144 
4182 };
4183 
4208  uint64_t metadata;
4209 };
4210 
4293 };
4294 
4308 typedef int (*rte_eth_dev_cb_fn)(uint16_t port_id,
4309  enum rte_eth_event_type event, void *cb_arg, void *ret_param);
4310 
4328 int rte_eth_dev_callback_register(uint16_t port_id,
4329  enum rte_eth_event_type event,
4330  rte_eth_dev_cb_fn cb_fn, void *cb_arg);
4331 
4350 int rte_eth_dev_callback_unregister(uint16_t port_id,
4351  enum rte_eth_event_type event,
4352  rte_eth_dev_cb_fn cb_fn, void *cb_arg);
4353 
4375 int rte_eth_dev_rx_intr_enable(uint16_t port_id, uint16_t queue_id);
4376 
4397 int rte_eth_dev_rx_intr_disable(uint16_t port_id, uint16_t queue_id);
4398 
4416 int rte_eth_dev_rx_intr_ctl(uint16_t port_id, int epfd, int op, void *data);
4417 
4439 int rte_eth_dev_rx_intr_ctl_q(uint16_t port_id, uint16_t queue_id,
4440  int epfd, int op, void *data);
4441 
4456 int
4457 rte_eth_dev_rx_intr_ctl_q_get_fd(uint16_t port_id, uint16_t queue_id);
4458 
4472 int rte_eth_led_on(uint16_t port_id);
4473 
4487 int rte_eth_led_off(uint16_t port_id);
4488 
4517 __rte_experimental
4518 int rte_eth_fec_get_capability(uint16_t port_id,
4519  struct rte_eth_fec_capa *speed_fec_capa,
4520  unsigned int num);
4521 
4542 __rte_experimental
4543 int rte_eth_fec_get(uint16_t port_id, uint32_t *fec_capa);
4544 
4568 __rte_experimental
4569 int rte_eth_fec_set(uint16_t port_id, uint32_t fec_capa);
4570 
4585 int rte_eth_dev_flow_ctrl_get(uint16_t port_id,
4586  struct rte_eth_fc_conf *fc_conf);
4587 
4602 int rte_eth_dev_flow_ctrl_set(uint16_t port_id,
4603  struct rte_eth_fc_conf *fc_conf);
4604 
4620 int rte_eth_dev_priority_flow_ctrl_set(uint16_t port_id,
4621  struct rte_eth_pfc_conf *pfc_conf);
4622 
4641 int rte_eth_dev_mac_addr_add(uint16_t port_id, struct rte_ether_addr *mac_addr,
4642  uint32_t pool);
4643 
4661 __rte_experimental
4663  struct rte_eth_pfc_queue_info *pfc_queue_info);
4664 
4688 __rte_experimental
4690  struct rte_eth_pfc_queue_conf *pfc_queue_conf);
4691 
4706 int rte_eth_dev_mac_addr_remove(uint16_t port_id,
4707  struct rte_ether_addr *mac_addr);
4708 
4726 int rte_eth_dev_default_mac_addr_set(uint16_t port_id,
4727  struct rte_ether_addr *mac_addr);
4728 
4746 int rte_eth_dev_rss_reta_update(uint16_t port_id,
4747  struct rte_eth_rss_reta_entry64 *reta_conf,
4748  uint16_t reta_size);
4749 
4768 int rte_eth_dev_rss_reta_query(uint16_t port_id,
4769  struct rte_eth_rss_reta_entry64 *reta_conf,
4770  uint16_t reta_size);
4771 
4791 int rte_eth_dev_uc_hash_table_set(uint16_t port_id, struct rte_ether_addr *addr,
4792  uint8_t on);
4793 
4812 int rte_eth_dev_uc_all_hash_table_set(uint16_t port_id, uint8_t on);
4813 
4830 int rte_eth_set_queue_rate_limit(uint16_t port_id, uint16_t queue_idx,
4831  uint32_t tx_rate);
4832 
4853 __rte_experimental
4854 int rte_eth_get_queue_rate_limit(uint16_t port_id, uint16_t queue_idx,
4855  uint32_t *tx_rate);
4856 
4871 int rte_eth_dev_rss_hash_update(uint16_t port_id,
4872  struct rte_eth_rss_conf *rss_conf);
4873 
4889 int
4890 rte_eth_dev_rss_hash_conf_get(uint16_t port_id,
4891  struct rte_eth_rss_conf *rss_conf);
4892 
4905 __rte_experimental
4906 const char *
4908 
4925 __rte_experimental
4926 int
4927 rte_eth_find_rss_algo(const char *name, uint32_t *algo);
4928 
4953 int
4954 rte_eth_dev_udp_tunnel_port_add(uint16_t port_id,
4955  struct rte_eth_udp_tunnel *tunnel_udp);
4956 
4976 int
4977 rte_eth_dev_udp_tunnel_port_delete(uint16_t port_id,
4978  struct rte_eth_udp_tunnel *tunnel_udp);
4979 
4994 int rte_eth_dev_get_dcb_info(uint16_t port_id,
4995  struct rte_eth_dcb_info *dcb_info);
4996 
4997 struct rte_eth_rxtx_callback;
4998 
5024 const struct rte_eth_rxtx_callback *
5025 rte_eth_add_rx_callback(uint16_t port_id, uint16_t queue_id,
5026  rte_rx_callback_fn fn, void *user_param);
5027 
5054 const struct rte_eth_rxtx_callback *
5055 rte_eth_add_first_rx_callback(uint16_t port_id, uint16_t queue_id,
5056  rte_rx_callback_fn fn, void *user_param);
5057 
5083 const struct rte_eth_rxtx_callback *
5084 rte_eth_add_tx_callback(uint16_t port_id, uint16_t queue_id,
5085  rte_tx_callback_fn fn, void *user_param);
5086 
5120 int rte_eth_remove_rx_callback(uint16_t port_id, uint16_t queue_id,
5121  const struct rte_eth_rxtx_callback *user_cb);
5122 
5156 int rte_eth_remove_tx_callback(uint16_t port_id, uint16_t queue_id,
5157  const struct rte_eth_rxtx_callback *user_cb);
5158 
5178 int rte_eth_rx_queue_info_get(uint16_t port_id, uint16_t queue_id,
5179  struct rte_eth_rxq_info *qinfo);
5180 
5200 int rte_eth_tx_queue_info_get(uint16_t port_id, uint16_t queue_id,
5201  struct rte_eth_txq_info *qinfo);
5202 
5223 __rte_experimental
5224 int rte_eth_recycle_rx_queue_info_get(uint16_t port_id,
5225  uint16_t queue_id,
5226  struct rte_eth_recycle_rxq_info *recycle_rxq_info);
5227 
5246 int rte_eth_rx_burst_mode_get(uint16_t port_id, uint16_t queue_id,
5247  struct rte_eth_burst_mode *mode);
5248 
5267 int rte_eth_tx_burst_mode_get(uint16_t port_id, uint16_t queue_id,
5268  struct rte_eth_burst_mode *mode);
5269 
5290 __rte_experimental
5291 int rte_eth_get_monitor_addr(uint16_t port_id, uint16_t queue_id,
5292  struct rte_power_monitor_cond *pmc);
5293 
5320 __rte_experimental
5321 int rte_eth_dev_get_reg_info_ext(uint16_t port_id, struct rte_dev_reg_info *info);
5322 
5341 int rte_eth_dev_get_reg_info(uint16_t port_id, struct rte_dev_reg_info *info)
5343 
5356 int rte_eth_dev_get_eeprom_length(uint16_t port_id);
5357 
5374 int rte_eth_dev_get_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info);
5375 
5392 int rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info);
5393 
5412 __rte_experimental
5413 int
5414 rte_eth_dev_get_module_info(uint16_t port_id, struct rte_eth_dev_module_info *modinfo)
5416 
5436 __rte_experimental
5437 int
5438 rte_eth_dev_get_module_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)
5440 
5460 int rte_eth_dev_set_mc_addr_list(uint16_t port_id,
5461  struct rte_ether_addr *mc_addr_set,
5462  uint32_t nb_mc_addr);
5463 
5476 int rte_eth_timesync_enable(uint16_t port_id);
5477 
5490 int rte_eth_timesync_disable(uint16_t port_id);
5491 
5510 int rte_eth_timesync_read_rx_timestamp(uint16_t port_id,
5511  struct timespec *timestamp, uint32_t flags);
5512 
5528 int rte_eth_timesync_read_tx_timestamp(uint16_t port_id,
5529  struct timespec *timestamp);
5530 
5548 int rte_eth_timesync_adjust_time(uint16_t port_id, int64_t delta);
5549 
5590 __rte_experimental
5591 int rte_eth_timesync_adjust_freq(uint16_t port_id, int64_t ppm);
5592 
5608 int rte_eth_timesync_read_time(uint16_t port_id, struct timespec *time);
5609 
5628 int rte_eth_timesync_write_time(uint16_t port_id, const struct timespec *time);
5629 
5675 __rte_experimental
5676 int
5677 rte_eth_read_clock(uint16_t port_id, uint64_t *clock);
5678 
5694 int
5695 rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id);
5696 
5713 int
5714 rte_eth_dev_get_name_by_port(uint16_t port_id, char *name);
5715 
5732 int rte_eth_dev_adjust_nb_rx_tx_desc(uint16_t port_id,
5733  uint16_t *nb_rx_desc,
5734  uint16_t *nb_tx_desc);
5735 
5750 int
5751 rte_eth_dev_pool_ops_supported(uint16_t port_id, const char *pool);
5752 
5762 void *
5763 rte_eth_dev_get_sec_ctx(uint16_t port_id);
5764 
5780 __rte_experimental
5781 int rte_eth_dev_hairpin_capability_get(uint16_t port_id,
5782  struct rte_eth_hairpin_cap *cap);
5783 
5793  int pf;
5794  __extension__
5795  union {
5796  int vf;
5797  int sf;
5798  };
5799  uint32_t id_base;
5800  uint32_t id_end;
5801  char name[RTE_DEV_NAME_MAX_LEN];
5802 };
5803 
5811  uint16_t controller;
5812  uint16_t pf;
5813  uint32_t nb_ranges_alloc;
5814  uint32_t nb_ranges;
5815  struct rte_eth_representor_range ranges[];
5816 };
5817 
5841 __rte_experimental
5842 int rte_eth_representor_info_get(uint16_t port_id,
5843  struct rte_eth_representor_info *info);
5844 
5846 #define RTE_ETH_RX_METADATA_USER_FLAG RTE_BIT64(0)
5847 
5849 #define RTE_ETH_RX_METADATA_USER_MARK RTE_BIT64(1)
5850 
5852 #define RTE_ETH_RX_METADATA_TUNNEL_ID RTE_BIT64(2)
5853 
5893 int rte_eth_rx_metadata_negotiate(uint16_t port_id, uint64_t *features);
5894 
5896 #define RTE_ETH_DEV_REASSEMBLY_F_IPV4 (RTE_BIT32(0))
5897 
5898 #define RTE_ETH_DEV_REASSEMBLY_F_IPV6 (RTE_BIT32(1))
5899 
5910  uint32_t timeout_ms;
5912  uint16_t max_frags;
5917  uint16_t flags;
5918 };
5919 
5940 __rte_experimental
5941 int rte_eth_ip_reassembly_capability_get(uint16_t port_id,
5942  struct rte_eth_ip_reassembly_params *capa);
5943 
5965 __rte_experimental
5966 int rte_eth_ip_reassembly_conf_get(uint16_t port_id,
5967  struct rte_eth_ip_reassembly_params *conf);
5968 
5998 __rte_experimental
5999 int rte_eth_ip_reassembly_conf_set(uint16_t port_id,
6000  const struct rte_eth_ip_reassembly_params *conf);
6001 
6009 typedef struct {
6016  uint16_t time_spent;
6018  uint16_t nb_frags;
6020 
6039 __rte_experimental
6040 int rte_eth_dev_priv_dump(uint16_t port_id, FILE *file);
6041 
6065 __rte_experimental
6066 int rte_eth_rx_descriptor_dump(uint16_t port_id, uint16_t queue_id,
6067  uint16_t offset, uint16_t num, FILE *file);
6068 
6092 __rte_experimental
6093 int rte_eth_tx_descriptor_dump(uint16_t port_id, uint16_t queue_id,
6094  uint16_t offset, uint16_t num, FILE *file);
6095 
6096 
6097 /* Congestion management */
6098 
6108 };
6109 
6126  uint64_t objs_supported;
6131  uint8_t rsvd[8];
6132 };
6133 
6144  enum rte_cman_mode mode;
6145  union {
6152  uint16_t rx_queue;
6159  uint8_t rsvd_obj_params[4];
6160  } obj_param;
6161  union {
6174  uint8_t rsvd_mode_params[4];
6175  } mode_param;
6176 };
6177 
6195 __rte_experimental
6196 int rte_eth_cman_info_get(uint16_t port_id, struct rte_eth_cman_info *info);
6197 
6215 __rte_experimental
6216 int rte_eth_cman_config_init(uint16_t port_id, struct rte_eth_cman_config *config);
6217 
6234 __rte_experimental
6235 int rte_eth_cman_config_set(uint16_t port_id, const struct rte_eth_cman_config *config);
6236 
6257 __rte_experimental
6258 int rte_eth_cman_config_get(uint16_t port_id, struct rte_eth_cman_config *config);
6259 
6260 #ifdef __cplusplus
6261 }
6262 #endif
6263 
6264 #include <rte_ethdev_core.h>
6265 
6266 #ifdef __cplusplus
6267 extern "C" {
6268 #endif
6269 
6293 uint16_t rte_eth_call_rx_callbacks(uint16_t port_id, uint16_t queue_id,
6294  struct rte_mbuf **rx_pkts, uint16_t nb_rx, uint16_t nb_pkts,
6295  void *opaque);
6296 
6384 static inline uint16_t
6385 rte_eth_rx_burst(uint16_t port_id, uint16_t queue_id,
6386  struct rte_mbuf **rx_pkts, const uint16_t nb_pkts)
6387 {
6388  uint16_t nb_rx;
6389  struct rte_eth_fp_ops *p;
6390  void *qd;
6391 
6392 #ifdef RTE_ETHDEV_DEBUG_RX
6393  if (port_id >= RTE_MAX_ETHPORTS ||
6394  queue_id >= RTE_MAX_QUEUES_PER_PORT) {
6395  RTE_ETHDEV_LOG_LINE(ERR,
6396  "Invalid port_id=%u or queue_id=%u",
6397  port_id, queue_id);
6398  return 0;
6399  }
6400 #endif
6401 
6402  /* fetch pointer to queue data */
6403  p = &rte_eth_fp_ops[port_id];
6404  qd = p->rxq.data[queue_id];
6405 
6406 #ifdef RTE_ETHDEV_DEBUG_RX
6407  RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0);
6408 
6409  if (qd == NULL) {
6410  RTE_ETHDEV_LOG_LINE(ERR, "Invalid Rx queue_id=%u for port_id=%u",
6411  queue_id, port_id);
6412  return 0;
6413  }
6414 #endif
6415 
6416  nb_rx = p->rx_pkt_burst(qd, rx_pkts, nb_pkts);
6417 
6419 
6420 #ifdef RTE_ETHDEV_RXTX_CALLBACKS
6421  {
6422  void *cb;
6423 
6424  /* rte_memory_order_release memory order was used when the
6425  * call back was inserted into the list.
6426  * Since there is a clear dependency between loading
6427  * cb and cb->fn/cb->next, rte_memory_order_acquire memory order is
6428  * not required.
6429  */
6430  cb = rte_atomic_load_explicit(&p->rxq.clbk[queue_id],
6431  rte_memory_order_relaxed);
6432  if (unlikely(cb != NULL))
6433  nb_rx = rte_eth_call_rx_callbacks(port_id, queue_id,
6434  rx_pkts, nb_rx, nb_pkts, cb);
6435  }
6436 #endif
6437 
6438  if (unlikely(nb_rx))
6439  rte_ethdev_trace_rx_burst_nonempty(port_id, queue_id, (void **)rx_pkts, nb_rx);
6440  else
6441  rte_ethdev_trace_rx_burst_empty(port_id, queue_id, (void **)rx_pkts);
6442  return nb_rx;
6443 }
6444 
6462 static inline int
6463 rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)
6464 {
6465  struct rte_eth_fp_ops *p;
6466  void *qd;
6467 
6468 #ifdef RTE_ETHDEV_DEBUG_RX
6469  if (port_id >= RTE_MAX_ETHPORTS ||
6470  queue_id >= RTE_MAX_QUEUES_PER_PORT) {
6471  RTE_ETHDEV_LOG_LINE(ERR,
6472  "Invalid port_id=%u or queue_id=%u",
6473  port_id, queue_id);
6474  return -EINVAL;
6475  }
6476 #endif
6477 
6478  /* fetch pointer to queue data */
6479  p = &rte_eth_fp_ops[port_id];
6480  qd = p->rxq.data[queue_id];
6481 
6482 #ifdef RTE_ETHDEV_DEBUG_RX
6483  RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
6484  if (qd == NULL)
6485  return -EINVAL;
6486 #endif
6487 
6488  return p->rx_queue_count(qd);
6489 }
6490 
6494 #define RTE_ETH_RX_DESC_AVAIL 0
6495 #define RTE_ETH_RX_DESC_DONE 1
6496 #define RTE_ETH_RX_DESC_UNAVAIL 2
6532 static inline int
6533 rte_eth_rx_descriptor_status(uint16_t port_id, uint16_t queue_id,
6534  uint16_t offset)
6535 {
6536  struct rte_eth_fp_ops *p;
6537  void *qd;
6538 
6539 #ifdef RTE_ETHDEV_DEBUG_RX
6540  if (port_id >= RTE_MAX_ETHPORTS ||
6541  queue_id >= RTE_MAX_QUEUES_PER_PORT) {
6542  RTE_ETHDEV_LOG_LINE(ERR,
6543  "Invalid port_id=%u or queue_id=%u",
6544  port_id, queue_id);
6545  return -EINVAL;
6546  }
6547 #endif
6548 
6549  /* fetch pointer to queue data */
6550  p = &rte_eth_fp_ops[port_id];
6551  qd = p->rxq.data[queue_id];
6552 
6553 #ifdef RTE_ETHDEV_DEBUG_RX
6554  RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
6555  if (qd == NULL)
6556  return -ENODEV;
6557 #endif
6558  return p->rx_descriptor_status(qd, offset);
6559 }
6560 
6564 #define RTE_ETH_TX_DESC_FULL 0
6565 #define RTE_ETH_TX_DESC_DONE 1
6566 #define RTE_ETH_TX_DESC_UNAVAIL 2
6602 static inline int rte_eth_tx_descriptor_status(uint16_t port_id,
6603  uint16_t queue_id, uint16_t offset)
6604 {
6605  struct rte_eth_fp_ops *p;
6606  void *qd;
6607 
6608 #ifdef RTE_ETHDEV_DEBUG_TX
6609  if (port_id >= RTE_MAX_ETHPORTS ||
6610  queue_id >= RTE_MAX_QUEUES_PER_PORT) {
6611  RTE_ETHDEV_LOG_LINE(ERR,
6612  "Invalid port_id=%u or queue_id=%u",
6613  port_id, queue_id);
6614  return -EINVAL;
6615  }
6616 #endif
6617 
6618  /* fetch pointer to queue data */
6619  p = &rte_eth_fp_ops[port_id];
6620  qd = p->txq.data[queue_id];
6621 
6622 #ifdef RTE_ETHDEV_DEBUG_TX
6623  RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
6624  if (qd == NULL)
6625  return -ENODEV;
6626 #endif
6627  return p->tx_descriptor_status(qd, offset);
6628 }
6629 
6649 uint16_t rte_eth_call_tx_callbacks(uint16_t port_id, uint16_t queue_id,
6650  struct rte_mbuf **tx_pkts, uint16_t nb_pkts, void *opaque);
6651 
6723 static inline uint16_t
6724 rte_eth_tx_burst(uint16_t port_id, uint16_t queue_id,
6725  struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
6726 {
6727  struct rte_eth_fp_ops *p;
6728  void *qd;
6729 
6730 #ifdef RTE_ETHDEV_DEBUG_TX
6731  if (port_id >= RTE_MAX_ETHPORTS ||
6732  queue_id >= RTE_MAX_QUEUES_PER_PORT) {
6733  RTE_ETHDEV_LOG_LINE(ERR,
6734  "Invalid port_id=%u or queue_id=%u",
6735  port_id, queue_id);
6736  return 0;
6737  }
6738 #endif
6739 
6740  /* fetch pointer to queue data */
6741  p = &rte_eth_fp_ops[port_id];
6742  qd = p->txq.data[queue_id];
6743 
6744 #ifdef RTE_ETHDEV_DEBUG_TX
6745  RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0);
6746 
6747  if (qd == NULL) {
6748  RTE_ETHDEV_LOG_LINE(ERR, "Invalid Tx queue_id=%u for port_id=%u",
6749  queue_id, port_id);
6750  return 0;
6751  }
6752 #endif
6753 
6754 #ifdef RTE_ETHDEV_RXTX_CALLBACKS
6755  {
6756  void *cb;
6757 
6758  /* rte_memory_order_release memory order was used when the
6759  * call back was inserted into the list.
6760  * Since there is a clear dependency between loading
6761  * cb and cb->fn/cb->next, rte_memory_order_acquire memory order is
6762  * not required.
6763  */
6764  cb = rte_atomic_load_explicit(&p->txq.clbk[queue_id],
6765  rte_memory_order_relaxed);
6766  if (unlikely(cb != NULL))
6767  nb_pkts = rte_eth_call_tx_callbacks(port_id, queue_id,
6768  tx_pkts, nb_pkts, cb);
6769  }
6770 #endif
6771 
6772  uint16_t requested_pkts = nb_pkts;
6774 
6775  nb_pkts = p->tx_pkt_burst(qd, tx_pkts, nb_pkts);
6776 
6777  if (requested_pkts > nb_pkts)
6778  rte_mbuf_history_mark_bulk(tx_pkts + nb_pkts,
6779  requested_pkts - nb_pkts, RTE_MBUF_HISTORY_OP_TX_BUSY);
6780 
6781  rte_ethdev_trace_tx_burst(port_id, queue_id, (void **)tx_pkts, nb_pkts);
6782  return nb_pkts;
6783 }
6784 
6838 #ifndef RTE_ETHDEV_TX_PREPARE_NOOP
6839 
6840 static inline uint16_t
6841 rte_eth_tx_prepare(uint16_t port_id, uint16_t queue_id,
6842  struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
6843 {
6844  struct rte_eth_fp_ops *p;
6845  void *qd;
6846 
6847 #ifdef RTE_ETHDEV_DEBUG_TX
6848  if (port_id >= RTE_MAX_ETHPORTS ||
6849  queue_id >= RTE_MAX_QUEUES_PER_PORT) {
6850  RTE_ETHDEV_LOG_LINE(ERR,
6851  "Invalid port_id=%u or queue_id=%u",
6852  port_id, queue_id);
6853  rte_errno = ENODEV;
6854  return 0;
6855  }
6856 #endif
6857 
6858  /* fetch pointer to queue data */
6859  p = &rte_eth_fp_ops[port_id];
6860  qd = p->txq.data[queue_id];
6861 
6862 #ifdef RTE_ETHDEV_DEBUG_TX
6863  if (!rte_eth_dev_is_valid_port(port_id)) {
6864  RTE_ETHDEV_LOG_LINE(ERR, "Invalid Tx port_id=%u", port_id);
6865  rte_errno = ENODEV;
6866  return 0;
6867  }
6868  if (qd == NULL) {
6869  RTE_ETHDEV_LOG_LINE(ERR, "Invalid Tx queue_id=%u for port_id=%u",
6870  queue_id, port_id);
6871  rte_errno = EINVAL;
6872  return 0;
6873  }
6874 #endif
6875 
6877 
6878  return p->tx_pkt_prepare(qd, tx_pkts, nb_pkts);
6879 }
6880 
6881 #else
6882 
6883 /*
6884  * Native NOOP operation for compilation targets which doesn't require any
6885  * preparations steps, and functional NOOP may introduce unnecessary performance
6886  * drop.
6887  *
6888  * Generally this is not a good idea to turn it on globally and didn't should
6889  * be used if behavior of tx_preparation can change.
6890  */
6891 
6892 static inline uint16_t
6893 rte_eth_tx_prepare(__rte_unused uint16_t port_id,
6894  __rte_unused uint16_t queue_id,
6895  __rte_unused struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
6896 {
6897  return nb_pkts;
6898 }
6899 
6900 #endif
6901 
6924 static inline uint16_t
6925 rte_eth_tx_buffer_flush(uint16_t port_id, uint16_t queue_id,
6926  struct rte_eth_dev_tx_buffer *buffer)
6927 {
6928  uint16_t sent;
6929  uint16_t to_send = buffer->length;
6930 
6931  if (to_send == 0)
6932  return 0;
6933 
6934  sent = rte_eth_tx_burst(port_id, queue_id, buffer->pkts, to_send);
6935 
6936  buffer->length = 0;
6937 
6938  /* All packets sent, or to be dealt with by callback below */
6939  if (unlikely(sent != to_send))
6940  buffer->error_callback(&buffer->pkts[sent],
6941  (uint16_t)(to_send - sent),
6942  buffer->error_userdata);
6943 
6944  return sent;
6945 }
6946 
6977 static __rte_always_inline uint16_t
6978 rte_eth_tx_buffer(uint16_t port_id, uint16_t queue_id,
6979  struct rte_eth_dev_tx_buffer *buffer, struct rte_mbuf *tx_pkt)
6980 {
6981  buffer->pkts[buffer->length++] = tx_pkt;
6982  if (buffer->length < buffer->size)
6983  return 0;
6984 
6985  return rte_eth_tx_buffer_flush(port_id, queue_id, buffer);
6986 }
6987 
7041 __rte_experimental
7042 static inline uint16_t
7043 rte_eth_recycle_mbufs(uint16_t rx_port_id, uint16_t rx_queue_id,
7044  uint16_t tx_port_id, uint16_t tx_queue_id,
7045  struct rte_eth_recycle_rxq_info *recycle_rxq_info)
7046 {
7047  struct rte_eth_fp_ops *p1, *p2;
7048  void *qd1, *qd2;
7049  uint16_t nb_mbufs;
7050 
7051 #ifdef RTE_ETHDEV_DEBUG_TX
7052  if (tx_port_id >= RTE_MAX_ETHPORTS ||
7053  tx_queue_id >= RTE_MAX_QUEUES_PER_PORT) {
7054  RTE_ETHDEV_LOG_LINE(ERR,
7055  "Invalid tx_port_id=%u or tx_queue_id=%u",
7056  tx_port_id, tx_queue_id);
7057  return 0;
7058  }
7059 #endif
7060 
7061  /* fetch pointer to Tx queue data */
7062  p1 = &rte_eth_fp_ops[tx_port_id];
7063  qd1 = p1->txq.data[tx_queue_id];
7064 
7065 #ifdef RTE_ETHDEV_DEBUG_TX
7066  RTE_ETH_VALID_PORTID_OR_ERR_RET(tx_port_id, 0);
7067 
7068  if (qd1 == NULL) {
7069  RTE_ETHDEV_LOG_LINE(ERR, "Invalid Tx queue_id=%u for port_id=%u",
7070  tx_queue_id, tx_port_id);
7071  return 0;
7072  }
7073 #endif
7074 
7075 #ifdef RTE_ETHDEV_DEBUG_RX
7076  if (rx_port_id >= RTE_MAX_ETHPORTS ||
7077  rx_queue_id >= RTE_MAX_QUEUES_PER_PORT) {
7078  RTE_ETHDEV_LOG_LINE(ERR, "Invalid rx_port_id=%u or rx_queue_id=%u",
7079  rx_port_id, rx_queue_id);
7080  return 0;
7081  }
7082 #endif
7083 
7084  /* fetch pointer to Rx queue data */
7085  p2 = &rte_eth_fp_ops[rx_port_id];
7086  qd2 = p2->rxq.data[rx_queue_id];
7087 
7088 #ifdef RTE_ETHDEV_DEBUG_RX
7089  RTE_ETH_VALID_PORTID_OR_ERR_RET(rx_port_id, 0);
7090 
7091  if (qd2 == NULL) {
7092  RTE_ETHDEV_LOG_LINE(ERR, "Invalid Rx queue_id=%u for port_id=%u",
7093  rx_queue_id, rx_port_id);
7094  return 0;
7095  }
7096 #endif
7097 
7098  /* Copy used *rte_mbuf* buffer pointers from Tx mbuf ring
7099  * into Rx mbuf ring.
7100  */
7101  nb_mbufs = p1->recycle_tx_mbufs_reuse(qd1, recycle_rxq_info);
7102 
7103  /* If no recycling mbufs, return 0. */
7104  if (nb_mbufs == 0)
7105  return 0;
7106 
7107  /* Replenish the Rx descriptors with the recycling
7108  * into Rx mbuf ring.
7109  */
7110  p2->recycle_rx_descriptors_refill(qd2, nb_mbufs);
7111 
7112  return nb_mbufs;
7113 }
7114 
7143 __rte_experimental
7144 int rte_eth_buffer_split_get_supported_hdr_ptypes(uint16_t port_id, uint32_t *ptypes, int num)
7146 
7181 __rte_experimental
7182 static inline int
7183 rte_eth_tx_queue_count(uint16_t port_id, uint16_t queue_id)
7184 {
7185  struct rte_eth_fp_ops *fops;
7186  void *qd;
7187  int rc;
7188 
7189 #ifdef RTE_ETHDEV_DEBUG_TX
7190  if (port_id >= RTE_MAX_ETHPORTS || !rte_eth_dev_is_valid_port(port_id)) {
7191  RTE_ETHDEV_LOG_LINE(ERR, "Invalid port_id=%u", port_id);
7192  return -ENODEV;
7193  }
7194 
7195  if (queue_id >= RTE_MAX_QUEUES_PER_PORT) {
7196  RTE_ETHDEV_LOG_LINE(ERR, "Invalid queue_id=%u for port_id=%u",
7197  queue_id, port_id);
7198  return -EINVAL;
7199  }
7200 #endif
7201 
7202  /* Fetch pointer to Tx queue data */
7203  fops = &rte_eth_fp_ops[port_id];
7204  qd = fops->txq.data[queue_id];
7205 
7206 #ifdef RTE_ETHDEV_DEBUG_TX
7207  if (qd == NULL) {
7208  RTE_ETHDEV_LOG_LINE(ERR, "Invalid queue_id=%u for port_id=%u",
7209  queue_id, port_id);
7210  return -EINVAL;
7211  }
7212 #endif
7213  rc = fops->tx_queue_count(qd);
7214  rte_eth_trace_tx_queue_count(port_id, queue_id, rc);
7215  return rc;
7216 }
7217 
7218 #ifdef __cplusplus
7219 }
7220 #endif
7221 
7222 #endif /* _RTE_ETHDEV_H_ */
uint16_t nb_rx_queues
Definition: rte_ethdev.h:1870
int rte_eth_dev_stop(uint16_t port_id)
struct rte_eth_vmdq_dcb_tx_conf vmdq_dcb_tx_conf
Definition: rte_ethdev.h:1578
int rte_eth_dev_priority_flow_ctrl_set(uint16_t port_id, struct rte_eth_pfc_conf *pfc_conf)
int rte_eth_promiscuous_disable(uint16_t port_id)
__extension__ uint32_t multi_pools
Definition: rte_ethdev.h:1770
int rte_eth_rx_burst_mode_get(uint16_t port_id, uint16_t queue_id, struct rte_eth_burst_mode *mode)
__rte_experimental int rte_eth_tx_descriptor_dump(uint16_t port_id, uint16_t queue_id, uint16_t offset, uint16_t num, FILE *file)
struct rte_eth_dev_portconf default_rxportconf
Definition: rte_ethdev.h:1880
__rte_experimental const char * rte_eth_link_connector_to_str(enum rte_eth_link_connector link_connector)
#define __rte_always_inline
Definition: rte_common.h:506
#define RTE_ETH_DCB_NUM_USER_PRIORITIES
Definition: rte_ethdev.h:883
uint16_t tx_rs_thresh
Definition: rte_ethdev.h:1226
uint16_t rte_eth_dev_count_avail(void)
int rte_eth_timesync_write_time(uint16_t port_id, const struct timespec *time)
uint32_t mtu
Definition: rte_ethdev.h:458
uint16_t nb_desc
Definition: rte_ethdev.h:1929
rte_eth_event_macsec_type
Definition: rte_ethdev.h:4107
char info[RTE_ETH_BURST_MODE_INFO_SIZE]
Definition: rte_ethdev.h:1974
uint64_t rx_offload_capa
Definition: rte_ethdev.h:1848
const uint32_t * dev_flags
Definition: rte_ethdev.h:1826
int rte_eth_timesync_read_time(uint16_t port_id, struct timespec *time)
rte_eth_link_connector
Definition: rte_ethdev.h:326
struct rte_eth_rxseg_capa rx_seg_capa
Definition: rte_ethdev.h:1846
__rte_deprecated int rte_eth_dev_set_rx_queue_stats_mapping(uint16_t port_id, uint16_t rx_queue_id, uint8_t stat_idx)
uint64_t rte_eth_find_next_owned_by(uint16_t port_id, const uint64_t owner_id)
__rte_experimental int rte_eth_dev_priv_dump(uint16_t port_id, FILE *file)
int rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_queue, uint16_t nb_tx_queue, const struct rte_eth_conf *eth_conf)
int rte_eth_dev_get_name_by_port(uint16_t port_id, char *name)
static uint16_t rte_eth_tx_prepare(uint16_t port_id, uint16_t queue_id, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
Definition: rte_ethdev.h:6841
struct rte_device * device
Definition: rte_ethdev.h:1820
rte_eth_nb_tcs
Definition: rte_ethdev.h:944
struct rte_eth_vmdq_tx_conf vmdq_tx_conf
Definition: rte_ethdev.h:1582
__rte_experimental int rte_eth_speed_lanes_get(uint16_t port_id, uint32_t *lanes)
const struct rte_eth_rxtx_callback * rte_eth_add_rx_callback(uint16_t port_id, uint16_t queue_id, rte_rx_callback_fn fn, void *user_param)
static __rte_experimental int rte_eth_tx_queue_count(uint16_t port_id, uint16_t queue_id)
Definition: rte_ethdev.h:7183
struct rte_eth_thresh rx_thresh
Definition: rte_ethdev.h:1167
uint16_t rte_eth_find_next(uint16_t port_id)
__rte_experimental int rte_eth_rx_descriptor_dump(uint16_t port_id, uint16_t queue_id, uint16_t offset, uint16_t num, FILE *file)
int rte_eth_dev_set_vlan_pvid(uint16_t port_id, uint16_t pvid, int on)
rte_cman_mode
Definition: rte_cman.h:16
int rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info) __rte_warn_unused_result
int rte_eth_led_off(uint16_t port_id)
int rte_eth_dev_udp_tunnel_port_delete(uint16_t port_id, struct rte_eth_udp_tunnel *tunnel_udp)
static int rte_eth_rx_descriptor_status(uint16_t port_id, uint16_t queue_id, uint16_t offset)
Definition: rte_ethdev.h:6533
uint64_t imissed
Definition: rte_ethdev.h:271
uint32_t low_water
Definition: rte_ethdev.h:1420
__rte_experimental int rte_eth_dev_hairpin_capability_get(uint16_t port_id, struct rte_eth_hairpin_cap *cap)
uint8_t rss_key_len
Definition: rte_ethdev.h:536
uint32_t max_rx_bufsize
Definition: rte_ethdev.h:1835
__rte_experimental int rte_eth_dev_map_aggr_tx_affinity(uint16_t port_id, uint16_t tx_queue_id, uint8_t affinity)
int rte_eth_dev_rss_reta_update(uint16_t port_id, struct rte_eth_rss_reta_entry64 *reta_conf, uint16_t reta_size)
static __rte_experimental uint16_t rte_eth_recycle_mbufs(uint16_t rx_port_id, uint16_t rx_queue_id, uint16_t tx_port_id, uint16_t tx_queue_id, struct rte_eth_recycle_rxq_info *recycle_rxq_info)
Definition: rte_ethdev.h:7043
uint8_t hthresh
Definition: rte_ethdev.h:403
int rte_eth_dev_rss_hash_update(uint16_t port_id, struct rte_eth_rss_conf *rss_conf)
__rte_experimental int rte_eth_fec_set(uint16_t port_id, uint32_t fec_capa)
uint64_t rx_queue_offload_capa
Definition: rte_ethdev.h:1852
int rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats, unsigned int n)
__rte_experimental int rte_eth_read_clock(uint16_t port_id, uint64_t *clock)
__rte_experimental int rte_eth_dev_count_aggr_ports(uint16_t port_id)
int rte_eth_iterator_init(struct rte_dev_iterator *iter, const char *devargs)
uint16_t reta_size
Definition: rte_ethdev.h:1856
int rte_eth_dev_rx_intr_ctl_q(uint16_t port_id, uint16_t queue_id, int epfd, int op, void *data)
int rte_eth_remove_rx_callback(uint16_t port_id, uint16_t queue_id, const struct rte_eth_rxtx_callback *user_cb)
uint32_t lpbk_mode
Definition: rte_ethdev.h:1562
enum rte_eth_tx_mq_mode mq_mode
Definition: rte_ethdev.h:1042
#define rte_errno
Definition: rte_errno.h:29
int rte_eth_link_get(uint16_t port_id, struct rte_eth_link *link) __rte_warn_unused_result
int rte_eth_dev_uc_all_hash_table_set(uint16_t port_id, uint8_t on)
uint32_t link_speeds
Definition: rte_ethdev.h:1553
uint64_t tx_queue_offload_capa
Definition: rte_ethdev.h:1854
rte_eth_tx_mq_mode
Definition: rte_ethdev.h:445
rte_eth_fc_mode
Definition: rte_ethdev.h:1406
uint8_t enable_default_pool
Definition: rte_ethdev.h:996
uint32_t max_hash_mac_addrs
Definition: rte_ethdev.h:1843
uint16_t nb_mtu_seg_max
Definition: rte_ethdev.h:1400
struct rte_mempool * mp
Definition: rte_ethdev.h:1943
int rte_eth_dev_rx_intr_ctl_q_get_fd(uint16_t port_id, uint16_t queue_id)
uint16_t rte_eth_find_next_sibling(uint16_t port_id_start, uint16_t ref_port_id)
#define __rte_unused
Definition: rte_common.h:248
int rte_eth_dev_get_eeprom_length(uint16_t port_id)
uint64_t opackets
Definition: rte_ethdev.h:264
rte_eth_cman_obj
Definition: rte_ethdev.h:6100
struct rte_eth_rss_conf rss_conf
Definition: rte_ethdev.h:1568
uint8_t hash_key_size
Definition: rte_ethdev.h:1857
int rte_eth_dev_close(uint16_t port_id)
struct rte_mempool * mp
Definition: rte_ethdev.h:1134
int rte_eth_dev_rx_intr_enable(uint16_t port_id, uint16_t queue_id)
__rte_experimental int rte_eth_rx_avail_thresh_set(uint16_t port_id, uint16_t queue_id, uint8_t avail_thresh)
int rte_eth_tx_queue_info_get(uint16_t port_id, uint16_t queue_id, struct rte_eth_txq_info *qinfo)
__rte_experimental const char * rte_eth_dev_rss_algo_name(enum rte_eth_hash_function rss_algo)
int rte_eth_dev_owner_get(const uint16_t port_id, struct rte_eth_dev_owner *owner)
struct rte_mempool * mp
Definition: rte_ethdev.h:1908
uint32_t dcb_capability_en
Definition: rte_ethdev.h:1586
__rte_experimental int rte_eth_timesync_adjust_freq(uint16_t port_id, int64_t ppm)
enum rte_eth_hash_function algorithm
Definition: rte_ethdev.h:542
const char * name
Definition: rte_ethdev.h:1742
uint8_t queue_state
Definition: rte_ethdev.h:1930
struct rte_eth_switch_info switch_info
Definition: rte_ethdev.h:1889
int rte_eth_dev_flow_ctrl_get(uint16_t port_id, struct rte_eth_fc_conf *fc_conf)
int rte_eth_dev_callback_unregister(uint16_t port_id, enum rte_eth_event_type event, rte_eth_dev_cb_fn cb_fn, void *cb_arg)
int rte_eth_dev_rx_queue_stop(uint16_t port_id, uint16_t rx_queue_id)
int rte_eth_dev_pool_ops_supported(uint16_t port_id, const char *pool)
int rte_eth_dev_set_link_up(uint16_t port_id)
#define RTE_BIT32(nr)
Definition: rte_bitops.h:44
int rte_eth_timesync_read_rx_timestamp(uint16_t port_id, struct timespec *timestamp, uint32_t flags)
struct rte_eth_thresh tx_thresh
Definition: rte_ethdev.h:1225
struct rte_eth_desc_lim rx_desc_lim
Definition: rte_ethdev.h:1866
__rte_experimental int rte_eth_tx_queue_is_valid(uint16_t port_id, uint16_t queue_id)
int rte_eth_dev_get_vlan_offload(uint16_t port_id)
struct rte_eth_conf::@173 rx_adv_conf
__rte_experimental int rte_eth_speed_lanes_get_capability(uint16_t port_id, struct rte_eth_speed_lanes_capa *speed_lanes_capa, unsigned int num)
int rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id, uint16_t nb_tx_desc, unsigned int socket_id, const struct rte_eth_txconf *tx_conf)
uint16_t vmdq_queue_num
Definition: rte_ethdev.h:1864
int rte_eth_tx_burst_mode_get(uint16_t port_id, uint16_t queue_id, struct rte_eth_burst_mode *mode)
int rte_eth_link_get_nowait(uint16_t port_id, struct rte_eth_link *link) __rte_warn_unused_result
uint16_t share_qid
Definition: rte_ethdev.h:1179
uint8_t rx_deferred_start
Definition: rte_ethdev.h:1170
__rte_experimental int rte_eth_dev_get_reg_info_ext(uint16_t port_id, struct rte_dev_reg_info *info)
struct rte_mbuf * pkts[]
Definition: rte_ethdev.h:3935
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:4308
struct rte_eth_rxmode rxmode
Definition: rte_ethdev.h:1560
uint32_t high_water
Definition: rte_ethdev.h:1419
enum rte_eth_nb_pools nb_queue_pools
Definition: rte_ethdev.h:995
#define RTE_ETH_MQ_RX_RSS_FLAG
Definition: rte_ethdev.h:410
uint32_t rte_eth_speed_bitflag(uint32_t speed, int duplex)
int rte_eth_dev_owner_set(const uint16_t port_id, const struct rte_eth_dev_owner *owner)
#define RTE_ETH_XSTATS_NAME_SIZE
Definition: rte_ethdev.h:1978
int rte_eth_dev_rss_hash_conf_get(uint16_t port_id, struct rte_eth_rss_conf *rss_conf)
__rte_experimental int rte_eth_macaddrs_get(uint16_t port_id, struct rte_ether_addr *ma, unsigned int num)
struct rte_eth_desc_lim tx_desc_lim
Definition: rte_ethdev.h:1867
int rte_eth_timesync_disable(uint16_t port_id)
int rte_eth_dev_default_mac_addr_set(uint16_t port_id, struct rte_ether_addr *mac_addr)
uint64_t offloads
Definition: rte_ethdev.h:1185
__rte_experimental int rte_eth_rx_avail_thresh_query(uint16_t port_id, uint16_t *queue_id, uint8_t *avail_thresh)
__rte_experimental int rte_eth_representor_info_get(uint16_t port_id, struct rte_eth_representor_info *info)
__rte_experimental int rte_eth_dev_priority_flow_ctrl_queue_configure(uint16_t port_id, struct rte_eth_pfc_queue_conf *pfc_queue_conf)
void rte_eth_iterator_cleanup(struct rte_dev_iterator *iter)
void * rte_eth_dev_get_sec_ctx(uint16_t port_id)
__rte_experimental int rte_eth_speed_lanes_set(uint16_t port_id, uint32_t speed_lanes)
__rte_experimental int rte_eth_fec_get_capability(uint16_t port_id, struct rte_eth_fec_capa *speed_fec_capa, unsigned int num)
uint16_t send_xon
Definition: rte_ethdev.h:1422
struct rte_mempool ** rx_mempools
Definition: rte_ethdev.h:1214
__rte_experimental int rte_eth_xstats_set_counter(uint16_t port_id, uint64_t id, int on_off)
int rte_eth_stats_reset(uint16_t port_id)
int rte_eth_allmulticast_enable(uint16_t port_id)
struct rte_eth_txconf default_txconf
Definition: rte_ethdev.h:1862
uint32_t offset_allowed
Definition: rte_ethdev.h:1771
__rte_experimental int rte_eth_get_monitor_addr(uint16_t port_id, uint16_t queue_id, struct rte_power_monitor_cond *pmc)
#define unlikely(x)
uint64_t ibytes
Definition: rte_ethdev.h:265
static void rte_mbuf_history_mark_bulk(struct rte_mbuf *const *mbufs, unsigned int count, enum rte_mbuf_history_op op)
uint32_t offset_align_log2
Definition: rte_ethdev.h:1772
uint8_t avail_thresh
Definition: rte_ethdev.h:1920
uint64_t offloads
Definition: rte_ethdev.h:1236
int rte_eth_dev_set_ptypes(uint16_t port_id, uint32_t ptype_mask, uint32_t *set_ptypes, unsigned int num)
uint16_t max_nb_queues
Definition: rte_ethdev.h:1272
uint64_t oerrors
Definition: rte_ethdev.h:273
void rte_eth_tx_buffer_drop_callback(struct rte_mbuf **pkts, uint16_t unsent, void *userdata)
int rte_eth_dev_udp_tunnel_port_add(uint16_t port_id, struct rte_eth_udp_tunnel *tunnel_udp)
struct rte_eth_dcb_rx_conf dcb_rx_conf
Definition: rte_ethdev.h:1572
enum rte_eth_err_handle_mode err_handle_mode
Definition: rte_ethdev.h:1891
struct rte_eth_vmdq_rx_conf vmdq_rx_conf
Definition: rte_ethdev.h:1574
int rte_eth_timesync_adjust_time(uint16_t port_id, int64_t delta)
#define __rte_cache_min_aligned
Definition: rte_common.h:776
__rte_experimental int rte_eth_dev_get_module_info(uint16_t port_id, struct rte_eth_dev_module_info *modinfo) __rte_warn_unused_result
uint16_t rte_eth_find_next_of(uint16_t port_id_start, const struct rte_device *parent)
uint16_t max_mtu
Definition: rte_ethdev.h:1825
uint64_t offloads
Definition: rte_ethdev.h:466
enum rte_eth_rx_mq_mode mq_mode
Definition: rte_ethdev.h:457
int rte_eth_dev_callback_register(uint16_t port_id, enum rte_eth_event_type event, rte_eth_dev_cb_fn cb_fn, void *cb_arg)
enum rte_eth_nb_pools nb_queue_pools
Definition: rte_ethdev.h:1026
int rte_eth_dev_tx_queue_stop(uint16_t port_id, uint16_t tx_queue_id)
uint16_t tx_free_thresh
Definition: rte_ethdev.h:1227
uint16_t nb_desc
Definition: rte_ethdev.h:1912
uint64_t modes_supported
Definition: rte_ethdev.h:6121
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:6385
int rte_eth_allmulticast_disable(uint16_t port_id)
int rte_eth_dev_set_vlan_strip_on_queue(uint16_t port_id, uint16_t rx_queue_id, int on)
rte_eth_hash_function
Definition: rte_ethdev.h:494
int rte_eth_dev_start(uint16_t port_id)
__rte_experimental int rte_eth_cman_config_get(uint16_t port_id, struct rte_eth_cman_config *config)
uint16_t rx_buf_size
Definition: rte_ethdev.h:1913
__rte_experimental int rte_eth_ip_reassembly_capability_get(uint16_t port_id, struct rte_eth_ip_reassembly_params *capa)
uint16_t max_vmdq_pools
Definition: rte_ethdev.h:1845
uint8_t scattered_rx
Definition: rte_ethdev.h:1910
int rte_eth_dev_reset(uint16_t port_id)
int rte_eth_xstats_get_by_id(uint16_t port_id, const uint64_t *ids, uint64_t *values, unsigned int size)
#define RTE_ETH_MQ_RX_DCB_FLAG
Definition: rte_ethdev.h:411
struct rte_eth_dcb_tx_conf dcb_tx_conf
Definition: rte_ethdev.h:1580
__rte_experimental int rte_eth_dev_get_module_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info) __rte_warn_unused_result
uint64_t offloads
Definition: rte_ethdev.h:1048
uint16_t vmdq_pool_base
Definition: rte_ethdev.h:1865
enum rte_eth_fc_mode mode_capa
Definition: rte_ethdev.h:1450
__rte_experimental int rte_eth_ip_reassembly_conf_get(uint16_t port_id, struct rte_eth_ip_reassembly_params *conf)
uint64_t tx_offload_capa
Definition: rte_ethdev.h:1850
uint64_t reserved_64s[2]
Definition: rte_ethdev.h:1059
uint16_t reta[RTE_ETH_RETA_GROUP_SIZE]
Definition: rte_ethdev.h:937
int rte_eth_dev_rx_intr_disable(uint16_t port_id, uint16_t queue_id)
int rte_eth_tx_buffer_set_err_callback(struct rte_eth_dev_tx_buffer *buffer, buffer_tx_error_fn callback, void *userdata)
__rte_experimental int rte_eth_buffer_split_get_supported_hdr_ptypes(uint16_t port_id, uint32_t *ptypes, int num) __rte_warn_unused_result
void rte_eth_tx_buffer_count_callback(struct rte_mbuf **pkts, uint16_t unsent, void *userdata)
uint16_t min_mtu
Definition: rte_ethdev.h:1824
int rte_eth_remove_tx_callback(uint16_t port_id, uint16_t queue_id, const struct rte_eth_rxtx_callback *user_cb)
int rte_eth_dev_is_removed(uint16_t port_id)
uint16_t(* rte_tx_callback_fn)(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[], uint16_t nb_pkts, void *user_param)
Definition: rte_ethdev.h:2131
void * reserved_ptrs[2]
Definition: rte_ethdev.h:1894
__rte_deprecated int rte_eth_dev_set_tx_queue_stats_mapping(uint16_t port_id, uint16_t tx_queue_id, uint8_t stat_idx)
uint64_t obytes
Definition: rte_ethdev.h:266
__rte_experimental int rte_eth_link_to_str(char *str, size_t len, const struct rte_eth_link *eth_link)
int rte_eth_dev_adjust_nb_rx_tx_desc(uint16_t port_id, uint16_t *nb_rx_desc, uint16_t *nb_tx_desc)
uint64_t reserved_64s[2]
Definition: rte_ethdev.h:468
int rte_eth_dev_mac_addr_remove(uint16_t port_id, struct rte_ether_addr *mac_addr)
rte_eth_err_handle_mode
Definition: rte_ethdev.h:1798
__rte_experimental int rte_eth_recycle_rx_queue_info_get(uint16_t port_id, uint16_t queue_id, struct rte_eth_recycle_rxq_info *recycle_rxq_info)
__rte_experimental int rte_eth_dev_priority_flow_ctrl_queue_info_get(uint16_t port_id, struct rte_eth_pfc_queue_info *pfc_queue_info)
int rte_eth_dev_owner_unset(const uint16_t port_id, const uint64_t owner_id)
rte_eth_fec_mode
Definition: rte_ethdev.h:2048
int rte_eth_dev_mac_addr_add(uint16_t port_id, struct rte_ether_addr *mac_addr, uint32_t pool)
uint16_t max_tx_queues
Definition: rte_ethdev.h:1840
int rte_eth_dev_tx_queue_start(uint16_t port_id, uint16_t tx_queue_id)
int rte_eth_xstats_reset(uint16_t port_id)
rte_eth_dev_state
Definition: rte_ethdev.h:2137
uint16_t rx_free_thresh
Definition: rte_ethdev.h:1168
uint64_t dev_capa
Definition: rte_ethdev.h:1884
uint64_t ierrors
Definition: rte_ethdev.h:272
#define RTE_ETH_MQ_RX_VMDQ_FLAG
Definition: rte_ethdev.h:412
__rte_experimental int rte_eth_hairpin_get_peer_ports(uint16_t port_id, uint16_t *peer_ports, size_t len, uint32_t direction)
int rte_eth_xstats_get_id_by_name(uint16_t port_id, const char *xstat_name, uint64_t *id)
int rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id)
struct rte_eth_vmdq_rx_conf::@170 pool_map[RTE_ETH_VMDQ_MAX_VLAN_FILTERS]
__extension__ uint8_t hw_vlan_insert_pvid
Definition: rte_ethdev.h:1053
enum rte_eth_fc_mode mode
Definition: rte_ethdev.h:1471
const struct rte_eth_rxtx_callback * rte_eth_add_tx_callback(uint16_t port_id, uint16_t queue_id, rte_tx_callback_fn fn, void *user_param)
uint64_t flow_type_rss_offloads
Definition: rte_ethdev.h:1860
#define RTE_ETH_VMDQ_MAX_VLAN_FILTERS
Definition: rte_ethdev.h:882
uint16_t rte_eth_dev_count_total(void)
int rte_eth_promiscuous_enable(uint16_t port_id)
int rte_eth_dev_rx_intr_ctl(uint16_t port_id, int epfd, int op, void *data)
__rte_experimental int rte_eth_dev_conf_get(uint16_t port_id, struct rte_eth_conf *dev_conf) __rte_warn_unused_result
union rte_eth_rxseg * rx_seg
Definition: rte_ethdev.h:1193
int rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask, uint32_t *ptypes, int num) __rte_warn_unused_result
int rte_eth_dev_owner_new(uint64_t *owner_id)
struct rte_eth_dev_portconf default_txportconf
Definition: rte_ethdev.h:1882
rte_vlan_type
Definition: rte_ethdev.h:476
const char * rte_eth_dev_tx_offload_name(uint64_t offload)
int rte_eth_dev_fw_version_get(uint16_t port_id, char *fw_version, size_t fw_size) __rte_warn_unused_result
__rte_experimental int rte_eth_fec_get(uint16_t port_id, uint32_t *fec_capa)
uint16_t nb_seg_max
Definition: rte_ethdev.h:1387
uint64_t ipackets
Definition: rte_ethdev.h:263
uint16_t max_vfs
Definition: rte_ethdev.h:1844
uint16_t pause_time
Definition: rte_ethdev.h:1421
int rte_eth_dev_owner_delete(const uint64_t owner_id)
uint64_t rx_nombuf
Definition: rte_ethdev.h:274
rte_eth_event_macsec_subtype
Definition: rte_ethdev.h:4073
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:6978
__extension__ uint8_t hw_vlan_reject_untagged
Definition: rte_ethdev.h:1053
uint8_t queue_state
Definition: rte_ethdev.h:1911
int rte_eth_dev_set_mc_addr_list(uint16_t port_id, struct rte_ether_addr *mc_addr_set, uint32_t nb_mc_addr)
struct rte_eth_vmdq_dcb_conf::@169 pool_map[RTE_ETH_VMDQ_MAX_VLAN_FILTERS]
uint32_t use_locked_device_memory
Definition: rte_ethdev.h:1339
int rte_eth_dev_get_dcb_info(uint16_t port_id, struct rte_eth_dcb_info *dcb_info)
uint16_t vmdq_queue_base
Definition: rte_ethdev.h:1863
rte_eth_event_ipsec_subtype
Definition: rte_ethdev.h:4149
struct rte_eth_intr_conf intr_conf
Definition: rte_ethdev.h:1587
rte_eth_nb_pools
Definition: rte_ethdev.h:953
uint16_t nb_align
Definition: rte_ethdev.h:1377
__rte_experimental int rte_eth_get_queue_rate_limit(uint16_t port_id, uint16_t queue_idx, uint32_t *tx_rate)
int rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)
rte_eth_rx_mq_mode
Definition: rte_ethdev.h:419
__rte_experimental const char * rte_eth_link_speed_to_str(uint32_t link_speed)
const char * driver_name
Definition: rte_ethdev.h:1821
static int rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)
Definition: rte_ethdev.h:6463
int rte_eth_rx_queue_info_get(uint16_t port_id, uint16_t queue_id, struct rte_eth_rxq_info *qinfo)
__rte_experimental int rte_eth_find_rss_algo(const char *name, uint32_t *algo)
union rte_eth_conf::@174 tx_adv_conf
int rte_eth_dev_socket_id(uint16_t port_id)
int rte_eth_set_queue_rate_limit(uint16_t port_id, uint16_t queue_idx, uint32_t tx_rate)
struct rte_mbuf ** mbuf_ring
Definition: rte_ethdev.h:1942
uint8_t enable_default_pool
Definition: rte_ethdev.h:1027
int rte_eth_dev_vlan_filter(uint16_t port_id, uint16_t vlan_id, int on)
uint16_t nb_tx_queues
Definition: rte_ethdev.h:1871
int rte_eth_dev_set_mtu(uint16_t port_id, uint16_t mtu)
int rte_eth_dev_set_vlan_ether_type(uint16_t port_id, enum rte_vlan_type vlan_type, uint16_t tag_type)
uint64_t reserved_64s[2]
Definition: rte_ethdev.h:1238
uint32_t max_mac_addrs
Definition: rte_ethdev.h:1841
int rte_eth_xstats_get_names_by_id(uint16_t port_id, struct rte_eth_xstat_name *xstats_names, unsigned int size, uint64_t *ids)
__rte_experimental int rte_eth_xstats_query_state(uint16_t port_id, uint64_t id)
rte_eth_tunnel_type
Definition: rte_ethdev.h:1495
__rte_experimental const char * rte_eth_dev_capability_name(uint64_t capability)
__rte_experimental int rte_eth_rx_hairpin_queue_setup(uint16_t port_id, uint16_t rx_queue_id, uint16_t nb_rx_desc, const struct rte_eth_hairpin_conf *conf)
uint64_t value
Definition: rte_ethdev.h:1991
static uint64_t rte_eth_rss_hf_refine(uint64_t rss_hf)
Definition: rte_ethdev.h:707
__rte_experimental int rte_eth_hairpin_bind(uint16_t tx_port, uint16_t rx_port)
__rte_experimental int rte_eth_ip_reassembly_conf_set(uint16_t port_id, const struct rte_eth_ip_reassembly_params *conf)
int rte_eth_dev_uc_hash_table_set(uint16_t port_id, struct rte_ether_addr *addr, uint8_t on)
__rte_experimental int rte_eth_cman_config_init(uint16_t port_id, struct rte_eth_cman_config *config)
int rte_eth_rx_metadata_negotiate(uint16_t port_id, uint64_t *features)
int rte_eth_dev_rss_reta_query(uint16_t port_id, struct rte_eth_rss_reta_entry64 *reta_conf, uint16_t reta_size)
int rte_eth_promiscuous_get(uint16_t port_id)
int rte_eth_led_on(uint16_t port_id)
int rte_eth_timesync_read_tx_timestamp(uint16_t port_id, struct timespec *timestamp)
uint32_t max_rx_pktlen
Definition: rte_ethdev.h:1836
uint64_t rss_hf
Definition: rte_ethdev.h:541
void * reserved_ptrs[2]
Definition: rte_ethdev.h:1239
uint32_t selective_rx
Definition: rte_ethdev.h:1773
uint64_t id
Definition: rte_ethdev.h:1990
uint64_t reserved_64s[2]
Definition: rte_ethdev.h:1893
__extension__ uint8_t hw_vlan_reject_tagged
Definition: rte_ethdev.h:1053
uint64_t reserved_64s[2]
Definition: rte_ethdev.h:1217
__rte_experimental int rte_eth_rx_queue_is_valid(uint16_t port_id, uint16_t queue_id)
int rte_eth_stats_get(uint16_t port_id, struct rte_eth_stats *stats)
unsigned int if_index
Definition: rte_ethdev.h:1822
__rte_experimental int rte_eth_cman_config_set(uint16_t port_id, const struct rte_eth_cman_config *config)
__rte_experimental int rte_eth_tx_hairpin_queue_setup(uint16_t port_id, uint16_t tx_queue_id, uint16_t nb_tx_desc, const struct rte_eth_hairpin_conf *conf)
uint8_t mac_ctrl_frame_fwd
Definition: rte_ethdev.h:1424
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:2107
int rte_eth_dev_get_reg_info(uint16_t port_id, struct rte_dev_reg_info *info) __rte_warn_unused_result
enum rte_eth_fc_mode mode
Definition: rte_ethdev.h:1423
int rte_eth_dev_get_mtu(uint16_t port_id, uint16_t *mtu)
struct rte_eth_vmdq_dcb_conf vmdq_dcb_conf
Definition: rte_ethdev.h:1570
uint8_t * rss_key
Definition: rte_ethdev.h:535
void * reserved_ptrs[2]
Definition: rte_ethdev.h:1060
uint8_t dcb_tc[RTE_ETH_DCB_NUM_USER_PRIORITIES]
Definition: rte_ethdev.h:1004
uint8_t tx_deferred_start
Definition: rte_ethdev.h:1230
uint8_t wthresh
Definition: rte_ethdev.h:404
void * reserved_ptrs[2]
Definition: rte_ethdev.h:1218
uint16_t max_rx_queues
Definition: rte_ethdev.h:1839
uint16_t max_rx_mempools
Definition: rte_ethdev.h:1878
int rte_eth_tx_buffer_init(struct rte_eth_dev_tx_buffer *buffer, uint16_t size)
rte_eth_representor_type
Definition: rte_ethdev.h:1785
uint32_t max_lro_pkt_size
Definition: rte_ethdev.h:460
int rte_eth_xstats_get_names(uint16_t port_id, struct rte_eth_xstat_name *xstats_names, unsigned int size)
struct rte_eth_fc_conf fc
Definition: rte_ethdev.h:1434
const struct rte_eth_rxtx_callback * rte_eth_add_first_rx_callback(uint16_t port_id, uint16_t queue_id, rte_rx_callback_fn fn, void *user_param)
int rte_eth_tx_done_cleanup(uint16_t port_id, uint16_t queue_id, uint32_t free_cnt)
int rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask)
struct rte_eth_txmode txmode
Definition: rte_ethdev.h:1561
int rte_eth_allmulticast_get(uint16_t port_id)
uint8_t rx_drop_en
Definition: rte_ethdev.h:1169
int rte_eth_dev_is_valid_port(uint16_t port_id)
int rte_eth_macaddr_get(uint16_t port_id, struct rte_ether_addr *mac_addr)
uint16_t rx_nseg
Definition: rte_ethdev.h:1171
#define __rte_warn_unused_result
Definition: rte_common.h:481
uint32_t max_lro_pkt_size
Definition: rte_ethdev.h:1838
void * reserved_ptrs[2]
Definition: rte_ethdev.h:469
int rte_eth_timesync_enable(uint16_t port_id)
uint8_t pthresh
Definition: rte_ethdev.h:402
uint16_t share_group
Definition: rte_ethdev.h:1178
struct rte_eth_rxconf default_rxconf
Definition: rte_ethdev.h:1861
uint32_t speed_capa
Definition: rte_ethdev.h:1868
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:6724
struct rte_eth_hairpin_queue_cap tx_cap
Definition: rte_ethdev.h:1279
__rte_experimental int rte_eth_cman_info_get(uint16_t port_id, struct rte_eth_cman_info *info)
int rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t rx_queue_id)
int rte_eth_dev_set_link_down(uint16_t port_id)
int rte_eth_dev_flow_ctrl_set(uint16_t port_id, struct rte_eth_fc_conf *fc_conf)
uint16_t rte_eth_iterator_next(struct rte_dev_iterator *iter)
__rte_experimental int rte_eth_hairpin_unbind(uint16_t tx_port, uint16_t rx_port)
uint64_t objs_supported
Definition: rte_ethdev.h:6126
struct rte_eth_hairpin_queue_cap rx_cap
Definition: rte_ethdev.h:1278
uint32_t min_rx_bufsize
Definition: rte_ethdev.h:1828
int rte_eth_dev_get_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)
const char * rte_eth_dev_rx_offload_name(uint64_t offload)
static uint16_t rte_eth_tx_buffer_flush(uint16_t port_id, uint16_t queue_id, struct rte_eth_dev_tx_buffer *buffer)
Definition: rte_ethdev.h:6925
int rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id, uint16_t nb_rx_desc, unsigned int socket_id, const struct rte_eth_rxconf *rx_conf, struct rte_mempool *mb_pool)
rte_eth_event_type
Definition: rte_ethdev.h:4214