[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cf18752f-9b67-7cc2-ba88-16f13ef618bc@gmail.com>
Date: Fri, 23 Feb 2018 16:41:47 -0700
From: David Ahern <dsahern@...il.com>
To: Serhey Popovych <serhe.popovych@...il.com>, netdev@...r.kernel.org
Subject: Re: [PATCH iproute2-next v3 2/8] iplink: Correctly report error when
network device isn't found
On 2/22/18 6:02 AM, Serhey Popovych wrote:
> @@ -650,6 +658,9 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req,
> bool drv = strcmp(*argv, "xdpdrv") == 0;
> bool offload = strcmp(*argv, "xdpoffload") == 0;
>
> + if (offload)
> + has_dev(*dev, dev_index);
> +
I think this is actually the wrong direction. seems to me argv should be
passed to xdp_parse rather than the generic, drv, offload bool's. That
function can then the check on which option it is and has the knowledge
about whether a device is needed or not.
> NEXT_ARG();
> if (xdp_parse(&argc, &argv, req, dev_index,
> generic, drv, offload))
Powered by blists - more mailing lists