summaryrefslogtreecommitdiffstats
path: root/src/plugins/gbp/gbp_policy_dpo.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/gbp/gbp_policy_dpo.h')
-rw-r--r--src/plugins/gbp/gbp_policy_dpo.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/plugins/gbp/gbp_policy_dpo.h b/src/plugins/gbp/gbp_policy_dpo.h
index 8ee086d1cb0..097205b8255 100644
--- a/src/plugins/gbp/gbp_policy_dpo.h
+++ b/src/plugins/gbp/gbp_policy_dpo.h
@@ -25,6 +25,8 @@
*/
typedef struct gbp_policy_dpo_t_
{
+ CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
+
/**
* The protocol of packets using this DPO
*/
@@ -46,7 +48,7 @@ typedef struct gbp_policy_dpo_t_
u16 gpd_locks;
/**
- * Stacked DPO on DVR of output interface
+ * Stacked DPO on DVR/ADJ of output interface
*/
dpo_id_t gpd_dpo;
} gbp_policy_dpo_t;
@@ -55,14 +57,24 @@ extern void gbp_policy_dpo_add_or_lock (dpo_proto_t dproto,
epg_id_t epg,
u32 sw_if_index, dpo_id_t * dpo);
-extern gbp_policy_dpo_t *gbp_policy_dpo_get (index_t index);
-
extern dpo_type_t gbp_policy_dpo_get_type (void);
extern vlib_node_registration_t ip4_gbp_policy_dpo_node;
extern vlib_node_registration_t ip6_gbp_policy_dpo_node;
extern vlib_node_registration_t gbp_policy_port_node;
+/**
+ * Types exposed for the Data-plane
+ */
+extern dpo_type_t gbp_policy_dpo_type;
+extern gbp_policy_dpo_t *gbp_policy_dpo_pool;
+
+always_inline gbp_policy_dpo_t *
+gbp_policy_dpo_get (index_t index)
+{
+ return (pool_elt_at_index (gbp_policy_dpo_pool, index));
+}
+
/*
* fd.io coding-style-patch-verification: ON
*