Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Add L3DSR feature in LB plugin
[vpp.git]
/
src
/
plugins
/
lb
/
lb_test.c
diff --git
a/src/plugins/lb/lb_test.c
b/src/plugins/lb/lb_test.c
index
9b30c18
..
b027939
100644
(file)
--- a/
src/plugins/lb/lb_test.c
+++ b/
src/plugins/lb/lb_test.c
@@
-16,7
+16,7
@@
#include <vat/vat.h>
#include <vlibapi/api.h>
#include <vlibmemory/api.h>
#include <vat/vat.h>
#include <vlibapi/api.h>
#include <vlibmemory/api.h>
-#include <vlibsocket/api.h>
+
#include <vppinfra/error.h>
#include <lb/lb.h>
#include <vppinfra/error.h>
#include <lb/lb.h>
@@
-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;
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)) {
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")) {
}
if (unformat(i, "gre4")) {
- mps.
is_gre4 = 1
;
+ mps.
encap = LB_ENCAP_TYPE_GRE4
;
} else if (unformat(i, "gre6")) {
} 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;
} else {
errmsg ("no encap\n");
return -99;