rte_pmd_ixgbe.h(3)

โœจ rte_pmd_ixgbe.h โœจ โ€” library functions manual ๐Ÿฆ‹

okay bestie, welcome to the ixgbe era. this is the header for all the rte_pmd_ixgbe goodies, and it is long, so we're doing this in parts. stay with me ๐Ÿ’…


๐ŸŒธ NAME ๐ŸŒธ

rte_pmd_ixgbe.h โ€” the header where all the ixgbe PMD specific functions live, fr fr.


๐ŸŽ€ SYNOPSIS ๐ŸŽ€

#include <rte_compat.h>
#include <rte_ethdev.h>
#include <rte_ether.h>

๐Ÿ’– Data Structures ๐Ÿ’–

  • struct rte_pmd_ixgbe_mb_event_param

๐Ÿ’– Enumerations ๐Ÿ’–

  • enum rte_pmd_ixgbe_mb_event_rsp { RTE_PMD_IXGBE_MB_EVENT_NOOP_ACK, RTE_PMD_IXGBE_MB_EVENT_NOOP_NACK, RTE_PMD_IXGBE_MB_EVENT_PROCEED, RTE_PMD_IXGBE_MB_EVENT_MAX }

๐Ÿ’– Functions ๐Ÿ’–

int rte_pmd_ixgbe_ping_vf (uint16_t port, uint16_t vf)
int rte_pmd_ixgbe_set_vf_mac_addr (uint16_t port, uint16_t vf, struct
    rte_ether_addr *mac_addr)
int rte_pmd_ixgbe_set_vf_vlan_anti_spoof (uint16_t port, uint16_t vf,
    uint8_t on)
int rte_pmd_ixgbe_set_vf_mac_anti_spoof (uint16_t port, uint16_t vf,
    uint8_t on)
int rte_pmd_ixgbe_set_vf_vlan_insert (uint16_t port, uint16_t vf,
    uint16_t vlan_id)
int rte_pmd_ixgbe_set_tx_loopback (uint16_t port, uint8_t on)
int rte_pmd_ixgbe_set_all_queues_drop_en (uint16_t port, uint8_t on)
int rte_pmd_ixgbe_set_vf_split_drop_en (uint16_t port, uint16_t vf,
    uint8_t on)
int rte_pmd_ixgbe_set_vf_vlan_stripq (uint16_t port, uint16_t vf,
    uint8_t on)
int rte_pmd_ixgbe_macsec_enable (uint16_t port, uint8_t en, uint8_t rp)
int rte_pmd_ixgbe_macsec_disable (uint16_t port)
int rte_pmd_ixgbe_macsec_config_txsc (uint16_t port, uint8_t *mac)
int rte_pmd_ixgbe_macsec_config_rxsc (uint16_t port, uint8_t *mac,
    uint16_t pi)
int rte_pmd_ixgbe_macsec_select_txsa (uint16_t port, uint8_t idx,
    uint8_t an, uint32_t pn, uint8_t *key)
int rte_pmd_ixgbe_macsec_select_rxsa (uint16_t port, uint8_t idx,
    uint8_t an, uint32_t pn, uint8_t *key)
int rte_pmd_ixgbe_set_vf_rxmode (uint16_t port, uint16_t vf, uint16_t
    rx_mask, uint8_t on)
int rte_pmd_ixgbe_set_vf_rx (uint16_t port, uint16_t vf, uint8_t on)
int rte_pmd_ixgbe_set_vf_tx (uint16_t port, uint16_t vf, uint8_t on)
int rte_pmd_ixgbe_set_vf_vlan_filter (uint16_t port, uint16_t vlan,
    uint64_t vf_mask, uint8_t vlan_on)
int rte_pmd_ixgbe_set_vf_rate_limit (uint16_t port, uint16_t vf,
    uint32_t tx_rate, uint64_t q_msk)
int rte_pmd_ixgbe_set_tc_bw_alloc (uint16_t port, uint8_t tc_num,
    uint8_t *bw_weight)
int rte_pmd_ixgbe_bypass_init (uint16_t port)
int rte_pmd_ixgbe_bypass_state_show (uint16_t port, uint32_t *state)
int rte_pmd_ixgbe_bypass_state_set (uint16_t port, uint32_t *new_state)
int rte_pmd_ixgbe_bypass_event_show (uint16_t port, uint32_t event,
    uint32_t *state)
int rte_pmd_ixgbe_bypass_event_store (uint16_t port, uint32_t event,
    uint32_t state)
int rte_pmd_ixgbe_bypass_wd_timeout_store (uint16_t port, uint32_t
    timeout)
int rte_pmd_ixgbe_bypass_ver_show (uint16_t port, uint32_t *ver)
int rte_pmd_ixgbe_bypass_wd_timeout_show (uint16_t port, uint32_t
    *wd_timeout)
int rte_pmd_ixgbe_bypass_wd_reset (uint16_t port)
int rte_pmd_ixgbe_mdio_lock (uint16_t port)
int rte_pmd_ixgbe_mdio_unlock (uint16_t port)
int rte_pmd_ixgbe_mdio_unlocked_read (uint16_t port, uint32_t reg_addr,
    uint32_t dev_type, uint16_t *phy_data)
int rte_pmd_ixgbe_mdio_unlocked_write (uint16_t port, uint32_t reg_addr,
    uint32_t dev_type, uint16_t phy_data)
int rte_pmd_ixgbe_upd_fctrl_sbp (uint16_t port, int enable)
__rte_experimental int rte_pmd_ixgbe_get_fdir_info (uint16_t port,
    struct rte_eth_fdir_info *fdir_info)
__rte_experimental int rte_pmd_ixgbe_get_fdir_stats (uint16_t port,
    struct rte_eth_fdir_stats *fdir_stats)

that's a lot of functions, and yes, we're covering every single one. no skipping. periodt ๐Ÿ’œ


๐Ÿ‘‘ Detailed Description ๐Ÿ‘‘

ixgbe PMD specific functions. that's the whole vibe โ€” these are the extras that only exist for the ixgbe driver, not the generic ethdev stuff.

Definition in file rte_pmd_ixgbe.h.


๐Ÿ”ฎ Enumeration Type Documentation ๐Ÿ”ฎ

enum rte_pmd_ixgbe_mb_event_rsp

Response sent back to ixgbe driver from user app after callback ๐Ÿซถ

Enumerator:

  • RTE_PMD_IXGBE_MB_EVENT_NOOP_ACK โ€” skip mbox request and ACK
  • RTE_PMD_IXGBE_MB_EVENT_NOOP_NACK โ€” skip mbox request and NACK
  • RTE_PMD_IXGBE_MB_EVENT_PROCEED โ€” proceed with mbox request
  • RTE_PMD_IXGBE_MB_EVENT_MAX โ€” max value of this enum

Definition at line 653 of file rte_pmd_ixgbe.h.


๐Ÿ’… Function Documentation ๐Ÿ’…

int rte_pmd_ixgbe_ping_vf (uint16_t port, uint16_t vf)

Notify VF when PF link status changes. like a lil "hey bestie, link changed" tap on the shoulder โœจ

Parameters:

  • port โ€” The port identifier of the Ethernet device.
  • vf โ€” VF id.

Returns:

  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if vf invalid.

int rte_pmd_ixgbe_set_vf_mac_addr (uint16_t port, uint16_t vf, struct rte_ether_addr * mac_addr)

Set the VF MAC address. giving that VF its whole identity ngl ๐ŸŽ€

Parameters:

  • port โ€” The port identifier of the Ethernet device.
  • vf โ€” VF id.
  • mac_addr โ€” VF MAC address.

Returns:

  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if vf or mac_addr is invalid.

int rte_pmd_ixgbe_set_vf_vlan_anti_spoof (uint16_t port, uint16_t vf, uint8_t on)

Enable/Disable VF VLAN anti spoofing. protecting the VLAN vibe from impostors ๐Ÿ’€

Parameters:

  • port โ€” The port identifier of the Ethernet device.
  • vf โ€” VF on which to set VLAN anti spoofing.
  • on โ€” 1 - Enable VFs VLAN anti spoofing. 0 - Disable VFs VLAN anti spoofing.

Returns:

  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.

int rte_pmd_ixgbe_set_vf_mac_anti_spoof (uint16_t port, uint16_t vf, uint8_t on)

Enable/Disable VF MAC anti spoofing. same energy, but for MAC this time ๐Ÿฆ‹

Parameters:

  • port โ€” The port identifier of the Ethernet device.
  • vf โ€” VF on which to set MAC anti spoofing.
  • on โ€” 1 - Enable VFs MAC anti spoofing. 0 - Disable VFs MAC anti spoofing.

Returns:

  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.

int rte_pmd_ixgbe_set_vf_vlan_insert (uint16_t port, uint16_t vf, uint16_t vlan_id)

Enable/Disable vf vlan insert. sticking a VLAN tag on like it's the finishing touch ๐Ÿ’…

Parameters:

  • port โ€” The port identifier of the Ethernet device.
  • vf โ€” ID specifying VF.
  • vlan_id โ€” 0 - Disable VF's vlan insert. n - Enable; n is inserted as the vlan id.

Returns:

  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.

int rte_pmd_ixgbe_set_tx_loopback (uint16_t port, uint8_t on)

Enable/Disable tx loopback. the packet goes out and comes right back home ๐Ÿชฉ

Parameters:

  • port โ€” The port identifier of the Ethernet device.
  • on โ€” 1 - Enable tx loopback. 0 - Disable tx loopback.

Returns:

  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.

int rte_pmd_ixgbe_set_all_queues_drop_en (uint16_t port, uint8_t on)

set all queues drop enable bit. lowkey the "drop everything" switch for all pools ๐Ÿ™ˆ

Parameters:

  • port โ€” The port identifier of the Ethernet device.
  • on โ€” 1 - set the queue drop enable bit for all pools. 0 - reset the queue drop enable bit for all pools.

Returns:

  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.

int rte_pmd_ixgbe_set_vf_split_drop_en (uint16_t port, uint16_t vf, uint8_t on)

set drop enable bit in the VF split rx control register. one VF, one bit, no drama ๐ŸŒธ

Parameters:

  • port โ€” The port identifier of the Ethernet device.
  • vf โ€” ID specifying VF.
  • on โ€” 1 - set the drop enable bit in the split rx control register. 0 - reset the drop enable bit in the split rx control register.

Returns:

  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.

int rte_pmd_ixgbe_set_vf_vlan_stripq (uint16_t port, uint16_t vf, uint8_t on)

Enable/Disable vf vlan strip for all queues in a pool. taking the VLAN tag off on RX, iconic behavior โœ‚๏ธ

Parameters:

  • port โ€” The port identifier of the Ethernet device.
  • vf โ€” ID specifying VF.
  • on โ€” 1 - Enable VF's vlan strip on RX queues. 0 - Disable VF's vlan strip on RX queues.

Returns:

  • (0) if successful.
  • (-ENOTSUP) if hardware doesn't support this feature.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.
notice how this one can hit you with (-ENOTSUP) too โ€” not every NIC has the range, bestie ๐Ÿ˜ญ

int rte_pmd_ixgbe_macsec_enable (uint16_t port, uint8_t en, uint8_t rp)

Enable MACsec offload. crypto mode activated ๐Ÿ”ฅ

Parameters:

  • port โ€” The port identifier of the Ethernet device.
  • en โ€” 1 - Enable encryption (encrypt and add integrity signature). 0 - Disable encryption (only add integrity signature).
  • rp โ€” 1 - Enable replay protection. 0 - Disable replay protection.

Returns:

  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-ENOTSUP) if hardware doesn't support this feature.

int rte_pmd_ixgbe_macsec_disable (uint16_t port)

Disable MACsec offload. okay we're done being mysterious ๐Ÿงš

Parameters:

  • port โ€” The port identifier of the Ethernet device.

Returns:

  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-ENOTSUP) if hardware doesn't support this feature.

int rte_pmd_ixgbe_macsec_config_txsc (uint16_t port, uint8_t * mac)

Configure Tx SC (Secure Connection). setting up the sending side's secure lil bond ๐Ÿ’–

Parameters:

  • port โ€” The port identifier of the Ethernet device.
  • mac โ€” The MAC address on the local side.

Returns:

  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-ENOTSUP) if hardware doesn't support this feature.

int rte_pmd_ixgbe_macsec_config_rxsc (uint16_t port, uint8_t * mac, uint16_t pi)

Configure Rx SC (Secure Connection). and now the receiving side gets its secure match ๐Ÿซถ

Parameters:

  • port โ€” The port identifier of the Ethernet device.
  • mac โ€” The MAC address on the remote side.
  • pi โ€” The PI (port identifier) on the remote side.

Returns:

  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-ENOTSUP) if hardware doesn't support this feature.

int rte_pmd_ixgbe_macsec_select_txsa (uint16_t port, uint8_t idx, uint8_t an, uint32_t pn, uint8_t * key)

Enable Tx SA (Secure Association). loving the acronym stack, honestly โญ

Parameters:

  • port โ€” The port identifier of the Ethernet device.
  • idx โ€” The SA to be enabled (0 or 1).
  • an โ€” The association number on the local side.
  • pn โ€” The packet number on the local side.
  • key โ€” The key on the local side.

Returns:

  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-ENOTSUP) if hardware doesn't support this feature.
  • (-EINVAL) if bad parameter.

int rte_pmd_ixgbe_macsec_select_rxsa (uint16_t port, uint8_t idx, uint8_t an, uint32_t pn, uint8_t * key)

Enable Rx SA (Secure Association). same as above but make it the remote side's problem ๐ŸŒˆ

Parameters:

  • port โ€” The port identifier of the Ethernet device.
  • idx โ€” The SA to be enabled (0 or 1)
  • an โ€” The association number on the remote side.
  • pn โ€” The packet number on the remote side.
  • key โ€” The key on the remote side.

Returns:

  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-ENOTSUP) if hardware doesn't support this feature.
  • (-EINVAL) if bad parameter.

int rte_pmd_ixgbe_set_vf_rxmode (uint16_t port, uint16_t vf, uint16_t rx_mask, uint8_t on)

Set RX L2 Filtering mode of a VF of an Ethernet device.

Parameters

  • port โ€” the port identifier of the Ethernet device, bestie. It's your entry pass ๐ŸŽŸ๏ธ
  • vf โ€” VF id.
  • rx_mask โ€” the RX mode mask, which is one or more of accepting Untagged Packets, packets that match the PFUTA table, Broadcast and Multicast Promiscuous. RTE_ETH_VMDQ_ACCEPT_UNTAG, RTE_ETH_VMDQ_ACCEPT_HASH_UC, RTE_ETH_VMDQ_ACCEPT_BROADCAST and RTE_ETH_VMDQ_ACCEPT_MULTICAST will be used in rx_mode.
  • on โ€” 1 = Enable a VF RX mode. 0 = Disable a VF RX mode.

Returns

  • (0) if successful. slay โœจ
  • (-ENOTSUP) if hardware doesn't support.
  • (-ENODEV) if port_id invalid.
  • (-EINVAL) if bad parameter.

๐Ÿ’… rte_pmd_ixgbe_set_vf_rx

int rte_pmd_ixgbe_set_vf_rx (uint16_t port, uint16_t vf, uint8_t on)

Enable or disable a VF traffic receive of an Ethernet device. like, flip the switch on whether this VF is allowed to receive at all ๐Ÿซถ

Parameters

  • port โ€” the port identifier of the Ethernet device.
  • vf โ€” VF id.
  • on โ€” 1 = Enable a VF traffic receive. 0 = Disable a VF traffic receive.

Returns

  • (0) if successful.
  • (-ENOTSUP) if hardware doesn't support.
  • (-ENODEV) if port_id invalid.
  • (-EINVAL) if bad parameter.

๐ŸŒธ rte_pmd_ixgbe_set_vf_tx

int rte_pmd_ixgbe_set_vf_tx (uint16_t port, uint16_t vf, uint8_t on)

Enable or disable a VF traffic transmit of the Ethernet device. same vibe as the RX one but for the send side ๐Ÿ“ค

Parameters

  • port โ€” the port identifier of the Ethernet device.
  • vf โ€” VF id.
  • on โ€” 1 = Enable a VF traffic transmit. 0 = Disable a VF traffic transmit.

Returns

  • (0) if successful.
  • (-ENODEV) if port_id invalid.
  • (-ENOTSUP) if hardware doesn't support.
  • (-EINVAL) if bad parameter.

๐ŸŽ€ rte_pmd_ixgbe_set_vf_vlan_filter

int rte_pmd_ixgbe_set_vf_vlan_filter (uint16_t port, uint16_t vlan, uint64_t vf_mask, uint8_t vlan_on)

Enable/Disable hardware VF VLAN filtering by an Ethernet device of received VLAN packets tagged with a given VLAN Tag Identifier. yes, that's the whole sentence, and yes it's a mouthful โ€” basically: "hey, packets wearing this VLAN tag, do we let the VFs see them or not ๐Ÿ’ญ"

Parameters

  • port โ€” the port identifier of the Ethernet device.
  • vlan โ€” the VLAN Tag Identifier whose filtering must be enabled or disabled.
  • vf_mask โ€” bitmap listing which VFs participate in the VLAN filtering.
  • vlan_on โ€” 1 = Enable VFs VLAN filtering. 0 = Disable VFs VLAN filtering.

Returns

  • (0) if successful.
  • (-ENOTSUP) if hardware doesn't support.
  • (-ENODEV) if port_id invalid.
  • (-EINVAL) if bad parameter.

๐Ÿ”ฅ rte_pmd_ixgbe_set_vf_rate_limit

int rte_pmd_ixgbe_set_vf_rate_limit (uint16_t port, uint16_t vf, uint32_t tx_rate, uint64_t q_msk)

Set the rate limitation for a vf on an Ethernet device. no more letting one VF hog the whole link, we're doing boundaries now ๐Ÿšง

Parameters

  • port โ€” the port identifier of the Ethernet device.
  • vf โ€” VF id.
  • tx_rate โ€” the tx rate allocated from the total link speed for this VF id.
  • q_msk โ€” the queue mask which need to set the rate.

Returns

  • (0) if successful.
  • (-ENOTSUP) if hardware doesn't support this feature.
  • (-ENODEV) if port_id invalid.
  • (-EINVAL) if bad parameter.

โญ rte_pmd_ixgbe_set_tc_bw_alloc

int rte_pmd_ixgbe_set_tc_bw_alloc (uint16_t port, uint8_t tc_num, uint8_t * bw_weight)

Set all the TCs' bandwidth weight.

The bw_weight means the percentage occupied by the TC. It can be taken as the relative min bandwidth setting. think of it as splitting a pizza ๐Ÿ• where nobody's slice is allowed to be sad.

Parameters

  • port โ€” the port identifier of the Ethernet device.
  • tc_num โ€” number of TCs.
  • bw_weight โ€” an array of relative bandwidth weight for all the TCs. The summary of the bw_weight should be 100.

Returns

  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.
  • (-ENOTSUP) not supported by firmware.

๐Ÿฆ‹ rte_pmd_ixgbe_bypass_init

int rte_pmd_ixgbe_bypass_init (uint16_t port)

Initialize bypass logic. This function needs to be called before executing any other bypass API.

bestie this is the prerequisite. skip it and every other bypass call in this page is gonna be out here doing nothing. do not skip it ๐Ÿ™ˆ

Parameters

  • port โ€” the port identifier of the Ethernet device.

Returns

  • (0) if successful.
  • (-ENOTSUP) if hardware doesn't support.
  • (-EINVAL) if bad parameter.

๐Ÿ‘‘ rte_pmd_ixgbe_bypass_state_show

int rte_pmd_ixgbe_bypass_state_show (uint16_t port, uint32_t * state)

Return bypass state. it's a read, not a write, don't get it twisted ๐Ÿ’…

Parameters

  • port โ€” the port identifier of the Ethernet device.
  • state โ€” the return bypass state.
    • (1) Normal mode
    • (2) Bypass mode
    • (3) Isolate mode

Returns

  • (0) if successful.
  • (-ENOTSUP) if hardware doesn't support.
  • (-EINVAL) if bad parameter.

๐Ÿ’œ rte_pmd_ixgbe_bypass_state_set

int rte_pmd_ixgbe_bypass_state_set (uint16_t port, uint32_t * new_state)

Set bypass state โ€” now we're the ones choosing the mode ๐ŸŽ›๏ธ

Parameters

  • port โ€” the port identifier of the Ethernet device.
  • new_state โ€” the current bypass state.
    • (1) Normal mode
    • (2) Bypass mode
    • (3) Isolate mode

Returns

  • (0) if successful.
  • (-ENOTSUP) if hardware doesn't support.
  • (-EINVAL) if bad parameter.

๐ŸŒˆ rte_pmd_ixgbe_bypass_event_show

int rte_pmd_ixgbe_bypass_event_show (uint16_t port, uint32_t event, uint32_t * state)

Return bypass state when given event occurs. "so like... when that happens, what mode do we end up in?" and this tells you โœจ

Parameters

  • port โ€” the port identifier of the Ethernet device.
  • event โ€” the bypass event
    • (1) Main power on (power button is pushed)
    • (2) Auxiliary power on (power supply is being plugged)
    • (3) Main power off (system shutdown and power supply is left plugged in)
    • (4) Auxiliary power off (power supply is being unplugged)
    • (5) Display or set the watchdog timer
  • state โ€” the bypass state when given event occurred.
    • (1) Normal mode
    • (2) Bypass mode
    • (3) Isolate mode

Returns

  • (0) if successful.
  • (-ENOTSUP) if hardware doesn't support.
  • (-EINVAL) if bad parameter.

๐Ÿงš rte_pmd_ixgbe_bypass_event_store

int rte_pmd_ixgbe_bypass_event_store (uint16_t port, uint32_t event, uint32_t state)

Set bypass state when given event occurs. same events as above, but now you're the one assigning the state instead of just peeking at it ๐Ÿ‘€

Parameters

  • port โ€” the port identifier of the Ethernet device.
  • event โ€” the bypass event
    • (1) Main power on (power button is pushed)
    • (2) Auxiliary power on (power supply is being plugged)
    • (3) Main power off (system shutdown and power supply is left plugged in)
    • (4) Auxiliary power off (power supply is being unplugged)
    • (5) Display or set the watchdog timer
  • state โ€” the assigned state when given event occurs.
    • (1) Normal mode
    • (2) Bypass mode
    • (3) Isolate mode

Returns

  • (0) if successful.
  • (-ENOTSUP) if hardware doesn't support.
  • (-EINVAL) if bad parameter.

๐Ÿ“ rte_pmd_ixgbe_bypass_wd_timeout_store

int rte_pmd_ixgbe_bypass_wd_timeout_store (uint16_t port, uint32_t timeout)

Set bypass watchdog timeout count. tick tock โฐ

Parameters

  • port โ€” the port identifier of the Ethernet device.
  • timeout โ€” the timeout to be set.
    • (0) 0 seconds (timer is off)
    • (1) 1.5 seconds
    • (2) 2 seconds
    • (3) 3 seconds
    • (4) 4 seconds
    • (5) 8 seconds
    • (6) 16 seconds
    • (7) 32 seconds

Returns

  • (0) if successful.
  • (-ENOTSUP) if hardware doesn't support.
  • (-EINVAL) if bad parameter.

โœจ rte_pmd_ixgbe_bypass_ver_show

int rte_pmd_ixgbe_bypass_ver_show (uint16_t port, uint32_t * ver)

Get bypass firmware version. drop the version number bestie ๐Ÿท๏ธ

Parameters

  • port โ€” the port identifier of the Ethernet device.
  • ver โ€” the firmware version

Returns

  • (0) if successful.
  • (-ENOTSUP) if hardware doesn't support.
  • (-EINVAL) if bad parameter.

๐ŸŒธ rte_pmd_ixgbe_bypass_wd_timeout_show

int rte_pmd_ixgbe_bypass_wd_timeout_show (uint16_t port, uint32_t * wd_timeout)

Return bypass watchdog timeout in seconds ๐Ÿ•ฐ๏ธ

Parameters

  • port โ€” the port identifier of the Ethernet device.
  • wd_timeout โ€” the return watchdog timeout. "0" represents timer expired
    • (0) 0 seconds (timer is off)
    • (1) 1.5 seconds
    • (2) 2 seconds
    • (3) 3 seconds
    • (4) 4 seconds
    • (5) 8 seconds
    • (6) 16 seconds
    • (7) 32 seconds

Returns

  • (0) if successful.
  • (-ENOTSUP) if hardware doesn't support.
  • (-EINVAL) if bad parameter.

๐Ÿ’– rte_pmd_ixgbe_bypass_wd_reset

int rte_pmd_ixgbe_bypass_wd_reset (uint16_t port)

Reset bypass watchdog timer. fresh start, no cap ๐Ÿ”„

Parameters

  • port โ€” the port identifier of the Ethernet device.

Returns

  • (0) if successful.
  • (-ENOTSUP) if hardware doesn't support.
  • (-EINVAL) if bad parameter.

๐Ÿ”’ rte_pmd_ixgbe_mdio_lock

int rte_pmd_ixgbe_mdio_lock (uint16_t port)

Acquire swfw semaphore lock for MDIO access. grab the lock before you go poking at PHY registers, we're not animals ๐Ÿซถ

Parameters

  • port โ€” the port identifier of the Ethernet device.

Returns

  • (0) if successful.
  • (-ENOTSUP) if hardware doesn't support.
  • (-ENODEV) if port invalid.
  • (IXGBE_ERR_SWFW_SYNC) If sw/fw semaphore acquisition failed

๐Ÿ”“ rte_pmd_ixgbe_mdio_unlock

int rte_pmd_ixgbe_mdio_unlock (uint16_t port)

Release swfw semaphore lock used for MDIO access. give it back, bestie, other people wanna talk to the PHY too ๐Ÿ˜ญ

Parameters

  • port โ€” the port identifier of the Ethernet device.

Returns

  • (0) if successful.
  • (-ENOTSUP) if hardware doesn't support.
  • (-ENODEV) if port invalid.

๐Ÿ’€ rte_pmd_ixgbe_mdio_unlocked_read

int rte_pmd_ixgbe_mdio_unlocked_read (uint16_t port, uint32_t reg_addr, uint32_t dev_type, uint16_t * phy_data)

Read PHY register using MDIO without MDIO lock. The lock must be taken separately before calling this API.

fr fr do NOT just call this raw. take the lock yourself first, the name is literally warning you ๐Ÿ’€

Parameters

  • port โ€” the port identifier of the Ethernet device.
  • reg_addr โ€” 32 bit PHY Register
  • dev_type โ€” used to define device base address
  • phy_data โ€” pointer for reading PHY register data

Returns

  • (0) if successful.
  • (-ENOTSUP) if hardware doesn't support.
  • (-ENODEV) if port invalid.
  • (IXGBE_ERR_PHY) If PHY read command failed

๐Ÿ’€ rte_pmd_ixgbe_mdio_unlocked_write

int rte_pmd_ixgbe_mdio_unlocked_write (uint16_t port, uint32_t reg_addr, uint32_t dev_type, uint16_t phy_data)

Write data to PHY register using without MDIO lock. The lock must be taken separately before calling this API.

same energy as above โ€” this one's locked out on purpose. handle the lock yourself or suffer ๐Ÿ™ˆ

Parameters

  • port โ€” the port identifier of the Ethernet device.
  • reg_addr โ€” 32 bit PHY Register
  • dev_type โ€” used to define device base address
  • phy_data โ€” data to write to PHY register

Returns

  • (0) if successful.
  • (-ENOTSUP) if hardware doesn't support.
  • (-ENODEV) if port invalid.
  • (IXGBE_ERR_PHY) If PHY read command failed

๐ŸŽ€ rte_pmd_ixgbe_upd_fctrl_sbp

int rte_pmd_ixgbe_upd_fctrl_sbp (uint16_t port, int enable)

Parameters

  • port โ€” the port identifier of the Ethernet device.
  • enable โ€” 0 to disable and nonzero to enable 'SBP' bit in FCTRL register to receive all packets

Returns

  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-ENOTSUP) if hardware doesn't support this feature.

โญ rte_pmd_ixgbe_get_fdir_info

__rte_experimental int rte_pmd_ixgbe_get_fdir_info (uint16_t port, struct rte_eth_fdir_info * fdir_info)

Get port fdir info. yes it's tagged __rte_experimental โ€” that's the "handle with care, this API might still change" badge ๐Ÿ‘‘โœจ

Parameters

  • port โ€” the port identifier of the Ethernet device.
  • fdir_info โ€” the fdir info of the port

Returns

โ€ฆand the return list rolls straight into the next part, we're not done yet ๐Ÿซถ

...and that one wraps up with the returns, which are giving:

  • (0) if successful ๐Ÿ’– clean win, we love to see it
  • (-ENODEV) if port invalid ๐Ÿ™ˆ that port does not exist bestie
  • (-ENOTSUP) if operation not supported ๐Ÿ’€ sorry, the hardware said no

__rte_experimental int rte_pmd_ixgbe_get_fdir_stats (uint16_t port, struct rte_eth_fdir_stats * fdir_stats)

Get port fdir status ๐ŸŒธ

Yeah, the __rte_experimental is right there in the name, no notes, we simply read it and proceed.

Parameters

  • port โ€” the port identifier of the Ethernet device. it's giving "which one" energy ๐Ÿ‘‘
  • fdir_stats โ€” the fdir status of the port โœจ (yes it hands you the stats through this pointer, that's the whole vibe)

Returns

  • (0) if successful ๐Ÿซถ
  • (-ENODEV) if port invalid ๐Ÿšซ
  • (-ENOTSUP) if operation not supported ๐Ÿ˜ญ
no cap, that's the whole function. three possible returns, zero drama.

Author ๐ŸŽ€

Generated automatically by Doxygen for DPDK from the source code.

likeโ€ฆ nobody hand-wrote this one, the robot did it. iconic honestly ๐Ÿค–๐Ÿ’…


and that's the whole page, bestie!! ๐ŸŒˆ this was DPDK Version 25.11.3, page rte_pmd_ixgbe.h(3), and every single detail made it in โ€” no cap, we kept it all ๐Ÿงš๐Ÿ’œ go forth and get_fdir_stats responsibly, mwah ๐Ÿ’‹

๐Ÿ“ฆ where this page comes from