struct
{
u32 arc_next;
- /* cached session index from previous node */
- u32 cached_session_index;
+ union
+ {
+ u32 cached_session_index;
+ u32 cached_dst_nat_session_index;
+ };
} nat;
union
format_function_t format_vnet_buffer;
format_function_t format_vnet_buffer_offload;
+format_function_t format_vnet_buffer_flags;
+format_function_t format_vnet_buffer_opaque;
+format_function_t format_vnet_buffer_opaque2;
static_always_inline void
vnet_buffer_offload_flags_set (vlib_buffer_t *b, u32 oflags)
{
- vnet_buffer2 (b)->oflags |= oflags;
- b->flags |= VNET_BUFFER_F_OFFLOAD;
+ if (b->flags & VNET_BUFFER_F_OFFLOAD)
+ {
+ /* add a flag to existing offload */
+ vnet_buffer2 (b)->oflags |= oflags;
+ }
+ else
+ {
+ /* no offload yet: reset offload flags to new value */
+ vnet_buffer2 (b)->oflags = oflags;
+ b->flags |= VNET_BUFFER_F_OFFLOAD;
+ }
}
static_always_inline void