]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/spdk/dpdk/drivers/net/failsafe/failsafe_args.c
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / spdk / dpdk / drivers / net / failsafe / failsafe_args.c
index 3351c5bcabd6083dc4ef16ce49c1db34fa77fa47..707490b94c4ee22411a046d837f5d5c7784fd4c8 100644 (file)
@@ -367,16 +367,12 @@ static int
 fs_get_mac_addr_arg(const char *key __rte_unused,
                const char *value, void *out)
 {
-       struct ether_addr *ea = out;
-       int ret;
+       struct rte_ether_addr *ea = out;
 
        if ((value == NULL) || (out == NULL))
                return -EINVAL;
-       ret = sscanf(value, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx",
-               &ea->addr_bytes[0], &ea->addr_bytes[1],
-               &ea->addr_bytes[2], &ea->addr_bytes[3],
-               &ea->addr_bytes[4], &ea->addr_bytes[5]);
-       return ret != ETHER_ADDR_LEN;
+
+       return rte_ether_unformat_addr(value, ea);
 }
 
 int