On Wed, Nov 01, 2017 at 05:27:22PM +0000, Amrani, Ram wrote: > > WTF is this? > > > > Based on the comment it should be: > > > > if (attr_mask & ~((1ULL << (IBV_QP_DEST_QPN + 1)) - 1)) > > > > To match the comment. And other places have the same mistake. > > This was broken recently by 3ca7a1031486b588a7fbe0d262f8f89738215b58 > > > > Bodong?? > > > > Oh yeah, that too. > But my point is that even after I've fixed this (I haven't checked other locations), > then backwardly compatibility is foo because the above check fails. > If you take a look at that kernel you can see it sets IB_QP_SMAC in attr_mask > and returns it to the user space. When modify QP is invoked it fails on that > check (IB_QP_DEST_QPN < IB_QP_SMAC). rdma-cm sets it? > This happens perhaps for the other bits. Haven't checked it yet. Yes, that test should pass all the historical bits supported by all older kernels. // Anything including and beyond RATE_LIMIT must use the _ex API if (attr_mask & ~((1ULL << IBV_QP_RATE_LIMIT) - 1)) > Also, currently they are marked in ib_verbs.h as reserved. This is misleading as > it hints they are for future use. We should mark them as don't ever use. We have tended to use reserved to mean dont use. Someone should inspect the git history before trying to use a reserved value.. Jason -- 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