* [PATCH iproute2 rdma: Ignore unknown netlink attributes
@ 2018-04-03 7:28 Leon Romanovsky
2018-04-03 13:32 ` Steve Wise
2018-04-04 23:43 ` Stephen Hemminger
0 siblings, 2 replies; 4+ messages in thread
From: Leon Romanovsky @ 2018-04-03 7:28 UTC (permalink / raw)
To: Stephen Hemminger
Cc: Leon Romanovsky, netdev, RDMA mailing list, David Ahern, Steve Wise
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);
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [PATCH iproute2 rdma: Ignore unknown netlink attributes
2018-04-03 7:28 [PATCH iproute2 rdma: Ignore unknown netlink attributes Leon Romanovsky
@ 2018-04-03 13:32 ` Steve Wise
2018-04-04 5:42 ` Leon Romanovsky
2018-04-04 23:43 ` Stephen Hemminger
1 sibling, 1 reply; 4+ messages in thread
From: Steve Wise @ 2018-04-03 13:32 UTC (permalink / raw)
To: 'Leon Romanovsky', 'Stephen Hemminger'
Cc: 'Leon Romanovsky', 'netdev',
'RDMA mailing list', 'David Ahern'
> -----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>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH iproute2 rdma: Ignore unknown netlink attributes
2018-04-03 13:32 ` Steve Wise
@ 2018-04-04 5:42 ` Leon Romanovsky
0 siblings, 0 replies; 4+ messages in thread
From: Leon Romanovsky @ 2018-04-04 5:42 UTC (permalink / raw)
To: Steve Wise
Cc: 'Stephen Hemminger', 'netdev',
'RDMA mailing list', 'David Ahern'
[-- Attachment #1: Type: text/plain, Size: 1699 bytes --]
On Tue, Apr 03, 2018 at 08:32:36AM -0500, Steve Wise wrote:
>
>
> > -----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?
Yes.
>
> Looks good.
>
> Reviewed-by: Steve Wise <swise@opengridcomputing.com>
>
Thanks a lot.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH iproute2 rdma: Ignore unknown netlink attributes
2018-04-03 7:28 [PATCH iproute2 rdma: Ignore unknown netlink attributes Leon Romanovsky
2018-04-03 13:32 ` Steve Wise
@ 2018-04-04 23:43 ` Stephen Hemminger
1 sibling, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2018-04-04 23:43 UTC (permalink / raw)
To: Leon Romanovsky
Cc: Leon Romanovsky, netdev, RDMA mailing list, David Ahern, Steve Wise
On Tue, 3 Apr 2018 10:28:42 +0300
Leon Romanovsky <leon@kernel.org> wrote:
> 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>
Applied
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-04-04 23:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-03 7:28 [PATCH iproute2 rdma: Ignore unknown netlink attributes Leon Romanovsky
2018-04-03 13:32 ` Steve Wise
2018-04-04 5:42 ` Leon Romanovsky
2018-04-04 23:43 ` Stephen Hemminger
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).