Well, just tell me how you want to discover gid_index when you poll the WC out of the CQ. Like I said, the sgid itself is in the GRH that is scattered to the buffers in the receive queue. When ib_poll_cq() is called the pointer to GRH is not passed so there is no way to determine the gid_index inside the polling context. BTW, why do you argue about this only now? This is not RoCE specific issue. sgid_index was always resolved outside the polling context. The only difference between then and now is that with InfiniBand there was no conflict about sgid_index once you had the sgid. Now, when same gid value can be present in multiple entries you need an extra parameter to get distinguish between them - that would be the netwrok_type On Mon, Dec 7, 2015 at 7:12 PM, Jason Gunthorpe <jgunthorpe@xxxxxxxxxxxxxxxxxxxx> wrote: > On Mon, Dec 07, 2015 at 08:37:41AM +0200, Moni Shoua wrote: >> On Mon, Dec 7, 2015 at 8:34 AM, Jason Gunthorpe >> <jgunthorpe@xxxxxxxxxxxxxxxxxxxx> wrote: >> > On Mon, Dec 07, 2015 at 08:15:40AM +0200, Moni Shoua wrote: >> > >> >> What you have though is the sgid taken from the GRH that is scattered >> >> to the first 40/20 bytes of the receive WQE. This is not enough to >> >> determine the network type. >> > >> > It is enough to discover the sgid index which will tell you the type. >> but how? all you have in hand is the sgid which can appear several >> times in the GID table in different indices. > > Eh? Reliably recovering the gid index is not optional. The network > namespace stuff that is already in the kernel hard requires that > ability. (This is the same argument we went around on already why pkey > had to come from the wc, not from the payload) > > If your position is it cannot be done from a WC,QP as is, then > gid_index needs to be added to the wc, or something else to remove the > ambiguity. > > In either case, network_type is absolutely the wrong thing to have in > the wc. > > Jason > -- > 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 -- 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