From: Arvid Brodin <arvid.brodin@enea.com>
To: <netdev@vger.kernel.org>
Subject: Re: bridge: HSR support
Date: Mon, 21 Nov 2011 17:52:16 +0100 [thread overview]
Message-ID: <4ECA81C0.2050208@enea.com> (raw)
In-Reply-To: <4EAACB7A.4090207@enea.com>
Arvid Brodin wrote:
> Arvid Brodin wrote:
>> Stephen Hemminger wrote:
>>> On Tue, 11 Oct 2011 20:25:08 +0200
>>> Arvid Brodin <arvid.brodin@enea.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> I want to add support for HSR ("High-availability Seamless Redundancy",
>>>> IEC-62439-3) to the bridge code. With HSR, all connected units have two network
>>>> ports and are connected in a ring. All new Ethernet packets are sent on both
>>>> ports (or passed through if the current unit is not the originating unit). The
>>>> same packet is never passed twice. Non-HSR units are not allowed in the ring.
>>>>
>>>> This gives instant, reconfiguration-free failover.
>>>>
> *snip*
>> I need to do two things:
>>
>> 1) Bind two network interfaces into one (say, eth0 & eth1 => hsr0). Frames sent on
>> hsr0 should get an HSR tag (including the correct EtherType) and go out on both
>> eth0 and eth1.
>>
>> 2) Ingress frames on eth0 & eth1, with EtherType 0x88fb, should be captured and
>> handled specially (either received on hsr0 or forwarded to the other bound
>> physical interface).
>>
>> Any ideas on the best way to implement this -- what's the nicest place to "hook
>> into" for this?
>>
I need some help with the code for creating virtual hsr devices.
To reiterate, a hsr device acts as a kind of master for two physical ethernet
devices. Any frame sent on the hsrX device should be forwarded to and sent from
both physical devices. Frames coming in on one of the physical devices should
be bridged to the other physical device, or received on the hsr device if the
host is the intended destination.
Questions:
1) net_device features. Should I just logically AND the features fields of the
physical interfaces to get a correct value for the hsr device?
2) net_device priv_flags / flags:
I'm guessing I need to clear IFF_XMIT_DST_RELEASE on all involved interfaces
to be able to send outgoing frames on multiple interfaces?
Can I set IFF_DONT_BRIDGE on the physical interfaces to prevent them being
used in a bridge?
Can I call netdev_set_master() on the physical devices to stop them from
being used in e.g. a bond?
3) Stats: is there a reason not to use the net_device->stats field for
statistics on the hsr device? (I see many drivers keep their own
net_device_stats data and implement ndo_get_stats64() instead.)
--
Arvid Brodin
Enea Services Stockholm AB
next prev parent reply other threads:[~2011-11-21 16:52 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
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 [this message]
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=4ECA81C0.2050208@enea.com \
--to=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 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).