Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Rework kube-proxy into 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
35bda26
..
fc49870
100644
(file)
--- 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;
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,15
@@
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 if (unformat(i, "nat4")) {
+ mps.encap = LB_ENCAP_TYPE_NAT4;
+ } else if (unformat(i, "nat6")) {
+ mps.encap = LB_ENCAP_TYPE_NAT6;
} else {
errmsg ("no encap\n");
return -99;
} else {
errmsg ("no encap\n");
return -99;
@@
-219,7
+225,9
@@
static int api_lb_add_del_as (vat_main_t * vam)
*/
#define foreach_vpe_api_msg \
_(lb_conf, "<ip4-src-addr> <ip6-src-address> <sticky_buckets_per_core> <flow_timeout>") \
*/
#define foreach_vpe_api_msg \
_(lb_conf, "<ip4-src-addr> <ip6-src-address> <sticky_buckets_per_core> <flow_timeout>") \
-_(lb_add_del_vip, "<ip-prefix> [gre4|gre6] <new_table_len> [del]") \
+_(lb_add_del_vip, "<ip-prefix> [gre4|gre6|l3dsr|nat4|nat6] " \
+ "<dscp> <port> <target_port> <node_port> " \
+ "<new_table_len> [del]") \
_(lb_add_del_as, "<vip-ip-prefix> <address> [del]")
static void
_(lb_add_del_as, "<vip-ip-prefix> <address> [del]")
static void