diff options
author | Ole Troan <ot@cisco.com> | 2016-01-05 20:39:55 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@projectrotterdam.info> | 2016-01-05 20:39:55 +0000 |
commit | 1bc56f7fa162eab44214e5e2fa02f8b3a5ccb021 (patch) | |
tree | 4566dadd539ec6d51f0cd45b9a6f676ca6d542de /vnet | |
parent | ec1a579f388a5bac307e8444fc9d9b342f28d235 (diff) | |
parent | a5d2c70f41deabe7078fc21c8fdc3c612bc11ccf (diff) |
Merge "Fix dual loop >= 4. Fix format specified for printing u64 counter."
Diffstat (limited to 'vnet')
-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); } |