>>>>> "Sagi" == Sagi Grimberg <sa...@mellanox.com> writes:
Sagi, Sagi> In various areas of the code, it is assumed that Sagi> se_cmd-> data_length describes pure data. In case Sagi> that protection information exists over the wire (protect bits is Sagi> are on) the target core decrease the protection length from the Sagi> data length (instead of each transport peeking in the cdb). I completely agree with the notion of including PI in the transport byte count. Why do you open code the transfer length adjustment below? + /** + * Adjust data_length to include + * protection information + **/ + switch (sc->device->sector_size) { + case 512: + data_len += (data_len >> 9) * 8; + break; + case 1024: + data_len += (data_len >> 10) * 8; + break; + case 2048: + data_len += (data_len >> 11) * 8; + break; + case 4096: + data_len += (data_len >> 12) * 8; + break; + default: + data_len += + (data_len >> ilog2(sc->device->sector_size)) * 8; + } -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html