public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Micha Nelissen <micha@neli.hopto.org>
To: "Bounine, Alexandre" <Alexandre.Bounine@idt.com>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org,
	Matt Porter <mporter@kernel.crashing.org>,
	Li Yang <leoli@freescale.com>,
	Kumar Gala <galak@kernel.crashing.org>,
	Thomas Moll <thomas.moll@sysgo.com>
Subject: Re: [PATCH -mm 0/2] RapidIO: Changes to handling of RIO switches
Date: Fri, 22 Oct 2010 20:28:46 +0200	[thread overview]
Message-ID: <4CC1D7DE.7060405@neli.hopto.org> (raw)
In-Reply-To: <0CE8B6BE3C4AD74AB97D9D29BD24E55201445906@CORPEXCH1.na.ads.idt.com>

Bounine, Alexandre wrote:
> Micha Nelissen <micha@neli.hopto.org> wrote:
>> Alexandre Bounine wrote:
>> How can you say this? The two variables have different meanings, this
>> logically implies you can't merge them. So how do you say 'this does
> not
>> prevent us from ...' without providing a reason?
> 
> Looks like I formulated it bad - better would be: they have different
> interpretation by hardware but logically in RapidIO they have single
> role - destid/hopcount are a device coordinates in the RIO network used
> to access that device.

They are logically different as well (for a non-host).

rswitch->destid with hopcount is the way to reach that switch.

rswitch->rdev->destid should be the id associated with a given switch, 
so that every (processor) device can agree what id some switch has. For 
a non-host, the path to reach a switch may use a different id than the 
switch itself has; it's just the id by which it was discovered.

However, it's possible to fix that by fixing the id+hopcount once the 
switch is found using the path with its own id: then you know the right 
hopcount.

>> can be defined to point to the switch that a given rio_dev is
> connected
>> to. This is useful for quick lookups. How else can to know to which
>> switch a given device is connected?
> 
> rdev->rswitch is not a pointer to the entire switch device object - it
> is a pointer to the switch specific extension associated with given
> rio_dev (if applicable). There is no other role for rdev->rswitch.

I know this, it doesn't answer my question.

> Why would you keep a pointer to device data extension instead of the
> pointer to attached device object itself?

There is no particular reason, but this is a useful way to define the 
fields that are there.

My point is, now that you remove the pointer field, that information (to 
which switch is a particular device connected) cannot be stored in this 
way, so do you have an alternative proposal for that? Maybe add a new field.

> BTW, I have back and forward links added in previous patches and only
> one link that may be added later is a forward link from mport to the
> attached rio_dev (ptr to rio_switch will not work here because it can be
> switchless connection). But this reference has to be added into
> rio_mport.

Possible, but I suggest to put it in the rio_net: fields rdev_host, and 
rdev_self. You can see it in the patch I sent you.

Micha

  reply	other threads:[~2010-10-22 18:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-21 19:10 [PATCH -mm 0/2] RapidIO: Changes to handling of RIO switches Alexandre Bounine
2010-10-21 19:10 ` [PATCH -mm 1/2] RapidIO: Use common destid storage for endpoints and switches Alexandre Bounine
2010-10-21 19:10 ` [PATCH -mm 2/2] RapidIO: Integrate rio_switch into rio_dev Alexandre Bounine
2010-10-21 21:15 ` [PATCH -mm 0/2] RapidIO: Changes to handling of RIO switches Micha Nelissen
2010-10-22 16:47   ` Bounine, Alexandre
2010-10-22 18:28     ` Micha Nelissen [this message]
2010-10-22 21:04       ` Bounine, Alexandre
2010-10-22 21:58         ` Micha Nelissen
2010-10-25 13:22           ` Bounine, Alexandre
2010-10-25 16:13             ` Micha Nelissen
2010-10-25 17:13               ` Bounine, Alexandre
2010-10-25 20:06                 ` Micha Nelissen
2010-10-26 13:39                   ` Bounine, Alexandre
2010-10-26 14:22                     ` Micha Nelissen
2010-10-26 17:17                       ` Bounine, Alexandre

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=4CC1D7DE.7060405@neli.hopto.org \
    --to=micha@neli.hopto.org \
    --cc=Alexandre.Bounine@idt.com \
    --cc=akpm@linux-foundation.org \
    --cc=galak@kernel.crashing.org \
    --cc=leoli@freescale.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mporter@kernel.crashing.org \
    --cc=thomas.moll@sysgo.com \
    /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