netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iproute2] vdpa: consume device_features parameter
@ 2023-09-11 18:08 Shannon Nelson
  2023-09-12  3:18 ` Jason Wang
  2023-09-12 16:00 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Shannon Nelson @ 2023-09-11 18:08 UTC (permalink / raw)
  To: dsahern
  Cc: netdev, virtualization, mst, jasowang, si-wei.liu, 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>
Reviewed-by: Si-Wei Liu <si-wei.liu@oracle.com>
---
 vdpa/vdpa.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/vdpa/vdpa.c b/vdpa/vdpa.c
index 8bbe452c..6e4a9c11 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] 3+ messages in thread

* Re: [PATCH iproute2] vdpa: consume device_features parameter
  2023-09-11 18:08 [PATCH iproute2] vdpa: consume device_features parameter Shannon Nelson
@ 2023-09-12  3:18 ` Jason Wang
  2023-09-12 16:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Jason Wang @ 2023-09-12  3:18 UTC (permalink / raw)
  To: Shannon Nelson
  Cc: dsahern, netdev, virtualization, mst, si-wei.liu, allen.hubbe,
	drivers

On Tue, Sep 12, 2023 at 2:08 AM Shannon Nelson <shannon.nelson@amd.com> wrote:
>
> 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>
> Reviewed-by: Si-Wei Liu <si-wei.liu@oracle.com>

Acked-by: Jason Wang <jasowang@redhat.com>

Thanks

> ---
>  vdpa/vdpa.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/vdpa/vdpa.c b/vdpa/vdpa.c
> index 8bbe452c..6e4a9c11 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	[flat|nested] 3+ messages in thread

* Re: [PATCH iproute2] vdpa: consume device_features parameter
  2023-09-11 18:08 [PATCH iproute2] vdpa: consume device_features parameter Shannon Nelson
  2023-09-12  3:18 ` Jason Wang
@ 2023-09-12 16:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-09-12 16:00 UTC (permalink / raw)
  To: Nelson, Shannon
  Cc: dsahern, netdev, virtualization, mst, jasowang, si-wei.liu,
	allen.hubbe, drivers

Hello:

This patch was applied to iproute2/iproute2-next.git (main)
by David Ahern <dsahern@kernel.org>:

On Mon, 11 Sep 2023 11:08:15 -0700 you wrote:
> 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"
> 
> [...]

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

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

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-11 18:08 [PATCH iproute2] vdpa: consume device_features parameter Shannon Nelson
2023-09-12  3:18 ` Jason Wang
2023-09-12 16:00 ` patchwork-bot+netdevbpf

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