rte_eth_dev_info(3)

๐Ÿ’– rte_eth_dev_info ๐Ÿ’–

okay bestie, gather round, because today we're reading rte_eth_dev_info(3) from the Library Functions Manual and honestly? it's giving โœจbackstage pass to your NICโœจ. This is the struct that lets you pull the whole contextual tea on an Ethernet device โ€” who's driving it, what it can do, how many queues it'll let you have. No cap.


๐ŸŒธ NAME ๐ŸŒธ

rte_eth_dev_info โ€” the struct you hit up when you want to know literally everything about an Ethernet device before you start configuring it ๐Ÿฆ‹


โœจ SYNOPSIS โœจ

#include <rte_ethdev.h>

๐ŸŽ€ Data Fields ๐ŸŽ€

here's the full roster, bestie, in order, no skipping ๐Ÿ’…

struct rte_device * device
const char * driver_name
unsigned int if_index
uint16_t min_mtu
uint16_t max_mtu
const uint32_t * dev_flags
uint32_t min_rx_bufsize
uint32_t max_rx_bufsize
uint32_t max_rx_pktlen
uint32_t max_lro_pkt_size
uint16_t max_rx_queues
uint16_t max_tx_queues
uint32_t max_mac_addrs
uint32_t max_hash_mac_addrs
uint16_t max_vfs
uint16_t max_vmdq_pools
struct rte_eth_rxseg_capa rx_seg_capa
uint64_t rx_offload_capa
uint64_t tx_offload_capa
uint64_t rx_queue_offload_capa
uint64_t tx_queue_offload_capa
uint16_t reta_size
uint8_t hash_key_size
uint64_t flow_type_rss_offloads
struct rte_eth_rxconf default_rxconf
struct rte_eth_txconf default_txconf
uint16_t vmdq_queue_base
uint16_t vmdq_queue_num
uint16_t vmdq_pool_base
struct rte_eth_desc_lim rx_desc_lim
struct rte_eth_desc_lim tx_desc_lim
uint32_t speed_capa
uint16_t nb_rx_queues
uint16_t nb_tx_queues
uint16_t max_rx_mempools
struct rte_eth_dev_portconf default_rxportconf
struct rte_eth_dev_portconf default_txportconf
uint64_t dev_capa
struct rte_eth_switch_info switch_info
enum rte_eth_err_handle_mode err_handle_mode
uint64_t reserved_64s [2]
void * reserved_ptrs [2]

๐ŸŒˆ DETAILED DESCRIPTION ๐ŸŒˆ

So. This is the structure you use to retrieve the contextual information of an Ethernet device โ€” like, who's the controlling driver of the device, etc... etc, bestie, the etc is doing so much heavy lifting here ๐Ÿ˜ญ

Definition at line 1806 of file rte_ethdev.h. ๐Ÿ“

๐Ÿ’œ FIELD DOCUMENTATION ๐Ÿ’œ

every single field, every single line number, let's go ๐Ÿซถ

struct rte_device* device

Generic device information ๐Ÿ’ซ

Definition at line 1807 of file rte_ethdev.h.

const char* driver_name

Device Driver name. iconic, we love a name drop ๐Ÿ‘‘

Definition at line 1808 of file rte_ethdev.h.

unsigned int if_index

Index to bound host interface, or 0 if none. Use if_indextoname() to translate into an interface name. it's giving โœจlookup table energyโœจ

Definition at line 1809 of file rte_ethdev.h.

uint16_t min_mtu

Minimum MTU allowed ๐Ÿ“

Definition at line 1811 of file rte_ethdev.h.

uint16_t max_mtu

Maximum MTU allowed ๐Ÿ“ (yes, it's the max, the ceiling, the limit, periodt)

Definition at line 1812 of file rte_ethdev.h.

const uint32_t* dev_flags

Device flags ๐Ÿšฉ (the good kind, presumably)

Definition at line 1813 of file rte_ethdev.h.

uint32_t min_rx_bufsize

Minimum Rx buffer size per descriptor supported by HW. the floor, the absolute minimum, bestie ๐Ÿ’…

Definition at line 1815 of file rte_ethdev.h.

uint32_t max_rx_bufsize

Maximum Rx buffer size per descriptor supported by HW. listen โ€” the value is not enforced, it's information only, for the application to optimize mbuf size. Its value is UINT32_MAX when not specified by the driver. so like, it's a hint, not a rule, okay? ๐Ÿ™ˆ

Definition at line 1822 of file rte_ethdev.h.

uint32_t max_rx_pktlen

Maximum configurable length of Rx pkt ๐Ÿ”ฅ

Definition at line 1823 of file rte_ethdev.h.

uint32_t max_lro_pkt_size

Maximum configurable size of LRO aggregated packet ๐Ÿ“ฆ

Definition at line 1825 of file rte_ethdev.h.

uint16_t max_rx_queues

Maximum number of Rx queues. that's how many you get, don't be greedy ๐ŸŒธ

Definition at line 1826 of file rte_ethdev.h.

uint16_t max_tx_queues

Maximum number of Tx queues. same deal, but outgoing ๐Ÿ“ค

Definition at line 1827 of file rte_ethdev.h.

uint32_t max_mac_addrs

Maximum number of MAC addresses ๐Ÿ’Œ

Definition at line 1828 of file rte_ethdev.h.

uint32_t max_hash_mac_addrs

Maximum number of hash MAC addresses for MTA and UTA ๐Ÿงฎ

Definition at line 1830 of file rte_ethdev.h.

uint16_t max_vfs

Maximum number of VFs. nah because virtualization is literally the moment ๐ŸŒ

Definition at line 1831 of file rte_ethdev.h.

uint16_t max_vmdq_pools

Maximum number of VMDq pools ๐ŸŠ

Definition at line 1832 of file rte_ethdev.h.

struct rte_eth_rxseg_capa rx_seg_capa

Segmentation capability โœ‚๏ธ

Definition at line 1833 of file rte_ethdev.h.

uint64_t rx_offload_capa

All Rx offload capabilities including all per-queue ones ๐Ÿ‘‘ (read that again, it's a superset, iykyk)

Definition at line 1835 of file rte_ethdev.h.

uint64_t tx_offload_capa

All Tx offload capabilities including all per-queue ones ๐Ÿ‘‘ (yes, also a superset, we're consistent here)

Definition at line 1837 of file rte_ethdev.h.

uint64_t rx_queue_offload_capa

Device per-queue Rx offload capabilities ๐Ÿ’… (just the per-queue ones, babes, the per-queue ones)

Definition at line 1839 of file rte_ethdev.h.

uint64_t tx_queue_offload_capa

Device per-queue Tx offload capabilities ๐Ÿ’… (ditto)

Definition at line 1841 of file rte_ethdev.h.

uint16_t reta_size

Device redirection table size, the total number of entries ๐Ÿ—‚๏ธ

Definition at line 1843 of file rte_ethdev.h.

uint8_t hash_key_size

Hash key size in bytes ๐Ÿ”‘

Definition at line 1844 of file rte_ethdev.h.

uint64_t flow_type_rss_offloads

RSS hash algorithms capabilities. Bit mask of RSS offloads โ€” and plot twist: the bit offset also means flow type ๐Ÿ‘€

Definition at line 1847 of file rte_ethdev.h.

struct rte_eth_rxconf default_rxconf

Default Rx configuration ๐ŸŽ€

Definition at line 1848 of file rte_ethdev.h.

struct rte_eth_txconf default_txconf

Default Tx configuration ๐ŸŽ€

Definition at line 1849 of file rte_ethdev.h.

uint16_t vmdq_queue_base

First queue ID for VMDq pools ๐Ÿ”ข

Definition at line 1850 of file rte_ethdev.h.

uint16_t vmdq_queue_num

Queue number for VMDq pools ๐Ÿ”ข

Definition at line 1851 of file rte_ethdev.h.

uint16_t vmdq_pool_base

First ID of VMDq pools ๐Ÿ”ข

Definition at line 1852 of file rte_ethdev.h.

struct rte_eth_desc_lim rx_desc_lim

Rx descriptors limits ๐Ÿšง

Definition at line 1853 of file rte_ethdev.h.

struct rte_eth_desc_lim tx_desc_lim

Tx descriptors limits ๐Ÿšง

Definition at line 1854 of file rte_ethdev.h.

uint32_t speed_capa

Supported speeds bitmap (RTE_ETH_LINK_SPEED_). zoom zoom ๐ŸŽ๏ธ

Definition at line 1855 of file rte_ethdev.h.

uint16_t nb_rx_queues

Configured number of Rx/Tx queues. Number of Rx queues. ๐Ÿ“ฅ (the label says Rx/Tx but the field is Rx, don't come for me, I'm just the messenger ๐Ÿ™ˆ)

Definition at line 1857 of file rte_ethdev.h.

uint16_t nb_tx_queues

Number of Tx queues ๐Ÿ“ค

Definition at line 1858 of file rte_ethdev.h.

uint16_t max_rx_mempools

Maximum number of Rx mempools supported per Rx queue.

listen closely bestie: a value greater than 0 means the driver supports Rx queue mempools specification via rx_conf->rx_mempools ๐Ÿ‘€ so if you see a nonzero here, you know what's up.

Definition at line 1865 of file rte_ethdev.h.

struct rte_eth_dev_portconf default_rxportconf

Rx parameter recommendations ๐ŸŒŸ (recommendations, bestie, not demands)

Definition at line 1867 of file rte_ethdev.h.

struct rte_eth_dev_portconf default_txportconf

Tx parameter recommendations ๐ŸŒŸ

Definition at line 1869 of file rte_ethdev.h.

uint64_t dev_capa

Generic device capabilities (RTE_ETH_DEV_CAPA_). the whole vibe check of what this thing can do ๐Ÿ’ช

Definition at line 1871 of file rte_ethdev.h.

struct rte_eth_switch_info switch_info

Switching information for ports on a device with a embedded managed interconnect/switch ๐Ÿ”€

Definition at line 1876 of file rte_ethdev.h.

enum rte_eth_err_handle_mode err_handle_mode

Supported error handling mode ๐Ÿšจ

Definition at line 1878 of file rte_ethdev.h.

uint64_t reserved_64s[2]

Reserved for future fields ๐Ÿ”ฎ (do not touch, it's not for you, it's for the future girlies)

Definition at line 1880 of file rte_ethdev.h.

void* reserved_ptrs[2]

Reserved for future fields ๐Ÿ”ฎ (same, hands off)

Definition at line 1881 of file rte_ethdev.h.

๐Ÿซถ AUTHOR ๐Ÿซถ

Generated automatically by Doxygen for DPDK from the source code. not a human author, just a robot doing its little documentation tasks and honestly? slay, robot ๐Ÿค–โœจ


๐Ÿ’Œ SEE ALSO ๐Ÿ’Œ

okay so the original page doesn't give us a SEE ALSO section, but if_indextoname() and everything in rte_ethdev.h are right there waiting for you, bestie. go read them, it's giving โœจhomework but the fun kindโœจ


and that's the whole page!! ๐ŸŽ‰ no cap, every field accounted for, nothing dropped, nothing made up. this was DPDK Version 25.11.3, documented on the rte_eth_dev_info(3) page in the Library Functions Manual. go configure your NIC with confidence, bestie โ€” you ate ๐Ÿ’…๐Ÿ’–โœจ๐Ÿฆ‹๐ŸŒธ


๐Ÿ“ฆ where this page comes from