DPDK  22.03.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 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 #include <stdint.h>
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 
85 __rte_experimental
86 int
87 rte_pmd_ifpga_get_dev_id(const char *pci_addr, uint16_t *dev_id);
88 
106 __rte_experimental
107 int
108 rte_pmd_ifpga_get_rsu_status(uint16_t dev_id, uint32_t *stat, uint32_t *prog);
109 
127 __rte_experimental
128 int
129 rte_pmd_ifpga_set_rsu_status(uint16_t dev_id, uint32_t stat, uint32_t prog);
130 
147 __rte_experimental
148 int
149 rte_pmd_ifpga_get_property(uint16_t dev_id, rte_pmd_ifpga_prop *prop);
150 
167 __rte_experimental
168 int
169 rte_pmd_ifpga_get_phy_info(uint16_t dev_id, rte_pmd_ifpga_phy_info *info);
170 
190 __rte_experimental
191 int
192 rte_pmd_ifpga_update_flash(uint16_t dev_id, const char *image,
193  uint64_t *status);
194 
211 __rte_experimental
212 int
213 rte_pmd_ifpga_stop_update(uint16_t dev_id, int force);
214 
229 __rte_experimental
230 int
231 rte_pmd_ifpga_reboot_try(uint16_t dev_id);
232 
255 __rte_experimental
256 int
257 rte_pmd_ifpga_reload(uint16_t dev_id, int type, int page);
258 
269 __rte_experimental
270 const struct rte_pci_bus *
272 
290 __rte_experimental
291 int
292 rte_pmd_ifpga_partial_reconfigure(uint16_t dev_id, int port, const char *file);
293 
300 __rte_experimental
301 void
303 
304 #ifdef __cplusplus
305 }
306 #endif
307 
308 #endif /* _RTE_PMD_IFPGA_H_ */
uint16_t link_status
Definition: rte_ethdev.h:370
__rte_experimental int rte_pmd_ifpga_get_dev_id(const char *pci_addr, uint16_t *dev_id)
__rte_experimental int rte_pmd_ifpga_reboot_try(uint16_t dev_id)
__rte_experimental void rte_pmd_ifpga_cleanup(void)
uint32_t link_speed
Definition: rte_ethdev.h:367
__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_stop_update(uint16_t dev_id, int force)
__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_update_flash(uint16_t dev_id, const char *image, uint64_t *status)
__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_reload(uint16_t dev_id, int type, int page)
__rte_experimental int rte_pmd_ifpga_get_property(uint16_t dev_id, rte_pmd_ifpga_prop *prop)
__rte_experimental int rte_pmd_ifpga_partial_reconfigure(uint16_t dev_id, int port, const char *file)
__rte_experimental const struct rte_pci_bus * rte_pmd_ifpga_get_pci_bus(void)