aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2018-11-19 00:12:11 +0100
committerNeale Ranns <nranns@cisco.com>2018-11-20 11:05:44 +0000
commit33b81da54acf1236cddf0716005c340f3402ff6d (patch)
tree25880bf6f88c5a16e733ce300f9c710cc472d130 /src
parent142eb8520041ece53d8d1e406bce0a6143a6e8d6 (diff)
vom: Add support for redirect contracts in gbp
Change-Id: I18543785166811ddbd628d19065d3dfad3f948e9 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/gbp/gbp.api1
-rw-r--r--src/plugins/gbp/gbp_api.c3
-rw-r--r--src/plugins/gbp/gbp_contract.h3
3 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/gbp/gbp.api b/src/plugins/gbp/gbp.api
index 9af8b35b870..6bdcc5d7e0c 100644
--- a/src/plugins/gbp/gbp.api
+++ b/src/plugins/gbp/gbp.api
@@ -263,6 +263,7 @@ enum gbp_hash_mode
{
GBP_API_HASH_MODE_SRC_IP,
GBP_API_HASH_MODE_DST_IP,
+ GBP_API_HASH_MODE_SYMMETRIC,
};
typedef gbp_next_hop_set
diff --git a/src/plugins/gbp/gbp_api.c b/src/plugins/gbp/gbp_api.c
index 6a000721a01..4402ec15b8c 100644
--- a/src/plugins/gbp/gbp_api.c
+++ b/src/plugins/gbp/gbp_api.c
@@ -718,6 +718,9 @@ gbp_hash_mode_decode (vl_api_gbp_hash_mode_t in, gbp_hash_mode_t * out)
case GBP_API_HASH_MODE_DST_IP:
*out = GBP_HASH_MODE_DST_IP;
return (0);
+ case GBP_API_HASH_MODE_SYMMETRIC:
+ *out = GBP_HASH_MODE_SYMMETRIC;
+ return (0);
}
return (-2);
diff --git a/src/plugins/gbp/gbp_contract.h b/src/plugins/gbp/gbp_contract.h
index c1073510413..21e7265a82f 100644
--- a/src/plugins/gbp/gbp_contract.h
+++ b/src/plugins/gbp/gbp_contract.h
@@ -52,7 +52,8 @@ typedef struct gbp_next_hop_t_
#define foreach_gbp_hash_mode \
_(SRC_IP, "src-ip") \
- _(DST_IP, "dst-ip")
+ _(DST_IP, "dst-ip") \
+ _(SYMMETRIC, "symmetric")
typedef enum gbp_hash_mode_t_
{