aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/arp/arp_proxy.c
diff options
context:
space:
mode:
authorNeale Ranns <neale@graphiant.com>2022-08-09 00:59:37 +0000
committerBeno�t Ganne <bganne@cisco.com>2022-08-11 06:48:27 +0000
commit13a74ae25d606f0ee85b65a57d7cba8bba86c2c2 (patch)
treed703b21c498a1ffdc621a296d5a1cfe58dc62061 /src/vnet/arp/arp_proxy.c
parentee15f8682cf5052e4a86b6498b9d0f630d1b9d68 (diff)
arp: Use the new style error count declaration
Type: improvement Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: Ifda8ca8d26912c750a77d2ca889e1638ca83d85a
Diffstat (limited to 'src/vnet/arp/arp_proxy.c')
-rw-r--r--src/vnet/arp/arp_proxy.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/vnet/arp/arp_proxy.c b/src/vnet/arp/arp_proxy.c
index e3f5b4ae67b..184edbf8be8 100644
--- a/src/vnet/arp/arp_proxy.c
+++ b/src/vnet/arp/arp_proxy.c
@@ -326,14 +326,14 @@ arp_proxy (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame)
is_request0 = arp0->opcode
== clib_host_to_net_u16 (ETHERNET_ARP_OPCODE_request);
- error0 = ETHERNET_ARP_ERROR_replies_sent;
+ error0 = ARP_ERROR_REPLIES_SENT;
sw_if_index0 = vnet_buffer (p0)->sw_if_index[VLIB_RX];
next0 = ARP_REPLY_NEXT_DROP;
fib_index0 = ip4_fib_table_get_index_for_sw_if_index (sw_if_index0);
if (~0 == fib_index0)
{
- error0 = ETHERNET_ARP_ERROR_interface_no_table;
+ error0 = ARP_ERROR_INTERFACE_NO_TABLE;
}
if (0 == error0 && is_request0)
@@ -376,28 +376,28 @@ arp_proxy (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame)
vlib_put_next_frame (vm, node, next_index, n_left_to_next);
}
- vlib_error_count (vm, node->node_index,
- ETHERNET_ARP_ERROR_replies_sent, n_arp_replies_sent);
+ vlib_error_count (vm, node->node_index, ARP_ERROR_REPLIES_SENT,
+ n_arp_replies_sent);
return frame->n_vectors;
}
-static char *ethernet_arp_error_strings[] = {
-#define _(sym,string) string,
- foreach_ethernet_arp_error
-#undef _
-};
-
VLIB_REGISTER_NODE (arp_proxy_node, static) =
{
- .function = arp_proxy,.name = "arp-proxy",.vector_size =
- sizeof (u32),.n_errors = ETHERNET_ARP_N_ERROR,.error_strings =
- ethernet_arp_error_strings,.n_next_nodes = ARP_REPLY_N_NEXT,.next_nodes =
+ .function = arp_proxy,
+ .name = "arp-proxy",
+ .vector_size = sizeof (u32),
+ .n_errors = ARP_N_ERROR,
+ .error_counters = arp_error_counters,
+ .n_next_nodes = ARP_REPLY_N_NEXT,
+ .next_nodes =
{
- [ARP_REPLY_NEXT_DROP] = "error-drop",
- [ARP_REPLY_NEXT_REPLY_TX] = "interface-output",}
-,.format_buffer = format_ethernet_arp_header,.format_trace =
- format_ethernet_arp_input_trace,};
+ [ARP_REPLY_NEXT_DROP] = "error-drop",
+ [ARP_REPLY_NEXT_REPLY_TX] = "interface-output",
+ },
+ .format_buffer = format_ethernet_arp_header,
+ .format_trace = format_ethernet_arp_input_trace,
+};
static clib_error_t *
show_ip4_arp (vlib_main_t * vm,