Commit 07f63fc
committed
irdma: Report network header type in UD work completions
irdma: Report network header type in UD work completions
Leverage the newly introduced IBV_WC_WITH_NETWORK_HDR_TYPE and
IBV_WC_NETWORK_HDR_IPV6 flags when processing Completion Queue Entries
(CQEs) for Unreliable Datagram (UD) QPs.
The irdma hardware natively parses the IP version and reports it via
the 'ipv4' field in the CQE. Translating this state into wc_flags
enables the core libibverbs layer to skip expensive software GRH
parsing and checksum verifications during address handle creation.
Beyond the performance benefits of bypassing payload memory reads,
this ensures correct IP version identification. Since some hardware
zeroes out the IPv4 header checksum in the buffer, a non-zero
checksum calculated in get_grh_header_version() could fail the
verification against the buffer's zeroed field, and wrongly
misclassify valid IPv4 packets as IPv6. Relying on the explicit
CQE state resolves this correctness issue.1 parent 4d78ba8 commit 07f63fc
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
923 | 923 | | |
924 | 924 | | |
925 | 925 | | |
926 | | - | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
927 | 929 | | |
928 | 930 | | |
929 | 931 | | |
| |||
0 commit comments