On Thu, May 17, 2018 at 8:59 AM, Leon Romanovsky <leon@xxxxxxxxxx> wrote: > On Wed, May 16, 2018 at 12:27:22PM -0600, Jason Gunthorpe wrote: >> On Tue, May 08, 2018 at 05:25:09PM +0300, Leon Romanovsky wrote: >> >> > diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h >> > index d84e6b6a8a56..2323a5624161 100644 >> > +++ b/include/rdma/ib_verbs.h >> > @@ -455,6 +455,7 @@ enum ib_port_cap_flags { >> > IB_PORT_LINK_LATENCY_SUP = 1 << 24, >> > IB_PORT_CLIENT_REG_SUP = 1 << 25, >> > IB_PORT_IP_BASED_GIDS = 1 << 26, >> > + IB_PORT_GRH_REQUIRED = 1 << 27, >> > }; >> >> Ahh.. What? >> >> This bitmap was supposed to be controlled by IBTA, it is >> PortInfo:CapabilityMask, and bit 26 and 27 are already defined by >> IBTA! >> >> So we can't just co-op them!!! >> >> Is this what all the crazy masking is about above?? >> >> NAKitty nak nak.. >> >> And someone needs to fix IB_PORT_IP_BASED_GIDS :( :( >> >> It overlaps with IsOtherLocalChangesNoticeSupported - not sure how to >> fix it. Sadness. :( > > As you wrote, this enum is already commingled by partial commit > f931551bafe1 ("IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters") > with todo line in 2010 and commit b4a26a27287a ("IB: Report using RoCE > IP based gids in port caps") in 2014. > > IB_PORT_IP_BASED_GIDS is already exported by libibverbs and supported by > two drivers. > > More on that, IBTA declares those bits as needed for SM entities > (C14-24.1.1) and it doesn't mean that we should limit everything to MADs. > > And yes, we need to ensure that those caps bits (26 and 27) are set correctly > in MAD layer. > > I don't know why separation between MADs and other interfaces wasn't done before. > When we discussed this in the past we agreed that while IBTA defines the wire bits and must be compliant by all vendors, the SW representation is Linux verbs specific and does not have to match exactly to the IBTA wire definitions. That is why we agreed to introduce the additional IB_PORT_GRH_REQUIRED, which continues the path of IB_PORT_IP_BASED_GIDS. The masks are new to verify there are no mistakes in any of the drivers implementations. We canceled the alternative to expose a new set of port flags caps. Alex -- 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