Convert message macro S to accept a message pointer parameter;
[vpp.git] / src / plugins / ioam / lib-vxlan-gpe / vxlan_gpe_test.c
index 7c4088e..ee25a87 100644 (file)
@@ -23,6 +23,8 @@
 #include <vlibmemory/api.h>
 #include <vlibsocket/api.h>
 #include <vppinfra/error.h>
+
+#define __plugin_msg_base vxlan_gpe_test_main.msg_id_base
 #include <vlibapi/vat_helper_macros.h>
 
 /* Declare message IDs */
@@ -123,14 +125,14 @@ api_vxlan_gpe_ioam_enable (vat_main_t * vam)
       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;
 
 
-  S;
+  S (mp);
   W;
 
   return (0);
@@ -143,8 +145,8 @@ api_vxlan_gpe_ioam_disable (vat_main_t * vam)
   vl_api_vxlan_gpe_ioam_disable_t *mp;
   f64 timeout;
 
-  M (VXLAN_GPE_IOAM_DISABLE, vxlan_gpe_ioam_disable);
-  S;
+  M (VXLAN_GPE_IOAM_DISABLE, mp);
+  S (mp);
   W;
   return 0;
 }
@@ -221,7 +223,7 @@ api_vxlan_gpe_ioam_vni_enable (vat_main_t * vam)
       return -99;
     }
 
-  M (VXLAN_GPE_IOAM_VNI_ENABLE, vxlan_gpe_ioam_vni_enable);
+  M (VXLAN_GPE_IOAM_VNI_ENABLE, mp);
 
 
   if (ipv6_set)
@@ -238,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);
@@ -316,7 +318,7 @@ api_vxlan_gpe_ioam_vni_disable (vat_main_t * vam)
       return -99;
     }
 
-  M (VXLAN_GPE_IOAM_VNI_DISABLE, vxlan_gpe_ioam_vni_disable);
+  M (VXLAN_GPE_IOAM_VNI_DISABLE, mp);
 
 
   if (ipv6_set)
@@ -333,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;
@@ -387,7 +389,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)
@@ -403,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);
@@ -457,7 +459,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)
@@ -472,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;