---
name: "RTE_PMD_I40E_MB_EVENT_PROCEED"
section: "3"
platform: "linux"
package: "dpdk-doc"
version: "24.11.4-0+deb13u1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/rte_pmd_i40e.h"
---

# RTE\_PMD\_I40E\_MB\_EVENT\_PROCEED(3)

Part of [rte\_pmd\_i40e.h(3)](/rte_pmd_i40e.h/3.md).

## NAME

rte\_pmd\_i40e.h

## SYNOPSIS

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

### 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** {  }\
 enum **rte\_pmd\_i40e\_package\_info** \
 enum **rte\_pmd\_i40e\_queue\_region\_op** {  }\
 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

### #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

### enum 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***.*

### enum 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***.*

### enum rte\_pmd\_i40e\_package\_info

*Types of package information.*

*Definition at line* **60** *of file* **rte\_pmd\_i40e.h***.*

### enum 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*

  *Definition at line* **81** *of file* **rte\_pmd\_i40e.h***.*

### enum 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***.*

### enum 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

### 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**

*port The port identifier of the Ethernet device.* \
 *conf Specifies configuration parameters of raw packet template filter.* \
 *add Specifies 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.*

### int rte\_pmd\_i40e\_ping\_vfs (uint16\_t port, uint16\_t vf)

*Notify VF when PF link status changes.*

**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\_i40e\_set\_vf\_mac\_anti\_spoof (uint16\_t port, uint16\_t vf\_id, uint8\_t on)

*Enable/Disable VF MAC anti spoofing.*

**Parameters**

*port The port identifier of the Ethernet device.* \
 *vf\_id 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\_i40e\_set\_vf\_vlan\_anti\_spoof (uint16\_t port, uint16\_t vf\_id, uint8\_t on)

*Enable/Disable VF VLAN anti spoofing.*

**Parameters**

*port The port identifier of the Ethernet device.* \
 *vf\_id 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\_i40e\_set\_tx\_loopback (uint16\_t port, uint8\_t on)

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

**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\_i40e\_set\_vf\_unicast\_promisc (uint16\_t port, uint16\_t vf\_id, uint8\_t on)

*Enable/Disable VF unicast promiscuous mode.*

**Parameters**

*port The port identifier of the Ethernet device.* \
 *vf\_id VF on which to set.* \
 *on 1 - Enable. 0 - Disable.*

**Returns**

- •

  *(0) if successful.*

- •

  *(-ENODEV) if port invalid.*

- •

  *(-EINVAL) if bad parameter.*

### 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**

*port The port identifier of the Ethernet device.* \
 *vf\_id VF on which to set.* \
 *on 1 - Enable. 0 - Disable.*

**Returns**

- •

  *(0) if successful.*

- •

  *(-ENODEV) if port invalid.*

- •

  *(-EINVAL) if bad parameter.*

### 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**

*port The port identifier of the Ethernet device.* \
 *vf\_id 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\_i40e\_remove\_vf\_mac\_addr (uint16\_t port, uint16\_t vf\_id, struct rte\_ether\_addr \* mac\_addr)

*Remove the VF MAC address.*

**Parameters**

*port The port identifier of the Ethernet device.* \
 *vf\_id 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\_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**

*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.*

- •

  *(-ENODEV) if port invalid.*

- •

  *(-EINVAL) if bad parameter.*

### 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**

*port The port identifier of the Ethernet device.* \
 *vf\_id 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\_i40e\_set\_vf\_broadcast (uint16\_t port, uint16\_t vf\_id, uint8\_t on)

*Enable/Disable vf broadcast mode*

**Parameters**

*port The port identifier of the Ethernet device.* \
 *vf\_id ID specifying VF.* \
 *on 0 - Disable broadcast. 1 - Enable broadcast.*

**Returns**

- •

  *(0) if successful.*

- •

  *(-ENODEV) if port invalid.*

- •

  *(-EINVAL) if bad parameter.*

### int rte\_pmd\_i40e\_set\_vf\_vlan\_tag (uint16\_t port, uint16\_t vf\_id, uint8\_t on)

*Enable/Disable vf vlan tag*

**Parameters**

*port The port identifier of the Ethernet device.* \
 *vf\_id ID specifying VF.* \
 *on 0 - Disable VF's vlan tag. n - Enable VF's vlan tag.*

**Returns**

- •

  *(0) if successful.*

- •

  *(-ENODEV) if port invalid.*

- •

  *(-EINVAL) if bad parameter.*

### 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**

*port The port identifier of the Ethernet device.* \
 *vlan\_id ID specifying VLAN* \
 *vf\_mask Mask to filter VF's* \
 *on 0 - 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.*

### int rte\_pmd\_i40e\_get\_vf\_stats (uint16\_t port, uint16\_t vf\_id, struct rte\_eth\_stats \* stats)

*Get VF's statistics*

**Parameters**

*port The port identifier of the Ethernet device.* \
 *vf\_id VF on which to get.* \
 *stats A 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.**

### int rte\_pmd\_i40e\_reset\_vf\_stats (uint16\_t port, uint16\_t vf\_id)

**Clear VF's statistics**

**Parameters**

*port* **The port identifier of the Ethernet device.** \
 *vf\_id* **VF on which to get.**

**Returns**

- •

  **(0) if successful.**

- •

  **(-ENODEV) if** *port* **invalid.**

- •

  **(-EINVAL) if bad parameter.**

### 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**

*port* **The port identifier of the Ethernet device.** \
 *vf\_id* **ID specifying VF.** \
 *bw* **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.**

**Returns**

- •

  **(0) if successful.**

- •

  **(-ENODEV) if** *port* **invalid.**

- •

  **(-EINVAL) if bad parameter.**

- •

  **(-ENOTSUP) not supported by firmware.**

### 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**

*port* **The port identifier of the Ethernet device.** \
 *vf\_id* **ID specifying VF.** \
 *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.**

### 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**

*port* **The port identifier of the Ethernet device.** \
 *vf\_id* **ID specifying VF.** \
 *tc\_no* **Number specifying TC.** \
 *bw* **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.**

**Returns**

- •

  **(0) if successful.**

- •

  **(-ENODEV) if** *port* **invalid.**

- •

  **(-EINVAL) if bad parameter.**

- •

  **(-ENOTSUP) not supported by firmware.**

### 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**

*port* **The port identifier of the Ethernet device.** \
 *tc\_map* **A bit map for the TCs.**

**Returns**

- •

  **(0) if successful.**

- •

  **(-ENODEV) if** *port* **invalid.**

- •

  **(-EINVAL) if bad parameter.**

- •

  **(-ENOTSUP) not supported by firmware.**

### 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**

*port* **The port identifier of the Ethernet device.** \
 *buff* **buffer of package.** \
 *size* **size of buffer.** \
 *op* **Operation 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.**

### 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**

*pkg* **buffer of package.** \
 *pkg\_size* **package buffer size** \
 *info* **buffer for response** \
 *size* **response buffer size** \
 *type* **type of information requested**

**Returns**

- •

  **(0) if successful.**

- •

  **(-ENOTSUP) if information type not supported by the profile.**

- •

  **(-EINVAL) if bad parameter.**

### 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**

*port* **port id** \
 *buff* **buffer for response** \
 *size* **buffer size**

**Returns**

- •

  **(0) if successful.**

- •

  **(-ENODEV) if** *port* **invalid.**

- •

  **(-EINVAL) if bad parameter.**

### 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**

*port* **pointer to port identifier of the device.** \
 *mapping\_items* **the base address of the mapping items array.** \
 *count* **number of mapping items.** \
 *exclusive* **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.**

### int rte\_pmd\_i40e\_ptype\_mapping\_reset (uint16\_t port)

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

**Parameters**

*port* **pointer to port identifier of the device**

### 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**

*port* **pointer to port identifier of the device.** \
 *mapping\_items* **the base address of the array to store returned items.** \
 *size* **the size of the input array.** \
 *count* **the 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.**

### 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**

*port* **pointer to port identifier of the device** \
 *target* **the 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\_type* **the new packet type to overwrite**

### 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**

*port* **The port identifier of the Ethernet device.** \
 *vf\_id* **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\_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**

*port* **pointer to port identifier of the device.** \
 *mapping\_items* **the base address of the mapping items array.** \
 *count* **number of mapping items.** \
 *exclusive* **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.**

### 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**

*port* **pointer to port identifier of the device.** \
 *mapping\_items* **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**

### 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**

*port* **pointer to port identifier of the device**

### 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**

*port* **pointer to port identifier of the device** \
 *vf\_mac* **the 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.**

### 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\_id* **The port identifier of the Ethernet device.** \
 *op\_type* **Queue region operation type** \
 *arg* **Queue region operation type specific data**

### 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**

*port* **The port identifier of the Ethernet device.** \
 *pctype* **HW pctype.** \
 *inset* **Buffer for input set info.** \
 *inset\_type* **Type of input set.**

**Returns**

- •

  **(0) if successful.**

- •

  **(-ENODEV) if** *port* **invalid.**

- •

  **(-EINVAL) if bad parameter.**

- •

  **(-ENOTSUP) if operation not supported.**

### 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**

*port* **The port identifier of the Ethernet device.** \
 *pctype* **HW pctype.** \
 *inset* **Input set info.** \
 *inset\_type* **Type of input set.**

**Returns**

- •

  **(0) if successful.**

- •

  **(-ENODEV) if** *port* **invalid.**

- •

  **(-EINVAL) if bad parameter.**

- •

  **(-ENOTSUP) if operation not supported.**

### static int rte\_pmd\_i40e\_inset\_field\_get (uint64\_t inset, uint8\_t field\_idx)` [inline]`, ` [static]`

**Get bit value for some field index**

**Parameters**

*inset* **Input set value.** \
 *field\_idx* **Field index for input set.**

**Returns**

- •

  **(1) if set.**

- •

  **(0) if cleared.**

**Definition at line 1006 of file rte\_pmd\_i40e.h.**

### static int rte\_pmd\_i40e\_inset\_field\_set (uint64\_t \* inset, uint8\_t field\_idx)` [inline]`, ` [static]`

**Set bit value for some field index**

**Parameters**

*inset* **Input set value.** \
 *field\_idx* **Field index for input set.**

**Returns**

- •

  **(-1) if failed.**

- •

  **(0) if success.**

**Definition at line 1032 of file rte\_pmd\_i40e.h.**

### static int rte\_pmd\_i40e\_inset\_field\_clear (uint64\_t \* inset, uint8\_t field\_idx)` [inline]`, ` [static]`

**Clear bit value for some field index**

**Parameters**

*inset* **Input set value.** \
 *field\_idx* **Field index for input set.**

**Returns**

- •

  **(-1) if failed.**

- •

  **(0) if success.**

**Definition at line 1057 of file rte\_pmd\_i40e.h.**

### \_\_rte\_experimental int rte\_pmd\_i40e\_get\_fdir\_info (uint16\_t port, struct rte\_eth\_fdir\_info \* fdir\_info)

**Get port fdir info**

**Parameters**

*port* **The port identifier of the Ethernet device.** \
 *fdir\_info* **The fdir info of the port**

**Returns**

- •

  **(0) if successful.**

- •

  **(-ENODEV) if** *port* **invalid.**

- •

  **(-ENOTSUP) if operation not supported.**

### \_\_rte\_experimental int rte\_pmd\_i40e\_get\_fdir\_stats (uint16\_t port, struct rte\_eth\_fdir\_stats \* fdir\_stat)

**Get port fdir status**

**Parameters**

*port* **The port identifier of the Ethernet device.** \
 *fdir\_stat* **The fdir status of the port**

**Returns**

- •

  **(0) if successful.**

- •

  **(-ENODEV) if** *port* **invalid.**

- •

  **(-ENOTSUP) if operation not supported.**

### \_\_rte\_experimental int rte\_pmd\_i40e\_set\_gre\_key\_len (uint16\_t port, uint8\_t len)

**Set GRE key length**

**Parameters**

*port* **The port identifier of the Ethernet device.** \
 *len* **Length of gre-key**

**Returns**

- •

  **(0) if successful.**

- •

  **(-ENODEV) if** *port* **invalid.**

- •

  **(-ENOTSUP) if operation not supported.**

### \_\_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\_id* **port\_id of i40e device to be set switch device.** \
 *switch\_dev* **target switch device from which i40e device to get link status from.**

**Returns**

- •

  **(less than 0) if failed.**

- •

  **(0) if success.**

### \_\_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**

*port* **The port identifier of the Ethernet device.** \
 *on* **1 - Enable source prune. 0 - Disable source prune.**

**Returns**

- •

  **(0) if successful.**

- •

  **(-ENODEV) if** *port* **invalid.**

- •

  **(-EINVAL) if bad parameter.**

## Author

**Generated automatically by Doxygen for DPDK from the source code.**
