raw/ifpga: add extra APIs for Cyborg
v16 cover raw/ifpga: add extra APIs for Cyborg
Cyborg is part of OpenStack, it needs some extra APIs to manage devices with Intel FPGA. These patches add APIs to meet Cyborg requirement.
Main changes from v15:
- remove example from the patch set
Wei Huang (3):
raw/ifpga: add fpga rsu APIs
raw/ifpga: add APIs to get fpga information
raw/ifpga: add miscellaneous APIs
doc/api/doxy-api-index.md | 3 +- doc/api/doxy-api.conf.in | 1 + drivers/raw/ifpga/base/ifpga_api.c | 34 ++ drivers/raw/ifpga/base/ifpga_defines.h | 1 + drivers/raw/ifpga/base/ifpga_feature_dev.c | 21 + drivers/raw/ifpga/base/ifpga_feature_dev.h | 1 + drivers/raw/ifpga/base/ifpga_fme.c | 36 +- drivers/raw/ifpga/base/ifpga_fme_rsu.c | 428 ++++++++++++++ drivers/raw/ifpga/base/ifpga_hw.h | 1 + drivers/raw/ifpga/base/ifpga_sec_mgr.c | 639 +++++++++++++++++++++ drivers/raw/ifpga/base/ifpga_sec_mgr.h | 93 +++ drivers/raw/ifpga/base/meson.build | 2 + drivers/raw/ifpga/base/opae_hw_api.c | 77 +++ drivers/raw/ifpga/base/opae_hw_api.h | 12 + drivers/raw/ifpga/base/opae_ifpga_hw_api.h | 1 + drivers/raw/ifpga/base/opae_intel_max10.c | 48 ++ drivers/raw/ifpga/base/opae_intel_max10.h | 44 ++ drivers/raw/ifpga/ifpga_rawdev.c | 30 + drivers/raw/ifpga/ifpga_rawdev.h | 7 +- drivers/raw/ifpga/meson.build | 4 +- drivers/raw/ifpga/rte_pmd_ifpga.c | 429 ++++++++++++++ drivers/raw/ifpga/rte_pmd_ifpga.h | 308 ++++++++++ drivers/raw/ifpga/version.map | 18 + 23 files changed, 2233 insertions(+), 5 deletions(-) create mode 100644 drivers/raw/ifpga/base/ifpga_fme_rsu.c create mode 100644 drivers/raw/ifpga/base/ifpga_sec_mgr.c create mode 100644 drivers/raw/ifpga/base/ifpga_sec_mgr.h create mode 100644 drivers/raw/ifpga/rte_pmd_ifpga.c create mode 100644 drivers/raw/ifpga/rte_pmd_ifpga.h
Signature · 1 line
2.29.2
PATCH v16 1/3 raw/ifpga: add fpga rsu APIs
RSU (Remote System Update) depends on secure manager which may be different on various implementations, so a new secure manager device is implemented for adapting such difference.
There are five APIs added:
1. rte_pmd_ifpga_get_dev_id() get raw device ID of ifpga device from PCI address like 'Domain:Bus:Dev.Func'.
2. rte_pmd_ifpga_update_flash() update flash with specific image file.
3. rte_pmd_ifpga_stop_update() abort flash update process.
4. rte_pmd_ifpga_reboot_try() check current ifpga status and change it to reboot status if it is idle.
5. rte_pmd_ifpga_reload() trigger full reconfiguration of ifpga device.
---
v2: fix coding style issue in ifpga_fme_rsu.c and ifpga_sec_mgr.c
---
v3: fix compilation issues in ifpga_fme_rsu.c
---
v4: fix compilation issues in opae_intel_max10.c
---
v5: implement APIs in rte_pmd_ifpga.c
--- doc/api/doxy-api-index.md | 3 +- doc/api/doxy-api.conf.in | 1 + drivers/raw/ifpga/base/ifpga_api.c | 26 + drivers/raw/ifpga/base/ifpga_fme.c | 8 + drivers/raw/ifpga/base/ifpga_fme_rsu.c | 428 +++++++++++++++ drivers/raw/ifpga/base/ifpga_hw.h | 1 + drivers/raw/ifpga/base/ifpga_sec_mgr.c | 639 ++++++++++++++++++++++ drivers/raw/ifpga/base/ifpga_sec_mgr.h | 93 ++++ drivers/raw/ifpga/base/meson.build | 2 + drivers/raw/ifpga/base/opae_hw_api.c | 59 ++ drivers/raw/ifpga/base/opae_hw_api.h | 10 + drivers/raw/ifpga/base/opae_intel_max10.c | 48 ++ drivers/raw/ifpga/base/opae_intel_max10.h | 44 ++ drivers/raw/ifpga/meson.build | 4 +- drivers/raw/ifpga/rte_pmd_ifpga.c | 163 ++++++ drivers/raw/ifpga/rte_pmd_ifpga.h | 132 +++++ drivers/raw/ifpga/version.map | 11 + 17 files changed, 1670 insertions(+), 2 deletions(-) create mode 100644 drivers/raw/ifpga/base/ifpga_fme_rsu.c create mode 100644 drivers/raw/ifpga/base/ifpga_sec_mgr.c create mode 100644 drivers/raw/ifpga/base/ifpga_sec_mgr.h create mode 100644 drivers/raw/ifpga/rte_pmd_ifpga.c create mode 100644 drivers/raw/ifpga/rte_pmd_ifpga.h
doc/api/doxy-api-index.md +2 -1
@@ -56,7 +56,8 @@ The public API headers are grouped by topics: [dpaa2_qdma] (@ref rte_pmd_dpaa2_qdma.h), [crypto_scheduler] (@ref rte_cryptodev_scheduler.h), [dlb] (@ref rte_pmd_dlb.h), - [dlb2] (@ref rte_pmd_dlb2.h) + [dlb2] (@ref rte_pmd_dlb2.h), + [ifpga] (@ref rte_pmd_ifpga.h) - **memory**: [memseg] (@ref rte_memory.h),
doc/api/doxy-api.conf.in +1 -0
@@ -23,6 +23,7 @@ INPUT = @TOPDIR@/doc/api/doxy-api-index.md \ @TOPDIR@/drivers/net/softnic \ @TOPDIR@/drivers/raw/dpaa2_cmdif \ @TOPDIR@/drivers/raw/dpaa2_qdma \ + @TOPDIR@/drivers/raw/ifpga \ @TOPDIR@/drivers/raw/ioat \ @TOPDIR@/lib/librte_eal/include \ @TOPDIR@/lib/librte_eal/include/generic \
drivers/raw/ifpga/base/ifpga_api.c +26 -0
@@ -5,6 +5,7 @@#include "ifpga_api.h" #include "ifpga_enumerate.h" #include "ifpga_feature_dev.h" +#include "ifpga_sec_mgr.h" #include "opae_hw_api.h"
@@ -228,11 +229,36 @@ static int ifpga_mgr_get_board_info(struct opae_manager *mgr,return 0 ; } +static int ifpga_mgr_update_flash (struct opae_manager *mgr,const char *image, +u64 *status) +{ +struct ifpga_fme_hw *fme = mgr->data; + +return fpga_update_flash (fme, image, status); +} + +static int ifpga_mgr_stop_flash_update (struct opae_manager *mgr,int force) +{ +struct ifpga_fme_hw *fme = mgr->data; + +return fpga_stop_flash_update (fme, force); +} + +static int ifpga_mgr_reload (struct opae_manager *mgr,int type,int page) +{ +struct ifpga_fme_hw *fme = mgr->data; + +return fpga_reload (fme, type, page); +} +struct opae_manager_ops ifpga_mgr_ops = { .flash = ifpga_mgr_flash, .get_eth_group_region_info = ifpga_mgr_get_eth_group_region_info, .get_sensor_value = ifpga_mgr_get_sensor_value, .get_board_info = ifpga_mgr_get_board_info, + .update_flash = ifpga_mgr_update_flash, + .stop_flash_update = ifpga_mgr_stop_flash_update, + .reload = ifpga_mgr_reload, }; static int ifpga_mgr_read_mac_rom(struct opae_manager *mgr, int offset,
drivers/raw/ifpga/base/ifpga_fme.c +8 -0
@@ -7,6 +7,7 @@#include "opae_intel_max10.h" #include "opae_i2c.h" #include "opae_at24_eeprom.h" +#include "ifpga_sec_mgr.h" #define PWR_THRESHOLD_MAX 0x7F
@@ -1152,6 +1153,12 @@ static int fme_nios_spi_init(struct ifpga_feature *feature)if (spi_self_checking (max10)) goto spi_fail; + ret =init_sec_mgr (fme); +if (ret) { +dev_err (fme,"security manager init fail\n" ); + goto spi_fail; + } +return ret; spi_fail:
@@ -1165,6 +1172,7 @@ static void fme_nios_spi_uinit(struct ifpga_feature *feature) {struct ifpga_fme_hw *fme = (struct ifpga_fme_hw *)feature->parent; +release_sec_mgr (fme);if (fme->max10_dev)intel_max10_device_remove (fme->max10_dev); }
drivers/raw/ifpga/base/ifpga_fme_rsu.c new file +428 -0
428 lines not on this page · raw message
drivers/raw/ifpga/base/ifpga_hw.h +1 -0
@@ -91,6 +91,7 @@ struct ifpga_fme_hw {struct opae_board_info board_info;int nums_eth_dev;unsigned int nums_acc_region; +void *sec_mgr; };enum ifpga_port_state {
drivers/raw/ifpga/base/ifpga_sec_mgr.c new file +639 -0
639 lines not on this page · raw message
drivers/raw/ifpga/base/ifpga_sec_mgr.h new file +93 -0
93 lines not on this page · raw message
drivers/raw/ifpga/base/meson.build +2 -0
@@ -12,6 +12,8 @@ sources = [ 'ifpga_port.c', 'ifpga_port_error.c', 'ifpga_fme_pr.c', + 'ifpga_fme_rsu.c', + 'ifpga_sec_mgr.c', 'opae_hw_api.c', 'opae_ifpga_hw_api.c', 'opae_debug.c',
drivers/raw/ifpga/base/opae_hw_api.c +59 -0
68 lines not on this page · raw message
drivers/raw/ifpga/base/opae_hw_api.h +10 -0
@@ -55,6 +55,10 @@ struct opae_manager_ops { unsigned int *value);int (*get_board_info)(struct opae_manager *mgr,struct opae_board_info **info); +int (*update_flash)(struct opae_manager *mgr,const char *image, +u64 *status); +int (*stop_flash_update)(struct opae_manager *mgr,int force); +int (*reload)(struct opae_manager *mgr,int type,int page); };/* networking management ops in FME */
@@ -276,6 +280,8 @@ typedef struct {pthread_mutex_t i2c_mutex;u32 ref_cnt;/* reference count of shared memory */ u32 dtb_size;/* actual length of DTB data in byte */ +u32 rsu_ctrl;/* used to control rsu */ +u32 rsu_stat;/* used to report status for rsu */ }; };u8 dtb[SHM_BLK_SIZE ];/* DTB data */
@@ -354,4 +360,8 @@ int opae_manager_eth_group_read_reg(struct opae_manager *mgr, u8 group_id, u8 type, u8 index, u16 addr, u32 *data);int opae_mgr_get_board_info (struct opae_manager *mgr,struct opae_board_info **info); +int opae_mgr_update_flash (struct opae_manager *mgr,const char *image, +uint64_t *status); +int opae_mgr_stop_flash_update (struct opae_manager *mgr,int force); +int opae_mgr_reload (struct opae_manager *mgr,int type,int page);#endif /* _OPAE_HW_API_H_*/
drivers/raw/ifpga/base/opae_intel_max10.c +48 -0
66 lines not on this page · raw message
drivers/raw/ifpga/base/opae_intel_max10.h +44 -0
76 lines not on this page · raw message
drivers/raw/ifpga/meson.build +3 -1
@@ -13,8 +13,10 @@ objs = [base_objs] deps += ['ethdev', 'rawdev', 'pci', 'bus_pci', 'kvargs', 'bus_vdev', 'bus_ifpga', 'net', 'net_i40e', 'net_ipn3ke'] -sources = files('ifpga_rawdev.c') +sources = files('ifpga_rawdev.c', 'rte_pmd_ifpga.c') includes += include_directories('base') includes += include_directories('../../net/ipn3ke') includes += include_directories('../../net/i40e') + +headers = files('rte_pmd_ifpga.h')
drivers/raw/ifpga/rte_pmd_ifpga.c new file +163 -0
163 lines not on this page · raw message
drivers/raw/ifpga/rte_pmd_ifpga.h new file +132 -0
132 lines not on this page · raw message
drivers/raw/ifpga/version.map +11 -0
@@ -1,3 +1,14 @@ DPDK_21 { local: *; }; + +EXPERIMENTAL { + global: + + # added in 21.05 + rte_pmd_ifpga_get_dev_id; + rte_pmd_ifpga_update_flash; + rte_pmd_ifpga_stop_update; + rte_pmd_ifpga_reboot_try; + rte_pmd_ifpga_reload; +};
Signature · 1 line
2.29.2
PATCH v16 2/3 raw/ifpga: add APIs to get fpga information
In reply to Wei HuangThere are some information data can be got from FPGA, they are implemented in below APIs:
1. rte_pmd_ifpga_get_property() get properties of FPGA (include BMC).
2. rte_pmd_ifpga_get_phy_info() get information of PHY connect to FPGA.
3. rte_pmd_ifpga_get_rsu_status() get status of rsu process.
---
v2: implement APIs in rte_pmd_ifpga.c
--- drivers/raw/ifpga/base/ifpga_api.c | 8 + drivers/raw/ifpga/base/ifpga_defines.h | 1 + drivers/raw/ifpga/base/ifpga_feature_dev.c | 21 ++ drivers/raw/ifpga/base/ifpga_feature_dev.h | 1 + drivers/raw/ifpga/base/ifpga_fme.c | 28 ++- drivers/raw/ifpga/base/opae_hw_api.c | 18 ++ drivers/raw/ifpga/base/opae_hw_api.h | 2 + drivers/raw/ifpga/base/opae_ifpga_hw_api.h | 1 + drivers/raw/ifpga/rte_pmd_ifpga.c | 221 +++++++++++++++++++++ drivers/raw/ifpga/rte_pmd_ifpga.h | 110 ++++++++++ drivers/raw/ifpga/version.map | 3 + 11 files changed, 412 insertions(+), 2 deletions(-)
drivers/raw/ifpga/base/ifpga_api.c +8 -0
@@ -229,6 +229,13 @@ static int ifpga_mgr_get_board_info(struct opae_manager *mgr,return 0 ; } +static int ifpga_mgr_get_uuid (struct opae_manager *mgr,struct uuid *uuid) +{ +struct ifpga_fme_hw *fme = mgr->data; + +return fpga_get_pr_uuid (fme, uuid); +} +static int ifpga_mgr_update_flash (struct opae_manager *mgr,const char *image,u64 *status) {
@@ -256,6 +263,7 @@ struct opae_manager_ops ifpga_mgr_ops = { .get_eth_group_region_info = ifpga_mgr_get_eth_group_region_info, .get_sensor_value = ifpga_mgr_get_sensor_value, .get_board_info = ifpga_mgr_get_board_info, + .get_uuid = ifpga_mgr_get_uuid, .update_flash = ifpga_mgr_update_flash, .stop_flash_update = ifpga_mgr_stop_flash_update, .reload = ifpga_mgr_reload,
drivers/raw/ifpga/base/ifpga_defines.h +1 -0
@@ -1727,6 +1727,7 @@ struct opae_board_info {u8 seu;u8 ptp; +u32 boot_page;u32 max10_version;u32 nios_fw_version;u32 nums_of_retimer;
drivers/raw/ifpga/base/ifpga_feature_dev.c +21 -0
@@ -87,6 +87,27 @@ int fpga_get_afu_uuid(struct ifpga_port_hw *port, struct uuid *uuid)return 0 ; } +int fpga_get_pr_uuid (struct ifpga_fme_hw *fme,struct uuid *uuid) +{ +struct feature_fme_pr *fme_pr; +u64 guidl, guidh; + +if (!fme || !uuid) +return -EINVAL ; + + fme_pr =get_fme_feature_ioaddr_by_index (fme,FME_FEATURE_ID_PR_MGMT ); + +spinlock_lock (&fme->lock); + guidl =readq (&fme_pr->fme_pr_intfc_id_l); + guidh =readq (&fme_pr->fme_pr_intfc_id_h); +spinlock_unlock (&fme->lock); + +opae_memcpy (uuid->b, &guidl,sizeof (u64)); +opae_memcpy (uuid->b +8 , &guidh,sizeof (u64)); + +return 0 ; +} +/* Mask / Unmask Port Errors by the Error Mask register. */ void port_err_mask (struct ifpga_port_hw *port,bool mask) {
drivers/raw/ifpga/base/ifpga_feature_dev.h +1 -0
@@ -103,6 +103,7 @@ is_port_feature_present(struct ifpga_port_hw *port, int index) }int fpga_get_afu_uuid (struct ifpga_port_hw *port,struct uuid *uuid); +int fpga_get_pr_uuid (struct ifpga_fme_hw *fme,struct uuid *uuid);int __fpga_port_disable (struct ifpga_port_hw *port);void __fpga_port_enable (struct ifpga_port_hw *port);
drivers/raw/ifpga/base/ifpga_fme.c +26 -2
@@ -101,6 +101,24 @@ static int fme_hdr_get_ports_num(struct ifpga_fme_hw *fme, u64 *ports_num)return 0 ; } +static int fme_hdr_get_port_type (struct ifpga_fme_hw *fme,u64 *port_type) +{ +struct feature_fme_header *fme_hdr + =get_fme_feature_ioaddr_by_index (fme,FME_FEATURE_ID_HEADER ); +struct feature_fme_port pt; +u32 port = (u32)((*port_type >>32 ) &0xffffffff ); + + pt.csr =readq (&fme_hdr->port[port]); +if (!pt.port_implemented) +return -ENODEV ; +if (pt.afu_access_control) + *port_type |=0x1 ; +else + *port_type &= ~0x1 ; + +return 0 ; +} +static int fme_hdr_get_cache_size (struct ifpga_fme_hw *fme,u64 *cache_size) {struct feature_fme_header *fme_hdr
@@ -179,6 +197,8 @@ fme_hdr_get_prop(struct ifpga_feature *feature, struct feature_prop *prop)return fme_hdr_get_bitstream_id (fme, &prop->data);case FME_HDR_PROP_BITSTREAM_METADATA :return fme_hdr_get_bitstream_metadata (fme, &prop->data); +case FME_HDR_PROP_PORT_TYPE : +return fme_hdr_get_port_type (fme, &prop->data); }return -ENOENT ;
@@ -891,13 +911,17 @@ static int fme_get_board_interface(struct ifpga_fme_hw *fme) fme->board_info.nums_of_fvl, fme->board_info.ports_per_fvl); +if (max10_sys_read (fme->max10_dev,FPGA_PAGE_INFO , &val)) +return -EINVAL ; + fme->board_info.boot_page = val &0x7 ; +if (max10_sys_read (fme->max10_dev,MAX10_BUILD_VER , &val))return -EINVAL ; - fme->board_info.max10_version = val &0xffffff ; + fme->board_info.max10_version = val;if (max10_sys_read (fme->max10_dev,NIOS2_FW_VERSION , &val))return -EINVAL ; - fme->board_info.nios_fw_version = val &0xffffff ; + fme->board_info.nios_fw_version = val; dev_info(fme, "max10 version 0x%x, nios fw version 0x%x\n", fme->board_info.max10_version,
drivers/raw/ifpga/base/opae_hw_api.c +18 -0
@@ -967,6 +967,24 @@ opae_mgr_get_board_info(struct opae_manager *mgr,return -ENOENT ; } +/** +* opae_mgr_get_uuid - get manager's UUID. +* @mgr: targeted manager +* @uuid: a pointer to UUID +* +* Return: 0 on success, otherwise error code. +*/ +int opae_mgr_get_uuid (struct opae_manager *mgr,struct uuid *uuid) +{ +if (!mgr || !uuid) +return -EINVAL ; + +if (mgr->ops && mgr->ops->get_uuid) +return mgr->ops->get_uuid (mgr, uuid); + +return -ENOENT ; +} +/** * opae_mgr_update_flash - update image in flash. * @mgr: targeted manager
drivers/raw/ifpga/base/opae_hw_api.h +2 -0
@@ -55,6 +55,7 @@ struct opae_manager_ops { unsigned int *value);int (*get_board_info)(struct opae_manager *mgr,struct opae_board_info **info); +int (*get_uuid)(struct opae_manager *mgr,struct uuid *uuid);int (*update_flash)(struct opae_manager *mgr,const char *image,u64 *status);int (*stop_flash_update)(struct opae_manager *mgr,int force);
@@ -360,6 +361,7 @@ int opae_manager_eth_group_read_reg(struct opae_manager *mgr, u8 group_id, u8 type, u8 index, u16 addr, u32 *data);int opae_mgr_get_board_info (struct opae_manager *mgr,struct opae_board_info **info); +int opae_mgr_get_uuid (struct opae_manager *mgr,struct uuid *uuid);int opae_mgr_update_flash (struct opae_manager *mgr,const char *image,uint64_t *status);int opae_mgr_stop_flash_update (struct opae_manager *mgr,int force);
drivers/raw/ifpga/base/opae_ifpga_hw_api.h +1 -0
@@ -61,6 +61,7 @@ struct feature_prop {#define FME_HDR_PROP_SOCKET_ID 0x5/* RDONLY */ #define FME_HDR_PROP_BITSTREAM_ID 0x6/* RDONLY */ #define FME_HDR_PROP_BITSTREAM_METADATA 0x7/* RDONLY */ +#define FME_HDR_PROP_PORT_TYPE 0x8/* RDWR */ /* FME error reporting feature's properties */ /* FME error reporting properties format */
drivers/raw/ifpga/rte_pmd_ifpga.c +221 -0
233 lines not on this page · raw message
drivers/raw/ifpga/rte_pmd_ifpga.h +110 -0
122 lines not on this page · raw message
drivers/raw/ifpga/version.map +3 -0
@@ -7,6 +7,9 @@ EXPERIMENTAL { # added in 21.05 rte_pmd_ifpga_get_dev_id; + rte_pmd_ifpga_get_rsu_status; + rte_pmd_ifpga_get_property; + rte_pmd_ifpga_get_phy_info; rte_pmd_ifpga_update_flash; rte_pmd_ifpga_stop_update; rte_pmd_ifpga_reboot_try;
Signature · 1 line
2.29.2
PATCH v16 3/3 raw/ifpga: add miscellaneous APIs
In reply to Wei HuangBelow miscellaneous APIs are used to implement OPAE application.
1. rte_pmd_ifpga_get_pci_bus() get PCI bus ifpga driver registered.
2. rte_pmd_ifpga_partial_reconfigure() do partial reconfiguration.
3. rte_pmd_ifpga_cleanup() free software resources allocated by driver.
4. rte_pmd_ifpga_set_rsu_status() set status of rsu process.
---
v2: implement APIs in rte_pmd_ifpga.c
--- drivers/raw/ifpga/ifpga_rawdev.c | 30 ++++++++++++++ drivers/raw/ifpga/ifpga_rawdev.h | 7 +++- drivers/raw/ifpga/rte_pmd_ifpga.c | 45 +++++++++++++++++++++ drivers/raw/ifpga/rte_pmd_ifpga.h | 66 +++++++++++++++++++++++++++++++ drivers/raw/ifpga/version.map | 4 ++ 5 files changed, 151 insertions(+), 1 deletion(-)
drivers/raw/ifpga/ifpga_rawdev.c +30 -0
@@ -1737,3 +1737,33 @@ RTE_PMD_REGISTER_PARAM_STRING(ifpga_rawdev_cfg,"ifpga=<string> " "port=<int> " "afu_bts=<path>"); + +struct rte_pci_bus *ifpga_get_pci_bus (void ) +{ +return rte_ifpga_rawdev_pmd.bus; +} + +int ifpga_rawdev_partial_reconfigure (struct rte_rawdev *dev,int port, +const char *file) +{ +if (!dev) { +IFPGA_RAWDEV_PMD_ERR ("Input parameter is invalid" ); +return -EINVAL ; + } + +return rte_fpga_do_pr (dev, port, file); +} + +void ifpga_rawdev_cleanup (void ) +{ +struct ifpga_rawdev *dev; +unsigned int i; + +for (i =0 ; i <IFPGA_RAWDEV_NUM ; i++) { + dev = &ifpga_rawdevices[i]; +if (dev->rawdev) { +rte_rawdev_pmd_release (dev->rawdev); + dev->rawdev =NULL ; + } + } +}
drivers/raw/ifpga/ifpga_rawdev.h +6 -1
@@ -43,7 +43,7 @@ enum ifpga_rawdev_device_state {static inline struct opae_adapter *ifpga_rawdev_get_priv (const struct rte_rawdev *rawdev) { -return rawdev->dev_private; +return (struct opae_adapter *)rawdev->dev_private; }#define IFPGA_RAWDEV_MSIX_IRQ_NUM 7
@@ -76,4 +76,9 @@ int ifpga_unregister_msix_irq(enum ifpga_irq_type type, int vec_start, rte_intr_callback_fn handler, void *arg); +struct rte_pci_bus *ifpga_get_pci_bus (void ); +int ifpga_rawdev_partial_reconfigure (struct rte_rawdev *dev,int port, +const char *file); +void ifpga_rawdev_cleanup (void ); +#endif /* _IFPGA_RAWDEV_H_ */
drivers/raw/ifpga/rte_pmd_ifpga.c +45 -0
54 lines not on this page · raw message
drivers/raw/ifpga/rte_pmd_ifpga.h +66 -0
78 lines not on this page · raw message
drivers/raw/ifpga/version.map +4 -0
@@ -8,10 +8,14 @@ EXPERIMENTAL { # added in 21.05 rte_pmd_ifpga_get_dev_id; rte_pmd_ifpga_get_rsu_status; + rte_pmd_ifpga_set_rsu_status; rte_pmd_ifpga_get_property; rte_pmd_ifpga_get_phy_info; rte_pmd_ifpga_update_flash; rte_pmd_ifpga_stop_update; rte_pmd_ifpga_reboot_try; rte_pmd_ifpga_reload; + rte_pmd_ifpga_get_pci_bus; + rte_pmd_ifpga_partial_reconfigure; + rte_pmd_ifpga_cleanup; };
Signature · 1 line
2.29.2
Quoted 4 lines · Wei Huang
Cyborg is part of OpenStack, it needs some extra APIs to manage devices with Intel FPGA. These patches add APIs to meet Cyborg requirement.
Quoted 8 lines
Main changes from v15:
- remove example from the patch setWei Huang (3):
raw/ifpga: add fpga rsu APIs
raw/ifpga: add APIs to get fpga information
raw/ifpga: add miscellaneous APIs
I guess this is sent by mistake, v16 already merged, updating patchwork accordingly.
Ferruh,
Yes, they have been rejected.
Thanks
-----Original Message-----
From: Yigit, Ferruh <[email protected]>
Sent: Thursday, March 18, 2021 01:09
To: Huang, Wei <[email protected]>; [email protected]; Xu, Rosen <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Zhang, Tianfei <[email protected]>
Subject: Re: [dpdk-stable] [PATCH v16 0/3] raw/ifpga: add extra APIs for Cyborg
Quoted 4 lines · Wei Huang
Cyborg is part of OpenStack, it needs some extra APIs to manage devices with Intel FPGA. These patches add APIs to meet Cyborg requirement.
Quoted 8 lines
Main changes from v15:
- remove example from the patch setWei Huang (3):
raw/ifpga: add fpga rsu APIs
raw/ifpga: add APIs to get fpga information
raw/ifpga: add miscellaneous APIs
I guess this is sent by mistake, v16 already merged, updating patchwork accordingly.