From: Horatiu Vultur <horatiu.vultur@microchip.com>
To: <linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>,
<bridge@lists.linux-foundation.org>, <jiri@resnulli.us>,
<ivecera@redhat.com>, <davem@davemloft.net>,
<roopa@cumulusnetworks.com>, <nikolay@cumulusnetworks.com>,
<anirudh.venkataramanan@intel.com>, <olteanv@gmail.com>,
<andrew@lunn.ch>, <jeffrey.t.kirsher@intel.com>,
<UNGLinuxDriver@microchip.com>
Cc: Horatiu Vultur <horatiu.vultur@microchip.com>
Subject: [RFC net-next v3 05/10] net: bridge: mrp: Update MRP interface to add switchdev support
Date: Fri, 24 Jan 2020 17:18:23 +0100 [thread overview]
Message-ID: <20200124161828.12206-6-horatiu.vultur@microchip.com> (raw)
In-Reply-To: <20200124161828.12206-1-horatiu.vultur@microchip.com>
Extend the MRP interface to allow switchdev support. The following functions are
added:
br_mrp_port_switchdev_add - this corresponds to the function br_mrp_add_port,
and will notify the HW that a port is added to a MRP ring. The function gets
as parameter the port and the ID of the ring.
br_mrp_port_switchdev_del - this corresponds to the function br_mrp_del_port
and will notify the HW that a port is removed from a MRP ring. The function
gets as parameter the port and the ID of the ring.
br_mrp_port_switchdev_set_state - this corresponds to the function
br_mrp_port_state. It would notify the HW if it should block or not non-MRP
frames.
br_mrp_port_switchdev_set_port - this corresponds to the function
br_mrp_port_role. It would set the port role, primary or secondary.
br_mrp_switchdev_set_role - this corresponds to the function br_mrp_ring_role
and would set one of the role MRM or MRC.
br_mrp_switchdev_set_ring_state - this corresponds to the function
br_mrp_ring_state and would set the ring to be open or closed.
br_mrp_switchdev_send_ring_test - this corresponds to the function
br_mrp_start_test. This will notify the HW to start or stop generating
MRP_Test frames. Value 0 for the interval parameter means to stop generating
the frames.
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
---
net/bridge/br_private_mrp.h | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/net/bridge/br_private_mrp.h b/net/bridge/br_private_mrp.h
index bea4ece4411c..de5ba7f730f6 100644
--- a/net/bridge/br_private_mrp.h
+++ b/net/bridge/br_private_mrp.h
@@ -35,6 +35,22 @@ int br_mrp_start_test(struct net_bridge *br, u32 ring_nr, u32 interval,
u8 max_miss);
int br_mrp_flush(struct net_bridge *br, u32 ring_nr);
+/* br_mrp_switchdev.c */
+int br_mrp_port_switchdev_add(struct net_bridge_port *p, u32 ring_nr);
+int br_mrp_port_switchdev_del(struct net_bridge_port *p, u32 ring_nr);
+int br_mrp_port_switchdev_set_state(struct net_bridge_port *p,
+ enum br_mrp_port_state_type state);
+int br_mrp_port_switchdev_set_role(struct net_bridge_port *p,
+ enum br_mrp_port_role_type role);
+
+int br_mrp_switchdev_set_ring_role(struct br_mrp *mrp,
+ enum br_mrp_ring_role_type role);
+int br_mrp_switchdev_set_ring_state(struct br_mrp *mrp,
+ enum br_mrp_ring_state_type state);
+
+int br_mrp_switchdev_send_ring_test(struct br_mrp *mrp, u32 interval,
+ u8 max_miss);
+
/* br_mrp_netlink.c */
void br_mrp_port_open(struct net_device *dev, u8 loc);
--
2.17.1
next prev parent reply other threads:[~2020-01-24 16:19 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-24 16:18 [RFC net-next v3 00/10] net: bridge: mrp: Add support for Media Redundancy Protocol (MRP) Horatiu Vultur
2020-01-24 16:18 ` [RFC net-next v3 01/10] net: bridge: mrp: Expose mrp attributes Horatiu Vultur
2020-01-24 16:18 ` [RFC net-next v3 02/10] net: bridge: mrp: Expose function br_mrp_port_open Horatiu Vultur
2020-01-24 17:37 ` Andrew Lunn
2020-01-25 11:29 ` Horatiu Vultur
2020-01-24 16:18 ` [RFC net-next v3 03/10] net: bridge: mrp: Add MRP interface used by netlink Horatiu Vultur
2020-01-24 17:43 ` Andrew Lunn
2020-01-25 11:37 ` Horatiu Vultur
2020-01-25 15:20 ` Andrew Lunn
2020-01-25 19:16 ` Allan W. Nielsen
2020-01-26 13:28 ` Horatiu Vultur
2020-01-26 15:39 ` Andrew Lunn
2020-02-20 9:08 ` Nikolay Aleksandrov
2020-02-20 13:00 ` Allan W. Nielsen
2020-01-24 16:18 ` [RFC net-next v3 04/10] net: bridge: mrp: Add generic netlink interface to configure MRP Horatiu Vultur
2020-01-25 15:34 ` Andrew Lunn
2020-01-25 19:28 ` Allan W. Nielsen
2020-01-26 13:39 ` Horatiu Vultur
2020-01-24 16:18 ` Horatiu Vultur [this message]
2020-01-24 16:18 ` [RFC net-next v3 06/10] net: bridge: mrp: switchdev: Extend switchdev API to offload MRP Horatiu Vultur
2020-01-25 16:35 ` Andrew Lunn
2020-01-26 13:22 ` Horatiu Vultur
2020-01-26 15:59 ` Andrew Lunn
2020-01-27 11:04 ` Allan W. Nielsen
2020-01-27 14:41 ` Jürgen Lambrecht
[not found] ` <c5733ddb-a837-b866-54bf-c631baf36c54@televic.com>
2020-01-27 15:06 ` Andrew Lunn
2020-01-28 9:50 ` Jürgen Lambrecht
2020-01-27 11:29 ` Jürgen Lambrecht
2020-01-27 12:27 ` Allan W. Nielsen
2020-01-27 14:39 ` Jürgen Lambrecht
2020-01-28 9:58 ` Allan W. Nielsen
2020-01-24 16:18 ` [RFC net-next v3 07/10] net: bridge: mrp: switchdev: Implement MRP API for switchdev Horatiu Vultur
2020-01-24 16:18 ` [RFC net-next v3 08/10] net: bridge: mrp: Connect MRP api with the switchev API Horatiu Vultur
2020-01-24 16:18 ` [RFC net-next v3 09/10] net: bridge: mrp: Integrate MRP into the bridge Horatiu Vultur
2020-01-25 15:42 ` Andrew Lunn
2020-01-26 12:49 ` Horatiu Vultur
2020-01-25 16:16 ` Andrew Lunn
2020-01-26 13:01 ` Horatiu Vultur
2020-01-26 17:12 ` Andrew Lunn
2020-01-27 10:57 ` Allan W. Nielsen
2020-01-27 13:02 ` Horatiu Vultur
2020-01-27 13:40 ` Andrew Lunn
2020-01-28 9:56 ` Jürgen Lambrecht
2020-01-28 10:17 ` Allan W. Nielsen
2020-01-24 16:18 ` [RFC net-next v3 10/10] net: bridge: mrp: Update Kconfig and Makefile Horatiu Vultur
2020-01-24 20:34 ` [RFC net-next v3 00/10] net: bridge: mrp: Add support for Media Redundancy Protocol (MRP) Allan W. Nielsen
2020-01-24 21:05 ` Vinicius Costa Gomes
2020-01-25 9:44 ` Allan W. Nielsen
2020-01-25 16:23 ` Andrew Lunn
2020-01-25 19:12 ` Allan W. Nielsen
2020-01-25 21:18 ` Vinicius Costa Gomes
2020-01-28 10:35 ` Jürgen Lambrecht
2020-02-18 12:18 ` Allan W. Nielsen
2020-02-18 16:55 ` Jakub Kicinski
2020-02-20 10:48 ` Nikolay Aleksandrov
2020-02-20 12:58 ` Allan W. Nielsen
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=20200124161828.12206-6-horatiu.vultur@microchip.com \
--to=horatiu.vultur@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=anirudh.venkataramanan@intel.com \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=ivecera@redhat.com \
--cc=jeffrey.t.kirsher@intel.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 \
/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).