54 if (n_bytes >= sizeof (t) \ 55 && sizeof (t) < sizeof (ip_csum_t) \ 56 && (data % (2 * sizeof (t))) != 0) \ 58 sum0 += * uword_to_pointer (data, t *); \ 60 n_bytes -= sizeof (t); \ 74 while (n_bytes >= 2 *
sizeof (d[0]))
79 n_bytes -= 2 *
sizeof (d[0]);
87 if (n_bytes >= sizeof (t) && sizeof (t) <= sizeof (ip_csum_t)) \ 89 sum0 = ip_csum_with_carry (sum0, * uword_to_pointer (data, t *)); \ 91 n_bytes -= sizeof (t); \ 121 val = ((
u8 *) src)[0];
130 while ((n_left >=
sizeof (
u16))
143 n_left -=
sizeof (
u16);
147 while (n_left >= 2 *
sizeof (sum))
160 dst += 2 *
sizeof (dst_even[0]);
161 src += 2 *
sizeof (dst_even[0]);
162 n_left -= 2 *
sizeof (dst_even[0]);
169 while (n_left >= 1 *
sizeof (sum))
180 dst += 1 *
sizeof (sum);
181 src += 1 *
sizeof (sum);
182 n_left -= 1 *
sizeof (sum);
187 while (n_left >=
sizeof (
u16))
189 u16 dst0, *dst_short, *src_short;
199 dst += 1 *
sizeof (dst0);
200 src += 1 *
sizeof (dst0);
201 n_left -= 1 *
sizeof (dst0);
#define CLIB_ARCH_IS_LITTLE_ENDIAN
static ip_csum_t ip_csum_with_carry(ip_csum_t sum, ip_csum_t x)
ip_csum_t ip_incremental_checksum(ip_csum_t sum, void *_data, uword n_bytes)
ip_csum_t ip_csum_and_memcpy(ip_csum_t sum, void *dst, void *src, uword n_bytes)
static uword pointer_to_uword(const void *p)
#define uword_to_pointer(u, type)
#define CLIB_ARCH_IS_BIG_ENDIAN
#define clib_mem_unaligned(pointer, type)