RE: [PATCH v2 01/17] IB/Verbs: Implement new callback query_transport() for each HW

From: Hefty, Sean
Date: Wed Apr 08 2015 - 14:41:33 EST


> I'm concerned about the performance implications of this. The size of
> this patchset already points out just how many places in the code we
> have to check for various aspects of the device transport in order to do
> the right thing. Without going through the entire list to see how many
> are on critical hot paths, I'm sure some of them are on at least
> partially critical hot paths (like creation of new connections). I
> would prefer to see this change be implemented via a device attribute,
> not a functional call query. That adds a needless function call in
> these paths.

My impression of these changes were that they would eventually lead to the mechanism that you outlined:


> I'm also concerned about this. I would like to see this enum
> essentially turned into a bitmap. One that is constructed in such a way
> that we can always get the specific test we need with only one compare
> against the overall value. In order to do so, we need to break it down
> into the essential elements that are part of each of the transports.
> So, for instance, we can define the two link layers we have so far, plus
> reserve one for OPA which we know is coming:
>
> RDMA_LINK_LAYER_IB = 0x00000001,
> RDMA_LINK_LAYER_ETH = 0x00000002,
> RDMA_LINK_LAYER_OPA = 0x00000004,
> RDMA_LINK_LAYER_MASK = 0x0000000f,
>
> We can then define the currently known high level transport types:
>
> RDMA_TRANSPORT_IB = 0x00000010,
> RDMA_TRANSPORT_IWARP = 0x00000020,
> RDMA_TRANSPORT_USNIC = 0x00000040,
> RDMA_TRANSPORT_USNIC_UDP = 0x00000080,
> RDMA_TRANSPORT_MASK = 0x000000f0,
>
> We could then define bits for the IB management types:
>
> RDMA_MGMT_IB = 0x00000100,
> RDMA_MGMT_OPA = 0x00000200,
> RDMA_MGMT_MASK = 0x00000f00,
>
> Then we have space to define specific quirks:
>
> RDMA_SEPARATE_READ_SGE = 0x00001000,
> RDMA_QUIRKS_MASK = 0xfffff000

I too would like to see this as the end result, but I think it's possible to stage the changes by having the static inline calls being added convert to using these sort of attributes.

- Sean
N‹§²æ¸›yú²X¬¶ÇvØ–)Þ{.nlj·¥Š{±‘êX§¶›¡Ü}©ž²ÆzÚj:+v‰¨¾«‘êZ+€Êzf£¢·hšˆ§~†­†Ûÿû®w¥¢¸?™¨è&¢)ßf”ùy§m…á«a¶Úÿ 0¶ìå