netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vdpa: consume device_features parameter
@ 2023-05-12 16:41 Shannon Nelson
  2023-05-17  5:56 ` Jason Wang
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Shannon Nelson @ 2023-05-12 16:41 UTC (permalink / raw)
  To: dsahern
  Cc: netdev, virtualization, mst, jasowang, shannon.nelson,
	allen.hubbe, drivers

From: Allen Hubbe <allen.hubbe@amd.com>

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")
Signed-off-by: Allen Hubbe <allen.hubbe@amd.com>
Reviewed-by: Shannon Nelson <shannon.nelson@amd.com>
---
 vdpa/vdpa.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/vdpa/vdpa.c b/vdpa/vdpa.c
index 27647d73d498..8a2fca8647b6 100644
--- a/vdpa/vdpa.c
+++ b/vdpa/vdpa.c
@@ -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


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-09-12  0:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-12 16:41 [PATCH] vdpa: consume device_features parameter Shannon Nelson
2023-05-17  5:56 ` Jason Wang
2023-05-18  6:51 ` Eugenio Perez Martin
2023-09-07 20:41 ` Si-Wei Liu
2023-09-07 23:02   ` Nelson, Shannon
2023-09-08  0:07   ` David Ahern
2023-09-08 18:37     ` Si-Wei Liu
2023-09-09 20:36       ` David Ahern
2023-09-12  0:33         ` Si-Wei Liu

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).