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
drivers/net: use internal function to get ethdev struct
[dpdk.git]
/
drivers
/
net
/
bonding
/
rte_eth_bond_args.c
diff --git
a/drivers/net/bonding/rte_eth_bond_args.c
b/drivers/net/bonding/rte_eth_bond_args.c
index
8c5f90d
..
5406e1c
100644
(file)
--- a/
drivers/net/bonding/rte_eth_bond_args.c
+++ b/
drivers/net/bonding/rte_eth_bond_args.c
@@
-18,7
+18,7
@@
const char *pmd_bond_init_valid_arguments[] = {
PMD_BOND_SOCKET_ID_KVARG,
PMD_BOND_MAC_ADDR_KVARG,
PMD_BOND_AGG_MODE_KVARG,
PMD_BOND_SOCKET_ID_KVARG,
PMD_BOND_MAC_ADDR_KVARG,
PMD_BOND_AGG_MODE_KVARG,
-
"driver"
,
+
RTE_DEVARGS_KEY_DRIVER
,
NULL
};
NULL
};
@@
-200,20
+200,20
@@
int
bond_ethdev_parse_socket_id_kvarg(const char *key __rte_unused,
const char *value, void *extra_args)
{
bond_ethdev_parse_socket_id_kvarg(const char *key __rte_unused,
const char *value, void *extra_args)
{
-
int
socket_id;
+
long
socket_id;
char *endptr;
if (value == NULL || extra_args == NULL)
return -1;
errno = 0;
char *endptr;
if (value == NULL || extra_args == NULL)
return -1;
errno = 0;
- socket_id =
(uint8_t)
strtol(value, &endptr, 10);
+ socket_id = strtol(value, &endptr, 10);
if (*endptr != 0 || errno != 0)
return -1;
/* validate socket id value */
if (*endptr != 0 || errno != 0)
return -1;
/* validate socket id value */
- if (socket_id >= 0) {
- *(
uint8_t *)extra_args = (uint8_
t)socket_id;
+ if (socket_id >= 0
&& socket_id < RTE_MAX_NUMA_NODES
) {
+ *(
int *)extra_args = (in
t)socket_id;
return 0;
}
return -1;
return 0;
}
return -1;