Re: [patch net-next v4 8/9] devlink: add a command to set notification filter and use it for multicasts

Jiri Pirko
2023-11-27T12:56:49Z

Mon, Nov 27, 2023 at 01:51:03PM CET, jiri@resnulli.us wrote:
>Mon, Nov 27, 2023 at 01:30:04PM CET, przemyslaw.kitszel@intel.com wrote:
>>On 11/23/23 19:15, Jiri Pirko wrote:
>>> From: Jiri Pirko <jiri@nvidia.com>

[...]

>>> static inline void devlink_nl_notify_send(struct devlink *devlink,
>>> struct sk_buff *msg)
>>> {
>>> - genlmsg_multicast_netns(&devlink_nl_family, devlink_net(devlink),
>>> - msg, 0, DEVLINK_MCGRP_CONFIG, GFP_KERNEL);
>>> + struct devlink_obj_desc desc;
>>
>>`= {};` would wipe out the need for memset().
>
>True. If there is going to be a respin, I'll change this.

On a second thought, since the next patch adds couple more users of
devlink_nl_obj_desc_init(), I prefer to leave the zeroing there.

>
>
>>
>>> +
>>> + devlink_nl_obj_desc_init(&desc, devlink);
>>> + devlink_nl_notify_send_desc(devlink, msg, &desc);
>>> }
>>> /* Notify */
>>
>>[snip]