nvmf/tcp: reorg the structure of struct spdk_nvmf_tcp_req

I used pahole to see whether the alignment of the structure
is reasonable. After reorgnization, we can saved 16 bytes and 1
cacheline according to the information by pahole.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I1347e7c582fe2b00707e2841690b87d53cc61e33
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460572
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Ziye Yang 2019-07-05 18:11:46 +08:00 committed by Changpeng Liu
parent b7a2058a4b
commit 57efada508

View File

@ -167,11 +167,15 @@ struct spdk_nvmf_tcp_req {
uint8_t *buf;
bool data_from_pool;
void *buffers[SPDK_NVMF_MAX_SGL_ENTRIES];
bool has_incapsule_data;
/* transfer_tag */
uint16_t ttag;
enum spdk_nvmf_tcp_req_state state;
void *buffers[SPDK_NVMF_MAX_SGL_ENTRIES];
/*
* next_expected_r2t_offset is used when we receive the h2c_data PDU.
*/
@ -184,9 +188,6 @@ struct spdk_nvmf_tcp_req {
uint32_t c2h_data_offset;
uint32_t c2h_data_pdu_num;
enum spdk_nvmf_tcp_req_state state;
bool has_incapsule_data;
TAILQ_ENTRY(spdk_nvmf_tcp_req) link;
TAILQ_ENTRY(spdk_nvmf_tcp_req) state_link;
};