#include <vnet/ip/ip.h>
#include <vnet/ethernet/ethernet.h>
+dvr_dpo_t *dvr_dpo_pool;
+
/**
* The 'DB' of DVR DPOs.
* There is one per-interface per-L3 proto, so this is a per-interface vector
(u8*)ethernet_buffer_get_header(b0));
len1 = ((u8*)vlib_buffer_get_current(b1) -
(u8*)ethernet_buffer_get_header(b1));
- vnet_buffer(b0)->l2.l2_len = len0;
- vnet_buffer(b1)->l2.l2_len = len1;
- vnet_buffer(b0)->flags |= VNET_OPAQUE_F_IS_DVR;
- vnet_buffer(b1)->flags |= VNET_OPAQUE_F_IS_DVR;
+ vnet_buffer(b0)->l2.l2_len =
+ vnet_buffer(b0)->ip.save_rewrite_length =
+ len0;
+ vnet_buffer(b1)->l2.l2_len =
+ vnet_buffer(b1)->ip.save_rewrite_length =
+ len1;
+ b0->flags |= VNET_BUFFER_F_IS_DVR;
+ b1->flags |= VNET_BUFFER_F_IS_DVR;
vlib_buffer_advance(b0, -len0);
vlib_buffer_advance(b1, -len1);
*/
len0 = ((u8*)vlib_buffer_get_current(b0) -
(u8*)ethernet_buffer_get_header(b0));
- vnet_buffer(b0)->l2.l2_len = len0;
- vnet_buffer(b0)->flags |= VNET_OPAQUE_F_IS_DVR;
+ vnet_buffer(b0)->l2.l2_len =
+ vnet_buffer(b0)->ip.save_rewrite_length =
+ len0;
+ b0->flags |= VNET_BUFFER_F_IS_DVR;
vlib_buffer_advance(b0, -len0);
/*
b0 = vlib_get_buffer (vm, bi0);
b1 = vlib_get_buffer (vm, bi1);
- if (vnet_buffer(b0)->flags & VNET_OPAQUE_F_IS_DVR)
+ if (b0->flags & VNET_BUFFER_F_IS_DVR)
next0 = DVR_REINJECT_OUTPUT;
else
- vnet_feature_next(vnet_buffer(b0)->sw_if_index[VLIB_TX],
- &next0, b0);
+ vnet_feature_next( &next0, b0);
- if (vnet_buffer(b1)->flags & VNET_OPAQUE_F_IS_DVR)
+ if (b1->flags & VNET_BUFFER_F_IS_DVR)
next1 = DVR_REINJECT_OUTPUT;
else
- vnet_feature_next(vnet_buffer(b1)->sw_if_index[VLIB_TX],
- &next1, b1);
+ vnet_feature_next( &next1, b1);
if (PREDICT_FALSE(b0->flags & VLIB_BUFFER_IS_TRACED))
{
b0 = vlib_get_buffer (vm, bi0);
- if (vnet_buffer(b0)->flags & VNET_OPAQUE_F_IS_DVR)
+ if (b0->flags & VNET_BUFFER_F_IS_DVR)
next0 = DVR_REINJECT_OUTPUT;
else
- vnet_feature_next(vnet_buffer(b0)->sw_if_index[VLIB_TX],
- &next0, b0);
+ vnet_feature_next( &next0, b0);
if (PREDICT_FALSE(b0->flags & VLIB_BUFFER_IS_TRACED))
{