summaryrefslogtreecommitdiffstats
path: root/src/vnet/dpo/dvr_dpo.h
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-06-06 10:35:07 +0000
committerNeale Ranns <nranns@cisco.com>2019-06-06 10:35:07 +0000
commita342da22f35676114ca928c65b0219fac8009f7a (patch)
treeba0e1ab147345a48e111f49ae2cdcfe32956609e /src/vnet/dpo/dvr_dpo.h
parent21aa8f1022590b8b5caf819b4bbd485de0f1dfe5 (diff)
DVR: Control the reinject as L2 or L3 based on the output interface type
Change-Id: Ib4cdbe8a6a1d10a643941c13aa0acbed410f876c Type: Feature Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/dpo/dvr_dpo.h')
-rw-r--r--src/vnet/dpo/dvr_dpo.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/vnet/dpo/dvr_dpo.h b/src/vnet/dpo/dvr_dpo.h
index 669c49201c8..4fef2811b10 100644
--- a/src/vnet/dpo/dvr_dpo.h
+++ b/src/vnet/dpo/dvr_dpo.h
@@ -19,6 +19,15 @@
#include <vnet/dpo/dpo.h>
/**
+ * Control how the reinject is performed
+ */
+typedef enum dvr_dpo_reinject_t_
+{
+ DVR_REINJECT_L2,
+ DVR_REINJECT_L3,
+} __clib_packed dvr_dpo_reinject_t;
+
+/**
* @brief
* The DVR DPO. Used as the resolving object for a DVR route.
* This is used, in place of the usual L3 Adjacency, to retransmit
@@ -40,11 +49,19 @@ typedef struct dvr_dpo_t_
dpo_proto_t dd_proto;
/**
+ * Control for how the re-inject is performed
+ */
+ dvr_dpo_reinject_t dd_reinject;
+
+ /**
* number of locks.
*/
u16 dd_locks;
} dvr_dpo_t;
+/* 8 bytes is a factor of cache line size so this struct will never span */
+STATIC_ASSERT_SIZEOF(dvr_dpo_t, 8);
+
extern void dvr_dpo_add_or_lock (u32 sw_if_index,
dpo_proto_t dproto,
dpo_id_t *dpo);