examples/ip_pipeline: add cryptodev
[dpdk.git] / drivers / bus / vmbus / vmbus_common.c
index c7165ad..e3ceb69 100644 (file)
@@ -85,7 +85,6 @@ vmbus_match(const struct rte_vmbus_driver *dr,
 
        return false;
 }
-
 /*
  * If device ID match, call the devinit() function of the driver.
  */
@@ -204,6 +203,27 @@ vmbus_parse(const char *name, void *addr)
        return ret;
 }
 
+/*
+ * scan for matching device args on command line
+ * example:
+ *     -w 'vmbus:635a7ae3-091e-4410-ad59-667c4f8c04c3,latency=20'
+ */
+struct rte_devargs *
+vmbus_devargs_lookup(struct rte_vmbus_device *dev)
+{
+       struct rte_devargs *devargs;
+       rte_uuid_t addr;
+
+       RTE_EAL_DEVARGS_FOREACH("vmbus", devargs) {
+               vmbus_parse(devargs->name, &addr);
+
+               if (rte_uuid_compare(dev->device_id, addr) == 0)
+                       return devargs;
+       }
+       return NULL;
+
+}
+
 /* register vmbus driver */
 void
 rte_vmbus_register(struct rte_vmbus_driver *driver)