From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: dsahern@gmail.com
Cc: stephen@networkplumber.org, netdev@vger.kernel.org,
oss-drivers@netronome.com, jiri@resnulli.us,
Jakub Kicinski <jakub.kicinski@netronome.com>
Subject: [PATCH iproute2-next 3/3] devlink: allow full range of resource sizes
Date: Tue, 5 Nov 2019 13:17:07 -0800 [thread overview]
Message-ID: <20191105211707.10300-4-jakub.kicinski@netronome.com> (raw)
In-Reply-To: <20191105211707.10300-1-jakub.kicinski@netronome.com>
Resource size is a 64 bit attribute at netlink level.
Make the command line argument 64 bit as well.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
---
devlink/devlink.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/devlink/devlink.c b/devlink/devlink.c
index e05a2336787a..ea3f992ee0d7 100644
--- a/devlink/devlink.c
+++ b/devlink/devlink.c
@@ -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;
--
2.23.0
next prev parent reply other threads:[~2019-11-05 21:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-05 21:17 [PATCH iproute2-next 0/3] devlink: improve parameter checking, resources and namespaces Jakub Kicinski
2019-11-05 21:17 ` [PATCH iproute2-next 1/3] devlink: fix referencing namespace by PID Jakub Kicinski
2019-11-06 8:51 ` Jiri Pirko
2019-11-05 21:17 ` [PATCH iproute2-next 2/3] devlink: catch missing strings in dl_args_required Jakub Kicinski
2019-11-06 8:52 ` Jiri Pirko
2019-11-05 21:17 ` Jakub Kicinski [this message]
2019-11-06 8:53 ` [PATCH iproute2-next 3/3] devlink: allow full range of resource sizes Jiri Pirko
2019-11-09 0:40 ` [PATCH iproute2-next 0/3] devlink: improve parameter checking, resources and namespaces David Ahern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191105211707.10300-4-jakub.kicinski@netronome.com \
--to=jakub.kicinski@netronome.com \
--cc=dsahern@gmail.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=oss-drivers@netronome.com \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).