IB/core: Fix and clean up ib_ud_header_init()
ib_ud_header_init() first clears header and then fills up the various fields. Later on, it tests header->immediate_present, which it has already cleared, so the condition is always false. Fix this by adding an immediate_present parameter and setting header->immediate_present as is done with grh_present. Also remove unused calculation of header_len. Signed-off-by: Eli Cohen <eli@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
@@ -232,6 +232,7 @@ void ib_unpack(const struct ib_field *desc,
|
||||
|
||||
void ib_ud_header_init(int payload_bytes,
|
||||
int grh_present,
|
||||
int immediate_present,
|
||||
struct ib_ud_header *header);
|
||||
|
||||
int ib_ud_header_pack(struct ib_ud_header *header,
|
||||
|
Reference in New Issue
Block a user