Skip to content

Commit

Permalink
net: fix checksum API documentation
Browse files Browse the repository at this point in the history
[ upstream commit dc954ae ]

Minor corrections and improvements to documentation
for checksum APIs.

Fixes: 6006818 ("net: new checksum functions")
Fixes: 45a08ef ("net: introduce functions to verify L4 checksums")

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
  • Loading branch information
Lance Richardson authored and cpaelzer committed Nov 30, 2021
1 parent a5811ad commit 0b9f46c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/librte_net/rte_ip.h
Expand Up @@ -322,15 +322,14 @@ rte_ipv4_phdr_cksum(const struct rte_ipv4_hdr *ipv4_hdr, uint64_t ol_flags)
/**
* Process the IPv4 UDP or TCP checksum.
*
* The IPv4 header should not contains options. The IP and layer 4
* checksum must be set to 0 in the packet by the caller.
* The layer 4 checksum must be set to 0 in the L4 header by the caller.
*
* @param ipv4_hdr
* The pointer to the contiguous IPv4 header.
* @param l4_hdr
* The pointer to the beginning of the L4 header.
* @return
* The complemented checksum to set in the IP packet.
* The complemented checksum to set in the L4 header.
*/
static inline uint16_t
rte_ipv4_udptcp_cksum(const struct rte_ipv4_hdr *ipv4_hdr, const void *l4_hdr)
Expand Down Expand Up @@ -423,15 +422,15 @@ rte_ipv6_phdr_cksum(const struct rte_ipv6_hdr *ipv6_hdr, uint64_t ol_flags)
/**
* Process the IPv6 UDP or TCP checksum.
*
* The IPv4 header should not contains options. The layer 4 checksum
* must be set to 0 in the packet by the caller.
* The IPv6 header must not be followed by extension headers. The layer 4
* checksum must be set to 0 in the L4 header by the caller.
*
* @param ipv6_hdr
* The pointer to the contiguous IPv6 header.
* @param l4_hdr
* The pointer to the beginning of the L4 header.
* @return
* The complemented checksum to set in the IP packet.
* The complemented checksum to set in the L4 header.
*/
static inline uint16_t
rte_ipv6_udptcp_cksum(const struct rte_ipv6_hdr *ipv6_hdr, const void *l4_hdr)
Expand Down

0 comments on commit 0b9f46c

Please sign in to comment.