From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH iproute2] devlink: Ignore unknown attributes Date: Thu, 18 Jan 2018 20:42:44 -0800 Message-ID: <695fecfe-c45e-4a83-cee8-0476ee56d422@gmail.com> References: <1516195680-33683-1-git-send-email-arkadis@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: davem@davemloft.net, stephen@networkplumber.org, mlxsw@mellanox.com To: Arkadi Sharshevsky , netdev@vger.kernel.org Return-path: Received: from mail-pg0-f65.google.com ([74.125.83.65]:39952 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750757AbeASEmw (ORCPT ); Thu, 18 Jan 2018 23:42:52 -0500 Received: by mail-pg0-f65.google.com with SMTP id g16so524348pgn.7 for ; Thu, 18 Jan 2018 20:42:52 -0800 (PST) In-Reply-To: <1516195680-33683-1-git-send-email-arkadis@mellanox.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 1/17/18 5:28 AM, Arkadi Sharshevsky wrote: > In case of extending the UAPI old packages would break. > > Signed-off-by: Arkadi Sharshevsky > --- > devlink/devlink.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/devlink/devlink.c b/devlink/devlink.c > index 39cda06..c9d1838 100644 > --- a/devlink/devlink.c > +++ b/devlink/devlink.c > @@ -343,7 +343,7 @@ static int attr_cb(const struct nlattr *attr, void *data) > int type; > > if (mnl_attr_type_valid(attr, DEVLINK_ATTR_MAX) < 0) > - return MNL_CB_ERROR; > + return MNL_CB_OK; > > type = mnl_attr_get_type(attr); > if (mnl_attr_validate(attr, devlink_policy[type]) < 0) > What's the point of calling mnl_attr_type_valid if you disregard a failure? you might as well not call mnl_attr_type_valid at all.