Skip to contentSkip to conversation

vdpa: consume device_features parameter

PATCH Applied Shannon Nelson 3 participants 3 messages Sep 11, 2023 – Sep 12, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vdpa: consume device_features parameter

From: Allen Hubbe <[email protected]>

Consume the parameter to device_features when parsing command line options. Otherwise the parameter may be used again as an option name.

 # vdpa dev add ... device_features 0xdeadbeef mac 00:11:22:33:44:55
 Unknown option "0xdeadbeef"
Fixes a4442ce58ebb ("vdpa: allow provisioning device features")
---
 vdpa/vdpa.c | 2 ++
 1 file changed, 2 insertions(+)
vdpa/vdpa.c +2 -0
index 8bbe452c..6e4a9c11 100644
@@ -353,6 +353,8 @@ static int vdpa_argv_parse(struct vdpa *vdpa, int argc, char **argv,
 						&opts->device_features);
 			if (err)
 				return err;
+
+			NEXT_ARG_FWD();
 			o_found |= VDPA_OPT_VDEV_FEATURES;
 		} else {
 			fprintf(stderr, "Unknown option \"%s\"\n", *argv);
Signature · 1 line
2.17.1
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Shannon Nelson

From: Allen Hubbe <[email protected]>

Consume the parameter to device_features when parsing command line options. Otherwise the parameter may be used again as an option name.

Quoted 7 lines
 # vdpa dev add ... device_features 0xdeadbeef mac 00:11:22:33:44:55
 Unknown option "0xdeadbeef"
Fixes a4442ce58ebb ("vdpa: allow provisioning device features")

Thanks

Quoted 20 lines
---
 vdpa/vdpa.c | 2 ++
 1 file changed, 2 insertions(+)
vdpa/vdpa.c +2 -1
index 8bbe452c..6e4a9c11 100644
@@ -353,6 +353,8 @@ static int vdpa_argv_parse(struct vdpa *vdpa, int argc, char **argv,
                                                &opts->device_features);
                        if (err)
                                return err;
+
+                       NEXT_ARG_FWD();
                        o_found |= VDPA_OPT_VDEV_FEATURES;
                } else {
                        fprintf(stderr, "Unknown option \"%s\"\n", *argv);
--

2.17.1

#2 lore raw
In reply to Shannon Nelson
This patch was applied to iproute2/iproute2-next.git (main) by David Ahern <[email protected]>:

Hello:

This patch was applied to iproute2/iproute2-next.git (main) by David Ahern <[email protected]>:

Quoted 9 lines · On Mon, 11 Sep 2023 11:08:15 -0700 you wrote:

From: Allen Hubbe <[email protected]>

Consume the parameter to device_features when parsing command line options. Otherwise the parameter may be used again as an option name.

 # vdpa dev add ... device_features 0xdeadbeef mac 00:11:22:33:44:55
 Unknown option "0xdeadbeef"

[...]

Here is the summary with links:
- [iproute2] vdpa: consume device_features parameter

    https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=92eac7e4bf14

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html