From: Chas Williams <3chas3@gmail.com>
To: Radu Nicolau <radu.nicolau@intel.com>, dev@dpdk.org
Cc: thomas@monjalon.net, declan.doherty@intel.com, chas3@att.com,
ferruh.yigit@intel.com, arybchenko@solarflare.com
Subject: Re: [dpdk-dev] [PATCH v2] net/bonding: fix segfault when creating bonded device
Date: Wed, 31 Oct 2018 12:14:03 -0400 [thread overview]
Message-ID: <fdb627b3-63e5-86c3-1103-feda1fdf003e@gmail.com> (raw)
In-Reply-To: <1541001008-13498-1-git-send-email-radu.nicolau@intel.com>
On 10/31/2018 11:50 AM, Radu Nicolau wrote:
> 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.
> Also, reverted 1620175b400e.
>
> Fixes: 391797f04208 ("drivers/bus: move driver assignment to end of probing")
> Fixes: 1620175b400e ("net/bonding: fix invalid port id")
>
> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Chas Williams <chas3@att.com>
> ---
> v2: reverted earlier patch
>
> drivers/net/bonding/rte_eth_bond_pmd.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
> index 156f31c..1a6d8e4 100644
> --- a/drivers/net/bonding/rte_eth_bond_pmd.c
> +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
> @@ -3216,8 +3216,6 @@ bond_probe(struct rte_vdev_device *dev)
> internals = rte_eth_devices[port_id].data->dev_private;
> internals->kvlist = kvlist;
>
> - rte_eth_dev_probing_finish(&rte_eth_devices[port_id]);
> -
> if (rte_kvargs_count(kvlist, PMD_BOND_AGG_MODE_KVARG) == 1) {
> if (rte_kvargs_process(kvlist,
> PMD_BOND_AGG_MODE_KVARG,
> @@ -3230,12 +3228,12 @@ 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_eth_dev_probing_finish(&rte_eth_devices[port_id]);
> RTE_BOND_LOG(INFO, "Create bonded device %s on port %d in mode %u on "
> "socket %u.", name, port_id, bonding_mode, socket_id);
> return 0;
>
next prev parent reply other threads:[~2018-10-31 16:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-31 13:59 [dpdk-dev] [PATCH] " 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 [this message]
2018-11-02 20:36 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fdb627b3-63e5-86c3-1103-feda1fdf003e@gmail.com \
--to=3chas3@gmail.com \
--cc=arybchenko@solarflare.com \
--cc=chas3@att.com \
--cc=declan.doherty@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=radu.nicolau@intel.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).