X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fbus%2Fifpga%2Fifpga_bus.c;h=dfd6b1fba9ce00cb8af25125bd335066f22e3dbc;hb=5ca59711f771;hp=55d3abf9fe2e093de4e183abc94ee9a26a81b1c4;hpb=fb87e55abac808bdda60e114a6817ab6e812ec16;p=dpdk.git diff --git a/drivers/bus/ifpga/ifpga_bus.c b/drivers/bus/ifpga/ifpga_bus.c index 55d3abf9fe..dfd6b1fba9 100644 --- a/drivers/bus/ifpga/ifpga_bus.c +++ b/drivers/bus/ifpga/ifpga_bus.c @@ -73,6 +73,19 @@ ifpga_find_afu_dev(const struct rte_rawdev *rdev, return NULL; } +struct rte_afu_device * +rte_ifpga_find_afu_by_name(const char *name) +{ + struct rte_afu_device *afu_dev = NULL; + + TAILQ_FOREACH(afu_dev, &ifpga_afu_dev_list, next) { + if (afu_dev && + !strcmp(afu_dev->device.name, name)) + return afu_dev; + } + return NULL; +} + static const char * const valid_args[] = { #define IFPGA_ARG_NAME "ifpga" IFPGA_ARG_NAME,