From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
To: Horatiu Vultur <horatiu.vultur@microchip.com>,
davem@davemloft.net, jiri@resnulli.us, ivecera@redhat.com,
kuba@kernel.org, roopa@cumulusnetworks.com, olteanv@gmail.com,
andrew@lunn.ch, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, bridge@lists.linux-foundation.org,
UNGLinuxDriver@microchip.com
Subject: Re: [RFC net-next v5 3/9] bridge: mrp: Expose function br_mrp_port_open
Date: Sat, 18 Apr 2020 11:11:21 +0300 [thread overview]
Message-ID: <2b387697-0e4c-7d8a-ae52-d1e8ce1f6bf4@cumulusnetworks.com> (raw)
In-Reply-To: <20200414112618.3644-4-horatiu.vultur@microchip.com>
On 14/04/2020 14:26, Horatiu Vultur wrote:
> In case the HW is capable to detect when the MRP ring is open or closed. It is
> expected that the network driver will notify the SW that the ring is open or
> closed.
>
> The function br_mrp_port_open is used to notify the kernel that one of the ports
> stopped receiving MRP_Test frames. The argument 'loc' has a value of '1' when
> the port stopped receiving MRP_Test and '0' when it started to receive MRP_Test.
>
> Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
> ---
> include/linux/mrp_bridge.h | 24 ++++++++++++++++++++++++
> 1 file changed, 24 insertions(+)
> create mode 100644 include/linux/mrp_bridge.h
>
> diff --git a/include/linux/mrp_bridge.h b/include/linux/mrp_bridge.h
> new file mode 100644
> index 000000000000..23d46b356263
> --- /dev/null
> +++ b/include/linux/mrp_bridge.h
> @@ -0,0 +1,24 @@
> +/* SPDX-License-Identifier: GPL-2.0-or-later */
> +
> +#ifndef _LINUX_MRP_BRIDGE_H
> +#define _LINUX_MRO_BRIDGE_H
> +
> +#include <linux/netdevice.h>
> +
> +/* The drivers are responsible to call this function when it detects that the
> + * MRP port stopped receiving MRP_Test frames or it started to receive MRP_Test.
> + * The argument dev represents the port and loc(Lost of Continuity) has a value
> + * of 1 when it stopped receiving MRP_Test frames and a value of 0 when it
> + * started to receive frames.
> + *
> + * This eventually notify the userspace which is required to react on these
> + * changes.
> + */
> +
> +#if IS_ENABLED(CONFIG_BRIDGE_MRP)
> +int br_mrp_port_open(struct net_device *dev, u8 loc);
> +#else
> +inline int br_mrp_port_open(struct net_device *dev, u8 loc) {}
static and put {} on their own, check how such functions are defined in other places (e.g. br_private.h)
but in general I think you can drop this function favor of br_ifinfo_notify(). More about that in my review
of next patches.
> +#endif
> +
> +#endif
>
next prev parent reply other threads:[~2020-04-18 8:11 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-14 11:26 [RFC net-next v5 0/9] net: bridge: mrp: Add support for Media Redundancy Protocol(MRP) Horatiu Vultur
2020-04-14 11:26 ` [RFC net-next v5 1/9] bridge: uapi: mrp: Add mrp attributes Horatiu Vultur
2020-04-14 11:26 ` [RFC net-next v5 2/9] bridge: mrp: Update Kconfig and Makefile Horatiu Vultur
2020-04-18 8:49 ` Nikolay Aleksandrov
2020-04-14 11:26 ` [RFC net-next v5 3/9] bridge: mrp: Expose function br_mrp_port_open Horatiu Vultur
2020-04-18 8:11 ` Nikolay Aleksandrov [this message]
2020-04-18 15:29 ` Horatiu Vultur
2020-04-14 11:26 ` [RFC net-next v5 4/9] bridge: mrp: Add MRP interface Horatiu Vultur
2020-04-14 11:26 ` [RFC net-next v5 5/9] switchdev: mrp: Extend switchdev API to offload MRP Horatiu Vultur
2020-04-14 11:26 ` [RFC net-next v5 6/9] bridge: switchdev: mrp: Implement MRP API for switchdev Horatiu Vultur
2020-04-14 11:26 ` [RFC net-next v5 7/9] bridge: mrp: Connect MRP API with the switchev API Horatiu Vultur
2020-04-18 8:46 ` Nikolay Aleksandrov
2020-04-18 14:57 ` Horatiu Vultur
2020-04-18 8:50 ` Nikolay Aleksandrov
2020-04-14 11:26 ` [RFC net-next v5 8/9] bridge: mrp: Implement netlink interface to configure MRP Horatiu Vultur
2020-04-18 8:21 ` Nikolay Aleksandrov
2020-04-18 14:48 ` Horatiu Vultur
2020-04-18 8:34 ` Nikolay Aleksandrov
2020-04-18 14:51 ` Horatiu Vultur
2020-04-14 11:26 ` [RFC net-next v5 9/9] bridge: mrp: Integrate MRP into the bridge Horatiu Vultur
2020-04-18 8:25 ` Nikolay Aleksandrov
2020-04-18 14:44 ` Horatiu Vultur
2020-04-18 9:01 ` [RFC net-next v5 0/9] net: bridge: mrp: Add support for Media Redundancy Protocol(MRP) Nikolay Aleksandrov
2020-04-18 15:03 ` 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=2b387697-0e4c-7d8a-ae52-d1e8ce1f6bf4@cumulusnetworks.com \
--to=nikolay@cumulusnetworks.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=horatiu.vultur@microchip.com \
--cc=ivecera@redhat.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--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
all inboxes | Powered by JetHome®