On 1/7/19 11:17 AM, Jason Gunthorpe wrote: > On Mon, Jan 07, 2019 at 07:08:36PM +0000, Adit Ranadive wrote: >> On 1/7/19 10:59 AM, Jason Gunthorpe wrote: >>> On Mon, Jan 07, 2019 at 06:53:24PM +0000, Adit Ranadive wrote: >>>> From: Adit Ranadive <aditr@xxxxxxxxxx> >>>> >>>> Since the IB_WR_REG_MR opcode value changed, set some of the PVRDMA device >>>> opcodes explicitly. >>>> >>>> Reported-by: Ruishuang Wang <ruishuangw@xxxxxxxxxx> >>>> Fixes: 9a59739bd01f ("IB/rxe: Revise the ib_wr_opcode enum") >>>> Cc: stable@xxxxxxxxxxxxxxx >>>> Reviewed-by: Bryan Tan <bryantan@xxxxxxxxxx> >>>> Reviewed-by: Ruishuang Wang <ruishuangw@xxxxxxxxxx> >>>> Reviewed-by: Vishnu Dasa <vdasa@xxxxxxxxxx> >>>> Signed-off-by: Adit Ranadive <aditr@xxxxxxxxxx> >>>> drivers/infiniband/hw/vmw_pvrdma/pvrdma.h | 21 ++++++++++++++++++++- >>>> 1 file changed, 20 insertions(+), 1 deletion(-) >>> >>> So naughty!! How many other places in this driver are assuming the >>> intenal IB constants are stable? >>> >>> Did you audit for other cases? >> >> Lots of places. Though its the values shared with userspace, like QP types, >> IB MTUs, etc. Unless you foresee changes to those .. > > Constants declared in the include/uapi header should be OK, but you > still need to check that the constants you are using are actually in > that header and either recode them or move them into uapi, as > appropriate. > > When constants get moved we may find more mistakes like this that > cause the kernel view to change. > > Jason > Thanks. Yeah, I was afraid we might have to do something like that. Okay, I'll send a v1 for this patch and more updates later for 5.1 inclusion if possible. Thanks, Adit