40 #ifndef __INTERFACE_INLINES_H__ 41 #define __INTERFACE_INLINES_H__ 51 if (b->
flags & VNET_BUFFER_F_OFFLOAD_IP_CKSUM)
53 if (b->
flags & VNET_BUFFER_F_OFFLOAD_TCP_CKSUM)
58 if (b->
flags & VNET_BUFFER_F_OFFLOAD_UDP_CKSUM)
71 if (b->
flags & VNET_BUFFER_F_OFFLOAD_TCP_CKSUM)
76 if (b->
flags & VNET_BUFFER_F_OFFLOAD_UDP_CKSUM)
85 int is_ip4,
int is_ip6,
int with_gso)
122 ASSERT (!(is_ip4 && is_ip6));
138 b->
flags &= ~VNET_BUFFER_F_OFFLOAD_TCP_CKSUM;
139 b->
flags &= ~VNET_BUFFER_F_OFFLOAD_UDP_CKSUM;
140 b->
flags &= ~VNET_BUFFER_F_OFFLOAD_IP_CKSUM;
static_always_inline void vnet_get_outer_header(vlib_buffer_t *b0, generic_header_offset_t *gho)
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index, VLIB_BUFFER_IS_TRACED: trace this buffer.
static_always_inline void vnet_calc_ip6_checksums(vlib_main_t *vm, vlib_buffer_t *b, ip6_header_t *ip6, tcp_header_t *th, udp_header_t *uh)
static_always_inline void vnet_get_inner_header(vlib_buffer_t *b0, generic_header_offset_t *gho)
struct _tcp_header tcp_header_t
#define static_always_inline
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
u16 ip6_tcp_udp_icmp_compute_checksum(vlib_main_t *vm, vlib_buffer_t *p0, ip6_header_t *ip0, int *bogus_lengthp)
u16 ip4_tcp_udp_compute_checksum(vlib_main_t *vm, vlib_buffer_t *p0, ip4_header_t *ip0)
static_always_inline void vnet_generic_header_offset_parser(vlib_buffer_t *b0, generic_header_offset_t *gho, int is_l2, int is_ip4, int is_ip6)
VLIB buffer representation.
static_always_inline void vnet_calc_ip4_checksums(vlib_main_t *vm, vlib_buffer_t *b, ip4_header_t *ip4, tcp_header_t *th, udp_header_t *uh)
static_always_inline void vnet_calc_checksums_inline(vlib_main_t *vm, vlib_buffer_t *b, int is_ip4, int is_ip6, int with_gso)
static u16 ip4_header_checksum(ip4_header_t *i)