|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
58 if (n_bytes >= sizeof (t) \
59 && sizeof (t) < sizeof (ip_csum_t) \
60 && (data % (2 * sizeof (t))) != 0) \
62 sum0 += * uword_to_pointer (data, t *); \
64 n_bytes -= sizeof (t); \
79 while (
n_bytes >= 2 *
sizeof (d[0]))
92 if (n_bytes >= sizeof (t) && sizeof (t) <= sizeof (ip_csum_t)) \
94 sum0 = ip_csum_with_carry (sum0, * uword_to_pointer (data, t *)); \
96 n_bytes -= sizeof (t); \
138 0x45, 0x00, 0x00, 0x3c, 0x5d, 0x6f, 0x40, 0x00,
139 0x40, 0x06, 0x3f, 0x6b, 0x0a, 0x76, 0x72, 0x44,
140 0x0a, 0x56, 0x16, 0xd2,
171 .path =
"test ip checksum",
172 .short_help =
"test ip checksum",
clib_error_t * ip_checksum_init(vlib_main_t *vm)
static vlib_cli_command_t test_checksum
(constructor) VLIB_CLI_COMMAND (test_checksum)
static uword pointer_to_uword(const void *p)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
struct clib_bihash_value offset
template key/value backing page structure
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment)
#define VLIB_CLI_COMMAND(x,...)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
static clib_error_t * test_ip_checksum_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
template key/value backing page structure
static const char test_pkt[]
static ip_csum_t ip_csum_with_carry(ip_csum_t sum, ip_csum_t x)
#define VLIB_INIT_FUNCTION(x)
ip_csum_t(* vnet_incremental_checksum_fp)(ip_csum_t, void *, uword)
static u16 ip4_header_checksum(ip4_header_t *i)
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
#define uword_to_pointer(u, type)