From: Andrew Lunn <andrew@lunn.ch>
To: Horatiu Vultur <horatiu.vultur@microchip.com>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
bridge@lists.linux-foundation.org, davem@davemloft.net,
roopa@cumulusnetworks.com, nikolay@cumulusnetworks.com,
jakub.kicinski@netronome.com, vivien.didelot@gmail.com,
olteanv@gmail.com, anirudh.venkataramanan@intel.com,
dsahern@gmail.com, jiri@resnulli.us, ivecera@redhat.com,
UNGLinuxDriver@microchip.com
Subject: Re: [RFC net-next Patch v2 4/4] net: bridge: mrp: switchdev: Add HW offload
Date: Mon, 13 Jan 2020 15:00:53 +0100 [thread overview]
Message-ID: <20200113140053.GE11788@lunn.ch> (raw)
In-Reply-To: <20200113124620.18657-5-horatiu.vultur@microchip.com>
On Mon, Jan 13, 2020 at 01:46:20PM +0100, Horatiu Vultur wrote:
> +#ifdef CONFIG_BRIDGE_MRP
> +/* SWITCHDEV_OBJ_ID_PORT_MRP */
> +struct switchdev_obj_port_mrp {
> + struct switchdev_obj obj;
> + struct net_device *port;
> + u32 ring_nr;
> +};
> +
> +#define SWITCHDEV_OBJ_PORT_MRP(OBJ) \
> + container_of((OBJ), struct switchdev_obj_port_mrp, obj)
> +
> +/* SWITCHDEV_OBJ_ID_RING_TEST_MRP */
> +struct switchdev_obj_ring_test_mrp {
> + struct switchdev_obj obj;
> + /* The value is in us and a value of 0 represents to stop */
> + u32 interval;
> + u8 max;
> + u32 ring_nr;
> +};
> +
> +#define SWITCHDEV_OBJ_RING_TEST_MRP(OBJ) \
> + container_of((OBJ), struct switchdev_obj_ring_test_mrp, obj)
> +
> +/* SWITCHDEV_OBJ_ID_RING_ROLE_MRP */
> +struct switchdev_obj_ring_role_mrp {
> + struct switchdev_obj obj;
> + u8 ring_role;
> + u32 ring_nr;
> +};
Hi Horatiu
The structures above should give me enough information to build this,
correct?
Ethernet II, Src: 7a:8b:b1:35:96:e1 (7a:8b:b1:35:96:e1), Dst: Iec_00:00:01 (01:15:4e:00:00:01)
Destination: Iec_00:00:01 (01:15:4e:00:00:01)
Source: 7a:8b:b1:35:96:e1 (7a:8b:b1:35:96:e1)
Type: MRP (0x88e3)
PROFINET MRP MRP_Test, MRP_Common, MRP_End
MRP_Version: 1
MRP_TLVHeader.Type: MRP_Test (0x02)
MRP_TLVHeader.Type: MRP_Test (0x02)
MRP_TLVHeader.Length: 18
MRP_Prio: 0x1f40 High priorities
MRP_SA: 7a:8b:b1:35:96:e1 (7a:8b:b1:35:96:e1)
MRP_PortRole: Primary ring port (0x0000)
MRP_RingState: Ring closed (0x0001)
MRP_Transition: 0x0001
MRP_TimeStamp [ms]: 0x000cf574 <---------- Updated automatic
MRP_TLVHeader.Type: MRP_Common (0x01)
MRP_TLVHeader.Type: MRP_Common (0x01)
MRP_TLVHeader.Length: 18
MRP_SequenceID: 0x00e9 <---------- Updated automatic
MRP_DomainUUID: ffffffff-ffff-ffff-ffff-ffffffffffff
MRP_TLVHeader.Type: MRP_End (0x00)
MRP_TLVHeader.Type: MRP_End (0x00)
MRP_TLVHeader.Length: 0
There are a couple of fields i don't see. MRP_SA, MRP_Transition.
What are max and ring_nr used for?
Do you need to set the first value MRP_SequenceID uses? Often, in
order to detect a reset, a random value is used to initialise the
sequence number. Also, does the time stamp need initializing?
Thanks
Andrew
next prev parent reply other threads:[~2020-01-13 14:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-13 12:46 [RFC net-next Patch v2 0/4] net: bridge: mrp: Add support for Media Redundancy Protocol(MRP) Horatiu Vultur
2020-01-13 12:46 ` [RFC net-next Patch v2 1/4] net: bridge: mrp: Add support for Media Redundancy Protocol Horatiu Vultur
2020-01-13 12:46 ` [RFC net-next Patch v2 2/4] net: bridge: mrp: Integrate MRP into the bridge Horatiu Vultur
2020-01-13 12:46 ` [RFC net-next Patch v2 3/4] net: bridge: mrp: Add netlink support to configure MRP Horatiu Vultur
2020-01-13 12:46 ` [RFC net-next Patch v2 4/4] net: bridge: mrp: switchdev: Add HW offload Horatiu Vultur
2020-01-13 14:00 ` Andrew Lunn [this message]
2020-01-13 22:57 ` Horatiu Vultur
2020-01-13 23:30 ` Andrew Lunn
2020-01-14 8:08 ` Horatiu Vultur
2020-01-14 13:20 ` Andrew Lunn
2020-01-14 16:46 ` Horatiu Vultur
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=20200113140053.GE11788@lunn.ch \
--to=andrew@lunn.ch \
--cc=UNGLinuxDriver@microchip.com \
--cc=anirudh.venkataramanan@intel.com \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=horatiu.vultur@microchip.com \
--cc=ivecera@redhat.com \
--cc=jakub.kicinski@netronome.com \
--cc=jiri@resnulli.us \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nikolay@cumulusnetworks.com \
--cc=olteanv@gmail.com \
--cc=roopa@cumulusnetworks.com \
--cc=vivien.didelot@gmail.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).