common/octeontx2: add mailbox base support infra
[dpdk.git] / drivers / bus / ifpga / ifpga_bus.c
index 55d3abf..dfd6b1f 100644 (file)
@@ -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,