RE: [PATCH v3 4/4] IB/sa: Route SA pathrecord query through netlink

Hefty, Sean
2015-06-05T20:53:01Z

> Yes, I saw Sean's comment, and I am glad we all understand there are
> only 3 callers. And looking at the callers there are only a small
> number of elements being used:
>
> rdma cm:
> IB_SA_PATH_REC_DGID | IB_SA_PATH_REC_SGID |
> IB_SA_PATH_REC_PKEY | IB_SA_PATH_REC_NUMB_PATH |
> IB_SA_PATH_REC_REVERSIBLE | IB_SA_PATH_REC_SERVICE_ID;
> IB_SA_PATH_REC_QOS_CLASS;
> IB_SA_PATH_REC_TRAFFIC_CLASS
>
> ipoib:
> IB_SA_PATH_REC_DGID |
> IB_SA_PATH_REC_SGID |
> IB_SA_PATH_REC_NUMB_PATH |
> IB_SA_PATH_REC_TRAFFIC_CLASS |
> IB_SA_PATH_REC_PKEY,
>
> srp:
> IB_SA_PATH_REC_SERVICE_ID |
> IB_SA_PATH_REC_DGID |
> IB_SA_PATH_REC_SGID |
> IB_SA_PATH_REC_NUMB_PATH |
> IB_SA_PATH_REC_PKEY,
>
> So, rather than a SA mad in netlink, I'd suggest actually using
> extensible netlink here and define the query cleanly using nested
> attributes:
>
> RDMA_OP_RESOLVE (request)
> GIDS
> SERVICE_ID
> QOS/TCLASS
> PKEY
> QP TYPE (aka reversible)
>
> RDMA_OP_RESOLVE (reply)
> IB_PATH
> IB_PATH
> IB_PATH

I thought you were asking to move the hook site. This approach seems reasonable. We should just need to add a check against the compmask.