Re: [PATCH (repost) net-next] sched: add extack for tfilter_notify

Hangbin Liu
2022-11-10T06:29:40Z

On Wed, Nov 09, 2022 at 06:20:53PM -0800, Jakub Kicinski wrote:
> Unless we want to create a separate netlink multicast channel for
> just ext acks of a family. That's fine by me, I guess. I'm mostly
> objecting to pretending notifications are multi-msg just to reuse
> NLMSG_DONE, and forcing all notification listeners to deal with it.

Hi Jakub,

Actually I'm a little curious about how should we use NLMSG_DONE.
Does a normal nlmsg(with NLM_F_MULTI flag) + a NLMSG_DONE msg illegal?
Should we need at least 2 nlmsgs + a NLMSG_DONE message.

Because when I wrote this patch, I saw some functions, like
team_nl_send_options_get(), team_nl_send_port_list_get() in team driver,
devlink_dpipe_tables_fill() in netlink.c, even netlink_dump_done(), could
*possible* only have 1 nlmsg + 1 NLMSG_DONE message.

In my understand, we can send only 1 nlmsg without NLM_F_MULTI flag. But if
there is 1 nlmsg + 1 NLMSG_DONE message. It should be considered as multi
message, and the first nlmsg need to add NLM_F_MULTI flag. Maybe there is
a little abuse of using NLMSG_DONE, but should be legal.

What do you think? Did I miss something?

Thanks
Hangbin