Skip to content

Commit 72f9b08

Browse files
Aditya Sarwadedledford
authored andcommitted
RDMA/vmw_pvrdma: Report network header type in WC
We should report the network header type in the work completion so that the kernel can infer the right RoCE type headers. Reviewed-by: Bryan Tan <[email protected]> Signed-off-by: Aditya Sarwade <[email protected]> Signed-off-by: Adit Ranadive <[email protected]> Reviewed-by: Yuval Shaia <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
1 parent 7936422 commit 72f9b08

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,7 @@ static int pvrdma_poll_one(struct pvrdma_cq *cq, struct pvrdma_qp **cur_qp,
389389
wc->dlid_path_bits = cqe->dlid_path_bits;
390390
wc->port_num = cqe->port_num;
391391
wc->vendor_err = cqe->vendor_err;
392+
wc->network_hdr_type = cqe->network_hdr_type;
392393

393394
/* Update shared ring state */
394395
pvrdma_idx_ring_inc(&cq->ring_state->rx.cons_head, cq->ibcq.cqe);

include/uapi/rdma/vmw_pvrdma-abi.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ enum pvrdma_wc_flags {
125125
PVRDMA_WC_IP_CSUM_OK = 1 << 3,
126126
PVRDMA_WC_WITH_SMAC = 1 << 4,
127127
PVRDMA_WC_WITH_VLAN = 1 << 5,
128-
PVRDMA_WC_FLAGS_MAX = PVRDMA_WC_WITH_VLAN,
128+
PVRDMA_WC_WITH_NETWORK_HDR_TYPE = 1 << 6,
129+
PVRDMA_WC_FLAGS_MAX = PVRDMA_WC_WITH_NETWORK_HDR_TYPE,
129130
};
130131

131132
struct pvrdma_alloc_ucontext_resp {
@@ -283,7 +284,8 @@ struct pvrdma_cqe {
283284
__u8 dlid_path_bits;
284285
__u8 port_num;
285286
__u8 smac[6];
286-
__u8 reserved2[7]; /* Pad to next power of 2 (64). */
287+
__u8 network_hdr_type;
288+
__u8 reserved2[6]; /* Pad to next power of 2 (64). */
287289
};
288290

289291
#endif /* __VMW_PVRDMA_ABI_H__ */

0 commit comments

Comments
 (0)