Re: [PATCH iproute2 rdma: Ignore unknown netlink attributes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 03, 2018 at 08:32:36AM -0500, Steve Wise wrote:
>
>
> > -----Original Message-----
> > From: Leon Romanovsky <leon@xxxxxxxxxx>
> > Sent: Tuesday, April 3, 2018 2:29 AM
> > To: Stephen Hemminger <stephen@xxxxxxxxxxxxxxxxxx>
> > Cc: Leon Romanovsky <leonro@xxxxxxxxxxxx>; netdev
> > <netdev@xxxxxxxxxxxxxxx>; RDMA mailing list <linux-
> > rdma@xxxxxxxxxxxxxxx>; David Ahern <dsahern@xxxxxxxxx>; Steve Wise
> > <swise@xxxxxxxxxxxxxxxxxxxxx>
> > Subject: [PATCH iproute2 rdma: Ignore unknown netlink attributes
> >
> > From: Leon Romanovsky <leonro@xxxxxxxxxxxx>
> >
> > 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@xxxxxxxxxxxxxxxxxxxxx>
> > Fixes: 74bd75c2b68d ("rdma: Add basic infrastructure for RDMA tool")
> > Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>
> > ---
> >  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@xxxxxxxxxxxxxxxxxxxxx>
>

Thanks a lot.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux