git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/mlx5: fix meter policy flow match item
[dpdk.git]
/
drivers
/
net
/
failsafe
/
failsafe_args.c
diff --git
a/drivers/net/failsafe/failsafe_args.c
b/drivers/net/failsafe/failsafe_args.c
index
d2e725b
..
b203e02
100644
(file)
--- a/
drivers/net/failsafe/failsafe_args.c
+++ b/
drivers/net/failsafe/failsafe_args.c
@@
-368,15
+368,11
@@
fs_get_mac_addr_arg(const char *key __rte_unused,
const char *value, void *out)
{
struct rte_ether_addr *ea = out;
const char *value, void *out)
{
struct rte_ether_addr *ea = out;
- int ret;
if ((value == NULL) || (out == NULL))
return -EINVAL;
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 != RTE_ETHER_ADDR_LEN;
+
+ return rte_ether_unformat_addr(value, ea);
}
int
}
int
@@
-455,8
+451,7
@@
failsafe_args_free(struct rte_eth_dev *dev)
sdev->cmdline = NULL;
free(sdev->fd_str);
sdev->fd_str = NULL;
sdev->cmdline = NULL;
free(sdev->fd_str);
sdev->fd_str = NULL;
- free(sdev->devargs.args);
- sdev->devargs.args = NULL;
+ rte_devargs_reset(&sdev->devargs);
}
}
}
}