netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Serhey Popovych <serhe.popovych@gmail.com>
To: David Ahern <dsahern@gmail.com>, netdev@vger.kernel.org
Subject: Re: [PATCH iproute2-next v2 2/7] iplink: Correctly report error when network device isn't found
Date: Wed, 21 Feb 2018 09:14:38 +0200	[thread overview]
Message-ID: <181dbb5d-488b-eff7-6e18-d064660b26f9@gmail.com> (raw)
In-Reply-To: <f2c67d30-1a85-305c-9b7b-f0f7c86cd056@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1010 bytes --]

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@gmail.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().

> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

  reply	other threads:[~2018-02-21  7:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-20 21:37 [PATCH iproute2-next v2 0/7] iplink: Improve iplink_parse() Serhey Popovych
2018-02-20 21:37 ` [PATCH iproute2-next v2 1/7] utils: Introduce and use nodev() helper routine Serhey Popovych
2018-02-21  5:13   ` David Ahern
2018-02-20 21:37 ` [PATCH iproute2-next v2 2/7] iplink: Correctly report error when network device isn't found Serhey Popovych
2018-02-21  5:15   ` David Ahern
2018-02-21  7:14     ` Serhey Popovych [this message]
2018-02-20 21:37 ` [PATCH iproute2-next v2 3/7] iplink: Use "dev" and "name" parameters interchangeable when possible Serhey Popovych
2018-02-20 23:04   ` Stephen Hemminger
2018-02-21  6:35     ` Serhey Popovych
2018-02-20 21:37 ` [PATCH iproute2-next v2 4/7] iplink: Follow documented behaviour when "index" is given Serhey Popovych
2018-02-20 21:37 ` [PATCH iproute2-next v2 5/7] iplink: Perform most of request buffer setups and checks in iplink_parse() Serhey Popovych
2018-02-20 21:37 ` [PATCH iproute2-next v2 6/7] iplink: Move data structures to block of their users Serhey Popovych
2018-02-20 21:37 ` [PATCH iproute2-next v2 7/7] iplink: Reduce number of arguments to iplink_parse() Serhey Popovych

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=181dbb5d-488b-eff7-6e18-d064660b26f9@gmail.com \
    --to=serhe.popovych@gmail.com \
    --cc=dsahern@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).