MCPcopy Create free account
hub / github.com/F-Stack/f-stack / __rte_raw_cksum_reduce

Function __rte_raw_cksum_reduce

dpdk/lib/net/rte_ip.h:193–199  ·  view source on GitHub ↗

* @internal Reduce a sum to the non-complemented checksum. * Helper routine for the rte_raw_cksum(). * * @param sum * Value of the sum. * @return * The non-complemented checksum. */

Source from the content-addressed store, hash-verified

191 * The non-complemented checksum.
192 */
193static inline uint16_t
194__rte_raw_cksum_reduce(uint32_t sum)
195{
196 sum = ((sum & 0xffff0000) >> 16) + (sum & 0xffff);
197 sum = ((sum & 0xffff0000) >> 16) + (sum & 0xffff);
198 return (uint16_t)sum;
199}
200
201/**
202 * Process the non-complemented checksum of a buffer.

Callers 4

rte_raw_cksumFunction · 0.85
rte_raw_cksum_mbufFunction · 0.85
rte_ipv6_phdr_cksumFunction · 0.85
hinic_ipv6_phdr_cksumFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected