From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Jiri Pirko <jiri@resnulli.us>
Cc: netdev@vger.kernel.org, kuba@kernel.org, pabeni@redhat.com,
davem@davemloft.net, edumazet@google.com,
jacob.e.keller@intel.com, jhs@mojatatu.com,
johannes@sipsolutions.net, amritha.nambiar@intel.com,
sdf@google.com
Subject: Re: [patch net-next 6/8] genetlink: introduce helpers to do filtered multicast
Date: Wed, 15 Nov 2023 16:53:37 +0200 [thread overview]
Message-ID: <ZVTbccC0VhT4CetU@smile.fi.intel.com> (raw)
In-Reply-To: <20231115141724.411507-7-jiri@resnulli.us>
On Wed, Nov 15, 2023 at 03:17:22PM +0100, Jiri Pirko wrote:
> From: Jiri Pirko <jiri@nvidia.com>
>
> Currently it is possible for netlink kernel user to pass custom
> filter function to broadcast send function netlink_broadcast_filtered().
> However, this is not exposed to multicast send and to generic
> netlink users.
>
> Extend the api and introduce a netlink helper nlmsg_multicast_filtered()
> and a generic netlink helper genlmsg_multicast_netns_filtered()
> to allow generic netlink families to specify filter function
> while sending multicast messages.
...
> +/**
> + * genlmsg_multicast_netns_filtered - multicast a netlink message
> + * to a specific netns with filter
> + * function
> + * @family: the generic netlink family
> + * @net: the net namespace
> + * @skb: netlink message as socket buffer
> + * @portid: own netlink portid to avoid sending to yourself
> + * @group: offset of multicast group in groups array
> + * @flags: allocation flags
> + * @filter: filter function
> + * @filter_data: filter function private data
scripts/kernel-doc -v -none -Wall ...
will complain.
> + */
...
> + int (*filter)(struct sock *dsk,
> + struct sk_buff *skb,
> + void *data),
Since it occurs more than once, perhaps
typedef int (*genlmsg_filter_fn)(struct sock *, struct sk_buff *, void *);
?
...
> /**
> - * nlmsg_multicast - multicast a netlink message
> + * nlmsg_multicast_filtered - multicast a netlink message with filter function
> * @sk: netlink socket to spread messages to
> * @skb: netlink message as socket buffer
> * @portid: own netlink portid to avoid sending to yourself
> * @group: multicast group id
> * @flags: allocation flags
> + * @filter: filter function
> + * @filter_data: filter function private data
I believe same complain by kernel-doc here and in more places...
Can you at least make sure your patches do not add new ones and removes ones
where you touch the code?
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2023-11-15 14:53 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-15 14:17 [patch net-next 0/8] devlink: introduce notifications filtering Jiri Pirko
2023-11-15 14:17 ` [patch net-next 1/8] devlink: use devl_is_registered() helper instead xa_get_mark() Jiri Pirko
2023-11-15 20:11 ` Jacob Keller
2023-11-15 14:17 ` [patch net-next 2/8] devlink: introduce __devl_is_registered() helper and use it instead of xa_get_mark() Jiri Pirko
2023-11-15 20:11 ` Jacob Keller
2023-11-15 14:17 ` [patch net-next 3/8] devlink: send notifications only if there are listeners Jiri Pirko
2023-11-15 20:17 ` Jacob Keller
2023-11-16 7:14 ` Jiri Pirko
2023-11-15 14:17 ` [patch net-next 4/8] devlink: introduce a helper for netlink multicast send Jiri Pirko
2023-11-15 20:18 ` Jacob Keller
2023-11-15 14:17 ` [patch net-next 5/8] genetlink: implement release callback and free sk_user_data there Jiri Pirko
2023-11-15 14:17 ` [patch net-next 6/8] genetlink: introduce helpers to do filtered multicast Jiri Pirko
2023-11-15 14:53 ` Andy Shevchenko [this message]
2023-11-15 20:20 ` Jacob Keller
2023-11-16 7:15 ` Jiri Pirko
2023-11-15 14:17 ` [patch net-next 7/8] devlink: add a command to set notification filter and use it for multicasts Jiri Pirko
2023-11-15 14:17 ` [patch net-next 8/8] devlink: extend multicast filtering by port index Jiri Pirko
2023-11-15 15:08 ` Andy Shevchenko
2023-11-16 7:10 ` Jiri Pirko
2023-11-16 9:14 ` [patch net-next 0/8] devlink: introduce notifications filtering Jiri Pirko
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=ZVTbccC0VhT4CetU@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=amritha.nambiar@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jacob.e.keller@intel.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@google.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).