On Tue, 15 Sep 2020 15:56:48 +0300 Moshe Shemesh wrote:
> On 9/15/2020 12:33 AM, Jakub Kicinski wrote:
> >> +     if (err)
> >> +             return err;
> >> +
> >> +     WARN_ON(!actions_performed);
> >> +     msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
> >> +     if (!msg)
> >> +             return -ENOMEM;
> >> +
> >> +     err = devlink_nl_reload_actions_performed_fill(msg, devlink, 
> >> actions_performed,
> >> +                                                    DEVLINK_CMD_RELOAD, 
> >> info->snd_portid,
> >> +                                                    info->snd_seq, 0);
> >> +     if (err) {
> >> +             nlmsg_free(msg);
> >> +             return err;
> >> +     }
> >> +
> >> +     return genlmsg_reply(msg, info);  
> > I think generating the reply may break existing users. Only generate
> > the reply if request contained DEVLINK_ATTR_RELOAD_ACTION (or any other
> > new attribute which existing users can't pass).  
> 
> OK, I can do that. But I update stats and generate devlink notification 
> anyway, that should fine, right ?

Yes, that should be fine.

Reply via email to