.TH "rte_pmd_i40e.h" 3 "Version 25.11.0" "DPDK" \" -*- nroff -*-
.ad l
.nh
.SH NAME
rte_pmd_i40e.h
.SH SYNOPSIS
.br
.PP
\fR#include <rte_compat\&.h>\fP
.br
\fR#include <rte_ethdev\&.h>\fP
.br
\fR#include <rte_ether\&.h>\fP
.br

.SS "Data Structures"

.in +1c
.ti -1c
.RI "struct \fBrte_pmd_i40e_mb_event_param\fP"
.br
.ti -1c
.RI "struct \fBrte_pmd_i40e_ddp_version\fP"
.br
.ti -1c
.RI "struct \fBrte_pmd_i40e_ddp_device_id\fP"
.br
.ti -1c
.RI "struct \fBrte_pmd_i40e_profile_info\fP"
.br
.ti -1c
.RI "struct \fBrte_pmd_i40e_profile_list\fP"
.br
.ti -1c
.RI "struct \fBrte_pmd_i40e_proto_info\fP"
.br
.ti -1c
.RI "struct \fBrte_pmd_i40e_ptype_info\fP"
.br
.ti -1c
.RI "struct \fBrte_pmd_i40e_queue_region_conf\fP"
.br
.ti -1c
.RI "struct \fBrte_pmd_i40e_pkt_template_action\fP"
.br
.ti -1c
.RI "struct \fBrte_pmd_i40e_pkt_template_input\fP"
.br
.ti -1c
.RI "struct \fBrte_pmd_i40e_pkt_template_conf\fP"
.br
.in -1c
.SS "Macros"

.in +1c
.ti -1c
.RI "#define \fBRTE_PMD_I40E_PTYPE_USER_DEFINE_MASK\fP   0x80000000"
.br
.in -1c
.SS "Enumerations"

.in +1c
.ti -1c
.RI "enum \fBrte_pmd_i40e_mb_event_rsp\fP { \fBRTE_PMD_I40E_MB_EVENT_NOOP_ACK\fP, \fBRTE_PMD_I40E_MB_EVENT_NOOP_NACK\fP, \fBRTE_PMD_I40E_MB_EVENT_PROCEED\fP, \fBRTE_PMD_I40E_MB_EVENT_MAX\fP }"
.br
.ti -1c
.RI "enum \fBrte_pmd_i40e_package_op\fP {  }"
.br
.ti -1c
.RI "enum \fBrte_pmd_i40e_package_info\fP "
.br
.ti -1c
.RI "enum \fBrte_pmd_i40e_queue_region_op\fP {  }"
.br
.ti -1c
.RI "enum \fBrte_pmd_i40e_pkt_template_behavior\fP "
.br
.ti -1c
.RI "enum \fBrte_pmd_i40e_pkt_template_status\fP { \fBRTE_PMD_I40E_PKT_TEMPLATE_NO_REPORT_STATUS\fP, \fBRTE_PMD_I40E_PKT_TEMPLATE_REPORT_ID\fP, \fBRTE_PMD_I40E_PKT_TEMPLATE_REPORT_ID_FLEX_4\fP, \fBRTE_PMD_I40E_PKT_TEMPLATE_REPORT_FLEX_8\fP }"
.br
.in -1c
.SS "Functions"

.in +1c
.ti -1c
.RI "int \fBrte_pmd_i40e_flow_add_del_packet_template\fP (uint16_t port, const struct \fBrte_pmd_i40e_pkt_template_conf\fP *conf, uint8_t add)"
.br
.ti -1c
.RI "int \fBrte_pmd_i40e_ping_vfs\fP (uint16_t port, uint16_t vf)"
.br
.ti -1c
.RI "int \fBrte_pmd_i40e_set_vf_mac_anti_spoof\fP (uint16_t port, uint16_t vf_id, uint8_t on)"
.br
.ti -1c
.RI "int \fBrte_pmd_i40e_set_vf_vlan_anti_spoof\fP (uint16_t port, uint16_t vf_id, uint8_t on)"
.br
.ti -1c
.RI "int \fBrte_pmd_i40e_set_tx_loopback\fP (uint16_t port, uint8_t on)"
.br
.ti -1c
.RI "int \fBrte_pmd_i40e_set_vf_unicast_promisc\fP (uint16_t port, uint16_t vf_id, uint8_t on)"
.br
.ti -1c
.RI "int \fBrte_pmd_i40e_set_vf_multicast_promisc\fP (uint16_t port, uint16_t vf_id, uint8_t on)"
.br
.ti -1c
.RI "int \fBrte_pmd_i40e_set_vf_mac_addr\fP (uint16_t port, uint16_t vf_id, struct rte_ether_addr *mac_addr)"
.br
.ti -1c
.RI "int \fBrte_pmd_i40e_remove_vf_mac_addr\fP (uint16_t port, uint16_t vf_id, struct rte_ether_addr *mac_addr)"
.br
.ti -1c
.RI "int \fBrte_pmd_i40e_set_vf_vlan_stripq\fP (uint16_t port, uint16_t vf, uint8_t on)"
.br
.ti -1c
.RI "int \fBrte_pmd_i40e_set_vf_vlan_insert\fP (uint16_t port, uint16_t vf_id, uint16_t vlan_id)"
.br
.ti -1c
.RI "int \fBrte_pmd_i40e_set_vf_broadcast\fP (uint16_t port, uint16_t vf_id, uint8_t on)"
.br
.ti -1c
.RI "int \fBrte_pmd_i40e_set_vf_vlan_tag\fP (uint16_t port, uint16_t vf_id, uint8_t on)"
.br
.ti -1c
.RI "int \fBrte_pmd_i40e_set_vf_vlan_filter\fP (uint16_t port, uint16_t vlan_id, uint64_t vf_mask, uint8_t on)"
.br
.ti -1c
.RI "int \fBrte_pmd_i40e_get_vf_stats\fP (uint16_t port, uint16_t vf_id, struct \fBrte_eth_stats\fP *stats)"
.br
.ti -1c
.RI "int \fBrte_pmd_i40e_reset_vf_stats\fP (uint16_t port, uint16_t vf_id)"
.br
.ti -1c
.RI "int \fBrte_pmd_i40e_set_vf_max_bw\fP (uint16_t port, uint16_t vf_id, uint32_t bw)"
.br
.ti -1c
.RI "int \fBrte_pmd_i40e_set_vf_tc_bw_alloc\fP (uint16_t port, uint16_t vf_id, uint8_t tc_num, uint8_t *bw_weight)"
.br
.ti -1c
.RI "int \fBrte_pmd_i40e_set_vf_tc_max_bw\fP (uint16_t port, uint16_t vf_id, uint8_t tc_no, uint32_t bw)"
.br
.ti -1c
.RI "int \fBrte_pmd_i40e_set_tc_strict_prio\fP (uint16_t port, uint8_t tc_map)"
.br
.ti -1c
.RI "int \fBrte_pmd_i40e_process_ddp_package\fP (uint16_t port, uint8_t *buff, uint32_t size, enum \fBrte_pmd_i40e_package_op\fP op)"
.br
.ti -1c
.RI "int \fBrte_pmd_i40e_get_ddp_info\fP (uint8_t *pkg, uint32_t pkg_size, uint8_t *info, uint32_t size, enum \fBrte_pmd_i40e_package_info\fP type)"
.br
.ti -1c
.RI "int \fBrte_pmd_i40e_get_ddp_list\fP (uint16_t port, uint8_t *buff, uint32_t size)"
.br
.ti -1c
.RI "int \fBrte_pmd_i40e_ptype_mapping_update\fP (uint16_t port, struct rte_pmd_i40e_ptype_mapping *mapping_items, uint16_t count, uint8_t exclusive)"
.br
.ti -1c
.RI "int \fBrte_pmd_i40e_ptype_mapping_reset\fP (uint16_t port)"
.br
.ti -1c
.RI "int \fBrte_pmd_i40e_ptype_mapping_get\fP (uint16_t port, struct rte_pmd_i40e_ptype_mapping *mapping_items, uint16_t size, uint16_t *count, uint8_t valid_only)"
.br
.ti -1c
.RI "int \fBrte_pmd_i40e_ptype_mapping_replace\fP (uint16_t port, uint32_t target, uint8_t mask, uint32_t pkt_type)"
.br
.ti -1c
.RI "int \fBrte_pmd_i40e_add_vf_mac_addr\fP (uint16_t port, uint16_t vf_id, struct rte_ether_addr *mac_addr)"
.br
.ti -1c
.RI "int \fBrte_pmd_i40e_flow_type_mapping_update\fP (uint16_t port, struct rte_pmd_i40e_flow_type_mapping *mapping_items, uint16_t count, uint8_t exclusive)"
.br
.ti -1c
.RI "int \fBrte_pmd_i40e_flow_type_mapping_get\fP (uint16_t port, struct rte_pmd_i40e_flow_type_mapping *mapping_items)"
.br
.ti -1c
.RI "int \fBrte_pmd_i40e_flow_type_mapping_reset\fP (uint16_t port)"
.br
.ti -1c
.RI "int \fBrte_pmd_i40e_query_vfid_by_mac\fP (uint16_t port, const struct rte_ether_addr *vf_mac)"
.br
.ti -1c
.RI "int \fBrte_pmd_i40e_rss_queue_region_conf\fP (uint16_t port_id, enum \fBrte_pmd_i40e_queue_region_op\fP op_type, void *arg)"
.br
.ti -1c
.RI "int \fBrte_pmd_i40e_inset_get\fP (uint16_t port, uint8_t pctype, struct rte_pmd_i40e_inset *inset, enum rte_pmd_i40e_inset_type inset_type)"
.br
.ti -1c
.RI "int \fBrte_pmd_i40e_inset_set\fP (uint16_t port, uint8_t pctype, struct rte_pmd_i40e_inset *inset, enum rte_pmd_i40e_inset_type inset_type)"
.br
.ti -1c
.RI "static int \fBrte_pmd_i40e_inset_field_get\fP (uint64_t inset, uint8_t field_idx)"
.br
.ti -1c
.RI "static int \fBrte_pmd_i40e_inset_field_set\fP (uint64_t *inset, uint8_t field_idx)"
.br
.ti -1c
.RI "static int \fBrte_pmd_i40e_inset_field_clear\fP (uint64_t *inset, uint8_t field_idx)"
.br
.ti -1c
.RI "__rte_experimental int \fBrte_pmd_i40e_get_fdir_info\fP (uint16_t port, struct \fBrte_eth_fdir_info\fP *fdir_info)"
.br
.ti -1c
.RI "__rte_experimental int \fBrte_pmd_i40e_get_fdir_stats\fP (uint16_t port, struct \fBrte_eth_fdir_stats\fP *fdir_stat)"
.br
.ti -1c
.RI "__rte_experimental int \fBrte_pmd_i40e_set_gre_key_len\fP (uint16_t port, uint8_t len)"
.br
.ti -1c
.RI "__rte_experimental int \fBrte_pmd_i40e_set_switch_dev\fP (uint16_t port_id, struct rte_eth_dev *switch_dev)"
.br
.ti -1c
.RI "__rte_experimental int \fBrte_pmd_i40e_set_pf_src_prune\fP (uint16_t port, uint8_t on)"
.br
.in -1c
.SH "Detailed Description"
.PP 
i40e PMD specific functions\&.

.PP
\fBEXPERIMENTAL:\fP this API may change, or be removed, without prior notice 
.PP
Definition in file \fBrte_pmd_i40e\&.h\fP\&.
.SH "Macro Definition Documentation"
.PP 
.SS "#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\&. 
.PP
Definition at line \fB176\fP of file \fBrte_pmd_i40e\&.h\fP\&.
.SH "Enumeration Type Documentation"
.PP 
.SS "enum \fBrte_pmd_i40e_mb_event_rsp\fP"
Response sent back to i40e driver from user app after callback 
.PP
\fBEnumerator\fP
.in +1c
.TP
\f(BIRTE_PMD_I40E_MB_EVENT_NOOP_ACK \fP
skip mbox request and ACK 
.TP
\f(BIRTE_PMD_I40E_MB_EVENT_NOOP_NACK \fP
skip mbox request and NACK 
.TP
\f(BIRTE_PMD_I40E_MB_EVENT_PROCEED \fP
proceed with mbox request 
.TP
\f(BIRTE_PMD_I40E_MB_EVENT_MAX \fP
max value of this enum 
.PP
Definition at line \fB28\fP of file \fBrte_pmd_i40e\&.h\fP\&.
.SS "enum \fBrte_pmd_i40e_package_op\fP"
Option of package processing\&. 
.PP
\fBEnumerator\fP
.in +1c
.TP
\f(BIRTE_PMD_I40E_PKG_OP_WR_ADD \fP
load package and add to info list 
.TP
\f(BIRTE_PMD_I40E_PKG_OP_WR_DEL \fP
load package and delete from info list 
.TP
\f(BIRTE_PMD_I40E_PKG_OP_WR_ONLY \fP
load package without modifying info list 
.PP
Definition at line \fB49\fP of file \fBrte_pmd_i40e\&.h\fP\&.
.SS "enum \fBrte_pmd_i40e_package_info\fP"
Types of package information\&. 
.PP
Definition at line \fB60\fP of file \fBrte_pmd_i40e\&.h\fP\&.
.SS "enum \fBrte_pmd_i40e_queue_region_op\fP"
Option types of queue region\&. 
.PP
\fBEnumerator\fP
.in +1c
.TP
\f(BIRTE_PMD_I40E_RSS_QUEUE_REGION_SET \fP
add queue region set 
.TP
\f(BIRTE_PMD_I40E_RSS_QUEUE_REGION_FLOWTYPE_SET \fP
add PF region pctype set 
.TP
\f(BIRTE_PMD_I40E_RSS_QUEUE_REGION_USER_PRIORITY_SET \fP
add queue region user priority set 
.TP
\f(BIRTE_PMD_I40E_RSS_QUEUE_REGION_ALL_FLUSH_ON \fP
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\&. 
.TP
\f(BIRTE_PMD_I40E_RSS_QUEUE_REGION_ALL_FLUSH_OFF \fP
"FLUSH_OFF " is just clean all configuration about queue region just now, and restore all to DPDK i40e driver default config when start up\&. 
.PP
Definition at line \fB81\fP of file \fBrte_pmd_i40e\&.h\fP\&.
.SS "enum \fBrte_pmd_i40e_pkt_template_behavior\fP"
Behavior will be taken if raw packet template is matched\&. 
.PP
Definition at line \fB234\fP of file \fBrte_pmd_i40e\&.h\fP\&.
.SS "enum \fBrte_pmd_i40e_pkt_template_status\fP"
Flow director report status It defines what will be reported if raw packet template is matched\&. 
.PP
\fBEnumerator\fP
.in +1c
.TP
\f(BIRTE_PMD_I40E_PKT_TEMPLATE_NO_REPORT_STATUS \fP
report nothing 
.TP
\f(BIRTE_PMD_I40E_PKT_TEMPLATE_REPORT_ID \fP
only report FD ID 
.TP
\f(BIRTE_PMD_I40E_PKT_TEMPLATE_REPORT_ID_FLEX_4 \fP
report FD ID and 4 flex bytes 
.TP
\f(BIRTE_PMD_I40E_PKT_TEMPLATE_REPORT_FLEX_8 \fP
report 8 flex bytes 
.PP
Definition at line \fB244\fP of file \fBrte_pmd_i40e\&.h\fP\&.
.SH "Function Documentation"
.PP 
.SS "int rte_pmd_i40e_flow_add_del_packet_template (uint16_t port, const struct \fBrte_pmd_i40e_pkt_template_conf\fP * conf, uint8_t add)"
Add or remove raw packet template filter to Flow Director\&.

.PP
\fBParameters\fP
.RS 4
\fIport\fP The port identifier of the Ethernet device\&. 
.br
\fIconf\fP Specifies configuration parameters of raw packet template filter\&. 
.br
\fIadd\fP Specifies an action to be taken - add or remove raw packet template filter\&. 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
(0) if successful\&.
.IP "\(bu" 2
(-ENODEV) if \fIport\fP invalid\&.
.IP "\(bu" 2
(-EINVAL) if \fIconf\fP invalid\&.
.IP "\(bu" 2
(-ENOTSUP) not supported by firmware\&. 
.PP
.RE
.PP

.SS "int rte_pmd_i40e_ping_vfs (uint16_t port, uint16_t vf)"
Notify VF when PF link status changes\&.

.PP
\fBParameters\fP
.RS 4
\fIport\fP The port identifier of the Ethernet device\&. 
.br
\fIvf\fP VF id\&. 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
(0) if successful\&.
.IP "\(bu" 2
(-ENODEV) if \fIport\fP invalid\&.
.IP "\(bu" 2
(-EINVAL) if \fIvf\fP invalid\&. 
.PP
.RE
.PP

.SS "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\&.

.PP
\fBParameters\fP
.RS 4
\fIport\fP The port identifier of the Ethernet device\&. 
.br
\fIvf_id\fP VF on which to set MAC anti spoofing\&. 
.br
\fIon\fP 1 - Enable VFs MAC anti spoofing\&. 0 - Disable VFs MAC anti spoofing\&. 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
(0) if successful\&.
.IP "\(bu" 2
(-ENODEV) if \fIport\fP invalid\&.
.IP "\(bu" 2
(-EINVAL) if bad parameter\&. 
.PP
.RE
.PP

.SS "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\&.

.PP
\fBParameters\fP
.RS 4
\fIport\fP The port identifier of the Ethernet device\&. 
.br
\fIvf_id\fP VF on which to set VLAN anti spoofing\&. 
.br
\fIon\fP 1 - Enable VFs VLAN anti spoofing\&. 0 - Disable VFs VLAN anti spoofing\&. 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
(0) if successful\&.
.IP "\(bu" 2
(-ENODEV) if \fIport\fP invalid\&.
.IP "\(bu" 2
(-EINVAL) if bad parameter\&. 
.PP
.RE
.PP

.SS "int rte_pmd_i40e_set_tx_loopback (uint16_t port, uint8_t on)"
Enable/Disable TX loopback on all the PF and VFs\&.

.PP
\fBParameters\fP
.RS 4
\fIport\fP The port identifier of the Ethernet device\&. 
.br
\fIon\fP 1 - Enable TX loopback\&. 0 - Disable TX loopback\&. 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
(0) if successful\&.
.IP "\(bu" 2
(-ENODEV) if \fIport\fP invalid\&.
.IP "\(bu" 2
(-EINVAL) if bad parameter\&. 
.PP
.RE
.PP

.SS "int rte_pmd_i40e_set_vf_unicast_promisc (uint16_t port, uint16_t vf_id, uint8_t on)"
Enable/Disable VF unicast promiscuous mode\&.

.PP
\fBParameters\fP
.RS 4
\fIport\fP The port identifier of the Ethernet device\&. 
.br
\fIvf_id\fP VF on which to set\&. 
.br
\fIon\fP 1 - Enable\&. 0 - Disable\&. 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
(0) if successful\&.
.IP "\(bu" 2
(-ENODEV) if \fIport\fP invalid\&.
.IP "\(bu" 2
(-EINVAL) if bad parameter\&. 
.PP
.RE
.PP

.SS "int rte_pmd_i40e_set_vf_multicast_promisc (uint16_t port, uint16_t vf_id, uint8_t on)"
Enable/Disable VF multicast promiscuous mode\&.

.PP
\fBParameters\fP
.RS 4
\fIport\fP The port identifier of the Ethernet device\&. 
.br
\fIvf_id\fP VF on which to set\&. 
.br
\fIon\fP 1 - Enable\&. 0 - Disable\&. 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
(0) if successful\&.
.IP "\(bu" 2
(-ENODEV) if \fIport\fP invalid\&.
.IP "\(bu" 2
(-EINVAL) if bad parameter\&. 
.PP
.RE
.PP

.SS "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\&.

.PP
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\&.

.PP
This will remove all existing MAC filters\&.

.PP
\fBParameters\fP
.RS 4
\fIport\fP The port identifier of the Ethernet device\&. 
.br
\fIvf_id\fP VF id\&. 
.br
\fImac_addr\fP VF MAC address\&. 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
(0) if successful\&.
.IP "\(bu" 2
(-ENODEV) if \fIport\fP invalid\&.
.IP "\(bu" 2
(-EINVAL) if \fIvf\fP or \fImac_addr\fP is invalid\&. 
.PP
.RE
.PP

.SS "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\&.

.PP
\fBParameters\fP
.RS 4
\fIport\fP The port identifier of the Ethernet device\&. 
.br
\fIvf_id\fP VF id\&. 
.br
\fImac_addr\fP VF MAC address\&. 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
(0) if successful\&.
.IP "\(bu" 2
(-ENODEV) if \fIport\fP invalid\&.
.IP "\(bu" 2
(-EINVAL) if \fIvf\fP or \fImac_addr\fP is invalid\&. 
.PP
.RE
.PP

.SS "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

.PP
\fBParameters\fP
.RS 4
\fIport\fP The port identifier of the Ethernet device\&. 
.br
\fIvf\fP ID specifying VF\&. 
.br
\fIon\fP 1 - Enable VF's vlan strip on RX queues\&. 0 - Disable VF's vlan strip on RX queues\&.
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
(0) if successful\&.
.IP "\(bu" 2
(-ENODEV) if \fIport\fP invalid\&.
.IP "\(bu" 2
(-EINVAL) if bad parameter\&. 
.PP
.RE
.PP

.SS "int rte_pmd_i40e_set_vf_vlan_insert (uint16_t port, uint16_t vf_id, uint16_t vlan_id)"
Enable/Disable vf vlan insert

.PP
\fBParameters\fP
.RS 4
\fIport\fP The port identifier of the Ethernet device\&. 
.br
\fIvf_id\fP ID specifying VF\&. 
.br
\fIvlan_id\fP 0 - Disable VF's vlan insert\&. n - Enable; n is inserted as the vlan id\&.
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
(0) if successful\&.
.IP "\(bu" 2
(-ENODEV) if \fIport\fP invalid\&.
.IP "\(bu" 2
(-EINVAL) if bad parameter\&. 
.PP
.RE
.PP

.SS "int rte_pmd_i40e_set_vf_broadcast (uint16_t port, uint16_t vf_id, uint8_t on)"
Enable/Disable vf broadcast mode

.PP
\fBParameters\fP
.RS 4
\fIport\fP The port identifier of the Ethernet device\&. 
.br
\fIvf_id\fP ID specifying VF\&. 
.br
\fIon\fP 0 - Disable broadcast\&. 1 - Enable broadcast\&.
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
(0) if successful\&.
.IP "\(bu" 2
(-ENODEV) if \fIport\fP invalid\&.
.IP "\(bu" 2
(-EINVAL) if bad parameter\&. 
.PP
.RE
.PP

.SS "int rte_pmd_i40e_set_vf_vlan_tag (uint16_t port, uint16_t vf_id, uint8_t on)"
Enable/Disable vf vlan tag

.PP
\fBParameters\fP
.RS 4
\fIport\fP The port identifier of the Ethernet device\&. 
.br
\fIvf_id\fP ID specifying VF\&. 
.br
\fIon\fP 0 - Disable VF's vlan tag\&. n - Enable VF's vlan tag\&.
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
(0) if successful\&.
.IP "\(bu" 2
(-ENODEV) if \fIport\fP invalid\&.
.IP "\(bu" 2
(-EINVAL) if bad parameter\&. 
.PP
.RE
.PP

.SS "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

.PP
\fBParameters\fP
.RS 4
\fIport\fP The port identifier of the Ethernet device\&. 
.br
\fIvlan_id\fP ID specifying VLAN 
.br
\fIvf_mask\fP Mask to filter VF's 
.br
\fIon\fP 0 - Disable VF's VLAN filter\&. 1 - Enable VF's VLAN filter\&.
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
(0) if successful\&.
.IP "\(bu" 2
(-ENODEV) if \fIport\fP invalid\&.
.IP "\(bu" 2
(-EINVAL) if bad parameter\&.
.IP "\(bu" 2
(-ENOTSUP) not supported by firmware\&. 
.PP
.RE
.PP

.SS "int rte_pmd_i40e_get_vf_stats (uint16_t port, uint16_t vf_id, struct \fBrte_eth_stats\fP * stats)"
Get VF's statistics

.PP
\fBParameters\fP
.RS 4
\fIport\fP The port identifier of the Ethernet device\&. 
.br
\fIvf_id\fP VF on which to get\&. 
.br
\fIstats\fP A pointer to a structure of type \fI\fBrte_eth_stats\fP\fP to be filled with the values of device counters for the following set of statistics:
.IP "\(bu" 2
\fIipackets\fP with the total of successfully received packets\&.
.IP "\(bu" 2
\fIopackets\fP with the total of successfully transmitted packets\&.
.IP "\(bu" 2
\fIibytes\fP with the total of successfully received bytes\&.
.IP "\(bu" 2
\fIobytes\fP with the total of successfully transmitted bytes\&.
.IP "\(bu" 2
\fIierrors\fP with the total of erroneous received packets\&.
.IP "\(bu" 2
\fIoerrors\fP with the total of failed transmitted packets\&. 
.PP
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
(0) if successful\&.
.IP "\(bu" 2
(-ENODEV) if \fIport\fP invalid\&.
.IP "\(bu" 2
(-EINVAL) if bad parameter\&. 
.PP
.RE
.PP

.SS "int rte_pmd_i40e_reset_vf_stats (uint16_t port, uint16_t vf_id)"
Clear VF's statistics

.PP
\fBParameters\fP
.RS 4
\fIport\fP The port identifier of the Ethernet device\&. 
.br
\fIvf_id\fP VF on which to get\&. 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
(0) if successful\&.
.IP "\(bu" 2
(-ENODEV) if \fIport\fP invalid\&.
.IP "\(bu" 2
(-EINVAL) if bad parameter\&. 
.PP
.RE
.PP

.SS "int rte_pmd_i40e_set_vf_max_bw (uint16_t port, uint16_t vf_id, uint32_t bw)"
Set VF's max bandwidth\&.

.PP
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\&.

.PP
\fBParameters\fP
.RS 4
\fIport\fP The port identifier of the Ethernet device\&. 
.br
\fIvf_id\fP ID specifying VF\&. 
.br
\fIbw\fP Bandwidth 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\&. 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
(0) if successful\&.
.IP "\(bu" 2
(-ENODEV) if \fIport\fP invalid\&.
.IP "\(bu" 2
(-EINVAL) if bad parameter\&.
.IP "\(bu" 2
(-ENOTSUP) not supported by firmware\&. 
.PP
.RE
.PP

.SS "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\&.

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

.PP
\fBParameters\fP
.RS 4
\fIport\fP The port identifier of the Ethernet device\&. 
.br
\fIvf_id\fP ID specifying VF\&. 
.br
\fItc_num\fP Number of TCs\&. 
.br
\fIbw_weight\fP An array of relative bandwidth weight for all the TCs\&. The summary of the bw_weight should be 100\&. 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
(0) if successful\&.
.IP "\(bu" 2
(-ENODEV) if \fIport\fP invalid\&.
.IP "\(bu" 2
(-EINVAL) if bad parameter\&.
.IP "\(bu" 2
(-ENOTSUP) not supported by firmware\&. 
.PP
.RE
.PP

.SS "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\&.

.PP
\fBParameters\fP
.RS 4
\fIport\fP The port identifier of the Ethernet device\&. 
.br
\fIvf_id\fP ID specifying VF\&. 
.br
\fItc_no\fP Number specifying TC\&. 
.br
\fIbw\fP Max 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\&. 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
(0) if successful\&.
.IP "\(bu" 2
(-ENODEV) if \fIport\fP invalid\&.
.IP "\(bu" 2
(-EINVAL) if bad parameter\&.
.IP "\(bu" 2
(-ENOTSUP) not supported by firmware\&. 
.PP
.RE
.PP

.SS "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\&.

.PP
\fBParameters\fP
.RS 4
\fIport\fP The port identifier of the Ethernet device\&. 
.br
\fItc_map\fP A bit map for the TCs\&. 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
(0) if successful\&.
.IP "\(bu" 2
(-ENODEV) if \fIport\fP invalid\&.
.IP "\(bu" 2
(-EINVAL) if bad parameter\&.
.IP "\(bu" 2
(-ENOTSUP) not supported by firmware\&. 
.PP
.RE
.PP

.SS "int rte_pmd_i40e_process_ddp_package (uint16_t port, uint8_t * buff, uint32_t size, enum \fBrte_pmd_i40e_package_op\fP op)"
Load/Unload a ddp package

.PP
\fBParameters\fP
.RS 4
\fIport\fP The port identifier of the Ethernet device\&. 
.br
\fIbuff\fP buffer of package\&. 
.br
\fIsize\fP size of buffer\&. 
.br
\fIop\fP Operation of package processing 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
(0) if successful\&.
.IP "\(bu" 2
(-ENODEV) if \fIport\fP invalid\&.
.IP "\(bu" 2
(-EINVAL) if bad parameter\&.
.IP "\(bu" 2
(-EEXIST) if profile exists\&.
.IP "\(bu" 2
(-EACCES) if profile does not exist\&.
.IP "\(bu" 2
(-ENOTSUP) if operation not supported\&. 
.PP
.RE
.PP

.SS "int rte_pmd_i40e_get_ddp_info (uint8_t * pkg, uint32_t pkg_size, uint8_t * info, uint32_t size, enum \fBrte_pmd_i40e_package_info\fP type)"
rte_pmd_i40e_get_ddp_info - Get profile's info 
.PP
\fBParameters\fP
.RS 4
\fIpkg\fP buffer of package\&. 
.br
\fIpkg_size\fP package buffer size 
.br
\fIinfo\fP buffer for response 
.br
\fIsize\fP response buffer size 
.br
\fItype\fP type of information requested 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
(0) if successful\&.
.IP "\(bu" 2
(-ENOTSUP) if information type not supported by the profile\&.
.IP "\(bu" 2
(-EINVAL) if bad parameter\&. 
.PP
.RE
.PP

.SS "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 
.PP
\fBParameters\fP
.RS 4
\fIport\fP port id 
.br
\fIbuff\fP buffer for response 
.br
\fIsize\fP buffer size 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
(0) if successful\&.
.IP "\(bu" 2
(-ENODEV) if \fIport\fP invalid\&.
.IP "\(bu" 2
(-EINVAL) if bad parameter\&. 
.PP
.RE
.PP

.SS "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\&.

.PP
\fBParameters\fP
.RS 4
\fIport\fP pointer to port identifier of the device\&. 
.br
\fImapping_items\fP the base address of the mapping items array\&. 
.br
\fIcount\fP number of mapping items\&. 
.br
\fIexclusive\fP the 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\&. 
.RE
.PP

.SS "int rte_pmd_i40e_ptype_mapping_reset (uint16_t port)"
Reset hardware defined ptype to software defined ptype mapping table to default\&.

.PP
\fBParameters\fP
.RS 4
\fIport\fP pointer to port identifier of the device 
.RE
.PP

.SS "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\&.

.PP
\fBParameters\fP
.RS 4
\fIport\fP pointer to port identifier of the device\&. 
.br
\fImapping_items\fP the base address of the array to store returned items\&. 
.br
\fIsize\fP the size of the input array\&. 
.br
\fIcount\fP the place to store the number of returned items\&. 
.br
\fIvalid_only\fP -(0) return full mapping table\&. -(!0) only return mapping items which packet_type != RTE_PTYPE_UNKNOWN\&. 
.RE
.PP

.SS "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

.PP
\fBParameters\fP
.RS 4
\fIport\fP pointer to port identifier of the device 
.br
\fItarget\fP the packet type to be replaced 
.br
\fImask\fP -(0) target represent a specific software defined ptype\&. -(!0) target is a mask to represent a group of software defined ptypes\&. 
.br
\fIpkt_type\fP the new packet type to overwrite 
.RE
.PP

.SS "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\&.

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

.PP
\fBParameters\fP
.RS 4
\fIport\fP The port identifier of the Ethernet device\&. 
.br
\fIvf_id\fP VF id\&. 
.br
\fImac_addr\fP VF MAC address\&. 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
(0) if successful\&.
.IP "\(bu" 2
(-ENODEV) if \fIport\fP invalid\&.
.IP "\(bu" 2
(-EINVAL) if \fIvf\fP or \fImac_addr\fP is invalid\&. 
.PP
.RE
.PP

.SS "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\&.

.PP
\fBParameters\fP
.RS 4
\fIport\fP pointer to port identifier of the device\&. 
.br
\fImapping_items\fP the base address of the mapping items array\&. 
.br
\fIcount\fP number of mapping items\&. 
.br
\fIexclusive\fP the 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\&. 
.RE
.PP

.SS "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\&.

.PP
\fBParameters\fP
.RS 4
\fIport\fP pointer to port identifier of the device\&. 
.br
\fImapping_items\fP the 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 
.RE
.PP

.SS "int rte_pmd_i40e_flow_type_mapping_reset (uint16_t port)"
Reset hardware defined pctype to software defined flow type mapping table to default\&.

.PP
\fBParameters\fP
.RS 4
\fIport\fP pointer to port identifier of the device 
.RE
.PP

.SS "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

.PP
\fBParameters\fP
.RS 4
\fIport\fP pointer to port identifier of the device 
.br
\fIvf_mac\fP the mac address of the vf to determine index of 
.RE
.PP
\fBReturns\fP
.RS 4
The index of vfid If successful\&. -EINVAL: vf mac address does not exist for this port -ENOTSUP: i40e not supported for this port\&. 
.RE
.PP

.SS "int rte_pmd_i40e_rss_queue_region_conf (uint16_t port_id, enum \fBrte_pmd_i40e_queue_region_op\fP op_type, void * arg)"
Do RSS queue region configuration for that port as the command option type

.PP
\fBParameters\fP
.RS 4
\fIport_id\fP The port identifier of the Ethernet device\&. 
.br
\fIop_type\fP Queue region operation type 
.br
\fIarg\fP Queue region operation type specific data 
.RE
.PP

.SS "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

.PP
\fBParameters\fP
.RS 4
\fIport\fP The port identifier of the Ethernet device\&. 
.br
\fIpctype\fP HW pctype\&. 
.br
\fIinset\fP Buffer for input set info\&. 
.br
\fIinset_type\fP Type of input set\&. 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
(0) if successful\&.
.IP "\(bu" 2
(-ENODEV) if \fIport\fP invalid\&.
.IP "\(bu" 2
(-EINVAL) if bad parameter\&.
.IP "\(bu" 2
(-ENOTSUP) if operation not supported\&. 
.PP
.RE
.PP

.SS "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

.PP
\fBParameters\fP
.RS 4
\fIport\fP The port identifier of the Ethernet device\&. 
.br
\fIpctype\fP HW pctype\&. 
.br
\fIinset\fP Input set info\&. 
.br
\fIinset_type\fP Type of input set\&. 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
(0) if successful\&.
.IP "\(bu" 2
(-ENODEV) if \fIport\fP invalid\&.
.IP "\(bu" 2
(-EINVAL) if bad parameter\&.
.IP "\(bu" 2
(-ENOTSUP) if operation not supported\&. 
.PP
.RE
.PP

.SS "int rte_pmd_i40e_inset_field_get (uint64_t inset, uint8_t field_idx)\fR [inline]\fP, \fR [static]\fP"
Get bit value for some field index

.PP
\fBParameters\fP
.RS 4
\fIinset\fP Input set value\&. 
.br
\fIfield_idx\fP Field index for input set\&. 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
(1) if set\&.
.IP "\(bu" 2
(0) if cleared\&. 
.PP
.RE
.PP

.PP
Definition at line \fB1006\fP of file \fBrte_pmd_i40e\&.h\fP\&.
.SS "int rte_pmd_i40e_inset_field_set (uint64_t * inset, uint8_t field_idx)\fR [inline]\fP, \fR [static]\fP"
Set bit value for some field index

.PP
\fBParameters\fP
.RS 4
\fIinset\fP Input set value\&. 
.br
\fIfield_idx\fP Field index for input set\&. 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
(-1) if failed\&.
.IP "\(bu" 2
(0) if success\&. 
.PP
.RE
.PP

.PP
Definition at line \fB1032\fP of file \fBrte_pmd_i40e\&.h\fP\&.
.SS "int rte_pmd_i40e_inset_field_clear (uint64_t * inset, uint8_t field_idx)\fR [inline]\fP, \fR [static]\fP"
Clear bit value for some field index

.PP
\fBParameters\fP
.RS 4
\fIinset\fP Input set value\&. 
.br
\fIfield_idx\fP Field index for input set\&. 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
(-1) if failed\&.
.IP "\(bu" 2
(0) if success\&. 
.PP
.RE
.PP

.PP
Definition at line \fB1057\fP of file \fBrte_pmd_i40e\&.h\fP\&.
.SS "__rte_experimental int rte_pmd_i40e_get_fdir_info (uint16_t port, struct \fBrte_eth_fdir_info\fP * fdir_info)"
Get port fdir info

.PP
\fBParameters\fP
.RS 4
\fIport\fP The port identifier of the Ethernet device\&. 
.br
\fIfdir_info\fP The fdir info of the port 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
(0) if successful\&.
.IP "\(bu" 2
(-ENODEV) if \fIport\fP invalid\&.
.IP "\(bu" 2
(-ENOTSUP) if operation not supported\&. 
.PP
.RE
.PP

.SS "__rte_experimental int rte_pmd_i40e_get_fdir_stats (uint16_t port, struct \fBrte_eth_fdir_stats\fP * fdir_stat)"
Get port fdir status

.PP
\fBParameters\fP
.RS 4
\fIport\fP The port identifier of the Ethernet device\&. 
.br
\fIfdir_stat\fP The fdir status of the port 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
(0) if successful\&.
.IP "\(bu" 2
(-ENODEV) if \fIport\fP invalid\&.
.IP "\(bu" 2
(-ENOTSUP) if operation not supported\&. 
.PP
.RE
.PP

.SS "__rte_experimental int rte_pmd_i40e_set_gre_key_len (uint16_t port, uint8_t len)"
Set GRE key length

.PP
\fBParameters\fP
.RS 4
\fIport\fP The port identifier of the Ethernet device\&. 
.br
\fIlen\fP Length of gre-key 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
(0) if successful\&.
.IP "\(bu" 2
(-ENODEV) if \fIport\fP invalid\&.
.IP "\(bu" 2
(-ENOTSUP) if operation not supported\&. 
.PP
.RE
.PP

.SS "__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\&.

.PP
\fBParameters\fP
.RS 4
\fIport_id\fP port_id of i40e device to be set switch device\&. 
.br
\fIswitch_dev\fP target switch device from which i40e device to get link status from\&. 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
(less than 0) if failed\&.
.IP "\(bu" 2
(0) if success\&. 
.PP
.RE
.PP

.SS "__rte_experimental int rte_pmd_i40e_set_pf_src_prune (uint16_t port, uint8_t on)"
Enable/Disable source prune on all the PF\&.

.PP
\fBParameters\fP
.RS 4
\fIport\fP The port identifier of the Ethernet device\&. 
.br
\fIon\fP 1 - Enable source prune\&. 0 - Disable source prune\&. 
.RE
.PP
\fBReturns\fP
.RS 4
.IP "\(bu" 2
(0) if successful\&.
.IP "\(bu" 2
(-ENODEV) if \fIport\fP invalid\&.
.IP "\(bu" 2
(-EINVAL) if bad parameter\&. 
.PP
.RE
.PP

.SH "Author"
.PP 
Generated automatically by Doxygen for DPDK from the source code\&.
