Realized my answer is confusing, I meant to say that code is correct as pseudo ipv4/ipv6 headers for the purpose of checksum calculations doesn't include options or extension headers, see udp wiki or corresponding rfcs
https://en.wikipedia.org/wiki/User_Datagram_Protocol On Sat, Oct 20, 2018 at 10:42 AM Shyam Shrivastav < shrivastav.sh...@gmail.com> wrote: > that is correct , pseudo header doesn't include ipv4 options or ipv6 > extension headers .. > > On Sat, Oct 20, 2018 at 9:02 AM lidejun <lidej...@huawei.com> wrote: > >> Has anybody used the following two APIs calculating ipv4&ipv6 tcp/udp >> pseudo header checksum? >> >> 1. rte_ipv4_phdr_cksum >> >> 2. rte_ipv6_phdr_cksum >> The ipv4 version does not exclude ip options and ipv6 version does not >> exclude extersion headers. >> >