* [DPDK/core Bug 1590] rte_ipv6_phdr_cksum users wrong proto
@ 2024-12-01 19:02 bugzilla
0 siblings, 0 replies; only message in thread
From: bugzilla @ 2024-12-01 19:02 UTC (permalink / raw)
To: dev
[-- Attachment #1: Type: text/plain, Size: 1803 bytes --]
https://bugs.dpdk.org/show_bug.cgi?id=1590
Bug ID: 1590
Summary: rte_ipv6_phdr_cksum users wrong proto
Product: DPDK
Version: 20.11
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: core
Assignee: dev@dpdk.org
Reporter: maaaah@mail.ru
Target Milestone: ---
It seems rte_ipv6_phdr_cksum implementation uses wrong proto field for
pseudo-header during calculating checksum:
static inline uint16_t
rte_ipv6_phdr_cksum(const struct rte_ipv6_hdr *ipv6_hdr, uint64_t ol_flags)
{
uint32_t sum;
struct {
rte_be32_t len; /* L4 length. */
rte_be32_t proto; /* L4 protocol - top 3 bytes must be zero */
} psd_hdr;
psd_hdr.proto = (uint32_t)(ipv6_hdr->proto << 24);
if (ol_flags & PKT_TX_TCP_SEG) {
psd_hdr.len = 0;
} else {
psd_hdr.len = ipv6_hdr->payload_len;
}
sum = __rte_raw_cksum(ipv6_hdr->src_addr,
sizeof(ipv6_hdr->src_addr) + sizeof(ipv6_hdr->dst_addr),
0);
sum = __rte_raw_cksum(&psd_hdr, sizeof(psd_hdr), sum);
return __rte_raw_cksum_reduce(sum);
}
proto is taken directly from the header while RFC 8200 clearly states:
The Next Header value in the pseudo-header identifies the upper-layer protocol
(e.g., 6 for TCP or 17 for UDP). It will differ from the Next Header value in
the IPv6 header if there are extension headers between the IPv6 header and the
upper-layer header.
see https://www.rfc-editor.org/rfc/rfc8200
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #2: Type: text/html, Size: 3750 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-12-01 19:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-01 19:02 [DPDK/core Bug 1590] rte_ipv6_phdr_cksum users wrong proto bugzilla
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).