* @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. */
| 191 | * The non-complemented checksum. |
| 192 | */ |
| 193 | static 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. |
no outgoing calls
no test coverage detected