Libiscsi: Changing header iscsi_in_pdu
socket: need to malloc hdr include/iscsi-private: changing iscsi_in_pdu hdr to char* instead of static array for more convinient iser pdu creation. To use iscsi_in_pdu in iSER without making a copy of it we need to change hdr to pointer from static array, Because of that, iscsi_tcp flow need to do szmalloc (small zero malloc) hdr when creating new iscsi_in_pdu. iscsi_in_pdu is being malloced once per each received pdu. This change is reducing iscsi_in_pdu struct size but adding extra allocation of the same size we reduced from the struct. Signed-off-by: Roy Shterman <roysh@mellanox.com>
This commit is contained in:
committed by
Ronnie Sahlberg
parent
2671e10565
commit
bc64420bad
@@ -55,7 +55,7 @@ struct iscsi_in_pdu {
|
||||
struct iscsi_in_pdu *next;
|
||||
|
||||
long long hdr_pos;
|
||||
unsigned char hdr[ISCSI_RAW_HEADER_SIZE + ISCSI_DIGEST_SIZE];
|
||||
unsigned char *hdr;
|
||||
|
||||
long long data_pos;
|
||||
unsigned char *data;
|
||||
|
||||
Reference in New Issue
Block a user