aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/sr/sr.h
diff options
context:
space:
mode:
authorPablo Camarillo <pcamaril@cisco.com>2017-03-16 10:43:05 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2017-03-29 08:56:05 +0000
commit4521afa9a643983c789b6b3a77b14c0a95d5e0b2 (patch)
tree0902086700854c4b6f5597b2cd0bb6f47be77a62 /src/vnet/sr/sr.h
parent45ce3fbee5c1a7ad2a01f766c9b05059aa467b8f (diff)
Bugfixing and documentation for SRv6
- Fixed three coverity issues - Linked SRv6 docs - Moved sample plugin to examples folder - Fixed bug with hash. Now everything is using mhash. Potentially in the future we want to do bihash. Change-Id: Ie03a13c8fecb1e315e67d0596cbd23220779aaf2 Signed-off-by: Pablo Camarillo <pcamaril@cisco.com>
Diffstat (limited to 'src/vnet/sr/sr.h')
-rwxr-xr-xsrc/vnet/sr/sr.h30
1 files changed, 7 insertions, 23 deletions
diff --git a/src/vnet/sr/sr.h b/src/vnet/sr/sr.h
index 5efeb4dd06a..b832c0fc365 100755
--- a/src/vnet/sr/sr.h
+++ b/src/vnet/sr/sr.h
@@ -173,6 +173,7 @@ typedef struct
} l2;
};
u8 traffic_type; /**< Traffic type (IPv4, IPv6, L2) */
+ u8 padding[3];
} sr_steering_key_t;
typedef struct
@@ -186,46 +187,29 @@ typedef struct
*/
typedef struct
{
- /* ip6-lookup next index for imposition FIB entries */
- u32 ip6_lookup_sr_next_index;
-
- /* ip6-replicate next index for multicast tunnel */
- u32 ip6_lookup_sr_spray_index;
-
- /* IP4-lookup -> SR rewrite next index */
- u32 ip4_lookup_sr_policy_rewrite_encaps_index;
- u32 ip4_lookup_sr_policy_rewrite_insert_index;
-
- /* IP6-lookup -> SR rewrite next index */
- u32 ip6_lookup_sr_policy_rewrite_encaps_index;
- u32 ip6_lookup_sr_policy_rewrite_insert_index;
-
/* L2-input -> SR rewrite next index */
u32 l2_sr_policy_rewrite_index;
- /* IP6-lookup -> SR LocalSID (SR End processing) index */
- u32 ip6_lookup_sr_localsid_index;
-
/* SR SID lists */
ip6_sr_sl_t *sid_lists;
/* SR policies */
ip6_sr_policy_t *sr_policies;
- /* Find an SR policy by its BindingSID */
- ip6_address_t *sr_policy_index_by_key;
+ /* Hash table mapping BindingSID to SR policy */
+ mhash_t sr_policies_index_hash;
/* Pool of SR localsid instances */
ip6_sr_localsid_t *localsids;
- /* Find a SR localsid instance based on its functionID */
- ip6_address_t *localsids_index_by_key;
+ /* Hash table mapping LOC:FUNC to SR LocalSID instance */
+ mhash_t sr_localsids_index_hash;
/* Pool of SR steer policies instances */
ip6_sr_steering_policy_t *steer_policies;
- /* Find a steer policy based on its classifier */
- sr_steering_key_t *steer_policies_index_by_key;
+ /* Hash table mapping steering rules to SR steer instance */
+ mhash_t sr_steer_policies_hash;
/* L2 steering ifaces - sr_policies */
u32 *sw_iface_sr_policies;