在 2017/11/25 0:03, Jason Gunthorpe 写道: > On Fri, Nov 24, 2017 at 04:38:28PM +0800, oulijun wrote: > >>>> +int hns_roce_u_rereg_mr(struct ibv_mr *mr, int flags, struct ibv_pd *pd, >>>> + void *addr, size_t length, int access) >>>> +{ >>>> + struct ibv_rereg_mr cmd; >>>> + struct ibv_rereg_mr_resp resp; >>>> + >>>> + if (flags & IBV_REREG_MR_KEEP_VALID) >>>> + return ENOTSUP; >>> >>> You need to write the supported flags here, so the people will >>> be able to extend ibv_rereg_mr_flags without worries about your driver. >>> >>> Thanks >> I think that it maybe not write. if the hw is not supported, the user will >> not call ibv_rereg_mr and don't configure flags for IBV_REREG_MR_KEEP_VALID >> besides, the kernel will check the flags. > > Since the kernel checks it just get rid of the if statement. > > Jason > Thanks. it may be more simple. Lijun Ou > -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html