Thread (13 messages) 13 messages, 3 authors, 2018-02-21

Re: [PATCH iproute2-next v2 2/7] iplink: Correctly report error when network device isn't found

flat view

From: Serhey Popovych <hidden>
Date: 2018-02-21 07:14:47

David Ahern wrote:
On 2/20/18 2:37 PM, Serhey Popovych wrote:
quoted
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 <redacted>
---
 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().
  

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help