---
name: "rte_pmd_ifpga.h"
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_ifpga.h"
---

# rte\_pmd\_ifpga.h(3)

## NAME

rte\_pmd\_ifpga.h

## SYNOPSIS

`#include <stdint.h>`\

### Data Structures

struct **rte\_pmd\_ifpga\_uuid**\
 struct **rte\_pmd\_ifpga\_common\_prop**\
 struct **rte\_pmd\_ifpga\_port\_prop**\
 struct **rte\_pmd\_ifpga\_prop**\
 struct **rte\_pmd\_ifpga\_phy\_info**\

### Functions

int **rte\_pmd\_ifpga\_get\_dev\_id** (const char \*pci\_addr, uint16\_t \*dev\_id)\
 int **rte\_pmd\_ifpga\_get\_rsu\_status** (uint16\_t dev\_id, uint32\_t \*stat, uint32\_t \*prog)\
 int **rte\_pmd\_ifpga\_set\_rsu\_status** (uint16\_t dev\_id, uint32\_t stat, uint32\_t prog)\
 int **rte\_pmd\_ifpga\_get\_property** (uint16\_t dev\_id, **rte\_pmd\_ifpga\_prop** \*prop)\
 int **rte\_pmd\_ifpga\_get\_phy\_info** (uint16\_t dev\_id, **rte\_pmd\_ifpga\_phy\_info** \*info)\
 int **rte\_pmd\_ifpga\_update\_flash** (uint16\_t dev\_id, const char \*image, uint64\_t \*status)\
 int **rte\_pmd\_ifpga\_stop\_update** (uint16\_t dev\_id, int force)\
 int **rte\_pmd\_ifpga\_reboot\_try** (uint16\_t dev\_id)\
 int **rte\_pmd\_ifpga\_reload** (uint16\_t dev\_id, int type, int page)\
 int **rte\_pmd\_ifpga\_partial\_reconfigure** (uint16\_t dev\_id, int port, const char \*file)\
 void **rte\_pmd\_ifpga\_cleanup** (void)\

## Detailed Description

ifpga PMD specific functions.

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

Definition in file **rte\_pmd\_ifpga.h**.

## Function Documentation

### int rte\_pmd\_ifpga\_get\_dev\_id (const char \* pci\_addr, uint16\_t \* dev\_id)

Get raw device ID from PCI address string like 'Domain:Bus:Dev.Func'

**Parameters**

*pci\_addr* The PCI address of specified Intel FPGA device. \
 *dev\_id* The buffer to output device ID.

**Returns**

- •

  (0) if successful.

- •

  (-EINVAL) if bad parameter.

- •

  (-ENODEV) if FPGA is not probed by ifpga driver.

### int rte\_pmd\_ifpga\_get\_rsu\_status (uint16\_t dev\_id, uint32\_t \* stat, uint32\_t \* prog)

Get current RSU status of the specified Intel FPGA device

**Parameters**

*dev\_id* The raw device ID of specified Intel FPGA device. \
 *stat* The buffer to output RSU status. \
 *prog* The buffer to output RSU progress.

**Returns**

- •

  (0) if successful.

- •

  (-ENODEV) if dev\_id is invalid.

- •

  (-ENOMEM) if share data is not initialized.

### int rte\_pmd\_ifpga\_set\_rsu\_status (uint16\_t dev\_id, uint32\_t stat, uint32\_t prog)

Set current RSU status of the specified Intel FPGA device

**Parameters**

*dev\_id* The raw device ID of specified Intel FPGA device. \
 *stat* The RSU status value to set. \
 *prog* The RSU progress value to set.

**Returns**

- •

  (0) if successful.

- •

  (-ENODEV) if dev\_id is invalid.

- •

  (-ENOMEM) if share data is not initialized.

### int rte\_pmd\_ifpga\_get\_property (uint16\_t dev\_id, rte\_pmd\_ifpga\_prop \* prop)

Get FPGA property of specified Intel FPGA device

**Parameters**

*dev\_id* The raw device ID of specified Intel FPGA device. \
 *prop* The data pointer of FPGA property buffer.

**Returns**

- •

  (0) if successful.

- •

  (-ENODEV) if dev\_id is invalid.

- •

  (-EBUSY) if FPGA is rebooting.

- •

  (-EIO) if failed to access hardware.

### int rte\_pmd\_ifpga\_get\_phy\_info (uint16\_t dev\_id, rte\_pmd\_ifpga\_phy\_info \* info)

Get PHY information of specified Intel FPGA device

**Parameters**

*dev\_id* The raw device ID of specified Intel FPGA device. \
 *info* The data pointer of PHY information buffer.

**Returns**

- •

  (0) if successful.

- •

  (-ENODEV) if dev\_id is invalid.

- •

  (-EBUSY) if FPGA is rebooting.

- •

  (-EIO) if failed to access hardware.

### int rte\_pmd\_ifpga\_update\_flash (uint16\_t dev\_id, const char \* image, uint64\_t \* status)

Update image flash of specified Intel FPGA device

**Parameters**

*dev\_id* The raw device ID of specified Intel FPGA device. \
 *image* The image file name string. \
 *status* The detailed update status for debug.

**Returns**

- •

  (0) if successful.

- •

  (-ENODEV) if dev\_id is invalid.

- •

  (-EINVAL) if bad parameter or staging area is not initialized.

- •

  (-EBUSY) if FPGA is updating or rebooting.

- •

  (-EIO) if failed to open image file.

### int rte\_pmd\_ifpga\_stop\_update (uint16\_t dev\_id, int force)

Stop flash update of specified Intel FPGA device

**Parameters**

*dev\_id* The raw device ID of specified Intel FPGA device. \
 *force* Abort the update process by writing register if set non-zero.

**Returns**

- •

  (0) if successful.

- •

  (-ENODEV) if dev\_id is invalid.

- •

  (-EINVAL) if bad parameter.

- •

  (-EAGAIN) if failed with force.

### int rte\_pmd\_ifpga\_reboot\_try (uint16\_t dev\_id)

Check current Intel FPGA status and change it to reboot status if it is idle

**Parameters**

*dev\_id* The raw device ID of specified Intel FPGA device.

**Returns**

- •

  (0) if FPGA is ready to reboot.

- •

  (-ENODEV) if dev\_id is invalid.

- •

  (-ENOMEM) if share data is not initialized.

- •

  (-EBUSY) if FPGA is updating or rebooting.

### int rte\_pmd\_ifpga\_reload (uint16\_t dev\_id, int type, int page)

Trigger full reconfiguration of specified Intel FPGA device

**Parameters**

*dev\_id* The raw device ID of specified Intel FPGA device. \
 *type* Select reconfiguration type. 0 - reconfigure FPGA only. 1 - reboot the whole card including FPGA. \
 *page* Select image from which flash partition. 0 - factory partition. 1 - user partition.

**Returns**

- •

  (0) if successful.

- •

  (-ENODEV) if dev\_id is invalid.

- •

  (-EINVAL) if bad parameter.

- •

  (-EBUSY) if failed to access BMC register.

### int rte\_pmd\_ifpga\_partial\_reconfigure (uint16\_t dev\_id, int port, const char \* file)

Perform PR (partial reconfiguration) on specified Intel FPGA device

**Parameters**

*dev\_id* The raw device ID of specified Intel FPGA device. \
 *port* The port index of the partial reconfiguration area. \
 *file* The GBS (Green BitStream) image file name string.

**Returns**

- •

  (0) if successful.

- •

  (-EINVAL) if bad parameter or operation failed.

- •

  (-ENOMEM) if failed to allocate memory.

### void rte\_pmd\_ifpga\_cleanup (void)

Free software resources allocated by Intel FPGA PMD

## Author

Generated automatically by Doxygen for DPDK from the source code.
