* The Ethernet Device API is composed of two parts:
*
* - The application-oriented Ethernet API that includes functions to setup
- * an Ethernet device (configure it, setup its RX and TX queues and start it),
+ * an Ethernet device (configure it, setup its Rx and Tx queues and start it),
* to get its MAC address, the speed and the status of its physical link,
* to receive and to transmit packets, and so on.
*
* are lock-free functions which assume to not be invoked in parallel on
* different logical cores to work on the same target object. For instance,
* the receive function of a PMD cannot be invoked in parallel on two logical
- * cores to poll the same RX queue [of the same port]. Of course, this function
- * can be invoked in parallel by different logical cores on different RX queues.
+ * cores to poll the same Rx queue [of the same port]. Of course, this function
+ * can be invoked in parallel by different logical cores on different Rx queues.
* It is the responsibility of the upper level application to enforce this rule.
*
* If needed, parallel accesses by multiple logical cores to shared queues
* - MTU
* - flow control settings
* - receive mode configuration (promiscuous mode, all-multicast mode,
- * hardware checksum mode, RSS/VMDQ settings etc.)
+ * hardware checksum mode, RSS/VMDq settings etc.)
* - VLAN filtering configuration
* - default MAC address
* - MAC addresses supplied to MAC address array
* performs an indirect invocation of the corresponding driver function
* supplied in the *eth_dev_ops* structure of the *rte_eth_dev* structure.
*
- * For performance reasons, the address of the burst-oriented RX and TX
+ * For performance reasons, the address of the burst-oriented Rx and Tx
* functions of the Ethernet driver are not contained in the *eth_dev_ops*
* structure. Instead, they are directly stored at the beginning of the
* *rte_eth_dev* structure to avoid an extra indirect memory access during
* their invocation.
*
- * RTE ethernet device drivers do not use interrupts for transmitting or
+ * RTE Ethernet device drivers do not use interrupts for transmitting or
* receiving. Instead, Ethernet drivers export Poll-Mode receive and transmit
* functions to applications.
* Both receive and transmit functions are packet-burst oriented to minimize
#include <rte_interrupts.h>
#include <rte_dev.h>
#include <rte_devargs.h>
+#include <rte_bitops.h>
#include <rte_errno.h>
#include <rte_common.h>
#include <rte_config.h>
* Iterates on devices with devargs filter.
* The ownership is not checked.
*
- * The next port id is returned, and the iterator is updated.
+ * The next port ID is returned, and the iterator is updated.
*
* @param iter
* Device iterator handle initialized by rte_eth_iterator_init().
* by calling rte_eth_iterator_cleanup().
*
* @return
- * A port id if found, RTE_MAX_ETHPORTS otherwise.
+ * A port ID if found, RTE_MAX_ETHPORTS otherwise.
*/
uint16_t rte_eth_iterator_next(struct rte_dev_iterator *iter);
* the function rte_eth_iterator_cleanup() must be called.
*
* @param id
- * Iterated port id of type uint16_t.
+ * Iterated port ID of type uint16_t.
* @param devargs
* Device parameters input as string of type char*.
* @param iter
uint64_t opackets; /**< Total number of successfully transmitted packets.*/
uint64_t ibytes; /**< Total number of successfully received bytes. */
uint64_t obytes; /**< Total number of successfully transmitted bytes. */
- uint64_t imissed;
- /**< Total of RX packets dropped by the HW,
- * because there are no available buffer (i.e. RX queues are full).
+ /**
+ * Total of Rx packets dropped by the HW,
+ * because there are no available buffer (i.e. Rx queues are full).
*/
+ uint64_t imissed;
uint64_t ierrors; /**< Total number of erroneous received packets. */
uint64_t oerrors; /**< Total number of failed transmitted packets. */
- uint64_t rx_nombuf; /**< Total number of RX mbuf allocation failures. */
+ uint64_t rx_nombuf; /**< Total number of Rx mbuf allocation failures. */
/* Queue stats are limited to max 256 queues */
+ /** Total number of queue Rx packets. */
uint64_t q_ipackets[RTE_ETHDEV_QUEUE_STAT_CNTRS];
- /**< Total number of queue RX packets. */
+ /** Total number of queue Tx packets. */
uint64_t q_opackets[RTE_ETHDEV_QUEUE_STAT_CNTRS];
- /**< Total number of queue TX packets. */
+ /** Total number of successfully received queue bytes. */
uint64_t q_ibytes[RTE_ETHDEV_QUEUE_STAT_CNTRS];
- /**< Total number of successfully received queue bytes. */
+ /** Total number of successfully transmitted queue bytes. */
uint64_t q_obytes[RTE_ETHDEV_QUEUE_STAT_CNTRS];
- /**< Total number of successfully transmitted queue bytes. */
+ /** Total number of queue packets received that are dropped. */
uint64_t q_errors[RTE_ETHDEV_QUEUE_STAT_CNTRS];
- /**< Total number of queue packets received that are dropped. */
};
/**@{@name Link speed capabilities
* Device supported speeds bitmap flags
*/
-#define ETH_LINK_SPEED_AUTONEG (0 << 0) /**< Autonegotiate (all speeds) */
-#define ETH_LINK_SPEED_FIXED (1 << 0) /**< Disable autoneg (fixed speed) */
-#define ETH_LINK_SPEED_10M_HD (1 << 1) /**< 10 Mbps half-duplex */
-#define ETH_LINK_SPEED_10M (1 << 2) /**< 10 Mbps full-duplex */
-#define ETH_LINK_SPEED_100M_HD (1 << 3) /**< 100 Mbps half-duplex */
-#define ETH_LINK_SPEED_100M (1 << 4) /**< 100 Mbps full-duplex */
-#define ETH_LINK_SPEED_1G (1 << 5) /**< 1 Gbps */
-#define ETH_LINK_SPEED_2_5G (1 << 6) /**< 2.5 Gbps */
-#define ETH_LINK_SPEED_5G (1 << 7) /**< 5 Gbps */
-#define ETH_LINK_SPEED_10G (1 << 8) /**< 10 Gbps */
-#define ETH_LINK_SPEED_20G (1 << 9) /**< 20 Gbps */
-#define ETH_LINK_SPEED_25G (1 << 10) /**< 25 Gbps */
-#define ETH_LINK_SPEED_40G (1 << 11) /**< 40 Gbps */
-#define ETH_LINK_SPEED_50G (1 << 12) /**< 50 Gbps */
-#define ETH_LINK_SPEED_56G (1 << 13) /**< 56 Gbps */
-#define ETH_LINK_SPEED_100G (1 << 14) /**< 100 Gbps */
-#define ETH_LINK_SPEED_200G (1 << 15) /**< 200 Gbps */
+#define ETH_LINK_SPEED_AUTONEG 0 /**< Autonegotiate (all speeds) */
+#define ETH_LINK_SPEED_FIXED RTE_BIT32(0) /**< Disable autoneg (fixed speed) */
+#define ETH_LINK_SPEED_10M_HD RTE_BIT32(1) /**< 10 Mbps half-duplex */
+#define ETH_LINK_SPEED_10M RTE_BIT32(2) /**< 10 Mbps full-duplex */
+#define ETH_LINK_SPEED_100M_HD RTE_BIT32(3) /**< 100 Mbps half-duplex */
+#define ETH_LINK_SPEED_100M RTE_BIT32(4) /**< 100 Mbps full-duplex */
+#define ETH_LINK_SPEED_1G RTE_BIT32(5) /**< 1 Gbps */
+#define ETH_LINK_SPEED_2_5G RTE_BIT32(6) /**< 2.5 Gbps */
+#define ETH_LINK_SPEED_5G RTE_BIT32(7) /**< 5 Gbps */
+#define ETH_LINK_SPEED_10G RTE_BIT32(8) /**< 10 Gbps */
+#define ETH_LINK_SPEED_20G RTE_BIT32(9) /**< 20 Gbps */
+#define ETH_LINK_SPEED_25G RTE_BIT32(10) /**< 25 Gbps */
+#define ETH_LINK_SPEED_40G RTE_BIT32(11) /**< 40 Gbps */
+#define ETH_LINK_SPEED_50G RTE_BIT32(12) /**< 50 Gbps */
+#define ETH_LINK_SPEED_56G RTE_BIT32(13) /**< 56 Gbps */
+#define ETH_LINK_SPEED_100G RTE_BIT32(14) /**< 100 Gbps */
+#define ETH_LINK_SPEED_200G RTE_BIT32(15) /**< 200 Gbps */
/**@}*/
/**@{@name Link speed
/**@}*/
/**
- * A structure used to configure the ring threshold registers of an RX/TX
+ * A structure used to configure the ring threshold registers of an Rx/Tx
* queue for an Ethernet port.
*/
struct rte_eth_thresh {
* packets to multiple queues.
*/
enum rte_eth_rx_mq_mode {
- /** None of DCB,RSS or VMDQ mode */
+ /** None of DCB, RSS or VMDq mode */
ETH_MQ_RX_NONE = 0,
- /** For RX side, only RSS is on */
+ /** For Rx side, only RSS is on */
ETH_MQ_RX_RSS = ETH_MQ_RX_RSS_FLAG,
- /** For RX side,only DCB is on. */
+ /** For Rx side,only DCB is on. */
ETH_MQ_RX_DCB = ETH_MQ_RX_DCB_FLAG,
/** Both DCB and RSS enable */
ETH_MQ_RX_DCB_RSS = ETH_MQ_RX_RSS_FLAG | ETH_MQ_RX_DCB_FLAG,
- /** Only VMDQ, no RSS nor DCB */
+ /** Only VMDq, no RSS nor DCB */
ETH_MQ_RX_VMDQ_ONLY = ETH_MQ_RX_VMDQ_FLAG,
- /** RSS mode with VMDQ */
+ /** RSS mode with VMDq */
ETH_MQ_RX_VMDQ_RSS = ETH_MQ_RX_RSS_FLAG | ETH_MQ_RX_VMDQ_FLAG,
- /** Use VMDQ+DCB to route traffic to queues */
+ /** Use VMDq+DCB to route traffic to queues */
ETH_MQ_RX_VMDQ_DCB = ETH_MQ_RX_VMDQ_FLAG | ETH_MQ_RX_DCB_FLAG,
- /** Enable both VMDQ and DCB in VMDq */
+ /** Enable both VMDq and DCB in VMDq */
ETH_MQ_RX_VMDQ_DCB_RSS = ETH_MQ_RX_RSS_FLAG | ETH_MQ_RX_DCB_FLAG |
ETH_MQ_RX_VMDQ_FLAG,
};
/**
- * for rx mq mode backward compatible
+ * for Rx mq mode backward compatible
*/
#define ETH_RSS ETH_MQ_RX_RSS
#define VMDQ_DCB ETH_MQ_RX_VMDQ_DCB
*/
enum rte_eth_tx_mq_mode {
ETH_MQ_TX_NONE = 0, /**< It is in neither DCB nor VT mode. */
- ETH_MQ_TX_DCB, /**< For TX side,only DCB is on. */
- ETH_MQ_TX_VMDQ_DCB, /**< For TX side,both DCB and VT is on. */
+ ETH_MQ_TX_DCB, /**< For Tx side,only DCB is on. */
+ ETH_MQ_TX_VMDQ_DCB, /**< For Tx side,both DCB and VT is on. */
ETH_MQ_TX_VMDQ_ONLY, /**< Only VT on, no DCB */
};
/**
- * for tx mq mode backward compatible
+ * for Tx mq mode backward compatible
*/
#define ETH_DCB_NONE ETH_MQ_TX_NONE
#define ETH_VMDQ_DCB_TX ETH_MQ_TX_VMDQ_DCB
#define ETH_DCB_TX ETH_MQ_TX_DCB
/**
- * A structure used to configure the RX features of an Ethernet port.
+ * A structure used to configure the Rx features of an Ethernet port.
*/
struct rte_eth_rxmode {
/** The multi-queue packet distribution mode to be used, e.g. RSS. */
};
/**
- * A structure used to describe a vlan filter.
+ * A structure used to describe a VLAN filter.
* If the bit corresponding to a VID is set, such VID is on.
*/
struct rte_vlan_filter_conf {
#define RTE_ETH_FLOW_IPV6_EX 15
#define RTE_ETH_FLOW_IPV6_TCP_EX 16
#define RTE_ETH_FLOW_IPV6_UDP_EX 17
+/** Consider device port number as a flow differentiator */
#define RTE_ETH_FLOW_PORT 18
- /**< Consider device port number as a flow differentiator */
#define RTE_ETH_FLOW_VXLAN 19 /**< VXLAN protocol based flow */
#define RTE_ETH_FLOW_GENEVE 20 /**< GENEVE protocol based flow */
#define RTE_ETH_FLOW_NVGRE 21 /**< NVGRE protocol based flow */
* Below macros are defined for RSS offload types, they can be used to
* fill rte_eth_rss_conf.rss_hf or rte_flow_action_rss.types.
*/
-#define ETH_RSS_IPV4 (1ULL << 2)
-#define ETH_RSS_FRAG_IPV4 (1ULL << 3)
-#define ETH_RSS_NONFRAG_IPV4_TCP (1ULL << 4)
-#define ETH_RSS_NONFRAG_IPV4_UDP (1ULL << 5)
-#define ETH_RSS_NONFRAG_IPV4_SCTP (1ULL << 6)
-#define ETH_RSS_NONFRAG_IPV4_OTHER (1ULL << 7)
-#define ETH_RSS_IPV6 (1ULL << 8)
-#define ETH_RSS_FRAG_IPV6 (1ULL << 9)
-#define ETH_RSS_NONFRAG_IPV6_TCP (1ULL << 10)
-#define ETH_RSS_NONFRAG_IPV6_UDP (1ULL << 11)
-#define ETH_RSS_NONFRAG_IPV6_SCTP (1ULL << 12)
-#define ETH_RSS_NONFRAG_IPV6_OTHER (1ULL << 13)
-#define ETH_RSS_L2_PAYLOAD (1ULL << 14)
-#define ETH_RSS_IPV6_EX (1ULL << 15)
-#define ETH_RSS_IPV6_TCP_EX (1ULL << 16)
-#define ETH_RSS_IPV6_UDP_EX (1ULL << 17)
-#define ETH_RSS_PORT (1ULL << 18)
-#define ETH_RSS_VXLAN (1ULL << 19)
-#define ETH_RSS_GENEVE (1ULL << 20)
-#define ETH_RSS_NVGRE (1ULL << 21)
-#define ETH_RSS_GTPU (1ULL << 23)
-#define ETH_RSS_ETH (1ULL << 24)
-#define ETH_RSS_S_VLAN (1ULL << 25)
-#define ETH_RSS_C_VLAN (1ULL << 26)
-#define ETH_RSS_ESP (1ULL << 27)
-#define ETH_RSS_AH (1ULL << 28)
-#define ETH_RSS_L2TPV3 (1ULL << 29)
-#define ETH_RSS_PFCP (1ULL << 30)
-#define ETH_RSS_PPPOE (1ULL << 31)
-#define ETH_RSS_ECPRI (1ULL << 32)
-#define ETH_RSS_MPLS (1ULL << 33)
-#define ETH_RSS_IPV4_CHKSUM (1ULL << 34)
+#define ETH_RSS_IPV4 RTE_BIT64(2)
+#define ETH_RSS_FRAG_IPV4 RTE_BIT64(3)
+#define ETH_RSS_NONFRAG_IPV4_TCP RTE_BIT64(4)
+#define ETH_RSS_NONFRAG_IPV4_UDP RTE_BIT64(5)
+#define ETH_RSS_NONFRAG_IPV4_SCTP RTE_BIT64(6)
+#define ETH_RSS_NONFRAG_IPV4_OTHER RTE_BIT64(7)
+#define ETH_RSS_IPV6 RTE_BIT64(8)
+#define ETH_RSS_FRAG_IPV6 RTE_BIT64(9)
+#define ETH_RSS_NONFRAG_IPV6_TCP RTE_BIT64(10)
+#define ETH_RSS_NONFRAG_IPV6_UDP RTE_BIT64(11)
+#define ETH_RSS_NONFRAG_IPV6_SCTP RTE_BIT64(12)
+#define ETH_RSS_NONFRAG_IPV6_OTHER RTE_BIT64(13)
+#define ETH_RSS_L2_PAYLOAD RTE_BIT64(14)
+#define ETH_RSS_IPV6_EX RTE_BIT64(15)
+#define ETH_RSS_IPV6_TCP_EX RTE_BIT64(16)
+#define ETH_RSS_IPV6_UDP_EX RTE_BIT64(17)
+#define ETH_RSS_PORT RTE_BIT64(18)
+#define ETH_RSS_VXLAN RTE_BIT64(19)
+#define ETH_RSS_GENEVE RTE_BIT64(20)
+#define ETH_RSS_NVGRE RTE_BIT64(21)
+#define ETH_RSS_GTPU RTE_BIT64(23)
+#define ETH_RSS_ETH RTE_BIT64(24)
+#define ETH_RSS_S_VLAN RTE_BIT64(25)
+#define ETH_RSS_C_VLAN RTE_BIT64(26)
+#define ETH_RSS_ESP RTE_BIT64(27)
+#define ETH_RSS_AH RTE_BIT64(28)
+#define ETH_RSS_L2TPV3 RTE_BIT64(29)
+#define ETH_RSS_PFCP RTE_BIT64(30)
+#define ETH_RSS_PPPOE RTE_BIT64(31)
+#define ETH_RSS_ECPRI RTE_BIT64(32)
+#define ETH_RSS_MPLS RTE_BIT64(33)
+#define ETH_RSS_IPV4_CHKSUM RTE_BIT64(34)
/**
* The ETH_RSS_L4_CHKSUM works on checksum field of any L4 header.
* For the case that checksum is not used in an UDP header,
* it takes the reserved value 0 as input for the hash function.
*/
-#define ETH_RSS_L4_CHKSUM (1ULL << 35)
+#define ETH_RSS_L4_CHKSUM RTE_BIT64(35)
/*
* We use the following macros to combine with above ETH_RSS_* for
* the same level are used simultaneously, it is the same case as none of
* them are added.
*/
-#define ETH_RSS_L3_SRC_ONLY (1ULL << 63)
-#define ETH_RSS_L3_DST_ONLY (1ULL << 62)
-#define ETH_RSS_L4_SRC_ONLY (1ULL << 61)
-#define ETH_RSS_L4_DST_ONLY (1ULL << 60)
-#define ETH_RSS_L2_SRC_ONLY (1ULL << 59)
-#define ETH_RSS_L2_DST_ONLY (1ULL << 58)
+#define ETH_RSS_L3_SRC_ONLY RTE_BIT64(63)
+#define ETH_RSS_L3_DST_ONLY RTE_BIT64(62)
+#define ETH_RSS_L4_SRC_ONLY RTE_BIT64(61)
+#define ETH_RSS_L4_DST_ONLY RTE_BIT64(60)
+#define ETH_RSS_L2_SRC_ONLY RTE_BIT64(59)
+#define ETH_RSS_L2_DST_ONLY RTE_BIT64(58)
/*
* Only select IPV6 address prefix as RSS input set according to
* Must be combined with ETH_RSS_IPV6, ETH_RSS_NONFRAG_IPV6_UDP,
* ETH_RSS_NONFRAG_IPV6_TCP, ETH_RSS_NONFRAG_IPV6_SCTP.
*/
-#define RTE_ETH_RSS_L3_PRE32 (1ULL << 57)
-#define RTE_ETH_RSS_L3_PRE40 (1ULL << 56)
-#define RTE_ETH_RSS_L3_PRE48 (1ULL << 55)
-#define RTE_ETH_RSS_L3_PRE56 (1ULL << 54)
-#define RTE_ETH_RSS_L3_PRE64 (1ULL << 53)
-#define RTE_ETH_RSS_L3_PRE96 (1ULL << 52)
+#define RTE_ETH_RSS_L3_PRE32 RTE_BIT64(57)
+#define RTE_ETH_RSS_L3_PRE40 RTE_BIT64(56)
+#define RTE_ETH_RSS_L3_PRE48 RTE_BIT64(55)
+#define RTE_ETH_RSS_L3_PRE56 RTE_BIT64(54)
+#define RTE_ETH_RSS_L3_PRE64 RTE_BIT64(53)
+#define RTE_ETH_RSS_L3_PRE96 RTE_BIT64(52)
/*
* Use the following macros to combine with the above layers
ETH_RSS_S_VLAN | \
ETH_RSS_C_VLAN)
-/**< Mask of valid RSS hash protocols */
+/** Mask of valid RSS hash protocols */
#define ETH_RSS_PROTO_MASK ( \
ETH_RSS_IPV4 | \
ETH_RSS_FRAG_IPV4 | \
#define RTE_RETA_GROUP_SIZE 64
/**@{@name VMDq and DCB maximums */
-#define ETH_VMDQ_MAX_VLAN_FILTERS 64 /**< Maximum nb. of VMDQ vlan filters. */
+#define ETH_VMDQ_MAX_VLAN_FILTERS 64 /**< Maximum nb. of VMDq VLAN filters. */
#define ETH_DCB_NUM_USER_PRIORITIES 8 /**< Maximum nb. of DCB priorities. */
-#define ETH_VMDQ_DCB_NUM_QUEUES 128 /**< Maximum nb. of VMDQ DCB queues. */
+#define ETH_VMDQ_DCB_NUM_QUEUES 128 /**< Maximum nb. of VMDq DCB queues. */
#define ETH_DCB_NUM_QUEUES 128 /**< Maximum nb. of DCB queues. */
/**@}*/
* is needed.
*/
struct rte_eth_rss_reta_entry64 {
+ /** Mask bits indicate which entries need to be updated/queried. */
uint64_t mask;
- /**< Mask bits indicate which entries need to be updated/queried. */
+ /** Group of 64 redirection table entries. */
uint16_t reta[RTE_RETA_GROUP_SIZE];
- /**< Group of 64 redirection table entries. */
};
/**
/**
* This enum indicates the possible number of queue pools
- * in VMDQ configurations.
+ * in VMDq configurations.
*/
enum rte_eth_nb_pools {
ETH_8_POOLS = 8, /**< 8 VMDq pools. */
};
/**
- * A structure used to configure the VMDQ+DCB feature
+ * A structure used to configure the VMDq+DCB feature
* of an Ethernet port.
*
* Using this feature, packets are routed to a pool of queues, based
- * on the vlan id in the vlan tag, and then to a specific queue within
- * that pool, using the user priority vlan tag field.
+ * on the VLAN ID in the VLAN tag, and then to a specific queue within
+ * that pool, using the user priority VLAN tag field.
*
* A default pool may be used, if desired, to route all traffic which
- * does not match the vlan filter rules.
+ * does not match the VLAN filter rules.
*/
struct rte_eth_vmdq_dcb_conf {
enum rte_eth_nb_pools nb_queue_pools; /**< With DCB, 16 or 32 pools */
uint8_t default_pool; /**< The default pool, if applicable */
uint8_t nb_pool_maps; /**< We can have up to 64 filters/mappings */
struct {
- uint16_t vlan_id; /**< The vlan id of the received frame */
- uint64_t pools; /**< Bitmask of pools for packet rx */
- } pool_map[ETH_VMDQ_MAX_VLAN_FILTERS]; /**< VMDq vlan pool maps. */
+ uint16_t vlan_id; /**< The VLAN ID of the received frame */
+ uint64_t pools; /**< Bitmask of pools for packet Rx */
+ } pool_map[ETH_VMDQ_MAX_VLAN_FILTERS]; /**< VMDq VLAN pool maps. */
+ /** Selects a queue in a pool */
uint8_t dcb_tc[ETH_DCB_NUM_USER_PRIORITIES];
- /**< Selects a queue in a pool */
};
/**
- * A structure used to configure the VMDQ feature of an Ethernet port when
+ * A structure used to configure the VMDq feature of an Ethernet port when
* not combined with the DCB feature.
*
* Using this feature, packets are routed to a pool of queues. By default,
- * the pool selection is based on the MAC address, the vlan id in the
- * vlan tag as specified in the pool_map array.
+ * the pool selection is based on the MAC address, the VLAN ID in the
+ * VLAN tag as specified in the pool_map array.
* Passing the ETH_VMDQ_ACCEPT_UNTAG in the rx_mode field allows pool
* selection using only the MAC address. MAC address to pool mapping is done
* using the rte_eth_dev_mac_addr_add function, with the pool parameter
- * corresponding to the pool id.
+ * corresponding to the pool ID.
*
* Queue selection within the selected pool will be done using RSS when
* it is enabled or revert to the first queue of the pool if not.
*
* A default pool may be used, if desired, to route all traffic which
- * does not match the vlan filter rules or any pool MAC address.
+ * does not match the VLAN filter rules or any pool MAC address.
*/
struct rte_eth_vmdq_rx_conf {
enum rte_eth_nb_pools nb_queue_pools; /**< VMDq only mode, 8 or 64 pools */
uint8_t nb_pool_maps; /**< We can have up to 64 filters/mappings */
uint32_t rx_mode; /**< Flags from ETH_VMDQ_ACCEPT_* */
struct {
- uint16_t vlan_id; /**< The vlan id of the received frame */
- uint64_t pools; /**< Bitmask of pools for packet rx */
- } pool_map[ETH_VMDQ_MAX_VLAN_FILTERS]; /**< VMDq vlan pool maps. */
+ uint16_t vlan_id; /**< The VLAN ID of the received frame */
+ uint64_t pools; /**< Bitmask of pools for packet Rx */
+ } pool_map[ETH_VMDQ_MAX_VLAN_FILTERS]; /**< VMDq VLAN pool maps. */
};
/**
- * A structure used to configure the TX features of an Ethernet port.
+ * A structure used to configure the Tx features of an Ethernet port.
*/
struct rte_eth_txmode {
- enum rte_eth_tx_mq_mode mq_mode; /**< TX multi-queues mode. */
+ enum rte_eth_tx_mq_mode mq_mode; /**< Tx multi-queues mode. */
/**
* Per-port Tx offloads to be set using DEV_TX_OFFLOAD_* flags.
* Only offloads set on tx_offload_capa field on rte_eth_dev_info
uint16_t pvid;
__extension__
- uint8_t hw_vlan_reject_tagged : 1,
- /**< If set, reject sending out tagged pkts */
+ uint8_t /** If set, reject sending out tagged pkts */
+ hw_vlan_reject_tagged : 1,
+ /** If set, reject sending out untagged pkts */
hw_vlan_reject_untagged : 1,
- /**< If set, reject sending out untagged pkts */
+ /** If set, enable port based VLAN insertion */
hw_vlan_insert_pvid : 1;
- /**< If set, enable port based VLAN insertion */
uint64_t reserved_64s[2]; /**< Reserved for future fields */
void *reserved_ptrs[2]; /**< Reserved for future fields */
};
/**
- * A structure used to configure an RX ring of an Ethernet port.
+ * A structure used to configure an Rx ring of an Ethernet port.
*/
struct rte_eth_rxconf {
- struct rte_eth_thresh rx_thresh; /**< RX ring threshold registers. */
- uint16_t rx_free_thresh; /**< Drives the freeing of RX descriptors. */
+ struct rte_eth_thresh rx_thresh; /**< Rx ring threshold registers. */
+ uint16_t rx_free_thresh; /**< Drives the freeing of Rx descriptors. */
uint8_t rx_drop_en; /**< Drop packets if no descriptors are available. */
uint8_t rx_deferred_start; /**< Do not start queue with rte_eth_dev_start(). */
uint16_t rx_nseg; /**< Number of descriptions in rx_seg array. */
+ /**
+ * Share group index in Rx domain and switch domain.
+ * Non-zero value to enable Rx queue share, zero value disable share.
+ * PMD is responsible for Rx queue consistency checks to avoid member
+ * port's configuration contradict to each other.
+ */
+ uint16_t share_group;
+ uint16_t share_qid; /**< Shared Rx queue ID in group */
/**
* Per-queue Rx offloads to be set using DEV_RX_OFFLOAD_* flags.
* Only offloads set on rx_queue_offload_capa or rx_offload_capa
};
/**
- * A structure used to configure a TX ring of an Ethernet port.
+ * A structure used to configure a Tx ring of an Ethernet port.
*/
struct rte_eth_txconf {
- struct rte_eth_thresh tx_thresh; /**< TX ring threshold registers. */
+ struct rte_eth_thresh tx_thresh; /**< Tx ring threshold registers. */
uint16_t tx_rs_thresh; /**< Drives the setting of RS bit on TXDs. */
- uint16_t tx_free_thresh; /**< Start freeing TX buffers if there are
+ uint16_t tx_free_thresh; /**< Start freeing Tx buffers if there are
less free descriptors than this value. */
uint8_t tx_deferred_start; /**< Do not start queue with rte_eth_dev_start(). */
*/
enum rte_eth_fc_mode {
RTE_FC_NONE = 0, /**< Disable flow control. */
- RTE_FC_RX_PAUSE, /**< RX pause frame, enable flowctrl on TX side. */
- RTE_FC_TX_PAUSE, /**< TX pause frame, enable flowctrl on RX side. */
+ RTE_FC_RX_PAUSE, /**< Rx pause frame, enable flowctrl on Tx side. */
+ RTE_FC_TX_PAUSE, /**< Tx pause frame, enable flowctrl on Rx side. */
RTE_FC_FULL /**< Enable flow control on both side. */
};
};
/**
- * Select report mode of FDIR hash information in RX descriptors.
+ * Select report mode of FDIR hash information in Rx descriptors.
*/
enum rte_fdir_status_mode {
RTE_FDIR_NO_REPORT_STATUS = 0, /**< Never report FDIR hash. */
enum rte_fdir_mode mode; /**< Flow Director mode. */
enum rte_fdir_pballoc_type pballoc; /**< Space for FDIR filters. */
enum rte_fdir_status_mode status; /**< How to report FDIR hash. */
- /** RX queue of packets matching a "drop" filter in perfect mode. */
+ /** Rx queue of packets matching a "drop" filter in perfect mode. */
uint8_t drop_queue;
struct rte_eth_fdir_masks mask;
+ /** Flex payload configuration. */
struct rte_eth_fdir_flex_conf flex_conf;
- /**< Flex payload configuration. */
};
/**
/**
* A structure used to configure an Ethernet port.
- * Depending upon the RX multi-queue mode, extra advanced
+ * Depending upon the Rx multi-queue mode, extra advanced
* configuration settings may be needed.
*/
struct rte_eth_conf {
speeds to be advertised. If the special value
ETH_LINK_SPEED_AUTONEG (0) is used, all speeds
supported are advertised. */
- struct rte_eth_rxmode rxmode; /**< Port RX configuration. */
- struct rte_eth_txmode txmode; /**< Port TX configuration. */
+ struct rte_eth_rxmode rxmode; /**< Port Rx configuration. */
+ struct rte_eth_txmode txmode; /**< Port Tx configuration. */
uint32_t lpbk_mode; /**< Loopback operation mode. By default the value
is 0, meaning the loopback mode is disabled.
- Read the datasheet of given ethernet controller
+ Read the datasheet of given Ethernet controller
for details. The possible values of this field
are defined in implementation of each driver. */
struct {
struct rte_eth_rss_conf rss_conf; /**< Port RSS configuration */
+ /** Port VMDq+DCB configuration. */
struct rte_eth_vmdq_dcb_conf vmdq_dcb_conf;
- /**< Port vmdq+dcb configuration. */
+ /** Port DCB Rx configuration. */
struct rte_eth_dcb_rx_conf dcb_rx_conf;
- /**< Port dcb RX configuration. */
+ /** Port VMDq Rx configuration. */
struct rte_eth_vmdq_rx_conf vmdq_rx_conf;
- /**< Port vmdq RX configuration. */
- } rx_adv_conf; /**< Port RX filtering configuration. */
+ } rx_adv_conf; /**< Port Rx filtering configuration. */
union {
+ /** Port VMDq+DCB Tx configuration. */
struct rte_eth_vmdq_dcb_tx_conf vmdq_dcb_tx_conf;
- /**< Port vmdq+dcb TX configuration. */
+ /** Port DCB Tx configuration. */
struct rte_eth_dcb_tx_conf dcb_tx_conf;
- /**< Port dcb TX configuration. */
+ /** Port VMDq Tx configuration. */
struct rte_eth_vmdq_tx_conf vmdq_tx_conf;
- /**< Port vmdq TX configuration. */
- } tx_adv_conf; /**< Port TX DCB configuration (union). */
+ } tx_adv_conf; /**< Port Tx DCB configuration (union). */
/** Currently,Priority Flow Control(PFC) are supported,if DCB with PFC
is needed,and the variable must be set ETH_DCB_PFC_SUPPORT. */
uint32_t dcb_capability_en;
};
/**
- * RX offload capabilities of a device.
+ * Rx offload capabilities of a device.
*/
#define DEV_RX_OFFLOAD_VLAN_STRIP 0x00000001
#define DEV_RX_OFFLOAD_IPV4_CKSUM 0x00000002
*/
/**
- * TX offload capabilities of a device.
+ * Tx offload capabilities of a device.
*/
#define DEV_TX_OFFLOAD_VLAN_INSERT 0x00000001
#define DEV_TX_OFFLOAD_IPV4_CKSUM 0x00000002
#define DEV_TX_OFFLOAD_IPIP_TNL_TSO 0x00000800 /**< Used for tunneling packet. */
#define DEV_TX_OFFLOAD_GENEVE_TNL_TSO 0x00001000 /**< Used for tunneling packet. */
#define DEV_TX_OFFLOAD_MACSEC_INSERT 0x00002000
-#define DEV_TX_OFFLOAD_MT_LOCKFREE 0x00004000
-/**< Multiple threads can invoke rte_eth_tx_burst() concurrently on the same
- * tx queue without SW lock.
+/**
+ * Multiple threads can invoke rte_eth_tx_burst() concurrently on the same
+ * Tx queue without SW lock.
*/
+#define DEV_TX_OFFLOAD_MT_LOCKFREE 0x00004000
+/** Device supports multi segment send. */
#define DEV_TX_OFFLOAD_MULTI_SEGS 0x00008000
-/**< Device supports multi segment send. */
-#define DEV_TX_OFFLOAD_MBUF_FAST_FREE 0x00010000
-/**< Device supports optimization for fast release of mbufs.
- * When set application must guarantee that per-queue all mbufs comes from
- * the same mempool and has refcnt = 1.
+/**
+ * Device supports optimization for fast release of mbufs.
+ * When set application must guarantee that per-queue all mbufs comes from
+ * the same mempool and has refcnt = 1.
*/
+#define DEV_TX_OFFLOAD_MBUF_FAST_FREE 0x00010000
#define DEV_TX_OFFLOAD_SECURITY 0x00020000
/**
* Device supports generic UDP tunneled packet TSO.
#define RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP 0x00000001
/** Device supports Tx queue setup after device started. */
#define RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP 0x00000002
+/**
+ * Device supports shared Rx queue among ports within Rx domain and
+ * switch domain. Mbufs are consumed by shared Rx queue instead of
+ * each queue. Multiple groups are supported by share_group of Rx
+ * queue configuration. Shared Rx queue is identified by PMD using
+ * share_qid of Rx queue configuration. Polling any port in the group
+ * receive packets of all member ports, source port identified by
+ * mbuf->port field.
+ */
+#define RTE_ETH_DEV_CAPA_RXQ_SHARE RTE_BIT64(2)
/**@}*/
/*
};
/**
- * Default values for switch domain id when ethdev does not support switch
+ * Default values for switch domain ID when ethdev does not support switch
* domain definitions.
*/
#define RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID (UINT16_MAX)
*/
struct rte_eth_switch_info {
const char *name; /**< switch name */
- uint16_t domain_id; /**< switch domain id */
- uint16_t port_id;
- /**<
- * mapping to the devices physical switch port as enumerated from the
+ uint16_t domain_id; /**< switch domain ID */
+ /**
+ * Mapping to the devices physical switch port as enumerated from the
* perspective of the embedded interconnect/switch. For SR-IOV enabled
* device this may correspond to the VF_ID of each virtual function,
* but each driver should explicitly define the mapping of switch
* port identifier to that physical interconnect/switch
*/
+ uint16_t port_id;
+ /**
+ * Shared Rx queue sub-domain boundary. Only ports in same Rx domain
+ * and switch domain can share Rx queue. Valid only if device advertised
+ * RTE_ETH_DEV_CAPA_RXQ_SHARE capability.
+ */
+ uint16_t rx_domain;
};
/**
uint16_t min_mtu; /**< Minimum MTU allowed */
uint16_t max_mtu; /**< Maximum MTU allowed */
const uint32_t *dev_flags; /**< Device flags */
- uint32_t min_rx_bufsize; /**< Minimum size of RX buffer. */
- uint32_t max_rx_pktlen; /**< Maximum configurable length of RX pkt. */
+ uint32_t min_rx_bufsize; /**< Minimum size of Rx buffer. */
+ uint32_t max_rx_pktlen; /**< Maximum configurable length of Rx pkt. */
/** Maximum configurable size of LRO aggregated packet. */
uint32_t max_lro_pkt_size;
- uint16_t max_rx_queues; /**< Maximum number of RX queues. */
- uint16_t max_tx_queues; /**< Maximum number of TX queues. */
+ uint16_t max_rx_queues; /**< Maximum number of Rx queues. */
+ uint16_t max_tx_queues; /**< Maximum number of Tx queues. */
uint32_t max_mac_addrs; /**< Maximum number of MAC addresses. */
uint32_t max_hash_mac_addrs;
/** Maximum number of hash MAC addresses for MTA and UTA. */
uint16_t max_vfs; /**< Maximum number of VFs. */
uint16_t max_vmdq_pools; /**< Maximum number of VMDq pools. */
struct rte_eth_rxseg_capa rx_seg_capa; /**< Segmentation capability.*/
+ /** All Rx offload capabilities including all per-queue ones */
uint64_t rx_offload_capa;
- /**< All RX offload capabilities including all per-queue ones */
+ /** All Tx offload capabilities including all per-queue ones */
uint64_t tx_offload_capa;
- /**< All TX offload capabilities including all per-queue ones */
+ /** Device per-queue Rx offload capabilities. */
uint64_t rx_queue_offload_capa;
- /**< Device per-queue RX offload capabilities. */
+ /** Device per-queue Tx offload capabilities. */
uint64_t tx_queue_offload_capa;
- /**< Device per-queue TX offload capabilities. */
+ /** Device redirection table size, the total number of entries. */
uint16_t reta_size;
- /**< Device redirection table size, the total number of entries. */
uint8_t hash_key_size; /**< Hash key size in bytes */
/** Bit mask of RSS offloads, the bit offset also means flow type */
uint64_t flow_type_rss_offloads;
- struct rte_eth_rxconf default_rxconf; /**< Default RX configuration */
- struct rte_eth_txconf default_txconf; /**< Default TX configuration */
- uint16_t vmdq_queue_base; /**< First queue ID for VMDQ pools. */
- uint16_t vmdq_queue_num; /**< Queue number for VMDQ pools. */
- uint16_t vmdq_pool_base; /**< First ID of VMDQ pools. */
- struct rte_eth_desc_lim rx_desc_lim; /**< RX descriptors limits */
- struct rte_eth_desc_lim tx_desc_lim; /**< TX descriptors limits */
+ struct rte_eth_rxconf default_rxconf; /**< Default Rx configuration */
+ struct rte_eth_txconf default_txconf; /**< Default Tx configuration */
+ uint16_t vmdq_queue_base; /**< First queue ID for VMDq pools. */
+ uint16_t vmdq_queue_num; /**< Queue number for VMDq pools. */
+ uint16_t vmdq_pool_base; /**< First ID of VMDq pools. */
+ struct rte_eth_desc_lim rx_desc_lim; /**< Rx descriptors limits */
+ struct rte_eth_desc_lim tx_desc_lim; /**< Tx descriptors limits */
uint32_t speed_capa; /**< Supported speeds bitmap (ETH_LINK_SPEED_). */
- /** Configured number of rx/tx queues */
- uint16_t nb_rx_queues; /**< Number of RX queues. */
- uint16_t nb_tx_queues; /**< Number of TX queues. */
+ /** Configured number of Rx/Tx queues */
+ uint16_t nb_rx_queues; /**< Number of Rx queues. */
+ uint16_t nb_tx_queues; /**< Number of Tx queues. */
/** Rx parameter recommendations */
struct rte_eth_dev_portconf default_rxportconf;
/** Tx parameter recommendations */
/**@}*/
/**
- * Ethernet device RX queue information structure.
+ * Ethernet device Rx queue information structure.
* Used to retrieve information about configured queue.
*/
struct rte_eth_rxq_info {
struct rte_mempool *mp; /**< mempool used by that queue. */
struct rte_eth_rxconf conf; /**< queue config parameters. */
- uint8_t scattered_rx; /**< scattered packets RX supported. */
+ uint8_t scattered_rx; /**< scattered packets Rx supported. */
uint8_t queue_state; /**< one of RTE_ETH_QUEUE_STATE_*. */
uint16_t nb_desc; /**< configured number of RXDs. */
uint16_t rx_buf_size; /**< hardware receive buffer size. */
} __rte_cache_min_aligned;
/**
- * Ethernet device TX queue information structure.
+ * Ethernet device Tx queue information structure.
* Used to retrieve information about configured queue.
*/
struct rte_eth_txq_info {
* by PMD, then the application can iterate to retrieve burst description for
* all other queues.
*/
-#define RTE_ETH_BURST_FLAG_PER_QUEUE (1ULL << 0)
+#define RTE_ETH_BURST_FLAG_PER_QUEUE RTE_BIT64(0)
/**
- * Ethernet device RX/TX queue packet burst mode information structure.
+ * Ethernet device Rx/Tx queue packet burst mode information structure.
* Used to retrieve information about packet burst mode setting.
*/
struct rte_eth_burst_mode {
* This structure is used by rte_eth_xstats_get() to provide
* statistics that are not provided in the generic *rte_eth_stats*
* structure.
- * It maps a name id, corresponding to an index in the array returned
+ * It maps a name ID, corresponding to an index in the array returned
* by rte_eth_xstats_get_names(), to a statistic value.
*/
struct rte_eth_xstat {
/**
* A structure used to get the information of queue and
- * TC mapping on both TX and RX paths.
+ * TC mapping on both Tx and Rx paths.
*/
struct rte_eth_dcb_tc_queue_mapping {
- /** rx queues assigned to tc per Pool */
+ /** Rx queues assigned to tc per Pool */
struct {
uint16_t base;
uint16_t nb_queue;
} tc_rxq[ETH_MAX_VMDQ_POOL][ETH_DCB_NUM_TCS];
- /** rx queues assigned to tc per Pool */
+ /** Rx queues assigned to tc per Pool */
struct {
uint16_t base;
uint16_t nb_queue;
struct rte_eth_dcb_info {
uint8_t nb_tcs; /**< number of TCs */
uint8_t prio_tc[ETH_DCB_NUM_USER_PRIORITIES]; /**< Priority to tc */
- uint8_t tc_bws[ETH_DCB_NUM_TCS]; /**< TX BW percentage for each TC */
- /** rx queues assigned to tc */
+ uint8_t tc_bws[ETH_DCB_NUM_TCS]; /**< Tx BW percentage for each TC */
+ /** Rx queues assigned to tc */
struct rte_eth_dcb_tc_queue_mapping tc_queue;
};
};
/* Translate from FEC mode to FEC capa */
-#define RTE_ETH_FEC_MODE_TO_CAPA(x) (1U << (x))
+#define RTE_ETH_FEC_MODE_TO_CAPA(x) RTE_BIT32(x)
/* This macro indicates FEC capa mask */
-#define RTE_ETH_FEC_MODE_CAPA_MASK(x) (1U << (RTE_ETH_FEC_ ## x))
+#define RTE_ETH_FEC_MODE_CAPA_MASK(x) RTE_BIT32(RTE_ETH_FEC_ ## x)
/* A structure used to get capabilities per link speed */
struct rte_eth_fec_capa {
} while (0)
/**@{@name L2 tunnel configuration */
-/**< l2 tunnel enable mask */
+/** L2 tunnel enable mask */
#define ETH_L2_TUNNEL_ENABLE_MASK 0x00000001
-/**< l2 tunnel insertion mask */
+/** L2 tunnel insertion mask */
#define ETH_L2_TUNNEL_INSERTION_MASK 0x00000002
-/**< l2 tunnel stripping mask */
+/** L2 tunnel stripping mask */
#define ETH_L2_TUNNEL_STRIPPING_MASK 0x00000004
-/**< l2 tunnel forwarding mask */
+/** L2 tunnel forwarding mask */
#define ETH_L2_TUNNEL_FORWARDING_MASK 0x00000008
/**@}*/
/**
- * Function type used for RX packet processing packet callbacks.
+ * Function type used for Rx packet processing packet callbacks.
*
- * The callback function is called on RX with a burst of packets that have
+ * The callback function is called on Rx with a burst of packets that have
* been received on the given port and queue.
*
* @param port_id
- * The Ethernet port on which RX is being performed.
+ * The Ethernet port on which Rx is being performed.
* @param queue
* The queue on the Ethernet port which is being used to receive the packets.
* @param pkts
void *user_param);
/**
- * Function type used for TX packet processing packet callbacks.
+ * Function type used for Tx packet processing packet callbacks.
*
- * The callback function is called on TX with a burst of packets immediately
+ * The callback function is called on Tx with a burst of packets immediately
* before the packets are put onto the hardware queue for transmission.
*
* @param port_id
- * The Ethernet port on which TX is being performed.
+ * The Ethernet port on which Tx is being performed.
* @param queue
* The queue on the Ethernet port which is being used to transmit the packets.
* @param pkts
struct rte_eth_dev_sriov {
uint8_t active; /**< SRIOV is active with 16, 32 or 64 pools */
- uint8_t nb_q_per_pool; /**< rx queue number per pool */
+ uint8_t nb_q_per_pool; /**< Rx queue number per pool */
uint16_t def_vmdq_idx; /**< Default pool num used for PF */
uint16_t def_pool_q_idx; /**< Default pool queue start reg index */
};
* Iterates over valid ethdev ports owned by a specific owner.
*
* @param port_id
- * The id of the next possible valid owned port.
+ * The ID of the next possible valid owned port.
* @param owner_id
* The owner identifier.
* RTE_ETH_DEV_NO_OWNER means iterate over all valid ownerless ports.
* @return
- * Next valid port id owned by owner_id, RTE_MAX_ETHPORTS if there is none.
+ * Next valid port ID owned by owner_id, RTE_MAX_ETHPORTS if there is none.
*/
uint64_t rte_eth_find_next_owned_by(uint16_t port_id,
const uint64_t owner_id);
* Iterates over valid ethdev ports.
*
* @param port_id
- * The id of the next possible valid port.
+ * The ID of the next possible valid port.
* @return
- * Next valid port id, RTE_MAX_ETHPORTS if there is none.
+ * Next valid port ID, RTE_MAX_ETHPORTS if there is none.
*/
uint16_t rte_eth_find_next(uint16_t port_id);
* Iterates over ethdev ports of a specified device.
*
* @param port_id_start
- * The id of the next possible valid port.
+ * The ID of the next possible valid port.
* @param parent
* The generic device behind the ports to iterate.
* @return
- * Next port id of the device, possibly port_id_start,
+ * Next port ID of the device, possibly port_id_start,
* RTE_MAX_ETHPORTS if there is none.
*/
uint16_t
* Macro to iterate over all ethdev ports of a specified device.
*
* @param port_id
- * The id of the matching port being iterated.
+ * The ID of the matching port being iterated.
* @param parent
* The rte_device pointer matching the iterated ports.
*/
* Iterates over sibling ethdev ports (i.e. sharing the same rte_device).
*
* @param port_id_start
- * The id of the next possible valid sibling port.
+ * The ID of the next possible valid sibling port.
* @param ref_port_id
- * The id of a reference port to compare rte_device with.
+ * The ID of a reference port to compare rte_device with.
* @return
- * Next sibling port id, possibly port_id_start or ref_port_id itself,
+ * Next sibling port ID, possibly port_id_start or ref_port_id itself,
* RTE_MAX_ETHPORTS if there is none.
*/
uint16_t
* Note: the specified reference port is part of the loop iterations.
*
* @param port_id
- * The id of the matching port being iterated.
+ * The ID of the matching port being iterated.
* @param ref_port_id
- * The id of the port being compared.
+ * The ID of the port being compared.
*/
#define RTE_ETH_FOREACH_DEV_SIBLING(port_id, ref_port_id) \
for (port_id = rte_eth_find_next_sibling(0, ref_port_id); \
* Any type of device supported offloading set in the input argument
* eth_conf->[rt]xmode.offloads to rte_eth_dev_configure() is enabled
* on all queues and it can't be disabled in rte_eth_[rt]x_queue_setup()
- * - the Receive Side Scaling (RSS) configuration when using multiple RX
+ * - the Receive Side Scaling (RSS) configuration when using multiple Rx
* queues per port. Any RSS hash function set in eth_conf->rss_conf.rss_hf
* must be within the flow_type_rss_offloads provided by drivers via
* rte_eth_dev_info_get() API.
* the DMA memory allocated for the receive descriptors of the ring.
* @param rx_conf
* The pointer to the configuration data to be used for the receive queue.
- * NULL value is allowed, in which case default RX configuration
+ * NULL value is allowed, in which case default Rx configuration
* will be used.
* The *rx_conf* structure contains an *rx_thresh* structure with the values
* of the Prefetch, Host, and Write-Back threshold registers of the receive
* the DMA memory allocated for the transmit descriptors of the ring.
* @param tx_conf
* The pointer to the configuration data to be used for the transmit queue.
- * NULL value is allowed, in which case default TX configuration
+ * NULL value is allowed, in which case default Tx configuration
* will be used.
* The *tx_conf* structure contains the following data:
* - The *tx_thresh* structure with the values of the Prefetch, Host, and
* @param port_id
* The port identifier of the Ethernet device
* @return
- * The NUMA socket id to which the Ethernet device is connected or
+ * The NUMA socket ID to which the Ethernet device is connected or
* a default of zero if the socket could not be determined.
* -1 is returned is the port_id value is out of range.
*/
int rte_eth_dev_is_valid_port(uint16_t port_id);
/**
- * Start specified RX queue of a port. It is used when rx_deferred_start
+ * Start specified Rx queue of a port. It is used when rx_deferred_start
* flag of the specified queue is true.
*
* @param port_id
* The port identifier of the Ethernet device
* @param rx_queue_id
- * The index of the rx queue to update the ring.
+ * The index of the Rx queue to update the ring.
* The value must be in the range [0, nb_rx_queue - 1] previously supplied
* to rte_eth_dev_configure().
* @return
int rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t rx_queue_id);
/**
- * Stop specified RX queue of a port
+ * Stop specified Rx queue of a port
*
* @param port_id
* The port identifier of the Ethernet device
* @param rx_queue_id
- * The index of the rx queue to update the ring.
+ * The index of the Rx queue to update the ring.
* The value must be in the range [0, nb_rx_queue - 1] previously supplied
* to rte_eth_dev_configure().
* @return
int rte_eth_dev_rx_queue_stop(uint16_t port_id, uint16_t rx_queue_id);
/**
- * Start TX for specified queue of a port. It is used when tx_deferred_start
+ * Start Tx for specified queue of a port. It is used when tx_deferred_start
* flag of the specified queue is true.
*
* @param port_id
* The port identifier of the Ethernet device
* @param tx_queue_id
- * The index of the tx queue to update the ring.
+ * The index of the Tx queue to update the ring.
* The value must be in the range [0, nb_tx_queue - 1] previously supplied
* to rte_eth_dev_configure().
* @return
int rte_eth_dev_tx_queue_start(uint16_t port_id, uint16_t tx_queue_id);
/**
- * Stop specified TX queue of a port
+ * Stop specified Tx queue of a port
*
* @param port_id
* The port identifier of the Ethernet device
* @param tx_queue_id
- * The index of the tx queue to update the ring.
+ * The index of the Tx queue to update the ring.
* The value must be in the range [0, nb_tx_queue - 1] previously supplied
* to rte_eth_dev_configure().
* @return
/**
* Link up an Ethernet device.
*
- * Set device link up will re-enable the device rx/tx
+ * Set device link up will re-enable the device Rx/Tx
* functionality after it is previously set device linked down.
*
* @param port_id
/**
* Link down an Ethernet device.
- * The device rx/tx functionality will be disabled if success,
+ * The device Rx/Tx functionality will be disabled if success,
* and it can be re-enabled with a call to
* rte_eth_dev_set_link_up()
*
int rte_eth_dev_close(uint16_t port_id);
/**
- * Reset a Ethernet device and keep its port id.
+ * Reset a Ethernet device and keep its port ID.
*
* When a port has to be reset passively, the DPDK application can invoke
* this function. For example when a PF is reset, all its VFs should also
* When this function is called, it first stops the port and then calls the
* PMD specific dev_uninit( ) and dev_init( ) to return the port to initial
* state, in which no Tx and Rx queues are setup, as if the port has been
- * reset and not started. The port keeps the port id it had before the
+ * reset and not started. The port keeps the port ID it had before the
* function call.
*
* After calling rte_eth_dev_reset( ), the application should use
* is too small. The return value corresponds to the size that should
* be given to succeed. The entries in the table are not valid and
* shall not be used by the caller.
- * - A negative value on error (invalid port id).
+ * - A negative value on error (invalid port ID).
*/
int rte_eth_xstats_get_names(uint16_t port_id,
struct rte_eth_xstat_name *xstats_names,
* is too small. The return value corresponds to the size that should
* be given to succeed. The entries in the table are not valid and
* shall not be used by the caller.
- * - A negative value on error (invalid port id).
+ * - A negative value on error (invalid port ID).
*/
int rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats,
unsigned int n);
* and RTE_PTYPE_L3_IPV4 are announced, the PMD must return the following
* packet types for these packets:
* - Ether/IPv4 -> RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4
- * - Ether/Vlan/IPv4 -> RTE_PTYPE_L2_ETHER_VLAN | RTE_PTYPE_L3_IPV4
+ * - Ether/VLAN/IPv4 -> RTE_PTYPE_L2_ETHER_VLAN | RTE_PTYPE_L3_IPV4
* - Ether/[anything else] -> RTE_PTYPE_L2_ETHER
- * - Ether/Vlan/[anything else] -> RTE_PTYPE_L2_ETHER_VLAN
+ * - Ether/VLAN/[anything else] -> RTE_PTYPE_L2_ETHER_VLAN
*
* When a packet is received by a PMD, the most precise type must be
* returned among the ones supported. However a PMD is allowed to set
* can still set a matching packet type in a received packet.
*
* @note
- * Better to invoke this API after the device is already started or rx burst
+ * Better to invoke this API after the device is already started or Rx burst
* function is decided, to obtain correct supported ptypes.
* @note
* if a given PMD does not report what ptypes it supports, then the supported
int rte_eth_dev_vlan_filter(uint16_t port_id, uint16_t vlan_id, int on);
/**
- * Enable/Disable hardware VLAN Strip by a rx queue of an Ethernet device.
+ * Enable/Disable hardware VLAN Strip by a Rx queue of an Ethernet device.
*
* @param port_id
* The port identifier of the Ethernet device.
* @param port_id
* The port identifier of the Ethernet device.
* @param vlan_type
- * The vlan type.
+ * The VLAN type.
* @param tag_type
* The Tag Protocol ID
* @return
int rte_eth_dev_get_vlan_offload(uint16_t port_id);
/**
- * Set port based TX VLAN insertion on or off.
+ * Set port based Tx VLAN insertion on or off.
*
* @param port_id
* The port identifier of the Ethernet device.
* @param pvid
- * Port based TX VLAN identifier together with user priority.
+ * Port based Tx VLAN identifier together with user priority.
* @param on
- * Turn on or off the port based TX VLAN insertion.
+ * Turn on or off the port based Tx VLAN insertion.
*
* @return
* - (0) if successful.
void *userdata);
/**
- * Structure used to buffer packets for future TX
+ * Structure used to buffer packets for future Tx
* Used by APIs rte_eth_tx_buffer and rte_eth_tx_buffer_flush
*/
struct rte_eth_dev_tx_buffer {
buffer_tx_error_fn error_callback;
void *error_userdata;
- uint16_t size; /**< Size of buffer for buffered tx */
+ uint16_t size; /**< Size of buffer for buffered Tx */
uint16_t length; /**< Number of packets in the array */
+ /** Pending packets to be sent on explicit flush or when full */
struct rte_mbuf *pkts[];
- /**< Pending packets to be sent on explicit flush or when full */
};
/**
- * Calculate the size of the tx buffer.
+ * Calculate the size of the Tx buffer.
*
* @param sz
* Number of stored packets.
* Configure a callback for buffered packets which cannot be sent
*
* Register a specific callback to be called when an attempt is made to send
- * all packets buffered on an ethernet port, but not all packets can
+ * all packets buffered on an Ethernet port, but not all packets can
* successfully be sent. The callback registered here will be called only
* from calls to rte_eth_tx_buffer() and rte_eth_tx_buffer_flush() APIs.
* The default callback configured for each queue by default just frees the
*
* This function can be passed to rte_eth_tx_buffer_set_err_callback() to
* adjust the default behavior when buffered packets cannot be sent. This
- * function drops any unsent packets silently and is used by tx buffered
+ * function drops any unsent packets silently and is used by Tx buffered
* operations as default behavior.
*
* NOTE: this function should not be called directly, instead it should be used
* eth device.
*/
enum rte_eth_event_ipsec_subtype {
+ /** Unknown event type */
RTE_ETH_EVENT_IPSEC_UNKNOWN = 0,
- /**< Unknown event type */
+ /** Sequence number overflow */
RTE_ETH_EVENT_IPSEC_ESN_OVERFLOW,
- /**< Sequence number overflow */
+ /** Soft time expiry of SA */
RTE_ETH_EVENT_IPSEC_SA_TIME_EXPIRY,
- /**< Soft time expiry of SA */
+ /** Soft byte expiry of SA */
RTE_ETH_EVENT_IPSEC_SA_BYTE_EXPIRY,
- /**< Soft byte expiry of SA */
+ /** Max value of this enum */
RTE_ETH_EVENT_IPSEC_MAX
- /**< Max value of this enum */
};
/**
* information of the IPsec offload event.
*/
struct rte_eth_event_ipsec_desc {
+ /** Type of RTE_ETH_EVENT_IPSEC_* event */
enum rte_eth_event_ipsec_subtype subtype;
- /**< Type of RTE_ETH_EVENT_IPSEC_* event */
+ /**
+ * Event specific metadata.
+ *
+ * For the following events, *userdata* registered
+ * with the *rte_security_session* would be returned
+ * as metadata,
+ *
+ * - @ref RTE_ETH_EVENT_IPSEC_ESN_OVERFLOW
+ * - @ref RTE_ETH_EVENT_IPSEC_SA_TIME_EXPIRY
+ * - @ref RTE_ETH_EVENT_IPSEC_SA_BYTE_EXPIRY
+ *
+ * @see struct rte_security_session_conf
+ *
+ */
uint64_t metadata;
- /**< Event specific metadata
- *
- * For the following events, *userdata* registered
- * with the *rte_security_session* would be returned
- * as metadata,
- *
- * - @ref RTE_ETH_EVENT_IPSEC_ESN_OVERFLOW
- * - @ref RTE_ETH_EVENT_IPSEC_SA_TIME_EXPIRY
- * - @ref RTE_ETH_EVENT_IPSEC_SA_BYTE_EXPIRY
- *
- * @see struct rte_security_session_conf
- *
- */
};
/**
enum rte_eth_event_type {
RTE_ETH_EVENT_UNKNOWN, /**< unknown event type */
RTE_ETH_EVENT_INTR_LSC, /**< lsc interrupt event */
+ /** queue state event (enabled/disabled) */
RTE_ETH_EVENT_QUEUE_STATE,
- /**< queue state event (enabled/disabled) */
+ /** reset interrupt event, sent to VF on PF reset */
RTE_ETH_EVENT_INTR_RESET,
- /**< reset interrupt event, sent to VF on PF reset */
RTE_ETH_EVENT_VF_MBOX, /**< message from the VF received by PF */
RTE_ETH_EVENT_MACSEC, /**< MACsec offload related event */
RTE_ETH_EVENT_INTR_RMV, /**< device removal event */
RTE_ETH_EVENT_MAX /**< max value of this enum */
};
+/** User application callback to be registered for interrupts. */
typedef int (*rte_eth_dev_cb_fn)(uint16_t port_id,
enum rte_eth_event_type event, void *cb_arg, void *ret_param);
-/**< user application callback to be registered for interrupts */
/**
* Register a callback function for port event.
*
* @param port_id
- * Port id.
+ * Port ID.
* RTE_ETH_ALL means register the event for all port ids.
* @param event
* Event interested.
* Unregister a callback function for port event.
*
* @param port_id
- * Port id.
+ * Port ID.
* RTE_ETH_ALL means unregister the event for all port ids.
* @param event
* Event interested.
rte_eth_dev_cb_fn cb_fn, void *cb_arg);
/**
- * When there is no rx packet coming in Rx Queue for a long time, we can
- * sleep lcore related to RX Queue for power saving, and enable rx interrupt
+ * When there is no Rx packet coming in Rx Queue for a long time, we can
+ * sleep lcore related to Rx Queue for power saving, and enable Rx interrupt
* to be triggered when Rx packet arrives.
*
- * The rte_eth_dev_rx_intr_enable() function enables rx queue
- * interrupt on specific rx queue of a port.
+ * The rte_eth_dev_rx_intr_enable() function enables Rx queue
+ * interrupt on specific Rx queue of a port.
*
* @param port_id
* The port identifier of the Ethernet device.
int rte_eth_dev_rx_intr_enable(uint16_t port_id, uint16_t queue_id);
/**
- * When lcore wakes up from rx interrupt indicating packet coming, disable rx
+ * When lcore wakes up from Rx interrupt indicating packet coming, disable Rx
* interrupt and returns to polling mode.
*
- * The rte_eth_dev_rx_intr_disable() function disables rx queue
- * interrupt on specific rx queue of a port.
+ * The rte_eth_dev_rx_intr_disable() function disables Rx queue
+ * interrupt on specific Rx queue of a port.
*
* @param port_id
* The port identifier of the Ethernet device.
int rte_eth_dev_rx_intr_disable(uint16_t port_id, uint16_t queue_id);
/**
- * RX Interrupt control per port.
+ * Rx Interrupt control per port.
*
* @param port_id
* The port identifier of the Ethernet device.
int rte_eth_dev_rx_intr_ctl(uint16_t port_id, int epfd, int op, void *data);
/**
- * RX Interrupt control per queue.
+ * Rx Interrupt control per queue.
*
* @param port_id
* The port identifier of the Ethernet device.
/**
* Updates unicast hash table for receiving packet with the given destination
- * MAC address, and the packet is routed to all VFs for which the RX mode is
+ * MAC address, and the packet is routed to all VFs for which the Rx mode is
* accept packets that match the unicast hash table.
*
* @param port_id
/**
* Updates all unicast hash bitmaps for receiving packet with any Unicast
- * Ethernet MAC addresses,the packet is routed to all VFs for which the RX
+ * Ethernet MAC addresses,the packet is routed to all VFs for which the Rx
* mode is accept packets that match the unicast hash table.
*
* @param port_id
* @param port_id
* The port identifier of the Ethernet device.
* @param queue_idx
- * The queue id.
+ * The queue ID.
* @param tx_rate
- * The tx rate in Mbps. Allocated from the total port link speed.
+ * The Tx rate in Mbps. Allocated from the total port link speed.
* @return
* - (0) if successful.
* - (-ENOTSUP) if hardware doesn't support this feature.
* @param port_id
* The port identifier of the Ethernet device.
* @param dcb_info
- * dcb information.
+ * DCB information.
* @return
* - (0) if successful.
* - (-ENODEV) if port identifier is invalid.
struct rte_eth_rxtx_callback;
/**
- * Add a callback to be called on packet RX on a given port and queue.
+ * Add a callback to be called on packet Rx on a given port and queue.
*
* This API configures a function to be called for each burst of
* packets received on a given NIC port queue. The return value is a pointer
rte_rx_callback_fn fn, void *user_param);
/**
- * Add a callback that must be called first on packet RX on a given port
+ * Add a callback that must be called first on packet Rx on a given port
* and queue.
*
* This API configures a first function to be called for each burst of
rte_rx_callback_fn fn, void *user_param);
/**
- * Add a callback to be called on packet TX on a given port and queue.
+ * Add a callback to be called on packet Tx on a given port and queue.
*
* This API configures a function to be called for each burst of
* packets sent on a given NIC port queue. The return value is a pointer
rte_tx_callback_fn fn, void *user_param);
/**
- * Remove an RX packet callback from a given port and queue.
+ * Remove an Rx packet callback from a given port and queue.
*
* This function is used to removed callbacks that were added to a NIC port
* queue using rte_eth_add_rx_callback().
* subsequently freed back by the application by calling rte_free():
*
* - Immediately - if the port is stopped, or the user knows that no
- * callbacks are in flight e.g. if called from the thread doing RX/TX
+ * callbacks are in flight e.g. if called from the thread doing Rx/Tx
* on that queue.
*
* - After a short delay - where the delay is sufficient to allow any
const struct rte_eth_rxtx_callback *user_cb);
/**
- * Remove a TX packet callback from a given port and queue.
+ * Remove a Tx packet callback from a given port and queue.
*
* This function is used to removed callbacks that were added to a NIC port
* queue using rte_eth_add_tx_callback().
* subsequently freed back by the application by calling rte_free():
*
* - Immediately - if the port is stopped, or the user knows that no
- * callbacks are in flight e.g. if called from the thread doing RX/TX
+ * callbacks are in flight e.g. if called from the thread doing Rx/Tx
* on that queue.
*
* - After a short delay - where the delay is sufficient to allow any
const struct rte_eth_rxtx_callback *user_cb);
/**
- * Retrieve information about given port's RX queue.
+ * Retrieve information about given port's Rx queue.
*
* @param port_id
* The port identifier of the Ethernet device.
* @param queue_id
- * The RX queue on the Ethernet device for which information
+ * The Rx queue on the Ethernet device for which information
* will be retrieved.
* @param qinfo
* A pointer to a structure of type *rte_eth_rxq_info_info* to be filled with
struct rte_eth_rxq_info *qinfo);
/**
- * Retrieve information about given port's TX queue.
+ * Retrieve information about given port's Tx queue.
*
* @param port_id
* The port identifier of the Ethernet device.
* @param queue_id
- * The TX queue on the Ethernet device for which information
+ * The Tx queue on the Ethernet device for which information
* will be retrieved.
* @param qinfo
* A pointer to a structure of type *rte_eth_txq_info_info* to be filled with
int rte_eth_timesync_disable(uint16_t port_id);
/**
- * Read an IEEE1588/802.1AS RX timestamp from an Ethernet device.
+ * Read an IEEE1588/802.1AS Rx timestamp from an Ethernet device.
*
* @param port_id
* The port identifier of the Ethernet device.
* @param timestamp
* Pointer to the timestamp struct.
* @param flags
- * Device specific flags. Used to pass the RX timesync register index to
+ * Device specific flags. Used to pass the Rx timesync register index to
* i40e. Unused in igb/ixgbe, pass 0 instead.
*
* @return
struct timespec *timestamp, uint32_t flags);
/**
- * Read an IEEE1588/802.1AS TX timestamp from an Ethernet device.
+ * Read an IEEE1588/802.1AS Tx timestamp from an Ethernet device.
*
* @param port_id
* The port identifier of the Ethernet device.
rte_eth_read_clock(uint16_t port_id, uint64_t *clock);
/**
-* Get the port id from device name. The device name should be specified
+* Get the port ID from device name. The device name should be specified
* as below:
* - PCIe address (Domain:Bus:Device.Function), for example- 0000:2:00.0
* - SoC device name, for example- fsl-gmac0
rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id);
/**
-* Get the device name from port id. The device name is specified as below:
+* Get the device name from port ID. The device name is specified as below:
* - PCIe address (Domain:Bus:Device.Function), for example- 0000:02:00.0
* - SoC device name, for example- fsl-gmac0
* - vdev dpdk name, for example- net_[pcap0|null0|tun0|tap0]
/**
* Check that numbers of Rx and Tx descriptors satisfy descriptors limits from
- * the ethernet device information, otherwise adjust them to boundaries.
+ * the Ethernet device information, otherwise adjust them to boundaries.
*
* @param port_id
* The port identifier of the Ethernet device.
* @warning
* @b EXPERIMENTAL: this structure may change without prior notice.
*
- * ethernet device representor ID range entry
+ * Ethernet device representor ID range entry
*/
struct rte_eth_representor_range {
enum rte_eth_representor_type type; /**< Representor type */
struct rte_eth_representor_info *info);
/** The NIC is able to deliver flag (if set) with packets to the PMD. */
-#define RTE_ETH_RX_METADATA_USER_FLAG (UINT64_C(1) << 0)
+#define RTE_ETH_RX_METADATA_USER_FLAG RTE_BIT64(0)
/** The NIC is able to deliver mark ID with packets to the PMD. */
-#define RTE_ETH_RX_METADATA_USER_MARK (UINT64_C(1) << 1)
+#define RTE_ETH_RX_METADATA_USER_MARK RTE_BIT64(1)
/** The NIC is able to deliver tunnel ID with packets to the PMD. */
-#define RTE_ETH_RX_METADATA_TUNNEL_ID (UINT64_C(1) << 2)
+#define RTE_ETH_RX_METADATA_TUNNEL_ID RTE_BIT64(2)
/**
* @warning
* device. The retrieved packets are stored in *rte_mbuf* structures whose
* pointers are supplied in the *rx_pkts* array.
*
- * The rte_eth_rx_burst() function loops, parsing the RX ring of the
- * receive queue, up to *nb_pkts* packets, and for each completed RX
+ * The rte_eth_rx_burst() function loops, parsing the Rx ring of the
+ * receive queue, up to *nb_pkts* packets, and for each completed Rx
* descriptor in the ring, it performs the following operations:
*
* - Initialize the *rte_mbuf* data structure associated with the
- * RX descriptor according to the information provided by the NIC into
- * that RX descriptor.
+ * Rx descriptor according to the information provided by the NIC into
+ * that Rx descriptor.
*
* - Store the *rte_mbuf* data structure into the next entry of the
* *rx_pkts* array.
*
- * - Replenish the RX descriptor with a new *rte_mbuf* buffer
+ * - Replenish the Rx descriptor with a new *rte_mbuf* buffer
* allocated from the memory pool associated with the receive queue at
* initialization time.
*
* The rte_eth_rx_burst() function returns the number of packets
* actually retrieved, which is the number of *rte_mbuf* data structures
* effectively supplied into the *rx_pkts* array.
- * A return value equal to *nb_pkts* indicates that the RX queue contained
+ * A return value equal to *nb_pkts* indicates that the Rx queue contained
* at least *rx_pkts* packets, and this is likely to signify that other
* received packets remain in the input queue. Applications implementing
* a "retrieve as much received packets as possible" policy can check this
RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0);
if (qd == NULL) {
- RTE_ETHDEV_LOG(ERR, "Invalid RX queue_id=%u for port_id=%u\n",
+ RTE_ETHDEV_LOG(ERR, "Invalid Rx queue_id=%u for port_id=%u\n",
queue_id, port_id);
return 0;
}
}
/**
- * Get the number of used descriptors of a rx queue
+ * Get the number of used descriptors of a Rx queue
*
* @param port_id
* The port identifier of the Ethernet device.
* @param queue_id
- * The queue id on the specific port.
+ * The queue ID on the specific port.
* @return
* The number of used descriptors in the specific queue, or:
* - (-ENODEV) if *port_id* is invalid.
* supplied in the *tx_pkts* array of *rte_mbuf* structures, each of them
* allocated from a pool created with rte_pktmbuf_pool_create().
* The rte_eth_tx_burst() function loops, sending *nb_pkts* packets,
- * up to the number of transmit descriptors available in the TX ring of the
+ * up to the number of transmit descriptors available in the Tx ring of the
* transmit queue.
* For each packet to send, the rte_eth_tx_burst() function performs
* the following operations:
* transparently free the memory buffers of packets previously sent.
* This feature is driven by the *tx_free_thresh* value supplied to the
* rte_eth_dev_configure() function at device configuration time.
- * When the number of free TX descriptors drops below this threshold, the
+ * When the number of free Tx descriptors drops below this threshold, the
* rte_eth_tx_burst() function must [attempt to] free the *rte_mbuf* buffers
* of those packets whose transmission was effectively completed.
*
* If the PMD is DEV_TX_OFFLOAD_MT_LOCKFREE capable, multiple threads can
- * invoke this function concurrently on the same tx queue without SW lock.
+ * invoke this function concurrently on the same Tx queue without SW lock.
* @see rte_eth_dev_info_get, struct rte_eth_txconf::offloads
*
* @see rte_eth_tx_prepare to perform some prior checks or adjustments
RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0);
if (qd == NULL) {
- RTE_ETHDEV_LOG(ERR, "Invalid TX queue_id=%u for port_id=%u\n",
+ RTE_ETHDEV_LOG(ERR, "Invalid Tx queue_id=%u for port_id=%u\n",
queue_id, port_id);
return 0;
}
* For each packet to send, the rte_eth_tx_prepare() function performs
* the following operations:
*
- * - Check if packet meets devices requirements for tx offloads.
+ * - Check if packet meets devices requirements for Tx offloads.
*
* - Check limitations about number of segments.
*
* - Check additional requirements when debug is enabled.
*
- * - Update and/or reset required checksums when tx offload is set for packet.
+ * - Update and/or reset required checksums when Tx offload is set for packet.
*
* Since this function can modify packet data, provided mbufs must be safely
* writable (e.g. modified data cannot be in shared segment).
*
* @param port_id
* The port identifier of the Ethernet device.
- * The value must be a valid port id.
+ * The value must be a valid port ID.
* @param queue_id
* The index of the transmit queue through which output packets must be
* sent.
#ifdef RTE_ETHDEV_DEBUG_TX
if (!rte_eth_dev_is_valid_port(port_id)) {
- RTE_ETHDEV_LOG(ERR, "Invalid TX port_id=%u\n", port_id);
+ RTE_ETHDEV_LOG(ERR, "Invalid Tx port_id=%u\n", port_id);
rte_errno = ENODEV;
return 0;
}
if (qd == NULL) {
- RTE_ETHDEV_LOG(ERR, "Invalid TX queue_id=%u for port_id=%u\n",
+ RTE_ETHDEV_LOG(ERR, "Invalid Tx queue_id=%u for port_id=%u\n",
queue_id, port_id);
rte_errno = EINVAL;
return 0;