DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/bonding: fix segfault when creating bonded device
@ 2018-10-31 13:59 Radu Nicolau
  2018-10-31 15:06 ` Thomas Monjalon
  2018-10-31 15:50 ` [dpdk-dev] [PATCH v2] " Radu Nicolau
  0 siblings, 2 replies; 9+ messages in thread
From: Radu Nicolau @ 2018-10-31 13:59 UTC (permalink / raw)
  To: dev; +Cc: thomas, declan.doherty, chas3, Radu Nicolau

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@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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-11-02 20:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-31 13:59 [dpdk-dev] [PATCH] net/bonding: fix segfault when creating bonded device Radu Nicolau
2018-10-31 15:06 ` Thomas Monjalon
2018-10-31 15:34   ` Radu Nicolau
2018-10-31 15:37   ` Chas Williams
2018-10-31 15:44     ` Thomas Monjalon
2018-10-31 15:50 ` [dpdk-dev] [PATCH v2] " Radu Nicolau
2018-10-31 16:11   ` Thomas Monjalon
2018-10-31 16:14   ` Chas Williams
2018-11-02 20:36     ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).