net/bonding: fix possible silent failure in configuration
This patch checks the return value of function
rte_eth_bond_8023ad_agg_selection_set() in bond_ethdev_configure
for error return value.
Fixes: 6d72657ce3
("net/bonding: add other aggregator modes")
Cc: stable@dpdk.org
Signed-off-by: Lee Daly <lee.daly@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
This commit is contained in:
parent
0d0dd2d9d8
commit
6f4ae7f5d9
@ -3423,9 +3423,16 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
|
||||
"Failed to parse agg selection mode for bonded device %s",
|
||||
name);
|
||||
}
|
||||
if (internals->mode == BONDING_MODE_8023AD)
|
||||
rte_eth_bond_8023ad_agg_selection_set(port_id,
|
||||
agg_mode);
|
||||
if (internals->mode == BONDING_MODE_8023AD) {
|
||||
int ret = rte_eth_bond_8023ad_agg_selection_set(port_id,
|
||||
agg_mode);
|
||||
if (ret < 0) {
|
||||
RTE_BOND_LOG(ERR,
|
||||
"Invalid args for agg selection set for bonded device %s",
|
||||
name);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Parse/add slave ports to bonded device */
|
||||
|
Loading…
Reference in New Issue
Block a user