iser: fix struct iser_rx_desc

iSER header is followed by iSCSI PDU without any pad in an RCaP Message.

Signed-off-by: wanghonghao <wanghonghao@bytedance.com>
This commit is contained in:
wanghonghao
2019-12-09 11:58:22 +08:00
parent 10599fcd4f
commit 22d7360b5e

View File

@@ -18,6 +18,7 @@
#define __iser_private_h__ #define __iser_private_h__
#include <stdint.h> #include <stdint.h>
#include <stddef.h>
#include <time.h> #include <time.h>
#include "iscsi-private.h" #include "iscsi-private.h"
@@ -118,15 +119,14 @@ struct iser_hdr {
struct iser_rx_desc { struct iser_rx_desc {
struct iser_hdr iser_header; struct iser_hdr iser_header;
char pad1[4];
char iscsi_header[ISCSI_RAW_HEADER_SIZE]; char iscsi_header[ISCSI_RAW_HEADER_SIZE];
char data[ISER_RECV_DATA_SEG_LEN]; char data[ISER_RECV_DATA_SEG_LEN];
struct ibv_sge rx_sg; char pad[4];
struct ibv_mr *hdr_mr; struct ibv_mr *hdr_mr;
char pad2[24]; struct ibv_sge rx_sg;
}; };
static_assert(sizeof(struct iser_rx_desc) == 256, "iser_rx_desc size != 256"); static_assert(offsetof(struct iser_rx_desc, hdr_mr) % 8 == 0, "iser_rx_desc is not aligned on 8-byte boundary");
/** /**
* struct iser_tx_desc - iSER TX descriptor (for send wr_id) * struct iser_tx_desc - iSER TX descriptor (for send wr_id)