net/failsafe: skip devargs if not present in secondary
authorStephen Hemminger <stephen@networkplumber.org>
Fri, 21 Jun 2019 22:08:24 +0000 (15:08 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 23 Jul 2019 12:31:35 +0000 (14:31 +0200)
When secondary process is run was noticing that the log always
contained complaints about unable to parse devargs.

It turns out that an empty devargs turns into "" and this
value is not parsable. Change the failsafe secondary to just
skip doing devargs if it empty.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
drivers/net/failsafe/failsafe.c

index 19dd71d..8af31d7 100644 (file)
@@ -364,6 +364,10 @@ rte_pmd_failsafe_probe(struct rte_vdev_device *vdev)
                 * A sub-device can be plugged later.
                 */
                FOREACH_SUBDEV(sdev, i, eth_dev) {
+                       /* skip empty devargs */
+                       if (sdev->devargs.name[0] == '\0')
+                               continue;
+
                        /* rebuild devargs to be able to get the bus name. */
                        ret = rte_devargs_parse(&devargs,
                                                sdev->devargs.name);