net/octeontx2: add Tx multi segment version
[dpdk.git] / drivers / net / vdev_netvsc / vdev_netvsc.c
index ef02fdc..1fcf90d 100644 (file)
@@ -330,7 +330,7 @@ vdev_netvsc_sysfs_readlink(char *buf, size_t size, const char *if_name,
        char in[RTE_MAX(sizeof(ctx->yield), 256u)];
        int ret;
 
-       ret = snprintf(in, sizeof(in) - 1, "/sys/class/net/%s/%s",
+       ret = snprintf(in, sizeof(in), "/sys/class/net/%s/%s",
                       if_name, relpath);
        if (ret == -1 || (size_t)ret >= sizeof(in))
                return -ENOBUFS;
@@ -387,7 +387,7 @@ vdev_netvsc_device_probe(const struct if_nameindex *iface,
                strlcpy(ctx->if_name, iface->if_name, sizeof(ctx->if_name));
                return 0;
        }
-       if (!is_same_ether_addr(eth_addr, &ctx->if_addr))
+       if (!rte_is_same_ether_addr(eth_addr, &ctx->if_addr))
                return 0;
        /* Look for associated PCI device. */
        ret = vdev_netvsc_sysfs_readlink(buf, sizeof(buf), iface->if_name,
@@ -544,7 +544,7 @@ vdev_netvsc_netvsc_probe(const struct if_nameindex *iface,
                                                pair->value);
                                        return -EINVAL;
                                }
-                               if (is_same_ether_addr(eth_addr, &tmp))
+                               if (rte_is_same_ether_addr(eth_addr, &tmp))
                                        break;
                        }
                }
@@ -633,7 +633,7 @@ vdev_netvsc_netvsc_probe(const struct if_nameindex *iface,
                ctx->devname, ctx->devargs);
        vdev_netvsc_foreach_iface(vdev_netvsc_device_probe, 0, ctx);
        ret = rte_eal_hotplug_add("vdev", ctx->devname, ctx->devargs);
-       if (ret)
+       if (ret < 0)
                goto error;
        LIST_INSERT_HEAD(&vdev_netvsc_ctx_list, ctx, entry);
        ++vdev_netvsc_ctx_count;