DPDK  24.11.0
rte_pmd_ifpga.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2021 Intel Corporation
3  */
4 
5 #ifndef _RTE_PMD_IFPGA_H_
6 #define _RTE_PMD_IFPGA_H_
7 
17 #include <stdint.h>
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 #define IFPGA_MAX_PORT_NUM 4
24 
28 typedef struct {
29  uint8_t b[16];
31 
35 typedef struct {
36  uint32_t num_ports;
37  uint32_t boot_page;
38  uint64_t bitstream_id;
39  uint64_t bitstream_metadata;
40  rte_pmd_ifpga_uuid pr_id;
41  uint32_t bmc_version;
42  uint32_t bmc_nios_version;
44 
48 typedef struct {
49  rte_pmd_ifpga_uuid afu_id;
50  uint32_t type; /* AFU memory access control type */
52 
56 typedef struct {
58  rte_pmd_ifpga_port_prop port[IFPGA_MAX_PORT_NUM];
60 
64 typedef struct {
65  uint32_t num_retimers;
66  uint32_t link_speed;
67  uint32_t link_status;
69 
82 int
83 rte_pmd_ifpga_get_dev_id(const char *pci_addr, uint16_t *dev_id);
84 
99 int
100 rte_pmd_ifpga_get_rsu_status(uint16_t dev_id, uint32_t *stat, uint32_t *prog);
101 
116 int
117 rte_pmd_ifpga_set_rsu_status(uint16_t dev_id, uint32_t stat, uint32_t prog);
118 
132 int
133 rte_pmd_ifpga_get_property(uint16_t dev_id, rte_pmd_ifpga_prop *prop);
134 
148 int
149 rte_pmd_ifpga_get_phy_info(uint16_t dev_id, rte_pmd_ifpga_phy_info *info);
150 
167 int
168 rte_pmd_ifpga_update_flash(uint16_t dev_id, const char *image,
169  uint64_t *status);
170 
184 int
185 rte_pmd_ifpga_stop_update(uint16_t dev_id, int force);
186 
198 int
199 rte_pmd_ifpga_reboot_try(uint16_t dev_id);
200 
220 int
221 rte_pmd_ifpga_reload(uint16_t dev_id, int type, int page);
222 
237 int
238 rte_pmd_ifpga_partial_reconfigure(uint16_t dev_id, int port, const char *file);
239 
243 void
245 
246 #ifdef __cplusplus
247 }
248 #endif
249 
250 #endif /* _RTE_PMD_IFPGA_H_ */
void rte_pmd_ifpga_cleanup(void)
int rte_pmd_ifpga_stop_update(uint16_t dev_id, int force)
int rte_pmd_ifpga_get_phy_info(uint16_t dev_id, rte_pmd_ifpga_phy_info *info)
int rte_pmd_ifpga_set_rsu_status(uint16_t dev_id, uint32_t stat, uint32_t prog)
int rte_pmd_ifpga_get_rsu_status(uint16_t dev_id, uint32_t *stat, uint32_t *prog)
int rte_pmd_ifpga_reboot_try(uint16_t dev_id)
int rte_pmd_ifpga_update_flash(uint16_t dev_id, const char *image, uint64_t *status)
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)
int rte_pmd_ifpga_get_dev_id(const char *pci_addr, uint16_t *dev_id)
int rte_pmd_ifpga_get_property(uint16_t dev_id, rte_pmd_ifpga_prop *prop)