intrte_pmd_ifpga_get_dev_id(constchar*pci_addr,uint16_t*dev_id)
Get raw device ID from PCI address string like 'Domain:Bus:Dev.Func'
Parameterspci_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.
intrte_pmd_ifpga_get_rsu_status(uint16_tdev_id,uint32_t*stat,uint32_t*prog)
Get current RSU status of the specified Intel FPGA device
Parametersdev_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.
intrte_pmd_ifpga_set_rsu_status(uint16_tdev_id,uint32_tstat,uint32_tprog)
Set current RSU status of the specified Intel FPGA device
Parametersdev_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.
intrte_pmd_ifpga_get_property(uint16_tdev_id,rte_pmd_ifpga_prop*prop)
Get FPGA property of specified Intel FPGA device
Parametersdev_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.
intrte_pmd_ifpga_get_phy_info(uint16_tdev_id,rte_pmd_ifpga_phy_info*info)
Get PHY information of specified Intel FPGA device
Parametersdev_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.
intrte_pmd_ifpga_update_flash(uint16_tdev_id,constchar*image,uint64_t*status)
Update image flash of specified Intel FPGA device
Parametersdev_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.
intrte_pmd_ifpga_stop_update(uint16_tdev_id,intforce)
Stop flash update of specified Intel FPGA device
Parametersdev_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.
intrte_pmd_ifpga_reboot_try(uint16_tdev_id)
Check current Intel FPGA status and change it to reboot status if it is idle
Parametersdev_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.
intrte_pmd_ifpga_reload(uint16_tdev_id,inttype,intpage)
Trigger full reconfiguration of specified Intel FPGA device
Parametersdev_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.
intrte_pmd_ifpga_partial_reconfigure(uint16_tdev_id,intport,constchar*file)
Perform PR (partial reconfiguration) on specified Intel FPGA device
Parametersdev_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.
voidrte_pmd_ifpga_cleanup(void)
Free software resources allocated by Intel FPGA PMD