Align iscsi_header[] and data[] on an 8-byte boundary instead of on a 4-byte
boundary. With this patch applied pahole produces the following output:
struct iser_rx_desc {
struct iser_hdr iser_header; /* 0 28 */
char pad1[4]; /* 28 4 */
char iscsi_header[48]; /* 32 48 */
/* --- cacheline 1 boundary (64 bytes) was 16 bytes ago --- */
char data[128]; /* 80 128 */
/* --- cacheline 3 boundary (192 bytes) was 16 bytes ago --- */
struct ibv_sge rx_sg; /* 208 16 */
struct ibv_mr * hdr_mr; /* 224 8 */
char pad2[24]; /* 232 24 */
/* size: 256, cachelines: 4, members: 7 */
};
Additionally, this patch fixes the following build errors:
iser.c: In function 'iser_alloc_rx_descriptors':
iser.c:916:11: error: taking address of packed member of 'struct iser_rx_desc' may result in an unaligned pointer value [-Werror=address-of-packed-member]
916 | rx_sg = &rx_desc->rx_sg;
| ^~~~~~~~~~~~~~~
iser.c: In function 'iser_post_recvm':
iser.c:955:20: error: taking address of packed member of 'struct iser_rx_desc' may result in an unaligned pointer value [-Werror=address-of-packed-member]
955 | rx_wr->sg_list = &rx_desc->rx_sg;
| ^~~~~~~~~~~~~~~
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
This splits a transport into static driver specific functions for the common
iscsi commands. Optionally, a driver specific opaque memory is introduced
which is currently only used by iSER transport.
Last a lot of functions changed to static.
Signed-off-by: Peter Lieven <pl@kamp.de>
This commit includes all iSER implementation in libscsi
library and utilities.
Also, adding iser option in url.
Change-Id: I55ca8a9d4db802e72eb991061260dbb0bd0ef9ba
Signed-off-by: Roy Shterman <roysh@mellanox.com>