devlink: allow full range of resource sizes

Resource size is a 64 bit attribute at netlink level.
Make the command line argument 64 bit as well.

Fixes: 8cd6440958 ("devlink: Add support for devlink resource abstraction")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
This commit is contained in:
Jakub Kicinski 2019-11-05 13:17:07 -08:00 committed by David Ahern
parent 1896b100af
commit c3f69bf923
1 changed files with 2 additions and 2 deletions

View File

@ -283,7 +283,7 @@ struct dl_opts {
bool dpipe_counters_enable;
bool eswitch_encap_mode;
const char *resource_path;
uint32_t resource_size;
uint64_t resource_size;
uint32_t resource_id;
bool resource_id_valid;
const char *param_name;
@ -1348,7 +1348,7 @@ static int dl_argv_parse(struct dl *dl, uint64_t o_required,
} else if (dl_argv_match(dl, "size") &&
(o_all & DL_OPT_RESOURCE_SIZE)) {
dl_arg_inc(dl);
err = dl_argv_uint32_t(dl, &opts->resource_size);
err = dl_argv_uint64_t(dl, &opts->resource_size);
if (err)
return err;
o_found |= DL_OPT_RESOURCE_SIZE;