diff options
author | Neale Ranns <nranns@cisco.com> | 2019-06-19 06:25:56 -0700 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2019-07-01 08:37:53 +0000 |
commit | 160c923f99c2adc103495fab1bfcefe965fe7fb8 (patch) | |
tree | a3b33e764c9ec138d519a5a2b4001bdf63eb8dba /src/plugins/gbp/gbp_contract.h | |
parent | 5770c916c0cf110ced690ff128b065bbb2c827ca (diff) |
gbp: VRF scoped contracts
Type: feature
Change-Id: I01772cfc3a0118a5c49bf346339788824e6931b2
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/plugins/gbp/gbp_contract.h')
-rw-r--r-- | src/plugins/gbp/gbp_contract.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/plugins/gbp/gbp_contract.h b/src/plugins/gbp/gbp_contract.h index 9de52eb9806..8e621a47d28 100644 --- a/src/plugins/gbp/gbp_contract.h +++ b/src/plugins/gbp/gbp_contract.h @@ -38,13 +38,14 @@ typedef struct gbp_contract_key_t_ { struct { + gbp_scope_t gck_scope; /** * source and destination EPGs for which the ACL applies */ sclass_t gck_src; sclass_t gck_dst; }; - u32 as_u32; + u64 as_u64; }; } gbp_contract_key_t; @@ -149,12 +150,14 @@ typedef struct gbp_contract_db_t_ uword *gc_hash; } gbp_contract_db_t; -extern int gbp_contract_update (sclass_t sclass, +extern int gbp_contract_update (gbp_scope_t scope, + sclass_t sclass, sclass_t dclass, u32 acl_index, index_t * rules, u16 * allowed_ethertypes, u32 * stats_index); -extern int gbp_contract_delete (sclass_t sclass, sclass_t dclass); +extern int gbp_contract_delete (gbp_scope_t scope, sclass_t sclass, + sclass_t dclass); extern index_t gbp_rule_alloc (gbp_rule_action_t action, gbp_hash_mode_t hash_mode, index_t * nhs); @@ -177,7 +180,7 @@ gbp_contract_find (gbp_contract_key_t * key) { uword *p; - p = hash_get (gbp_contract_db.gc_hash, key->as_u32); + p = hash_get (gbp_contract_db.gc_hash, key->as_u64); if (NULL != p) return (p[0]); |