On Fri, Jan 15, 2021 at 04:58:58AM +0000, Bryan Tan wrote: > > From: Jason Gunthorpe <jgg@xxxxxxxxxx> > > Sent: Friday, January 15, 2021 1:24 AM > > On Thu, Jan 14, 2021 at 06:26:48AM -0800, Bryan Tan wrote: > > > The PVRDMA device defines network_hdr_type according to an old > > > definition of the rdma_network_type enum that has since changed, > > > resulting in the wrong rdma_network_type being reported. Fix this by > > > explicitly defining the enum used by the PVRDMA device and adding a > > > function to convert the pvrdma_network_type to rdma_network_type enum. > > > > How come I can't find anything reading this in rdma-core? > > > > $ ~/oss/rdma-core#git grep network_hdr_type > > kernel-headers/rdma/vmw_pvrdma-abi.h: __u8 network_hdr_type; > > > > ?? > > network_hdr_type isn't exposed in the userspace WC ibv_wc. So this is "HW" API then? > Given that the field is only in the kernel side, it didn't seem like > we should add the new enum to vmw_pvrdma-abi.h either. Well, the struct that holds the value is in a uapi header, so the definition should be too. If you are defining HW data in uapi then may as well define all of it. Jason