DPDK  24.11.0-rc1
Data Structures | Macros | Enumerations | Functions
rte_pmd_i40e.h File Reference
#include <rte_compat.h>
#include <rte_ethdev.h>
#include <rte_ether.h>

Go to the source code of this file.

Data Structures

struct  rte_pmd_i40e_mb_event_param
 
struct  rte_pmd_i40e_ddp_version
 
struct  rte_pmd_i40e_ddp_device_id
 
struct  rte_pmd_i40e_profile_info
 
struct  rte_pmd_i40e_profile_list
 
struct  rte_pmd_i40e_proto_info
 
struct  rte_pmd_i40e_ptype_info
 
struct  rte_pmd_i40e_queue_region_conf
 
struct  rte_pmd_i40e_pkt_template_action
 
struct  rte_pmd_i40e_pkt_template_input
 
struct  rte_pmd_i40e_pkt_template_conf
 

Macros

#define RTE_PMD_I40E_PTYPE_USER_DEFINE_MASK   0x80000000
 

Enumerations

enum  rte_pmd_i40e_mb_event_rsp { RTE_PMD_I40E_MB_EVENT_NOOP_ACK, RTE_PMD_I40E_MB_EVENT_NOOP_NACK, RTE_PMD_I40E_MB_EVENT_PROCEED, RTE_PMD_I40E_MB_EVENT_MAX }
 
enum  rte_pmd_i40e_package_op { , RTE_PMD_I40E_PKG_OP_WR_ADD, RTE_PMD_I40E_PKG_OP_WR_DEL, RTE_PMD_I40E_PKG_OP_WR_ONLY }
 
enum  rte_pmd_i40e_package_info
 
enum  rte_pmd_i40e_queue_region_op { ,
  RTE_PMD_I40E_RSS_QUEUE_REGION_SET, RTE_PMD_I40E_RSS_QUEUE_REGION_FLOWTYPE_SET, RTE_PMD_I40E_RSS_QUEUE_REGION_USER_PRIORITY_SET, RTE_PMD_I40E_RSS_QUEUE_REGION_ALL_FLUSH_ON,
  RTE_PMD_I40E_RSS_QUEUE_REGION_ALL_FLUSH_OFF
}
 
enum  rte_pmd_i40e_pkt_template_behavior
 
enum  rte_pmd_i40e_pkt_template_status { RTE_PMD_I40E_PKT_TEMPLATE_NO_REPORT_STATUS, RTE_PMD_I40E_PKT_TEMPLATE_REPORT_ID, RTE_PMD_I40E_PKT_TEMPLATE_REPORT_ID_FLEX_4, RTE_PMD_I40E_PKT_TEMPLATE_REPORT_FLEX_8 }
 

Functions

int rte_pmd_i40e_flow_add_del_packet_template (uint16_t port, const struct rte_pmd_i40e_pkt_template_conf *conf, uint8_t add)
 
int rte_pmd_i40e_ping_vfs (uint16_t port, uint16_t vf)
 
int rte_pmd_i40e_set_vf_mac_anti_spoof (uint16_t port, uint16_t vf_id, uint8_t on)
 
int rte_pmd_i40e_set_vf_vlan_anti_spoof (uint16_t port, uint16_t vf_id, uint8_t on)
 
int rte_pmd_i40e_set_tx_loopback (uint16_t port, uint8_t on)
 
int rte_pmd_i40e_set_vf_unicast_promisc (uint16_t port, uint16_t vf_id, uint8_t on)
 
int rte_pmd_i40e_set_vf_multicast_promisc (uint16_t port, uint16_t vf_id, uint8_t on)
 
int rte_pmd_i40e_set_vf_mac_addr (uint16_t port, uint16_t vf_id, struct rte_ether_addr *mac_addr)
 
int rte_pmd_i40e_remove_vf_mac_addr (uint16_t port, uint16_t vf_id, struct rte_ether_addr *mac_addr)
 
int rte_pmd_i40e_set_vf_vlan_stripq (uint16_t port, uint16_t vf, uint8_t on)
 
int rte_pmd_i40e_set_vf_vlan_insert (uint16_t port, uint16_t vf_id, uint16_t vlan_id)
 
int rte_pmd_i40e_set_vf_broadcast (uint16_t port, uint16_t vf_id, uint8_t on)
 
int rte_pmd_i40e_set_vf_vlan_tag (uint16_t port, uint16_t vf_id, uint8_t on)
 
int rte_pmd_i40e_set_vf_vlan_filter (uint16_t port, uint16_t vlan_id, uint64_t vf_mask, uint8_t on)
 
int rte_pmd_i40e_get_vf_stats (uint16_t port, uint16_t vf_id, struct rte_eth_stats *stats)
 
int rte_pmd_i40e_reset_vf_stats (uint16_t port, uint16_t vf_id)
 
int rte_pmd_i40e_set_vf_max_bw (uint16_t port, uint16_t vf_id, uint32_t bw)
 
int rte_pmd_i40e_set_vf_tc_bw_alloc (uint16_t port, uint16_t vf_id, uint8_t tc_num, uint8_t *bw_weight)
 
int rte_pmd_i40e_set_vf_tc_max_bw (uint16_t port, uint16_t vf_id, uint8_t tc_no, uint32_t bw)
 
int rte_pmd_i40e_set_tc_strict_prio (uint16_t port, uint8_t tc_map)
 
int rte_pmd_i40e_process_ddp_package (uint16_t port, uint8_t *buff, uint32_t size, enum rte_pmd_i40e_package_op op)
 
int rte_pmd_i40e_get_ddp_info (uint8_t *pkg, uint32_t pkg_size, uint8_t *info, uint32_t size, enum rte_pmd_i40e_package_info type)
 
int rte_pmd_i40e_get_ddp_list (uint16_t port, uint8_t *buff, uint32_t size)
 
int rte_pmd_i40e_ptype_mapping_update (uint16_t port, struct rte_pmd_i40e_ptype_mapping *mapping_items, uint16_t count, uint8_t exclusive)
 
int rte_pmd_i40e_ptype_mapping_reset (uint16_t port)
 
int rte_pmd_i40e_ptype_mapping_get (uint16_t port, struct rte_pmd_i40e_ptype_mapping *mapping_items, uint16_t size, uint16_t *count, uint8_t valid_only)
 
int rte_pmd_i40e_ptype_mapping_replace (uint16_t port, uint32_t target, uint8_t mask, uint32_t pkt_type)
 
int rte_pmd_i40e_add_vf_mac_addr (uint16_t port, uint16_t vf_id, struct rte_ether_addr *mac_addr)
 
int rte_pmd_i40e_flow_type_mapping_update (uint16_t port, struct rte_pmd_i40e_flow_type_mapping *mapping_items, uint16_t count, uint8_t exclusive)
 
int rte_pmd_i40e_flow_type_mapping_get (uint16_t port, struct rte_pmd_i40e_flow_type_mapping *mapping_items)
 
int rte_pmd_i40e_flow_type_mapping_reset (uint16_t port)
 
int rte_pmd_i40e_query_vfid_by_mac (uint16_t port, const struct rte_ether_addr *vf_mac)
 
int rte_pmd_i40e_rss_queue_region_conf (uint16_t port_id, enum rte_pmd_i40e_queue_region_op op_type, void *arg)
 
int rte_pmd_i40e_inset_get (uint16_t port, uint8_t pctype, struct rte_pmd_i40e_inset *inset, enum rte_pmd_i40e_inset_type inset_type)
 
int rte_pmd_i40e_inset_set (uint16_t port, uint8_t pctype, struct rte_pmd_i40e_inset *inset, enum rte_pmd_i40e_inset_type inset_type)
 
static int rte_pmd_i40e_inset_field_get (uint64_t inset, uint8_t field_idx)
 
static int rte_pmd_i40e_inset_field_set (uint64_t *inset, uint8_t field_idx)
 
static int rte_pmd_i40e_inset_field_clear (uint64_t *inset, uint8_t field_idx)
 
__rte_experimental int rte_pmd_i40e_get_fdir_info (uint16_t port, struct rte_eth_fdir_info *fdir_info)
 
__rte_experimental int rte_pmd_i40e_get_fdir_stats (uint16_t port, struct rte_eth_fdir_stats *fdir_stat)
 
__rte_experimental int rte_pmd_i40e_set_gre_key_len (uint16_t port, uint8_t len)
 
__rte_experimental int rte_pmd_i40e_set_switch_dev (uint16_t port_id, struct rte_eth_dev *switch_dev)
 
__rte_experimental int rte_pmd_i40e_set_pf_src_prune (uint16_t port, uint8_t on)
 

Detailed Description

i40e PMD specific functions.

EXPERIMENTAL: this API may change, or be removed, without prior notice

Definition in file rte_pmd_i40e.h.

Macro Definition Documentation

◆ RTE_PMD_I40E_PTYPE_USER_DEFINE_MASK

#define RTE_PMD_I40E_PTYPE_USER_DEFINE_MASK   0x80000000

ptype mapping table only accept RTE_PTYPE_XXX or "user defined" ptype. A ptype with MSB set will be regarded as a user defined ptype. Below macro help to create a user defined ptype.

Definition at line 176 of file rte_pmd_i40e.h.

Enumeration Type Documentation

◆ rte_pmd_i40e_mb_event_rsp

Response sent back to i40e driver from user app after callback

Enumerator
RTE_PMD_I40E_MB_EVENT_NOOP_ACK 

skip mbox request and ACK

RTE_PMD_I40E_MB_EVENT_NOOP_NACK 

skip mbox request and NACK

RTE_PMD_I40E_MB_EVENT_PROCEED 

proceed with mbox request

RTE_PMD_I40E_MB_EVENT_MAX 

max value of this enum

Definition at line 28 of file rte_pmd_i40e.h.

◆ rte_pmd_i40e_package_op

Option of package processing.

Enumerator
RTE_PMD_I40E_PKG_OP_WR_ADD 

load package and add to info list

RTE_PMD_I40E_PKG_OP_WR_DEL 

load package and delete from info list

RTE_PMD_I40E_PKG_OP_WR_ONLY 

load package without modifying info list

Definition at line 49 of file rte_pmd_i40e.h.

◆ rte_pmd_i40e_package_info

Types of package information.

Definition at line 60 of file rte_pmd_i40e.h.

◆ rte_pmd_i40e_queue_region_op

Option types of queue region.

Enumerator
RTE_PMD_I40E_RSS_QUEUE_REGION_SET 

add queue region set

RTE_PMD_I40E_RSS_QUEUE_REGION_FLOWTYPE_SET 

add PF region pctype set

RTE_PMD_I40E_RSS_QUEUE_REGION_USER_PRIORITY_SET 

add queue region user priority set

RTE_PMD_I40E_RSS_QUEUE_REGION_ALL_FLUSH_ON 

ALL configuration about queue region from up layer at first will only keep in DPDK software stored in driver, only after " FLUSH_ON ", it commit all configuration to HW. Because PMD had to set hardware configuration at a time, so it will record all up layer command at first.

RTE_PMD_I40E_RSS_QUEUE_REGION_ALL_FLUSH_OFF 

"FLUSH_OFF " is just clean all configuration about queue region just now, and restore all to DPDK i40e driver default config when start up.

Definition at line 81 of file rte_pmd_i40e.h.

◆ rte_pmd_i40e_pkt_template_behavior

Behavior will be taken if raw packet template is matched.

Definition at line 234 of file rte_pmd_i40e.h.

◆ rte_pmd_i40e_pkt_template_status

Flow director report status It defines what will be reported if raw packet template is matched.

Enumerator
RTE_PMD_I40E_PKT_TEMPLATE_NO_REPORT_STATUS 

report nothing

RTE_PMD_I40E_PKT_TEMPLATE_REPORT_ID 

only report FD ID

RTE_PMD_I40E_PKT_TEMPLATE_REPORT_ID_FLEX_4 

report FD ID and 4 flex bytes

RTE_PMD_I40E_PKT_TEMPLATE_REPORT_FLEX_8 

report 8 flex bytes

Definition at line 244 of file rte_pmd_i40e.h.

Function Documentation

◆ rte_pmd_i40e_flow_add_del_packet_template()

int rte_pmd_i40e_flow_add_del_packet_template ( uint16_t  port,
const struct rte_pmd_i40e_pkt_template_conf conf,
uint8_t  add 
)

Add or remove raw packet template filter to Flow Director.

Parameters
portThe port identifier of the Ethernet device.
confSpecifies configuration parameters of raw packet template filter.
addSpecifies an action to be taken - add or remove raw packet template filter.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if conf invalid.
  • (-ENOTSUP) not supported by firmware.

◆ rte_pmd_i40e_ping_vfs()

int rte_pmd_i40e_ping_vfs ( uint16_t  port,
uint16_t  vf 
)

Notify VF when PF link status changes.

Parameters
portThe port identifier of the Ethernet device.
vfVF id.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if vf invalid.

◆ rte_pmd_i40e_set_vf_mac_anti_spoof()

int rte_pmd_i40e_set_vf_mac_anti_spoof ( uint16_t  port,
uint16_t  vf_id,
uint8_t  on 
)

Enable/Disable VF MAC anti spoofing.

Parameters
portThe port identifier of the Ethernet device.
vf_idVF on which to set MAC anti spoofing.
on1 - Enable VFs MAC anti spoofing. 0 - Disable VFs MAC anti spoofing.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.

◆ rte_pmd_i40e_set_vf_vlan_anti_spoof()

int rte_pmd_i40e_set_vf_vlan_anti_spoof ( uint16_t  port,
uint16_t  vf_id,
uint8_t  on 
)

Enable/Disable VF VLAN anti spoofing.

Parameters
portThe port identifier of the Ethernet device.
vf_idVF on which to set VLAN anti spoofing.
on1 - Enable VFs VLAN anti spoofing. 0 - Disable VFs VLAN anti spoofing.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.

◆ rte_pmd_i40e_set_tx_loopback()

int rte_pmd_i40e_set_tx_loopback ( uint16_t  port,
uint8_t  on 
)

Enable/Disable TX loopback on all the PF and VFs.

Parameters
portThe port identifier of the Ethernet device.
on1 - Enable TX loopback. 0 - Disable TX loopback.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.

◆ rte_pmd_i40e_set_vf_unicast_promisc()

int rte_pmd_i40e_set_vf_unicast_promisc ( uint16_t  port,
uint16_t  vf_id,
uint8_t  on 
)

Enable/Disable VF unicast promiscuous mode.

Parameters
portThe port identifier of the Ethernet device.
vf_idVF on which to set.
on1 - Enable. 0 - Disable.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.

◆ rte_pmd_i40e_set_vf_multicast_promisc()

int rte_pmd_i40e_set_vf_multicast_promisc ( uint16_t  port,
uint16_t  vf_id,
uint8_t  on 
)

Enable/Disable VF multicast promiscuous mode.

Parameters
portThe port identifier of the Ethernet device.
vf_idVF on which to set.
on1 - Enable. 0 - Disable.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.

◆ rte_pmd_i40e_set_vf_mac_addr()

int rte_pmd_i40e_set_vf_mac_addr ( uint16_t  port,
uint16_t  vf_id,
struct rte_ether_addr *  mac_addr 
)

Set the VF MAC address.

PF should set MAC address before VF initialized, if PF sets the MAC address after VF initialized, new MAC address won't be effective until VF reinitialize.

This will remove all existing MAC filters.

Parameters
portThe port identifier of the Ethernet device.
vf_idVF id.
mac_addrVF MAC address.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if vf or mac_addr is invalid.
Examples:
examples/vm_power_manager/main.c.

◆ rte_pmd_i40e_remove_vf_mac_addr()

int rte_pmd_i40e_remove_vf_mac_addr ( uint16_t  port,
uint16_t  vf_id,
struct rte_ether_addr *  mac_addr 
)

Remove the VF MAC address.

Parameters
portThe port identifier of the Ethernet device.
vf_idVF id.
mac_addrVF MAC address.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if vf or mac_addr is invalid.

◆ rte_pmd_i40e_set_vf_vlan_stripq()

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

Enable/Disable vf vlan strip for all queues in a pool

Parameters
portThe port identifier of the Ethernet device.
vfID specifying VF.
on1 - Enable VF's vlan strip on RX queues. 0 - Disable VF's vlan strip on RX queues.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.

◆ rte_pmd_i40e_set_vf_vlan_insert()

int rte_pmd_i40e_set_vf_vlan_insert ( uint16_t  port,
uint16_t  vf_id,
uint16_t  vlan_id 
)

Enable/Disable vf vlan insert

Parameters
portThe port identifier of the Ethernet device.
vf_idID specifying VF.
vlan_id0 - 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.

◆ rte_pmd_i40e_set_vf_broadcast()

int rte_pmd_i40e_set_vf_broadcast ( uint16_t  port,
uint16_t  vf_id,
uint8_t  on 
)

Enable/Disable vf broadcast mode

Parameters
portThe port identifier of the Ethernet device.
vf_idID specifying VF.
on0 - Disable broadcast. 1 - Enable broadcast.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.

◆ rte_pmd_i40e_set_vf_vlan_tag()

int rte_pmd_i40e_set_vf_vlan_tag ( uint16_t  port,
uint16_t  vf_id,
uint8_t  on 
)

Enable/Disable vf vlan tag

Parameters
portThe port identifier of the Ethernet device.
vf_idID specifying VF.
on0 - Disable VF's vlan tag. n - Enable VF's vlan tag.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.

◆ rte_pmd_i40e_set_vf_vlan_filter()

int rte_pmd_i40e_set_vf_vlan_filter ( uint16_t  port,
uint16_t  vlan_id,
uint64_t  vf_mask,
uint8_t  on 
)

Enable/Disable VF VLAN filter

Parameters
portThe port identifier of the Ethernet device.
vlan_idID specifying VLAN
vf_maskMask to filter VF's
on0 - Disable VF's VLAN filter. 1 - Enable VF's VLAN filter.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.
  • (-ENOTSUP) not supported by firmware.

◆ rte_pmd_i40e_get_vf_stats()

int rte_pmd_i40e_get_vf_stats ( uint16_t  port,
uint16_t  vf_id,
struct rte_eth_stats stats 
)

Get VF's statistics

Parameters
portThe port identifier of the Ethernet device.
vf_idVF on which to get.
statsA pointer to a structure of type rte_eth_stats to be filled with the values of device counters for the following set of statistics:
  • ipackets with the total of successfully received packets.
  • opackets with the total of successfully transmitted packets.
  • ibytes with the total of successfully received bytes.
  • obytes with the total of successfully transmitted bytes.
  • ierrors with the total of erroneous received packets.
  • oerrors with the total of failed transmitted packets.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.
Examples:
examples/vm_power_manager/channel_monitor.c.

◆ rte_pmd_i40e_reset_vf_stats()

int rte_pmd_i40e_reset_vf_stats ( uint16_t  port,
uint16_t  vf_id 
)

Clear VF's statistics

Parameters
portThe port identifier of the Ethernet device.
vf_idVF on which to get.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.

◆ rte_pmd_i40e_set_vf_max_bw()

int rte_pmd_i40e_set_vf_max_bw ( uint16_t  port,
uint16_t  vf_id,
uint32_t  bw 
)

Set VF's max bandwidth.

Per VF bandwidth limitation and per TC bandwidth limitation cannot be enabled in parallel. If per TC bandwidth is enabled, this function will disable it.

Parameters
portThe port identifier of the Ethernet device.
vf_idID specifying VF.
bwBandwidth for this VF. The value should be an absolute bandwidth in Mbps. The bandwidth is a L2 bandwidth counting the bytes of ethernet packets. Not count the bytes added by physical layer.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.
  • (-ENOTSUP) not supported by firmware.

◆ rte_pmd_i40e_set_vf_tc_bw_alloc()

int rte_pmd_i40e_set_vf_tc_bw_alloc ( uint16_t  port,
uint16_t  vf_id,
uint8_t  tc_num,
uint8_t *  bw_weight 
)

Set all the TCs' bandwidth weight on a specific VF.

The bw_weight means the percentage occupied by the TC. It can be taken as the relative min bandwidth setting.

Parameters
portThe port identifier of the Ethernet device.
vf_idID specifying VF.
tc_numNumber of TCs.
bw_weightAn 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_i40e_set_vf_tc_max_bw()

int rte_pmd_i40e_set_vf_tc_max_bw ( uint16_t  port,
uint16_t  vf_id,
uint8_t  tc_no,
uint32_t  bw 
)

Set a specific TC's max bandwidth on a specific VF.

Parameters
portThe port identifier of the Ethernet device.
vf_idID specifying VF.
tc_noNumber specifying TC.
bwMax bandwidth for this TC. The value should be an absolute bandwidth in Mbps. The bandwidth is a L2 bandwidth counting the bytes of ethernet packets. Not count the bytes added by physical layer.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.
  • (-ENOTSUP) not supported by firmware.

◆ rte_pmd_i40e_set_tc_strict_prio()

int rte_pmd_i40e_set_tc_strict_prio ( uint16_t  port,
uint8_t  tc_map 
)

Set some TCs to strict priority mode on a physical port.

Parameters
portThe port identifier of the Ethernet device.
tc_mapA bit map for the TCs.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.
  • (-ENOTSUP) not supported by firmware.

◆ rte_pmd_i40e_process_ddp_package()

int rte_pmd_i40e_process_ddp_package ( uint16_t  port,
uint8_t *  buff,
uint32_t  size,
enum rte_pmd_i40e_package_op  op 
)

Load/Unload a ddp package

Parameters
portThe port identifier of the Ethernet device.
buffbuffer of package.
sizesize of buffer.
opOperation of package processing
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.
  • (-EEXIST) if profile exists.
  • (-EACCES) if profile does not exist.
  • (-ENOTSUP) if operation not supported.

◆ rte_pmd_i40e_get_ddp_info()

int rte_pmd_i40e_get_ddp_info ( uint8_t *  pkg,
uint32_t  pkg_size,
uint8_t *  info,
uint32_t  size,
enum rte_pmd_i40e_package_info  type 
)

rte_pmd_i40e_get_ddp_info - Get profile's info

Parameters
pkgbuffer of package.
pkg_sizepackage buffer size
infobuffer for response
sizeresponse buffer size
typetype of information requested
Returns
  • (0) if successful.
  • (-ENOTSUP) if information type not supported by the profile.
  • (-EINVAL) if bad parameter.

◆ rte_pmd_i40e_get_ddp_list()

int rte_pmd_i40e_get_ddp_list ( uint16_t  port,
uint8_t *  buff,
uint32_t  size 
)

rte_pmd_i40e_get_ddp_list - Get loaded profile list

Parameters
portport id
buffbuffer for response
sizebuffer size
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.

◆ rte_pmd_i40e_ptype_mapping_update()

int rte_pmd_i40e_ptype_mapping_update ( uint16_t  port,
struct rte_pmd_i40e_ptype_mapping *  mapping_items,
uint16_t  count,
uint8_t  exclusive 
)

Update hardware defined ptype to software defined packet type mapping table.

Parameters
portpointer to port identifier of the device.
mapping_itemsthe base address of the mapping items array.
countnumber of mapping items.
exclusivethe flag indicate different ptype mapping update method. -(0) only overwrite referred PTYPE mapping, keep other PTYPEs mapping unchanged. -(!0) overwrite referred PTYPE mapping, set other PTYPEs maps to PTYPE_UNKNOWN.

◆ rte_pmd_i40e_ptype_mapping_reset()

int rte_pmd_i40e_ptype_mapping_reset ( uint16_t  port)

Reset hardware defined ptype to software defined ptype mapping table to default.

Parameters
portpointer to port identifier of the device

◆ rte_pmd_i40e_ptype_mapping_get()

int rte_pmd_i40e_ptype_mapping_get ( uint16_t  port,
struct rte_pmd_i40e_ptype_mapping *  mapping_items,
uint16_t  size,
uint16_t *  count,
uint8_t  valid_only 
)

Get hardware defined ptype to software defined ptype mapping items.

Parameters
portpointer to port identifier of the device.
mapping_itemsthe base address of the array to store returned items.
sizethe size of the input array.
countthe place to store the number of returned items.
valid_only-(0) return full mapping table. -(!0) only return mapping items which packet_type != RTE_PTYPE_UNKNOWN.

◆ rte_pmd_i40e_ptype_mapping_replace()

int rte_pmd_i40e_ptype_mapping_replace ( uint16_t  port,
uint32_t  target,
uint8_t  mask,
uint32_t  pkt_type 
)

Replace a specific or a group of software defined ptypes with a new one

Parameters
portpointer to port identifier of the device
targetthe packet type to be replaced
mask-(0) target represent a specific software defined ptype. -(!0) target is a mask to represent a group of software defined ptypes.
pkt_typethe new packet type to overwrite

◆ rte_pmd_i40e_add_vf_mac_addr()

int rte_pmd_i40e_add_vf_mac_addr ( uint16_t  port,
uint16_t  vf_id,
struct rte_ether_addr *  mac_addr 
)

Add a VF MAC address.

Add more MAC address for VF. The existing MAC addresses are still effective.

Parameters
portThe port identifier of the Ethernet device.
vf_idVF id.
mac_addrVF MAC address.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if vf or mac_addr is invalid.

◆ rte_pmd_i40e_flow_type_mapping_update()

int rte_pmd_i40e_flow_type_mapping_update ( uint16_t  port,
struct rte_pmd_i40e_flow_type_mapping *  mapping_items,
uint16_t  count,
uint8_t  exclusive 
)

Update hardware defined pctype to software defined flow type mapping table.

Parameters
portpointer to port identifier of the device.
mapping_itemsthe base address of the mapping items array.
countnumber of mapping items.
exclusivethe flag indicate different pctype mapping update method. -(0) only overwrite referred PCTYPE mapping, keep other PCTYPEs mapping unchanged. -(!0) overwrite referred PCTYPE mapping, set other PCTYPEs maps to PCTYPE_INVALID.

◆ rte_pmd_i40e_flow_type_mapping_get()

int rte_pmd_i40e_flow_type_mapping_get ( uint16_t  port,
struct rte_pmd_i40e_flow_type_mapping *  mapping_items 
)

Get software defined flow type to hardware defined pctype mapping items.

Parameters
portpointer to port identifier of the device.
mapping_itemsthe base address of the array to store returned items. array should be allocated by caller with minimum size of RTE_PMD_I40E_FLOW_TYPE_MAX items

◆ rte_pmd_i40e_flow_type_mapping_reset()

int rte_pmd_i40e_flow_type_mapping_reset ( uint16_t  port)

Reset hardware defined pctype to software defined flow type mapping table to default.

Parameters
portpointer to port identifier of the device

◆ rte_pmd_i40e_query_vfid_by_mac()

int rte_pmd_i40e_query_vfid_by_mac ( uint16_t  port,
const struct rte_ether_addr *  vf_mac 
)

On the PF, find VF index based on VF MAC address

Parameters
portpointer to port identifier of the device
vf_macthe mac address of the vf to determine index of
Returns
The index of vfid If successful. -EINVAL: vf mac address does not exist for this port -ENOTSUP: i40e not supported for this port.
Examples:
examples/vm_power_manager/channel_monitor.c.

◆ rte_pmd_i40e_rss_queue_region_conf()

int rte_pmd_i40e_rss_queue_region_conf ( uint16_t  port_id,
enum rte_pmd_i40e_queue_region_op  op_type,
void *  arg 
)

Do RSS queue region configuration for that port as the command option type

Parameters
port_idThe port identifier of the Ethernet device.
op_typeQueue region operation type
argQueue region operation type specific data

◆ rte_pmd_i40e_inset_get()

int rte_pmd_i40e_inset_get ( uint16_t  port,
uint8_t  pctype,
struct rte_pmd_i40e_inset *  inset,
enum rte_pmd_i40e_inset_type  inset_type 
)

Get input set

Parameters
portThe port identifier of the Ethernet device.
pctypeHW pctype.
insetBuffer for input set info.
inset_typeType of input set.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.
  • (-ENOTSUP) if operation not supported.

◆ rte_pmd_i40e_inset_set()

int rte_pmd_i40e_inset_set ( uint16_t  port,
uint8_t  pctype,
struct rte_pmd_i40e_inset *  inset,
enum rte_pmd_i40e_inset_type  inset_type 
)

Set input set

Parameters
portThe port identifier of the Ethernet device.
pctypeHW pctype.
insetInput set info.
inset_typeType of input set.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.
  • (-ENOTSUP) if operation not supported.

◆ rte_pmd_i40e_inset_field_get()

static int rte_pmd_i40e_inset_field_get ( uint64_t  inset,
uint8_t  field_idx 
)
inlinestatic

Get bit value for some field index

Parameters
insetInput set value.
field_idxField index for input set.
Returns
  • (1) if set.
  • (0) if cleared.

Definition at line 1006 of file rte_pmd_i40e.h.

◆ rte_pmd_i40e_inset_field_set()

static int rte_pmd_i40e_inset_field_set ( uint64_t *  inset,
uint8_t  field_idx 
)
inlinestatic

Set bit value for some field index

Parameters
insetInput set value.
field_idxField index for input set.
Returns
  • (-1) if failed.
  • (0) if success.

Definition at line 1032 of file rte_pmd_i40e.h.

◆ rte_pmd_i40e_inset_field_clear()

static int rte_pmd_i40e_inset_field_clear ( uint64_t *  inset,
uint8_t  field_idx 
)
inlinestatic

Clear bit value for some field index

Parameters
insetInput set value.
field_idxField index for input set.
Returns
  • (-1) if failed.
  • (0) if success.

Definition at line 1057 of file rte_pmd_i40e.h.

◆ rte_pmd_i40e_get_fdir_info()

__rte_experimental int rte_pmd_i40e_get_fdir_info ( uint16_t  port,
struct rte_eth_fdir_info fdir_info 
)

Get port fdir info

Parameters
portThe port identifier of the Ethernet device.
fdir_infoThe fdir info of the port
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-ENOTSUP) if operation not supported.

◆ rte_pmd_i40e_get_fdir_stats()

__rte_experimental int rte_pmd_i40e_get_fdir_stats ( uint16_t  port,
struct rte_eth_fdir_stats fdir_stat 
)

Get port fdir status

Parameters
portThe port identifier of the Ethernet device.
fdir_statThe fdir status of the port
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-ENOTSUP) if operation not supported.

◆ rte_pmd_i40e_set_gre_key_len()

__rte_experimental int rte_pmd_i40e_set_gre_key_len ( uint16_t  port,
uint8_t  len 
)

Set GRE key length

Parameters
portThe port identifier of the Ethernet device.
lenLength of gre-key
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-ENOTSUP) if operation not supported.

◆ rte_pmd_i40e_set_switch_dev()

__rte_experimental int rte_pmd_i40e_set_switch_dev ( uint16_t  port_id,
struct rte_eth_dev *  switch_dev 
)

For ipn3ke, i40e works with FPGA. In this situation, i40e get link status from fpga, fpga works as switch_dev for i40e. This function set switch_dev for i40e.

Parameters
port_idport_id of i40e device to be set switch device.
switch_devtarget switch device from which i40e device to get link status from.
Returns
  • (less than 0) if failed.
  • (0) if success.

◆ rte_pmd_i40e_set_pf_src_prune()

__rte_experimental int rte_pmd_i40e_set_pf_src_prune ( uint16_t  port,
uint8_t  on 
)

Enable/Disable source prune on all the PF.

Parameters
portThe port identifier of the Ethernet device.
on1 - Enable source prune. 0 - Disable source prune.
Returns
  • (0) if successful.
  • (-ENODEV) if port invalid.
  • (-EINVAL) if bad parameter.