Skip to content

Commit

Permalink
prov/efa: Fix optional header size calculations
Browse files Browse the repository at this point in the history
This includes the CQ data header size for the zero-copy receive use-case

Signed-off-by: Darryl Abbate <drl@amazon.com>
  • Loading branch information
darrylabbate committed May 17, 2024
1 parent bf5c27f commit 02aa85d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prov/efa/src/rdm/efa_rdm_pke_req.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void efa_rdm_pke_init_req_hdr_common(struct efa_rdm_pke *pkt_entry,
opt_hdr += EFA_RDM_REQ_OPT_RAW_ADDR_HDR_SIZE;
}

if (base_hdr->flags & EFA_RDM_REQ_OPT_CQ_DATA_HDR) {
if (base_hdr->flags & EFA_RDM_REQ_OPT_CQ_DATA_HDR || pkt_entry->ep->use_zcpy_rx) {
struct efa_rdm_req_opt_cq_data_hdr *cq_data_hdr;

cq_data_hdr = (struct efa_rdm_req_opt_cq_data_hdr *)opt_hdr;
Expand Down Expand Up @@ -148,7 +148,7 @@ uint32_t *efa_rdm_pke_get_req_connid_ptr(struct efa_rdm_pke *pkt_entry)
return &raw_addr->qkey;
}

if (base_hdr->flags & EFA_RDM_REQ_OPT_CQ_DATA_HDR)
if (base_hdr->flags & EFA_RDM_REQ_OPT_CQ_DATA_HDR || pkt_entry->ep->use_zcpy_rx)
opt_hdr += sizeof(struct efa_rdm_req_opt_cq_data_hdr);

if (base_hdr->flags & EFA_RDM_PKT_CONNID_HDR) {
Expand Down

0 comments on commit 02aa85d

Please sign in to comment.