lkml.org 
[lkml]   [2020]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next 02/16] devlink: Add reload action option to devlink reload command
Thu, Oct 01, 2020 at 03:59:05PM CEST, moshe@mellanox.com wrote:

[...]

>+static int
>+devlink_nl_reload_actions_performed_snd(struct devlink *devlink,
>+ unsigned long actions_performed,
>+ enum devlink_command cmd, struct genl_info *info)
>+{
>+ struct sk_buff *msg;
>+ void *hdr;
>+
>+ msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
>+ if (!msg)
>+ return -ENOMEM;
>+
>+ hdr = genlmsg_put(msg, info->snd_portid, info->snd_seq, &devlink_nl_family, 0, cmd);
>+ if (!hdr)
>+ goto free_msg;
>+
>+ if (devlink_nl_put_handle(msg, devlink))
>+ goto nla_put_failure;
>+
>+ if (nla_put_u64_64bit(msg, DEVLINK_ATTR_RELOAD_ACTIONS_PERFORMED, actions_performed,

This should be NLA_BITFIELD, I believe. We use it for other bitfields
too.


>+ DEVLINK_ATTR_PAD))

[...]

\
 
 \ /
  Last update: 2020-10-03 09:52    [W:0.257 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site