> From: Jason Gunthorpe [mailto:[email protected]] > Sent: Thursday, June 11, 2015 3:27 PM > To: Wan, Kaike > Cc: [email protected]; Fleck, John; Weiny, Ira > Subject: Re: [PATCH v5 1/1] ibacm: Add support for pathrecord query > through netlink > > On Thu, Jun 11, 2015 at 06:52:19PM +0000, Wan, Kaike wrote: > > > From: Jason Gunthorpe [mailto:[email protected]] > > > Sent: Thursday, June 11, 2015 2:47 PM > > > To: Wan, Kaike > > > Cc: [email protected]; Fleck, John; Weiny, Ira > > > Subject: Re: [PATCH v5 1/1] ibacm: Add support for pathrecord query > > > through netlink > > > > > > On Thu, Jun 11, 2015 at 06:31:53PM +0000, Wan, Kaike wrote: > > > > 1. all mandatory attributes must be present in the message. > > > > Otherwise, the request is invalid. > > > > > > All mandatory attributes that are present must be supported or the > > > user space side cannot answer the request. > > > > Then I will define all mandatory attribute types and check against them on > the user space side. > > You need to handle the case where a new kernel gains a new mandatory > attribute type. A list in user space does not seem to handle that.
Can the mandatory list be defined within rdma_netlink.h and exported to user? or we use a new bit in attribute type (bit 13) to define the attribute as "Mandatory": #define RDMA_NLA_F_MANDATORY (1 << 13) #define RDMA_NLA_TYPE_MASK ~(NLA_F_NESTED | NLA_F_NET_BYTEORDER | RDMA_NLA_F_MANDATORY) In this case, kernel will use (RDMA_NLA_F_MANDATORY | type) to inform user space that this attribute is mandatory. > > Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
