Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <bryantan@vmware.com>
Signed-off-by: Aditya Sarwade <asarwade@vmware.com>
Signed-off-by: Adit Ranadive <aditr@vmware.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>

authored by

Aditya Sarwade and committed by
Doug Ledford
72f9b089 79364227

+5 -2
+1
drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c
··· 389 389 wc->dlid_path_bits = cqe->dlid_path_bits; 390 390 wc->port_num = cqe->port_num; 391 391 wc->vendor_err = cqe->vendor_err; 392 + wc->network_hdr_type = cqe->network_hdr_type; 392 393 393 394 /* Update shared ring state */ 394 395 pvrdma_idx_ring_inc(&cq->ring_state->rx.cons_head, cq->ibcq.cqe);
+4 -2
include/uapi/rdma/vmw_pvrdma-abi.h
··· 125 125 PVRDMA_WC_IP_CSUM_OK = 1 << 3, 126 126 PVRDMA_WC_WITH_SMAC = 1 << 4, 127 127 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, 129 130 }; 130 131 131 132 struct pvrdma_alloc_ucontext_resp { ··· 284 283 __u8 dlid_path_bits; 285 284 __u8 port_num; 286 285 __u8 smac[6]; 287 - __u8 reserved2[7]; /* Pad to next power of 2 (64). */ 286 + __u8 network_hdr_type; 287 + __u8 reserved2[6]; /* Pad to next power of 2 (64). */ 288 288 }; 289 289 290 290 #endif /* __VMW_PVRDMA_ABI_H__ */