diff options
author | Jon Loeliger <jdl@netgate.com> | 2017-01-31 14:03:33 -0600 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2017-02-02 17:31:37 +0000 |
commit | 7bc770ceb62ede18414b7bb5788692e32477e373 (patch) | |
tree | a0898e2e7b3b994c9edbc2442328545513849bec /src/plugins | |
parent | 614e97d87b46853384cf0dcf1d59aaf9f4b2fa92 (diff) |
Convert message macro S to accept a message pointer parameter;
Rather than blindly assume an unbound, fixed message parameter
explicilty pass it as a paramter to the S() macro.
Change-Id: Ieea1f1815cadd2eec7d9240408d69acdc3caa49a
Signed-off-by: Jon Loeliger <jdl@netgate.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/acl/acl_test.c | 24 | ||||
-rw-r--r-- | src/plugins/flowperpkt/flowperpkt_test.c | 2 | ||||
-rw-r--r-- | src/plugins/ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_test.c | 2 | ||||
-rw-r--r-- | src/plugins/ioam/export/ioam_export_test.c | 2 | ||||
-rw-r--r-- | src/plugins/ioam/lib-pot/pot_test.c | 12 | ||||
-rw-r--r-- | src/plugins/ioam/lib-trace/trace_test.c | 6 | ||||
-rw-r--r-- | src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_test.c | 12 | ||||
-rw-r--r-- | src/plugins/lb/lb_test.c | 6 | ||||
-rw-r--r-- | src/plugins/snat/snat_test.c | 41 |
9 files changed, 59 insertions, 48 deletions
diff --git a/src/plugins/acl/acl_test.c b/src/plugins/acl/acl_test.c index 04683a12..70fd6959 100644 --- a/src/plugins/acl/acl_test.c +++ b/src/plugins/acl/acl_test.c @@ -276,7 +276,7 @@ static int api_acl_plugin_get_version (vat_main_t * vam) mp->client_index = vam->my_client_index; /* send it... */ - S; + S(mp); /* Wait for a reply... */ W; @@ -298,7 +298,7 @@ static int api_macip_acl_interface_get (vat_main_t * vam) mp->client_index = vam->my_client_index; /* send it... */ - S; + S(mp); /* Wait for a reply... */ W; @@ -479,7 +479,7 @@ static int api_acl_add_replace (vat_main_t * vam) mp->count = htonl(n_rules); /* send it... */ - S; + S(mp); /* Wait for a reply... */ W; @@ -502,7 +502,7 @@ static int api_acl_del (vat_main_t * vam) mp->acl_index = ntohl(acl_index); /* send it... */ - S; + S(mp); /* Wait for a reply... */ W; @@ -525,7 +525,7 @@ static int api_macip_acl_del (vat_main_t * vam) mp->acl_index = ntohl(acl_index); /* send it... */ - S; + S(mp); /* Wait for a reply... */ W; @@ -592,7 +592,7 @@ static int api_acl_interface_add_del (vat_main_t * vam) mp->is_input = is_input; /* send it... */ - S; + S(mp); /* Wait for a reply... */ W; @@ -642,7 +642,7 @@ static int api_macip_acl_interface_add_del (vat_main_t * vam) mp->is_add = is_add; /* send it... */ - S; + S(mp); /* Wait for a reply... */ W; @@ -699,7 +699,7 @@ static int api_acl_interface_set_acl_list (vat_main_t * vam) clib_memcpy(mp->acls, inacls, vec_len(inacls)*sizeof(u32)); /* send it... */ - S; + S(mp); /* Wait for a reply... */ W; @@ -728,7 +728,7 @@ static int api_acl_interface_list_dump (vat_main_t * vam) mp->sw_if_index = ntohl (sw_if_index); /* send it... */ - S; + S(mp); /* Wait for a reply... */ W; @@ -754,7 +754,7 @@ static int api_acl_dump (vat_main_t * vam) mp->acl_index = ntohl (acl_index); /* send it... */ - S; + S(mp); /* Wait for a reply... */ W; @@ -780,7 +780,7 @@ static int api_macip_acl_dump (vat_main_t * vam) mp->acl_index = ntohl (acl_index); /* send it... */ - S; + S(mp); /* Wait for a reply... */ W; @@ -912,7 +912,7 @@ static int api_macip_acl_add (vat_main_t * vam) mp->count = htonl(n_rules); /* send it... */ - S; + S(mp); /* Wait for a reply... */ W; diff --git a/src/plugins/flowperpkt/flowperpkt_test.c b/src/plugins/flowperpkt/flowperpkt_test.c index 70b4a34a..d5edc4ad 100644 --- a/src/plugins/flowperpkt/flowperpkt_test.c +++ b/src/plugins/flowperpkt/flowperpkt_test.c @@ -129,7 +129,7 @@ api_flowperpkt_tx_interface_add_del (vat_main_t * vam) mp->which = which; /* send it... */ - S; + S (mp); /* Wait for a reply... */ W; diff --git a/src/plugins/ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_test.c b/src/plugins/ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_test.c index b9f61d9a..161b5241 100644 --- a/src/plugins/ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_test.c +++ b/src/plugins/ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_test.c @@ -110,7 +110,7 @@ api_vxlan_gpe_ioam_export_enable_disable (vat_main_t * vam) mp->is_disable = is_disable; /* send it... */ - S; + S (mp); /* Wait for a reply... */ W; diff --git a/src/plugins/ioam/export/ioam_export_test.c b/src/plugins/ioam/export/ioam_export_test.c index b9686058..45c4ca56 100644 --- a/src/plugins/ioam/export/ioam_export_test.c +++ b/src/plugins/ioam/export/ioam_export_test.c @@ -112,7 +112,7 @@ api_ioam_export_ip6_enable_disable (vat_main_t * vam) mp->is_disable = is_disable; /* send it... */ - S; + S(mp); /* Wait for a reply... */ W; diff --git a/src/plugins/ioam/lib-pot/pot_test.c b/src/plugins/ioam/lib-pot/pot_test.c index 48d5bd40..4f049be8 100644 --- a/src/plugins/ioam/lib-pot/pot_test.c +++ b/src/plugins/ioam/lib-pot/pot_test.c @@ -188,7 +188,8 @@ static int api_pot_profile_add (vat_main_t *vam) mp->id = id; mp->max_bits = bits; - S; W; + S(mp); + W; OUT: vec_free(name); @@ -228,7 +229,8 @@ static int api_pot_profile_activate (vat_main_t *vam) clib_memcpy(mp->list_name, name, mp->list_name_len); mp->id = id; - S; W; + S(mp); + W; OUT: vec_free(name); @@ -243,7 +245,8 @@ static int api_pot_profile_del (vat_main_t *vam) M(POT_PROFILE_DEL, mp); mp->list_name_len = 0; - S; W; + S(mp); + W; return 0; } @@ -264,7 +267,8 @@ static int api_pot_profile_show_config_dump (vat_main_t *vam) mp->id = id; - S; W; + S(mp); + W; return 0; } diff --git a/src/plugins/ioam/lib-trace/trace_test.c b/src/plugins/ioam/lib-trace/trace_test.c index a1354327..5093f330 100644 --- a/src/plugins/ioam/lib-trace/trace_test.c +++ b/src/plugins/ioam/lib-trace/trace_test.c @@ -157,7 +157,7 @@ api_trace_profile_add (vat_main_t * vam) mp->app_data = htonl (app_data); mp->num_elts = num_elts; - S; + S (mp); W; return (rv); @@ -172,7 +172,7 @@ api_trace_profile_del (vat_main_t * vam) f64 timeout; M (TRACE_PROFILE_DEL, mp); - S; + S (mp); W; return 0; } @@ -183,7 +183,7 @@ api_trace_profile_show_config (vat_main_t * vam) vl_api_trace_profile_show_config_t *mp; f64 timeout; M (TRACE_PROFILE_SHOW_CONFIG, mp); - S; + S (mp); W; return 0; } 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 5d36547f..ee25a874 100644 --- a/src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_test.c +++ b/src/plugins/ioam/lib-vxlan-gpe/vxlan_gpe_test.c @@ -132,7 +132,7 @@ api_vxlan_gpe_ioam_enable (vat_main_t * vam) mp->trace_enable = has_trace_option; - S; + S (mp); W; return (0); @@ -146,7 +146,7 @@ api_vxlan_gpe_ioam_disable (vat_main_t * vam) f64 timeout; M (VXLAN_GPE_IOAM_DISABLE, mp); - S; + S (mp); W; return 0; } @@ -240,7 +240,7 @@ api_vxlan_gpe_ioam_vni_enable (vat_main_t * vam) mp->vni = ntohl (vni); mp->is_ipv6 = ipv6_set; - S; + S (mp); W; return (0); @@ -335,7 +335,7 @@ api_vxlan_gpe_ioam_vni_disable (vat_main_t * vam) mp->vni = ntohl (vni); mp->is_ipv6 = ipv6_set; - S; + S (mp); W; return 0; @@ -405,7 +405,7 @@ api_vxlan_gpe_ioam_transit_enable (vat_main_t * vam) mp->outer_fib_index = htonl (outer_fib_index); mp->is_ipv6 = ipv6_set; - S; + S (mp); W; return (0); @@ -474,7 +474,7 @@ api_vxlan_gpe_ioam_transit_disable (vat_main_t * vam) mp->outer_fib_index = htonl (outer_fib_index); mp->is_ipv6 = ipv6_set; - S; + S (mp); W; diff --git a/src/plugins/lb/lb_test.c b/src/plugins/lb/lb_test.c index c150ea32..f553a93e 100644 --- a/src/plugins/lb/lb_test.c +++ b/src/plugins/lb/lb_test.c @@ -146,7 +146,7 @@ static int api_lb_conf (vat_main_t * vam) } M(LB_CONF, mp); - S; + S(mp); W; /* NOTREACHED */ @@ -186,7 +186,7 @@ static int api_lb_add_del_vip (vat_main_t * vam) } M(LB_ADD_DEL_VIP, mp); - S; + S(mp); W; /* NOTREACHED */ return 0; @@ -211,7 +211,7 @@ static int api_lb_add_del_as (vat_main_t * vam) } M(LB_ADD_DEL_AS, mp); - S; + S(mp); W; /* NOTREACHED */ return 0; diff --git a/src/plugins/snat/snat_test.c b/src/plugins/snat/snat_test.c index c6f9a8ff..c0913f37 100644 --- a/src/plugins/snat/snat_test.c +++ b/src/plugins/snat/snat_test.c @@ -159,7 +159,8 @@ static int api_snat_add_address_range (vat_main_t * vam) mp->is_ip4 = 1; mp->is_add = is_add; - S; W; + S(mp); + W; /* NOTREACHED */ return 0; @@ -205,7 +206,8 @@ static int api_snat_interface_add_del_feature (vat_main_t * vam) mp->is_add = is_add; mp->is_inside = is_inside; - S; W; + S(mp); + W; /* NOTREACHED */ return 0; } @@ -273,7 +275,8 @@ static int api_snat_add_static_mapping(vat_main_t * vam) memcpy (mp->local_ip_address, &local_addr, 4); memcpy (mp->external_ip_address, &external_addr, 4); - S; W; + S(mp); + W; /* NOTREACHED */ return 0; } @@ -331,12 +334,12 @@ static int api_snat_static_mapping_dump(vat_main_t * vam) "port", "vrf"); M(SNAT_STATIC_MAPPING_DUMP, mp); - S; + S(mp); /* Use a control ping for synchronization */ { vl_api_snat_control_ping_t *mp; M(SNAT_CONTROL_PING, mp); - S; + S(mp); } W; /* NOTREACHED */ @@ -386,7 +389,8 @@ static int api_snat_show_config(vat_main_t * vam) } M(SNAT_SHOW_CONFIG, mp); - S; W; + S(mp); + W; /* NOTREACHED */ return 0; } @@ -412,12 +416,12 @@ static int api_snat_address_dump(vat_main_t * vam) } M(SNAT_ADDRESS_DUMP, mp); - S; + S(mp); /* Use a control ping for synchronization */ { vl_api_snat_control_ping_t *mp; M(SNAT_CONTROL_PING, mp); - S; + S(mp); } W; /* NOTREACHED */ @@ -446,12 +450,12 @@ static int api_snat_interface_dump(vat_main_t * vam) } M(SNAT_INTERFACE_DUMP, mp); - S; + S(mp); /* Use a control ping for synchronization */ { vl_api_snat_control_ping_t *mp; M(SNAT_CONTROL_PING, mp); - S; + S(mp); } W; /* NOTREACHED */ @@ -479,7 +483,8 @@ static int api_snat_set_workers (vat_main_t * vam) M(SNAT_SET_WORKERS, mp); mp->worker_mask = clib_host_to_net_u64 (bitmap[0]); - S; W; + S(mp); + W; /* NOTREACHED */ return 0; @@ -507,12 +512,12 @@ static int api_snat_worker_dump(vat_main_t * vam) } M(SNAT_WORKER_DUMP, mp); - S; + S(mp); /* Use a control ping for synchronization */ { vl_api_snat_control_ping_t *mp; M(SNAT_CONTROL_PING, mp); - S; + S(mp); } W; /* NOTREACHED */ @@ -553,7 +558,8 @@ static int api_snat_ipfix_enable_disable (vat_main_t * vam) mp->sw_if_index = ntohl(sw_if_index); mp->is_add = is_add; - S; W; + S(mp); + W; /* NOTREACHED */ return 0; } @@ -579,12 +585,12 @@ static int api_snat_interface_addr_dump(vat_main_t * vam) } M(SNAT_INTERFACE_ADDR_DUMP, mp); - S; + S(mp); /* Use a control ping for synchronization */ { vl_api_snat_control_ping_t *mp; M(SNAT_CONTROL_PING, mp); - S; + S(mp); } W; /* NOTREACHED */ @@ -620,7 +626,8 @@ static int api_snat_add_del_interface_addr (vat_main_t * vam) mp->src_port = htons((u16) src_port); mp->enable = enable; - S; W; + S(mp); + W; /* NOTREACHED */ return 0; } |