diff options
author | Ole Troan <ot@cisco.com> | 2016-01-05 21:26:17 +0100 |
---|---|---|
committer | Ole Troan <ot@cisco.com> | 2016-01-05 21:26:17 +0100 |
commit | a5d2c70f41deabe7078fc21c8fdc3c612bc11ccf (patch) | |
tree | 96b5ce2f7177b6c12b74991446ae8cb8b47e6ba0 | |
parent | 92be0df475f3165ef0d82da35250c77a223f2954 (diff) |
Fix dual loop >= 4. Fix format specified for printing u64 counter.
Change-Id: I314837f6a3482264fc200493a392e744aa1a21c7
Signed-off-by: Ole Troan <ot@cisco.com>
-rw-r--r-- | vnet/vnet/map/ip4_map.c | 2 | ||||
-rw-r--r-- | vnet/vnet/map/ip6_map.c | 2 | ||||
-rw-r--r-- | vnet/vnet/map/map.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/vnet/vnet/map/ip4_map.c b/vnet/vnet/map/ip4_map.c index 559275eb586..6ed176c8e60 100644 --- a/vnet/vnet/map/ip4_map.c +++ b/vnet/vnet/map/ip4_map.c @@ -176,7 +176,7 @@ ip4_map (vlib_main_t *vm, vlib_get_next_frame(vm, node, next_index, to_next, n_left_to_next); /* Dual loop */ - while (n_left_from > 4 && n_left_to_next > 2) { + while (n_left_from >= 4 && n_left_to_next >= 2) { u32 pi0, pi1; vlib_buffer_t *p0, *p1; map_domain_t *d0, *d1; diff --git a/vnet/vnet/map/ip6_map.c b/vnet/vnet/map/ip6_map.c index e803af9007a..7ef85e791f5 100644 --- a/vnet/vnet/map/ip6_map.c +++ b/vnet/vnet/map/ip6_map.c @@ -164,7 +164,7 @@ ip6_map (vlib_main_t *vm, vlib_get_next_frame(vm, node, next_index, to_next, n_left_to_next); /* Dual loop */ - while (n_left_from > 4 && n_left_to_next > 2) { + while (n_left_from >= 4 && n_left_to_next >= 2) { u32 pi0, pi1; vlib_buffer_t *p0, *p1; u8 error0 = MAP_ERROR_NONE; diff --git a/vnet/vnet/map/map.c b/vnet/vnet/map/map.c index b0cab660876..fe54f65454e 100644 --- a/vnet/vnet/map/map.c +++ b/vnet/vnet/map/map.c @@ -676,9 +676,9 @@ format_map_domain (u8 *s, va_list *args) map_domain_counter_lock(mm); vlib_counter_t v; vlib_get_combined_counter(&mm->domain_counters[MAP_DOMAIN_COUNTER_TX], d - mm->domains, &v); - s = format(s, " TX: %d/%d", v.packets, v.bytes); + s = format(s, " TX: %lld/%lld", v.packets, v.bytes); vlib_get_combined_counter(&mm->domain_counters[MAP_DOMAIN_COUNTER_RX], d - mm->domains, &v); - s = format(s, " RX: %d/%d", v.packets, v.bytes); + s = format(s, " RX: %lld/%lld", v.packets, v.bytes); map_domain_counter_unlock(mm); } |