From: jgg@ziepe.ca (Jason Gunthorpe) Date: Fri, 12 Jul 2019 14:42:20 -0300 Subject: regression: nvme rdma with bnxt_re0 broken In-Reply-To: References: <66d43fd8-18e8-8b9d-90e3-ee2804d56889@redhat.com> <20190712154044.GJ27512@ziepe.ca> Message-ID: <20190712174220.GL27512@ziepe.ca> On Fri, Jul 12, 2019@09:59:38PM +0530, Selvin Xavier wrote: > > bnxt guys: please just delete this duplicate detection code from the > > driver. Every GID provided from the core must be programmed into the > > given gid table index. > > Jason, > This check is required in bnxt_re because the HW need only one entry > in its table for RoCE V1 and RoCE v2 Gids. The HW doesn't have a 'GID table' if it has this restriction. It sounds like it has some 'IP table' or maybe 'IP and VLAN' table? So the driver must provide a full emulated 'GID Table' with all the normal semantics. Which looks sort of like what the add side is doing, other than the mis-naming it seems reasonable.. But then I see this in re_create_ah: /* * If RoCE V2 is enabled, stack will have two entries for * each GID entry. Avoiding this duplicte entry in HW. Dividing * the GID index by 2 for RoCE V2 */ ah->qplib_ah.sgid_index = grh->sgid_index / 2; Which seems completely wrong - that is making assumptions about the layout of the gid table that is just not allowed. Surely it needs to access the per-gid driver context that add_gid set and use the index into the sgid_table from there? Jason