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];
141 n_left -=
sizeof (
u16);
145 while (n_left >= 2 *
sizeof (sum))
158 dst += 2 *
sizeof(dst_even[0]);
159 src += 2 *
sizeof(dst_even[0]);
160 n_left -= 2 *
sizeof (dst_even[0]);
167 while (n_left >= 1 *
sizeof (sum))
178 dst += 1 *
sizeof(sum);
179 src += 1 *
sizeof(sum);
180 n_left -= 1 *
sizeof (sum);
185 while (n_left >=
sizeof (
u16))
187 u16 dst0, *dst_short, *src_short;
197 dst += 1 *
sizeof (dst0);
198 src += 1 *
sizeof (dst0);
199 n_left -= 1 *
sizeof (dst0);
#define CLIB_ARCH_IS_LITTLE_ENDIAN
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)
always_inline ip_csum_t ip_csum_with_carry(ip_csum_t sum, ip_csum_t x)
#define CLIB_ARCH_IS_BIG_ENDIAN
#define clib_mem_unaligned(pointer, type)