DPDK patches and discussions
 help / color / mirror / Atom feed
From: Shreyansh Jain <shreyansh.jain@nxp.com>
To: santosh <santosh.shukla@caviumnetworks.com>,
	Thomas Monjalon <thomas@monjalon.net>
Cc: <dev@dpdk.org>, <ferruh.yigit@intel.com>, <hemant.agrawal@nxp.com>
Subject: Re: [dpdk-dev] [PATCH] bus/dpaa: fix memory allocation during bus scan
Date: Wed, 11 Oct 2017 10:47:11 +0530	[thread overview]
Message-ID: <421a112e-69f1-b8bc-c863-cd08dad5cc7f@nxp.com> (raw)
In-Reply-To: <f8f5cf4c-cda8-440d-49e2-93c72fe4bd50@caviumnetworks.com>

On Tuesday 10 October 2017 10:25 PM, santosh wrote:
> 
> On Tuesday 10 October 2017 09:47 PM, Thomas Monjalon wrote:
>> 10/10/2017 16:05, santosh:
>>> Hi Thomas,
>>>
>>> On Tuesday 10 October 2017 01:09 PM, Thomas Monjalon wrote:
>>>> 10/10/2017 09:01, Shreyansh Jain:
>>>>> Fixes: 5b22cf744689 ("bus/dpaa: introducing FMan configurations")
>>>>> Fixes: 37f9b54bd3cf ("net/dpaa: support Tx and Rx queue setup")
>>>> These lines should appear after the explanation.
>>>>
>>>>> Cc: shreyansh.jain@nxp.com
>>>>>
>>>>> With the IOVA auto detection changes, bus scan is performed before
>>>>> memory initialization. DPAA bus scan must not use rte_malloc in
>>>>> its path.
>>>> If the scan has been broken by IOVA detection, you should reference
>>>> IOVA in Fixes line, not DPAA.
>>>>
>>> hmm.. IOVA not breaking scanning!, Refer this [1].
>> It is breaking. A break is a behaviour or interface change.
>> When moving init order, you break behaviour.
>> I don't say it is bad.
>> I say only it is the primary cause of this change.
> 
> disagree!. Why so: Legacy PCI/bus scan implementation don't
> use rte_ lib as they don;t need to.. Refer [1] for detailing.
> However, dpaa is and that we agree to align with legacy.
> So its a open question : Who fixes who?

Just because PCI/bus-scan didn't use rte_malloc didn't mean that no one 
else can use it. For DPAA, the case was different and ideally I 
shouldn't have used rte_malloc. [1] was a discussion based on FSLMC and 
that was incorrect implementation.

But, that is not a general case.

If we go by pre-IOVA patch era:

  -> Subsystem A initialized
  -> Subsystem B initialized
  -> bus scan
      `-> implementation free to use all initialized subsystem

post-IOVA era


  -> Subsystem A initialized
  -> bus scan
      `-> implementation free to use all initialized subsystem
  -> Subsystem B initialized

Essentially, it means IOVA made a change in the expected behavior of the 
implementation.
For case of DPAA, as that was still in development, it certainly can be 
said that it should have been fixed within dev cycle itself. That was 
the prime reason I used 'Fixes' to my own patches in v1 of this patch.

But that said, I agree with what Thomas is saying. Fixes is only 
indicative of which patched changed the status-quo. And it helps 
maintainers know dependency tree. In this case, DPAA patches came 
*before* IOVA was added and hence the mistake in committed version came 
out *after* IOVA patches.

> 
>> The Fixes: line is also a help when backporting patches.
>> This patch needs to be backported only if IOVA patch is also backported.
> 
> IMO, would prefer backport: rather fixes: tag in above case, more verbose I guess.
> 
>>> We(me/hemant) has discussed about same on thread[1] and agreed to
>>> do respective changes and remove rte_ memory dependency from code base
>>> at scan time..
>>>
>>> Thanks.
>>>
>>> [1] http://dpdk.org/dev/patchwork/patch/26764/
>> You already discussed about this issue, fine.
>>
>> Santosh, as you insist to talk again about it, one more comment:
>>
>> It is very good to have discussions on the mailing list.
> 
> Thanks, That makes me think that I didn't break, indeed did what was needed in agnostic way.

Again, IOVA patch changes status quo, but that was a known fact and it 
was missed by DPAA patches. Now, for maintenance reasons, "Fixes" should 
actually be IOVA patch. I am not sure why you disagree with that.

> 
>> It would be perfect if all these informations were explicitly given
>> in the commit messages.
>> For instance, saying that the scan cannot use rte_malloc anymore is
>> a valuable tip for other developpers.
> 
> Agree, but scan wasn;t using for PCI/bus case.. so one can;t be sure whether to
> mention or not..
> 

  reply	other threads:[~2017-10-11  5:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-10  7:01 Shreyansh Jain
2017-10-10  7:39 ` Thomas Monjalon
2017-10-10  9:19   ` Shreyansh Jain
2017-10-10 14:05   ` santosh
2017-10-10 16:17     ` Thomas Monjalon
2017-10-10 16:55       ` santosh
2017-10-11  5:17         ` Shreyansh Jain [this message]
2017-10-11  5:23           ` santosh
2017-10-10  9:34 ` [dpdk-dev] [PATCH v2] " Shreyansh Jain
2017-10-10 13:13   ` Thomas Monjalon

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=421a112e-69f1-b8bc-c863-cd08dad5cc7f@nxp.com \
    --to=shreyansh.jain@nxp.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=santosh.shukla@caviumnetworks.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).