Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
VCL: Fix socket_test.sh to build test apps.
[vpp.git]
/
src
/
plugins
/
ioam
/
lib-vxlan-gpe
/
vxlan_gpe_test.c
diff --git
a/src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_test.c
b/src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_test.c
index
0748c5b
..
ef24a50
100644
(file)
--- a/
src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_test.c
+++ b/
src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_test.c
@@
-21,7
+21,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>
#define __plugin_msg_base vxlan_gpe_test_main.msg_id_base
#include <vppinfra/error.h>
#define __plugin_msg_base vxlan_gpe_test_main.msg_id_base
@@
-104,11
+104,11
@@
api_vxlan_gpe_ioam_enable (vat_main_t * vam)
{
unformat_input_t *input = vam->input;
vl_api_vxlan_gpe_ioam_enable_t *mp;
{
unformat_input_t *input = vam->input;
vl_api_vxlan_gpe_ioam_enable_t *mp;
- f64 timeout;
u32 id = 0;
int has_trace_option = 0;
int has_pow_option = 0;
int has_ppc_option = 0;
u32 id = 0;
int has_trace_option = 0;
int has_pow_option = 0;
int has_ppc_option = 0;
+ int ret;
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
{
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
{
@@
-125,17
+125,16
@@
api_vxlan_gpe_ioam_enable (vat_main_t * vam)
else
break;
}
else
break;
}
- M (VXLAN_GPE_IOAM_ENABLE,
vxlan_gpe_ioam_enable
);
+ M (VXLAN_GPE_IOAM_ENABLE,
mp
);
mp->id = htons (id);
mp->trace_ppc = has_ppc_option;
mp->pow_enable = has_pow_option;
mp->trace_enable = has_trace_option;
mp->id = htons (id);
mp->trace_ppc = has_ppc_option;
mp->pow_enable = has_pow_option;
mp->trace_enable = has_trace_option;
- S;
- W;
-
- return (0);
+ S (mp);
+ W (ret);
+ return ret;
}
}
@@
-143,12
+142,12
@@
static int
api_vxlan_gpe_ioam_disable (vat_main_t * vam)
{
vl_api_vxlan_gpe_ioam_disable_t *mp;
api_vxlan_gpe_ioam_disable (vat_main_t * vam)
{
vl_api_vxlan_gpe_ioam_disable_t *mp;
-
f64 timeou
t;
+
int re
t;
- M (VXLAN_GPE_IOAM_DISABLE,
vxlan_gpe_ioam_disable
);
- S;
- W;
- return
0
;
+ M (VXLAN_GPE_IOAM_DISABLE,
mp
);
+ S
(mp)
;
+ W
(ret)
;
+ return
ret
;
}
static int
}
static int
@@
-163,7
+162,7
@@
api_vxlan_gpe_ioam_vni_enable (vat_main_t * vam)
u8 remote_set = 0;
u32 vni;
u8 vni_set = 0;
u8 remote_set = 0;
u32 vni;
u8 vni_set = 0;
-
f64 timeou
t;
+
int re
t;
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
@@
-223,7
+222,7
@@
api_vxlan_gpe_ioam_vni_enable (vat_main_t * vam)
return -99;
}
return -99;
}
- M (VXLAN_GPE_IOAM_VNI_ENABLE,
vxlan_gpe_ioam_vni_enable
);
+ M (VXLAN_GPE_IOAM_VNI_ENABLE,
mp
);
if (ipv6_set)
if (ipv6_set)
@@
-240,10
+239,9
@@
api_vxlan_gpe_ioam_vni_enable (vat_main_t * vam)
mp->vni = ntohl (vni);
mp->is_ipv6 = ipv6_set;
mp->vni = ntohl (vni);
mp->is_ipv6 = ipv6_set;
- S;
- W;
-
- return (0);
+ S (mp);
+ W (ret);
+ return ret;
}
static int
}
static int
@@
-258,7
+256,7
@@
api_vxlan_gpe_ioam_vni_disable (vat_main_t * vam)
u8 remote_set = 0;
u32 vni;
u8 vni_set = 0;
u8 remote_set = 0;
u32 vni;
u8 vni_set = 0;
-
f64 timeou
t;
+
int re
t;
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
@@
-318,7
+316,7
@@
api_vxlan_gpe_ioam_vni_disable (vat_main_t * vam)
return -99;
}
return -99;
}
- M (VXLAN_GPE_IOAM_VNI_DISABLE,
vxlan_gpe_ioam_vni_disable
);
+ M (VXLAN_GPE_IOAM_VNI_DISABLE,
mp
);
if (ipv6_set)
if (ipv6_set)
@@
-335,10
+333,9
@@
api_vxlan_gpe_ioam_vni_disable (vat_main_t * vam)
mp->vni = ntohl (vni);
mp->is_ipv6 = ipv6_set;
mp->vni = ntohl (vni);
mp->is_ipv6 = ipv6_set;
- S;
- W;
-
- return 0;
+ S (mp);
+ W (ret);
+ return ret;
}
static int
}
static int
@@
-351,7
+348,7
@@
api_vxlan_gpe_ioam_transit_enable (vat_main_t * vam)
u8 ipv4_set = 0, ipv6_set = 0;
u8 local_set = 0;
u32 outer_fib_index = 0;
u8 ipv4_set = 0, ipv6_set = 0;
u8 local_set = 0;
u32 outer_fib_index = 0;
-
f64 timeou
t;
+
int re
t;
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
@@
-389,7
+386,7
@@
api_vxlan_gpe_ioam_transit_enable (vat_main_t * vam)
}
}
- M (VXLAN_GPE_IOAM_TRANSIT_ENABLE,
vxlan_gpe_ioam_transit_enable
);
+ M (VXLAN_GPE_IOAM_TRANSIT_ENABLE,
mp
);
if (ipv6_set)
if (ipv6_set)
@@
-405,10
+402,9
@@
api_vxlan_gpe_ioam_transit_enable (vat_main_t * vam)
mp->outer_fib_index = htonl (outer_fib_index);
mp->is_ipv6 = ipv6_set;
mp->outer_fib_index = htonl (outer_fib_index);
mp->is_ipv6 = ipv6_set;
- S;
- W;
-
- return (0);
+ S (mp);
+ W (ret);
+ return ret;
}
static int
}
static int
@@
-421,7
+417,7
@@
api_vxlan_gpe_ioam_transit_disable (vat_main_t * vam)
u8 ipv4_set = 0, ipv6_set = 0;
u8 local_set = 0;
u32 outer_fib_index = 0;
u8 ipv4_set = 0, ipv6_set = 0;
u8 local_set = 0;
u32 outer_fib_index = 0;
-
f64 timeou
t;
+
int re
t;
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
@@
-459,7
+455,7
@@
api_vxlan_gpe_ioam_transit_disable (vat_main_t * vam)
}
}
- M (VXLAN_GPE_IOAM_TRANSIT_DISABLE,
vxlan_gpe_ioam_transit_disable
);
+ M (VXLAN_GPE_IOAM_TRANSIT_DISABLE,
mp
);
if (ipv6_set)
if (ipv6_set)
@@
-474,11
+470,9
@@
api_vxlan_gpe_ioam_transit_disable (vat_main_t * vam)
mp->outer_fib_index = htonl (outer_fib_index);
mp->is_ipv6 = ipv6_set;
mp->outer_fib_index = htonl (outer_fib_index);
mp->is_ipv6 = ipv6_set;
- S;
- W;
-
-
- return (0);
+ S (mp);
+ W (ret);
+ return ret;
}
/*
}
/*
@@
-527,7
+521,7
@@
vxlan_gpe_vat_api_hookup (vat_main_t * vam)
}
clib_error_t *
}
clib_error_t *
-vat_plugin_register (vat_main_t * vam)
+v
xlan_gpe_v
at_plugin_register (vat_main_t * vam)
{
vxlan_gpe_test_main_t *sm = &vxlan_gpe_test_main;
u8 *name;
{
vxlan_gpe_test_main_t *sm = &vxlan_gpe_test_main;
u8 *name;