netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Vivien Didelot <vivien.didelot@savoirfairelinux.com>,
	netdev@vger.kernel.org
Cc: andrew@lunn.ch, john@phrozen.org, davem@davemloft.net
Subject: Re: [PATCH net-next 0/5] net: dsa: Multi-CPU ground work
Date: Tue, 6 Jun 2017 12:20:54 -0700	[thread overview]
Message-ID: <28e3b3c4-1f15-0473-ab51-e55c0de667d6@gmail.com> (raw)
In-Reply-To: <87bmq1j7ni.fsf@weeman.i-did-not-set--mail-host-address--so-tickle-me>

On 06/06/2017 11:25 AM, Vivien Didelot wrote:
> Hi Florian,
> 
> Florian Fainelli <f.fainelli@gmail.com> writes:
> 
>> This patch series prepares the ground for adding mutliple CPU port support to
> 
>                                                    multiple
>                                                    
>> DSA, and starts by removing redundant pieces of information such as
>> master_netdev which is cpu_dp->ethernet. Finally drivers are moved away from
> 
>                          cpu_dp->netdev
>                          
>> directly accessing ds->dst->cpu_dp and use appropriate helper functions.
>>
>> Note that if you have Device Tree blobs/platform configurations that are
>> currently listing multiple CPU ports, the proposed behavior in
>> dsa_ds_get_cpu_dp() will be to return the last bit set in ds->cpu_port_mask.
>>
>> Future plans include:
>> - making dst->cpu_dp a flexible data structure (array, list, you name it)
>> - having the ability for drivers to return a default/preferred CPU port (if
>>   necessary)
> 
> The overall patchset looks good. I have questions for future work
> though.
> 
> I am still not sure that we need CPU port references in
> dsa_switch_tree. When device tree or pdata is parsed, we have allocated
> dsa_switch and dsa_port structures. We should be able validate and
> assign all ds->ports[x].cpu_dp, before setting up the switches and
> creating the slave devices. What do you think?

True, we should be able to do that, thanks for the suggestion.

> 
> Also I see dsa_ptr becoming a pointer to the assosicated dsa_port, and
> dsa_port should contain the tagging ops for quick access. That is more
> rigourous with the physical representation and much easier for
> transparent multi-CPU port support.

Ultimately, I agree we should probably have dev->dsa_ptr be the actual
CPU port within the switch, and from the switch be able to go to the
collection of switches (dst). This should indeed be a bit more optimized
as there should be less traversal of structures in such a case.

Thanks!
-- 
Florian

      reply	other threads:[~2017-06-06 19:20 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-06 17:01 [PATCH net-next 0/5] net: dsa: Multi-CPU ground work Florian Fainelli
2017-06-06 17:01 ` [PATCH net-next 1/5] net: dsa: Remove master_netdev and use dst->cpu_dp->netdev Florian Fainelli
2017-06-06 17:24   ` Vivien Didelot
2017-06-06 18:09     ` Florian Fainelli
2017-06-09  0:01   ` kbuild test robot
2017-06-06 17:01 ` [PATCH net-next 2/5] net: dsa: Relocate master ethtool operations Florian Fainelli
2017-06-06 17:28   ` Vivien Didelot
2017-06-06 17:02 ` [PATCH net-next 3/5] net: dsa: Associate slave network device with CPU port Florian Fainelli
2017-06-06 17:37   ` Vivien Didelot
2017-06-06 17:02 ` [PATCH net-next 4/5] net: dsa: Introduce dsa_dst_get_cpu_dp() Florian Fainelli
2017-06-06 17:52   ` Vivien Didelot
2017-06-06 17:02 ` [PATCH net-next 5/5] net: dsa: Stop accessing ds->dst->cpu_dp in drivers Florian Fainelli
2017-06-06 18:09   ` Vivien Didelot
2017-06-06 18:12     ` Florian Fainelli
2017-06-06 18:33       ` Vivien Didelot
2017-06-06 18:25 ` [PATCH net-next 0/5] net: dsa: Multi-CPU ground work Vivien Didelot
2017-06-06 19:20   ` Florian Fainelli [this message]

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=28e3b3c4-1f15-0473-ab51-e55c0de667d6@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=john@phrozen.org \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@savoirfairelinux.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;
as well as URLs for NNTP newsgroup(s).