From 8a1531dfb7c963b530b54d33498c4a035ec03caa Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Wed, 3 Aug 2016 10:32:50 +0200 Subject: VPP-233: disallow array[0] in reply messages - updates jvpp generator to raise exception if array[0] is present in reply/detail/counter message - fixes vpe.api reply/detail/counter messages that use incorrect variable array syntax. Additional info: Variable arrays in reply/detail/counter messages needs to have lenght defined in other variable within the message. The other variable can have any name, so it is impossible to generate Java/Python code handling. New syntax introduced by https://gerrit.fd.io/r/#/c/1617/ fixes the problem: u32 some_var; XX array[some_var]; Change-Id: I0af50f1ef1d94d95b56d9326d4e944e72b4edcdd Signed-off-by: Marek Gradzki --- vpp/vpp-api/vpe.api | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'vpp/vpp-api') diff --git a/vpp/vpp-api/vpe.api b/vpp/vpp-api/vpe.api index 3e4b933b..50cfe2ad 100644 --- a/vpp/vpp-api/vpe.api +++ b/vpp/vpp-api/vpe.api @@ -630,7 +630,7 @@ define vnet_interface_counters { u8 is_combined; u32 first_sw_if_index; u32 count; - u8 data[0]; + u8 data[count]; }; typeonly manual_print manual_endian define ip4_fib_counter { @@ -3979,7 +3979,7 @@ define mpls_gre_tunnel_details { u32 tunnel_dst; u32 outer_fib_index; u32 nlabels; - u32 labels[0]; + u32 labels[nlabels]; }; /** \brief Dump mpls eth tunnel table @@ -4017,7 +4017,7 @@ define mpls_eth_tunnel_details { u8 tunnel_dst_mac[6]; u32 tx_sw_if_index; u32 nlabels; - u32 labels[0]; + u32 labels[nlabels]; }; /** \brief Dump mpls fib table @@ -4045,7 +4045,7 @@ define mpls_fib_encap_details { u32 dest; u32 s_bit; u32 nlabels; - u32 labels[0]; + u32 labels[nlabels]; }; /** \brief Dump mpls fib decap table -- cgit 1.2.3-korg