DPDK  21.05.0
Data Structures | Functions
rte_pmd_ifpga.h File Reference
#include <stdint.h>

Go to the source code of this file.

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

__rte_experimental int rte_pmd_ifpga_get_dev_id (const char *pci_addr, uint16_t *dev_id)
 
__rte_experimental int rte_pmd_ifpga_get_rsu_status (uint16_t dev_id, uint32_t *stat, uint32_t *prog)
 
__rte_experimental int rte_pmd_ifpga_set_rsu_status (uint16_t dev_id, uint32_t stat, uint32_t prog)
 
__rte_experimental int rte_pmd_ifpga_get_property (uint16_t dev_id, rte_pmd_ifpga_prop *prop)
 
__rte_experimental int rte_pmd_ifpga_get_phy_info (uint16_t dev_id, rte_pmd_ifpga_phy_info *info)
 
__rte_experimental int rte_pmd_ifpga_update_flash (uint16_t dev_id, const char *image, uint64_t *status)
 
__rte_experimental int rte_pmd_ifpga_stop_update (uint16_t dev_id, int force)
 
__rte_experimental int rte_pmd_ifpga_reboot_try (uint16_t dev_id)
 
__rte_experimental int rte_pmd_ifpga_reload (uint16_t dev_id, int type, int page)
 
__rte_experimental const struct rte_pci_bus * rte_pmd_ifpga_get_pci_bus (void)
 
__rte_experimental int rte_pmd_ifpga_partial_reconfigure (uint16_t dev_id, int port, const char *file)
 
__rte_experimental 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

◆ rte_pmd_ifpga_get_dev_id()

__rte_experimental int rte_pmd_ifpga_get_dev_id ( const char *  pci_addr,
uint16_t *  dev_id 
)
Warning
EXPERIMENTAL: this API may change, or be removed, without prior notice

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

Parameters
pci_addrThe PCI address of specified Intel FPGA device.
dev_idThe buffer to output device ID.
Returns
  • (0) if successful.
  • (-EINVAL) if bad parameter.
  • (-ENODEV) if FPGA is not probed by ifpga driver.

◆ rte_pmd_ifpga_get_rsu_status()

__rte_experimental int rte_pmd_ifpga_get_rsu_status ( uint16_t  dev_id,
uint32_t *  stat,
uint32_t *  prog 
)
Warning
EXPERIMENTAL: this API may change, or be removed, without prior notice

Get current RSU status of the specified Intel FPGA device

Parameters
dev_idThe raw device ID of specified Intel FPGA device.
statThe buffer to output RSU status.
progThe buffer to output RSU progress.
Returns
  • (0) if successful.
  • (-ENODEV) if dev_id is invalid.
  • (-ENOMEM) if share data is not initialized.

◆ rte_pmd_ifpga_set_rsu_status()

__rte_experimental int rte_pmd_ifpga_set_rsu_status ( uint16_t  dev_id,
uint32_t  stat,
uint32_t  prog 
)
Warning
EXPERIMENTAL: this API may change, or be removed, without prior notice

Set current RSU status of the specified Intel FPGA device

Parameters
dev_idThe raw device ID of specified Intel FPGA device.
statThe RSU status value to set.
progThe RSU progress value to set.
Returns
  • (0) if successful.
  • (-ENODEV) if dev_id is invalid.
  • (-ENOMEM) if share data is not initialized.

◆ rte_pmd_ifpga_get_property()

__rte_experimental int rte_pmd_ifpga_get_property ( uint16_t  dev_id,
rte_pmd_ifpga_prop prop 
)
Warning
EXPERIMENTAL: this API may change, or be removed, without prior notice

Get FPGA property of specified Intel FPGA device

Parameters
dev_idThe raw device ID of specified Intel FPGA device.
propThe 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.

◆ rte_pmd_ifpga_get_phy_info()

__rte_experimental int rte_pmd_ifpga_get_phy_info ( uint16_t  dev_id,
rte_pmd_ifpga_phy_info info 
)
Warning
EXPERIMENTAL: this API may change, or be removed, without prior notice

Get PHY information of specified Intel FPGA device

Parameters
dev_idThe raw device ID of specified Intel FPGA device.
infoThe 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.

◆ rte_pmd_ifpga_update_flash()

__rte_experimental int rte_pmd_ifpga_update_flash ( uint16_t  dev_id,
const char *  image,
uint64_t *  status 
)
Warning
EXPERIMENTAL: this API may change, or be removed, without prior notice

Update image flash of specified Intel FPGA device

Parameters
dev_idThe raw device ID of specified Intel FPGA device.
imageThe image file name string.
statusThe 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.

◆ rte_pmd_ifpga_stop_update()

__rte_experimental int rte_pmd_ifpga_stop_update ( uint16_t  dev_id,
int  force 
)
Warning
EXPERIMENTAL: this API may change, or be removed, without prior notice

Stop flash update of specified Intel FPGA device

Parameters
dev_idThe raw device ID of specified Intel FPGA device.
forceAbort 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.

◆ rte_pmd_ifpga_reboot_try()

__rte_experimental int rte_pmd_ifpga_reboot_try ( uint16_t  dev_id)
Warning
EXPERIMENTAL: this API may change, or be removed, without prior notice

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

Parameters
dev_idThe 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.

◆ rte_pmd_ifpga_reload()

__rte_experimental int rte_pmd_ifpga_reload ( uint16_t  dev_id,
int  type,
int  page 
)
Warning
EXPERIMENTAL: this API may change, or be removed, without prior notice

Trigger full reconfiguration of specified Intel FPGA device

Parameters
dev_idThe raw device ID of specified Intel FPGA device.
typeSelect reconfiguration type. 0 - reconfigure FPGA only. 1 - reboot the whole card including FPGA.
pageSelect 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.

◆ rte_pmd_ifpga_get_pci_bus()

__rte_experimental const struct rte_pci_bus* rte_pmd_ifpga_get_pci_bus ( void  )
Warning
EXPERIMENTAL: this API may change, or be removed, without prior notice

Get PCI bus the Intel FPGA driver register to

Returns
  • (valid pointer) if successful.
  • (NULL) if the Intel FPGA driver is not registered to any PCI bus.

◆ rte_pmd_ifpga_partial_reconfigure()

__rte_experimental int rte_pmd_ifpga_partial_reconfigure ( uint16_t  dev_id,
int  port,
const char *  file 
)
Warning
EXPERIMENTAL: this API may change, or be removed, without prior notice

Perform PR (partial reconfiguration) on specified Intel FPGA device

Parameters
dev_idThe raw device ID of specified Intel FPGA device.
portThe port index of the partial reconfiguration area.
fileThe GBS (Green BitStream) image file name string.
Returns
  • (0) if successful.
  • (-EINVAL) if bad parameter or operation failed.
  • (-ENOMEM) if failed to allocate memory.

◆ rte_pmd_ifpga_cleanup()

__rte_experimental void rte_pmd_ifpga_cleanup ( void  )
Warning
EXPERIMENTAL: this API may change, or be removed, without prior notice

Free software resources allocated by Intel FPGA PMD