[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <181dbb5d-488b-eff7-6e18-d064660b26f9@gmail.com>
Date: Wed, 21 Feb 2018 09:14:38 +0200
From: Serhey Popovych <serhe.popovych@...il.com>
To: David Ahern <dsahern@...il.com>, netdev@...r.kernel.org
Subject: Re: [PATCH iproute2-next v2 2/7] iplink: Correctly report error when
network device isn't found
David Ahern wrote:
> On 2/20/18 2:37 PM, Serhey Popovych wrote:
>> Distinguish cases when "dev" parameter isn't given from cases where no
>> network device corresponding to "dev" is found.
>>
>> Do not check for index validity in xdp_parse(): caller should take care
>> of this because has more information (e.g. when "dev" is given or not
>> found) for this.
>>
>> Signed-off-by: Serhey Popovych <serhe.popovych@...il.com>
>> ---
>> ip/iplink.c | 16 +++++++++++++---
>> ip/iplink_xdp.c | 7 +------
>> 2 files changed, 14 insertions(+), 9 deletions(-)
>>
>
> don't really see any benefit from this one.
This clearly shows to user what is wrong with it's command line: either
dev/name is missing while parsing VF/XDP or it specifies non existent
network device (or at least ll_name_to_index() can't resolve it).
Moving ifindex check from xdp_parse() to the caller is done to
consolidate all dev/name parsing and validating code in single place:
iplink_parse().
>
Download attachment "signature.asc" of type "application/pgp-signature" (491 bytes)
Powered by blists - more mailing lists