netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Steve Wise" <swise@opengridcomputing.com>
To: "'Leon Romanovsky'" <leon@kernel.org>,
	"'Stephen Hemminger'" <stephen@networkplumber.org>
Cc: "'Leon Romanovsky'" <leonro@mellanox.com>,
	"'netdev'" <netdev@vger.kernel.org>,
	"'RDMA mailing list'" <linux-rdma@vger.kernel.org>,
	"'David Ahern'" <dsahern@gmail.com>
Subject: RE: [PATCH iproute2 rdma: Ignore unknown netlink attributes
Date: Tue, 3 Apr 2018 08:32:36 -0500	[thread overview]
Message-ID: <016b01d3cb50$3adc88b0$b0959a10$@opengridcomputing.com> (raw)
In-Reply-To: <20180403072842.32153-1-leon@kernel.org>



> -----Original Message-----
> From: Leon Romanovsky <leon@kernel.org>
> Sent: Tuesday, April 3, 2018 2:29 AM
> To: Stephen Hemminger <stephen@networkplumber.org>
> Cc: Leon Romanovsky <leonro@mellanox.com>; netdev
> <netdev@vger.kernel.org>; RDMA mailing list <linux-
> rdma@vger.kernel.org>; David Ahern <dsahern@gmail.com>; Steve Wise
> <swise@opengridcomputing.com>
> Subject: [PATCH iproute2 rdma: Ignore unknown netlink attributes
> 
> From: Leon Romanovsky <leonro@mellanox.com>
> 
> The check if netlink attributes supplied more than maximum supported
> is to strict and may lead to backward compatibility issues with old
> application with a newer kernel that supports new attribute.
> 
> CC: Steve Wise <swise@opengridcomputing.com>
> Fixes: 74bd75c2b68d ("rdma: Add basic infrastructure for RDMA tool")
> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
> ---
>  rdma/utils.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/rdma/utils.c b/rdma/utils.c
> index a2e08e91..5c1e736a 100644
> --- a/rdma/utils.c
> +++ b/rdma/utils.c
> @@ -399,7 +399,8 @@ int rd_attr_cb(const struct nlattr *attr, void *data)
>  	int type;
> 
>  	if (mnl_attr_type_valid(attr, RDMA_NLDEV_ATTR_MAX) < 0)
> -		return MNL_CB_ERROR;
> +		/* We received uknown attribute */
> +		return MNL_CB_OK;
> 
>  	type = mnl_attr_get_type(attr);
> 

Hey Leon,

So the resource parsing functions correctly ignore the unkown attrs and
print everything else?

Looks good.

Reviewed-by: Steve Wise <swise@opengridcomputing.com>

  reply	other threads:[~2018-04-03 13:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-03  7:28 [PATCH iproute2 rdma: Ignore unknown netlink attributes Leon Romanovsky
2018-04-03 13:32 ` Steve Wise [this message]
2018-04-04  5:42   ` Leon Romanovsky
2018-04-04 23:43 ` Stephen Hemminger

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='016b01d3cb50$3adc88b0$b0959a10$@opengridcomputing.com' \
    --to=swise@opengridcomputing.com \
    --cc=dsahern@gmail.com \
    --cc=leon@kernel.org \
    --cc=leonro@mellanox.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.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).