All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: Arvid Brodin <arvid.brodin@enea.com>
Cc: <netdev@vger.kernel.org>
Subject: Re: bridge: HSR support
Date: Tue, 6 Dec 2011 15:27:45 -0800	[thread overview]
Message-ID: <20111206152745.7dd6bc1c@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <4EDEA3E9.3070004@enea.com>

On Wed, 7 Dec 2011 00:23:21 +0100
Arvid Brodin <arvid.brodin@enea.com> wrote:

> Stephen Hemminger wrote:
> > On Fri, 28 Oct 2011 17:34:18 +0200
> > Arvid Brodin <arvid.brodin@enea.com> wrote:
> > 
> >> Ok, so after a lot of reading and looking through code I have this idea of a
> >> standalone solution:
> >>
> >> 1) Add ioctls to create (and remove) "hsr" netdevs which encapsulates two
> >>    physical Ethernet interfaces each (somewhat like the bridge code does, but
> >>    with precisely 2 interfaces slaved).
> > 
> > Please use the newer netlink interface and the master attribute for this
> > rather than inventing yet another ioctl.
> 
> 
> Is the rtnl interface documented anywhere (the usage of the different IFLA_
> flags etc.)? Specifically: how do I use the IFLA_MASTER flag (what's the
> meaning of the 32-bit data it wants, and how is it used by the kernel)? I 
> haven't been very successful figuring this out by looking at the kernel code.


Look at bridging or bonding. the u32 is the ifindex of the master device (ie
where packets are being forwarded to).

> 
> Also, how do I best tell the kernel which my slave devices are when creating
> the hsr device? Should I create my own IFLA_HSR_UNSPEC, etc, or can I use some
> of the generic flags?

Look at macvlan, vlan, or bridging. There this is done by processing a newlink
message.


> Oh, and the kernel (struct rtnl_link_ops).newlink method has two (struct
> nlattr *[]) params: tb and data. What are their roles?
> 
> 

  reply	other threads:[~2011-12-06 23:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4E948A04.8060400@enea.com>
     [not found] ` <20111011112821.28cd3e51@nehalam.linuxnetplumber.net>
2011-10-11 23:51   ` bridge: HSR support Arvid Brodin
2011-10-12 13:28     ` David Lamparter
2011-10-12 14:24       ` Arvid Brodin
2011-10-24 14:17     ` Arvid Brodin
2011-10-28 15:34       ` Arvid Brodin
2011-10-28 15:54         ` Stephen Hemminger
2011-10-28 16:36           ` Arvid Brodin
2011-12-06 23:23           ` Arvid Brodin
2011-12-06 23:27             ` Stephen Hemminger [this message]
2011-12-07 18:30               ` Arvid Brodin
2011-12-07 19:59                 ` Jay Vosburgh
2011-12-08 14:45                   ` Arvid Brodin
2011-11-21 16:52         ` Arvid Brodin
2012-01-06 18:11       ` Arvid Brodin
2012-01-12 18:02         ` bridge: HSR support - possible recursive locking? Arvid Brodin

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=20111206152745.7dd6bc1c@nehalam.linuxnetplumber.net \
    --to=shemminger@vyatta.com \
    --cc=arvid.brodin@enea.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.