diff options
author | Neale Ranns <nranns@wasa-ucs-11.cisco.com> | 2017-03-15 12:34:25 -0400 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2017-03-17 11:35:39 +0000 |
commit | b069a6910aa2b95316ccdb5d9e5b95143b9dc7c0 (patch) | |
tree | 0fb3292c39de54a2d66778272fe197b319286f96 /src/vnet/ip/lookup.c | |
parent | b85e43965ec9e23c4ae14b62f4bbfe839f75c427 (diff) |
Cache a 'has-features' flag on the adjacency for faster access. Reclaim the node_index memeber from the rewrite for space - this is only used for formtting
before:
ip4-rewrite * * * * 2.66e1 256.00
after:
ip4-rewrite * * * * 2.40e1 256.00
Change-Id: Ic397150727cad38811564777419ad6bd26b8a3a6
Signed-off-by: Neale Ranns <nranns@wasa-ucs-11.cisco.com>
Diffstat (limited to 'src/vnet/ip/lookup.c')
-rw-r--r-- | src/vnet/ip/lookup.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/vnet/ip/lookup.c b/src/vnet/ip/lookup.c index 9ae269cc205..dabfa012eb1 100644 --- a/src/vnet/ip/lookup.c +++ b/src/vnet/ip/lookup.c @@ -291,7 +291,6 @@ format_ip_lookup_next (u8 * s, va_list * args) u8 * format_ip_adjacency_packet_data (u8 * s, va_list * args) { - vnet_main_t *vnm = va_arg (*args, vnet_main_t *); u32 adj_index = va_arg (*args, u32); u8 *packet_data = va_arg (*args, u8 *); u32 n_packet_data_bytes = va_arg (*args, u32); @@ -300,10 +299,9 @@ format_ip_adjacency_packet_data (u8 * s, va_list * args) switch (adj->lookup_next_index) { case IP_LOOKUP_NEXT_REWRITE: - s = format (s, "%U", - format_vnet_rewrite_header, - vnm->vlib_main, &adj->rewrite_header, packet_data, - n_packet_data_bytes); + case IP_LOOKUP_NEXT_MCAST: + s = + format (s, "%U", format_hex_bytes, packet_data, n_packet_data_bytes); break; default: |