From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f171.google.com ([209.85.223.171]:32880 "EHLO mail-io0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750708AbeBUFPZ (ORCPT ); Wed, 21 Feb 2018 00:15:25 -0500 Received: by mail-io0-f171.google.com with SMTP id n7so824815iob.0 for ; Tue, 20 Feb 2018 21:15:24 -0800 (PST) Subject: Re: [PATCH iproute2-next v2 2/7] iplink: Correctly report error when network device isn't found To: Serhey Popovych , netdev@vger.kernel.org References: <1519162649-22449-1-git-send-email-serhe.popovych@gmail.com> <1519162649-22449-3-git-send-email-serhe.popovych@gmail.com> From: David Ahern Message-ID: Date: Tue, 20 Feb 2018 22:15:22 -0700 MIME-Version: 1.0 In-Reply-To: <1519162649-22449-3-git-send-email-serhe.popovych@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: 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 > --- > 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.