netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Tobias Waldekranz <tobias@waldekranz.com>
Cc: davem@davemloft.net, kuba@kernel.org, jiri@resnulli.us,
	ivecera@redhat.com, netdev@vger.kernel.org, roopa@nvidia.com,
	razor@blackwall.org, bridge@lists.linux.dev, rostedt@goodmis.org,
	mhiramat@kernel.org, linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 3/5] net: switchdev: Relay all replay messages through a central function
Date: Wed, 24 Jan 2024 10:14:02 +0000	[thread overview]
Message-ID: <20240124101402.GU254773@kernel.org> (raw)
In-Reply-To: <20240123153707.550795-4-tobias@waldekranz.com>

On Tue, Jan 23, 2024 at 04:37:05PM +0100, Tobias Waldekranz wrote:

...

> diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c
> index 5b045284849e..05f22f971312 100644
> --- a/net/switchdev/switchdev.c
> +++ b/net/switchdev/switchdev.c
> @@ -307,6 +307,23 @@ int switchdev_port_obj_del(struct net_device *dev,
>  }
>  EXPORT_SYMBOL_GPL(switchdev_port_obj_del);
>  
> +/**
> + *	switchdev_replay - Replay switchdev message to driver

nit: switchdev_call_replay

> + *	@nb: notifier block to send the message to
> + *	@val: value passed unmodified to notifier function

nit: this should document @type rather than @value

> + *	@info: notifier information data
> + *
> + *	Typically issued by the bridge, as a response to a replay
> + *	request initiated by a port that is either attaching to, or
> + *	detaching from, that bridge.
> + */
> +int switchdev_call_replay(struct notifier_block *nb, unsigned long type,
> +			  struct switchdev_notifier_info *info)
> +{
> +	return nb->notifier_call(nb, type, info);
> +}
> +EXPORT_SYMBOL_GPL(switchdev_call_replay);
> +
>  static ATOMIC_NOTIFIER_HEAD(switchdev_notif_chain);
>  static BLOCKING_NOTIFIER_HEAD(switchdev_blocking_notif_chain);
>  
> -- 
> 2.34.1
> 

  reply	other threads:[~2024-01-24 10:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-23 15:37 [PATCH net-next 0/5] net: switchdev: Tracepoints Tobias Waldekranz
2024-01-23 15:37 ` [PATCH net-next 1/5] net: switchdev: Wrap enums in mapper macros Tobias Waldekranz
2024-01-23 15:37 ` [PATCH net-next 2/5] net: switchdev: Add helpers to display switchdev objects as strings Tobias Waldekranz
2024-01-23 15:37 ` [PATCH net-next 3/5] net: switchdev: Relay all replay messages through a central function Tobias Waldekranz
2024-01-24 10:14   ` Simon Horman [this message]
2024-01-26  6:07   ` kernel test robot
2024-01-23 15:37 ` [PATCH net-next 4/5] net: switchdev: Prepare deferred notifications before enqueuing them Tobias Waldekranz
2024-01-23 15:37 ` [PATCH net-next 5/5] net: switchdev: Add tracepoints Tobias Waldekranz

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=20240124101402.GU254773@kernel.org \
    --to=horms@kernel.org \
    --cc=bridge@lists.linux.dev \
    --cc=davem@davemloft.net \
    --cc=ivecera@redhat.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=razor@blackwall.org \
    --cc=roopa@nvidia.com \
    --cc=rostedt@goodmis.org \
    --cc=tobias@waldekranz.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).