aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/gbp/gbp_contract.h
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2018-04-17 19:35:42 +0200
committerNeale Ranns <nranns@cisco.com>2018-07-19 07:51:39 +0000
commitd61105656b61012c39e7b9f96c12b65ef5ad3b05 (patch)
tree4087f0357b0e96fba924c88c860260ad8125e4cf /src/plugins/gbp/gbp_contract.h
parent692250bedfc047ec9f88e7308daf456ed5f4a2a7 (diff)
gbp: Add support for ACL
Change-Id: I7513c41307e62068ab5d9739cac393675c6066f8 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> (cherry picked from commit 22b3b846822df2701bb6cb508fa4e023526e5717)
Diffstat (limited to 'src/plugins/gbp/gbp_contract.h')
-rw-r--r--src/plugins/gbp/gbp_contract.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/plugins/gbp/gbp_contract.h b/src/plugins/gbp/gbp_contract.h
index 1964098adc3..75f2edca116 100644
--- a/src/plugins/gbp/gbp_contract.h
+++ b/src/plugins/gbp/gbp_contract.h
@@ -38,6 +38,25 @@ typedef struct gbp_contract_key_t_
} gbp_contract_key_t;
/**
+ * The value for an Contract
+ */
+typedef struct gbp_contract_value_t_
+{
+ union
+ {
+ struct
+ {
+ /**
+ * lookup context and acl index
+ */
+ u32 gc_lc_index;
+ u32 gc_acl_index;
+ };
+ u64 as_u64;
+ };
+} gbp_contract_value_t;
+
+/**
* A Group Based Policy Contract.
* Determines the ACL that applies to traffic pass between two endpoint groups
*/
@@ -51,7 +70,7 @@ typedef struct gbp_contract_t_
/**
* The ACL to apply for packets from the source to the destination EPG
*/
- u32 gc_acl_index;;
+ gbp_contract_value_t gc_value;
} gbp_contract_t;
/**
@@ -78,7 +97,7 @@ extern void gbp_contract_walk (gbp_contract_cb_t bgpe, void *ctx);
*/
extern gbp_contract_db_t gbp_contract_db;
-always_inline u32
+always_inline u64
gbp_acl_lookup (gbp_contract_key_t * key)
{
uword *p;