From: Tonghao Zhang <xiangxia.m....@gmail.com>

If users set the interface options with multi-pci or device names
with ',' as a separator, we try to parse it as dpdk-bond args.
For example, set an interface as:

    ovs-vsctl add-port br0 dpdk0 -- \
            set Interface dpdk0 type=dpdk \
            options:dpdk-devargs=0000:06:00.0,0000:06:00.1

This patch allows vswitchd to parse it and will be used in
next patch.

Signed-off-by: Tonghao Zhang <xiangxia.m....@gmail.com>
---
 lib/netdev-dpdk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index ee39cbe..30dc76d 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -1389,7 +1389,7 @@ netdev_dpdk_process_devargs(struct netdev_dpdk *dev,
     if (strncmp(devargs, "class=eth,mac=", 14) == 0) {
         new_port_id = netdev_dpdk_get_port_by_mac(&devargs[14]);
     } else {
-        name = xmemdup0(devargs, strcspn(devargs, ","));
+        name = xmemdup0(devargs, strlen(devargs));
         if (rte_eth_dev_get_port_by_name(name, &new_port_id)
                 || !rte_eth_dev_is_valid_port(new_port_id)) {
             /* Device not found in DPDK, attempt to attach it */
-- 
1.8.3.1

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to