aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/lb/lb_test.c
diff options
context:
space:
mode:
authorHongjun Ni <hongjun.ni@intel.com>2018-01-23 19:17:23 +0800
committerHongjun Ni <hongjun.ni@intel.com>2018-02-02 02:20:46 +0000
commit647f609a11e2afb91a5216ca99d0705a3e1212a7 (patch)
tree149ab0443d42a8d8a7620c8bce917ec87edf1ae7 /src/plugins/lb/lb_test.c
parent91389ac2c28ae10f2b7f766e4dfe7a7fd96dc5e0 (diff)
Add L3DSR feature in LB plugin
L3DSR is used to overcome Layer 2 limitations of Direct Server Return Load Balancing. It maps VIP to DSCP bits, and reuse TOS bits to transfer it to server, and then server will get VIP from DSCP-to-VIP mapping. Please refer to https://www.nanog.org/meetings/nanog51/presentations/Monday/NANOG51.Talk45.nanog51-Schaumann.pdf Change-Id: I403ffeadfb04ed0265086eb2dc41f2e17f8f34cb Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
Diffstat (limited to 'src/plugins/lb/lb_test.c')
-rw-r--r--src/plugins/lb/lb_test.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/lb/lb_test.c b/src/plugins/lb/lb_test.c
index 35bda262fee..b02793944c5 100644
--- a/src/plugins/lb/lb_test.c
+++ b/src/plugins/lb/lb_test.c
@@ -157,7 +157,7 @@ static int api_lb_add_del_vip (vat_main_t * vam)
vl_api_lb_add_del_vip_t mps, *mp;
int ret;
mps.is_del = 0;
- mps.is_gre4 = 0;
+ mps.encap = LB_ENCAP_TYPE_GRE4;
if (!unformat(i, "%U",
unformat_ip46_prefix, mps.ip_prefix, &mps.prefix_length, IP46_TYPE_ANY)) {
@@ -166,9 +166,11 @@ static int api_lb_add_del_vip (vat_main_t * vam)
}
if (unformat(i, "gre4")) {
- mps.is_gre4 = 1;
+ mps.encap = LB_ENCAP_TYPE_GRE4;
} else if (unformat(i, "gre6")) {
- mps.is_gre4 = 0;
+ mps.encap = LB_ENCAP_TYPE_GRE6;
+ } else if (unformat(i, "l3dsr")) {
+ mps.encap = LB_ENCAP_TYPE_L3DSR;
} else {
errmsg ("no encap\n");
return -99;