[dpdk-dev] [PATCH] net/bonding: fix segfault when creating bonded device
Radu Nicolau
radu.nicolau at intel.com
Wed Oct 31 14:59:06 CET 2018
After the patch below the call to rte_eth_bond_8023ad_agg_selection_set
from probe() segfaults; there is no need to call the function, just set
the mode directly.
Fixes: 391797f04208 ("drivers/bus: move driver assignment to end of probing")
Signed-off-by: Radu Nicolau <radu.nicolau at intel.com>
---
drivers/net/bonding/rte_eth_bond_pmd.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 156f31c..6421b96 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3230,10 +3230,9 @@ bond_probe(struct rte_vdev_device *dev)
}
if (internals->mode == BONDING_MODE_8023AD)
- rte_eth_bond_8023ad_agg_selection_set(port_id,
- agg_mode);
+ internals->mode4.agg_selection = agg_mode;
} else {
- rte_eth_bond_8023ad_agg_selection_set(port_id, AGG_STABLE);
+ internals->mode4.agg_selection = AGG_STABLE;
}
RTE_BOND_LOG(INFO, "Create bonded device %s on port %d in mode %u on "
--
2.7.5
More information about the dev
mailing list