DPDK patches and discussions
 help / color / mirror / Atom feed
From: Radu Nicolau <radu.nicolau@intel.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev@dpdk.org, declan.doherty@intel.com, chas3@att.com,
	ferruh.yigit@intel.com, arybchenko@solarflare.com
Subject: Re: [dpdk-dev] [PATCH] net/bonding: fix segfault when creating bonded device
Date: Wed, 31 Oct 2018 15:34:45 +0000	[thread overview]
Message-ID: <e7caabc8-4165-f2d0-266a-5331ac22009f@intel.com> (raw)
In-Reply-To: <2490703.Y8HZJr6zFH@xps>



On 10/31/2018 3:06 PM, Thomas Monjalon wrote:
> 31/10/2018 14:59, 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")
> It would not segfault if you call rte_eth_dev_probing_finish() at the
> real end of the probing function. Then the port will be considered not
> valid in rte_eth_bond_8023ad_agg_selection_set().
But we need to set the mode, the call to 
rte_eth_bond_8023ad_agg_selection_set() assumed before that it will 
actually succeed, which is not the case anymore.
I will look at reverting that patch/fix, it is likely not needed anymore 
anyway if this patch is applied.
> It does not solve your problem but it is more correct.
> So I suggest to revert this patch (which was a wrong fix):
> 	http://git.dpdk.org/dpdk/commit/?id=1620175
>
> Then the issue is to allow configuring a port before the end of probing.
> This patch is workarounding the public API which checks port validity.
> I think it is a good approach.
>
In probe() we need to set the mode, and we know that the port is a valid 
bonding port, so there is no need to check. Any other call bar the ones 
in probe remain the same.

  reply	other threads:[~2018-10-31 15:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-31 13:59 Radu Nicolau
2018-10-31 15:06 ` Thomas Monjalon
2018-10-31 15:34   ` Radu Nicolau [this message]
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

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=e7caabc8-4165-f2d0-266a-5331ac22009f@intel.com \
    --to=radu.nicolau@intel.com \
    --cc=arybchenko@solarflare.com \
    --cc=chas3@att.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@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).