netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Jiri Pirko <jiri@resnulli.us>
Cc: netdev <netdev@vger.kernel.org>,
	David Miller <davem@davemloft.net>,
	Lennert Buytenhek <buytenh@wantstofly.org>
Subject: Re: [PATCH net-next] net: ipconfig: allow IP-Config over DSA devices
Date: Mon, 2 Jun 2014 11:02:31 -0700	[thread overview]
Message-ID: <CAGVrzcahuvmqT8Onc_W3UiimUNWqWCWvKKKU2XNCfZ9viNqw1Q@mail.gmail.com> (raw)
In-Reply-To: <20140531070436.GA3154@minipsycho.orion>

2014-05-31 0:04 GMT-07:00 Jiri Pirko <jiri@resnulli.us>:
> Fri, May 30, 2014 at 08:08:45PM CEST, f.fainelli@gmail.com wrote:
>>Hi David, Lennert, Jiri,
>>
>>This small patch allows us to use the kernel IP auto-configuration on DSA
>>enabled devices.
>>
>>I initially started implementing the netdev_upper_dev_link() calls for the
>>DSA slave devices, but ended up realizing that although this might be useful,
>>the other drivers or protocols implementing these master/slave relantionship
>>are the bonding driver and the VLAN code.
>>
>>None of these interfaces (bonding or VLAN) can be created by the kernel
>>without modifications, which means that user-space is there, and so we could
>>pivot_root over a NFS mounted share for instance, hence making the master/slave
>>net_device relationship not so useful for IP-Config.
>>
>>This is not the case with DSA devices which are solely created by the kernel
>>based on platform configuration.
>>
>>Let me know your thoughts. If you feel like something like:
>>netdev_is_upper_dev() or something like that is better.
>
> uppers and lowers should not be used by switches. If they were, it would
> block the usage of ports in bond/bridge/ovs. I did that myself in my
> first RFC patchset but realized that it make no sense.
>
> What I have in mind and I believe that many people nodded to is an
> exported (netlink, sysfs) value of switch id. That can be generated
> randomly or from some hw id. Please see following git tree:
>
> https://github.com/jpirko/net-next-rocker
>
> On the tip, there are rocker patches combined with the switch
> infrastructure patches. The switch id is there implemented for dsa and
> rocker.
>
> This is based on the RFC patchset I sent some while ago on netdev
> mailing list.
>
> Please tell me what do you think.

The way the switch_id attribute is implemented, is currently a
property of the slave aka per-port net_devices, which makes sense.
That does not entirely help me in my case, which is bringing up the
master/parent network device of these slave devices. We are still
missing a "generic" way to tell how a slave per-port network device
relates to its "conduit" network device.
-- 
Florian

  reply	other threads:[~2014-06-02 18:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-30 18:08 [PATCH net-next] net: ipconfig: allow IP-Config over DSA devices Florian Fainelli
2014-05-30 18:08 ` [PATCH net-next] net: ipconfig: handle DSA enabled network devices Florian Fainelli
2014-05-31  7:04 ` [PATCH net-next] net: ipconfig: allow IP-Config over DSA devices Jiri Pirko
2014-06-02 18:02   ` Florian Fainelli [this message]
2014-06-05  7:01 ` David Miller
2014-06-05 17:47   ` Florian Fainelli

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=CAGVrzcahuvmqT8Onc_W3UiimUNWqWCWvKKKU2XNCfZ9viNqw1Q@mail.gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=buytenh@wantstofly.org \
    --cc=davem@davemloft.net \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    /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).