Can someone help me understand the reason for this code in ib_isert.c?

Chris Moore
2014-10-20T15:29:59Z

The following code is in isert_conn_setup_qp() in ib_isert.c:

/*
* FIXME: Use devattr.max_sge - 2 for max_send_sge as
* work-around for RDMA_READ..
*/
attr.cap.max_send_sge = device->dev_attr.max_sge - 2;

It's not clear from the comment what this is a work-around for, and I wasn't able
to figure it out from looking at logs.

In trying to get isert working with ocrdma I ran into a problem where the code
thought there was only 1 send SGE available when in fact the device has 3.
Then I found the above work-around, which explained the problem.

Removing this (setting attr.cap.max_send_sge to device->dev_attr.max_sge)
fixes the problem with isert and ocrdma, but I don't know what other side effects
that might have.

Thanks,

Chris