diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/vnet/interface/monitor.c | 12 | ||||
-rw-r--r-- | src/vppinfra/std-formats.c | 2 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/vnet/interface/monitor.c b/src/vnet/interface/monitor.c index 6d79154ae0a..3ae1fd29156 100644 --- a/src/vnet/interface/monitor.c +++ b/src/vnet/interface/monitor.c @@ -90,12 +90,14 @@ monitor_interface_command_fn (vlib_main_t *vm, unformat_input_t *input, tsd = ts[spin] - ts[spin ^ 1]; vlib_cli_output ( - vm, "rx: %Upps %Ubps tx: %Upps %Ubps%c", format_base10, - (u32) ((vrx[spin].packets - vrx[spin ^ 1].packets) / tsd), - format_base10, (u32) ((vrx[spin].bytes - vrx[spin ^ 1].bytes) / tsd), + vm, "rx: %Upps %Ubps tx: %Upps %Ubps", format_base10, + (u64) ((vrx[spin].packets - vrx[spin ^ 1].packets) / tsd), format_base10, - (u32) ((vtx[spin].packets - vtx[spin ^ 1].packets) / tsd), - format_base10, (u32) ((vtx[spin].bytes - vtx[spin ^ 1].bytes) / tsd)); + (u64) (8 * (vrx[spin].bytes - vrx[spin ^ 1].bytes) / tsd), + format_base10, + (u64) ((vtx[spin].packets - vtx[spin ^ 1].packets) / tsd), + format_base10, + (u64) (8 * (vtx[spin].bytes - vtx[spin ^ 1].bytes) / tsd)); } done: diff --git a/src/vppinfra/std-formats.c b/src/vppinfra/std-formats.c index f7632e16a0b..bfe9844c832 100644 --- a/src/vppinfra/std-formats.c +++ b/src/vppinfra/std-formats.c @@ -254,7 +254,7 @@ format_time_interval (u8 * s, va_list * args) __clib_export u8 * format_base10 (u8 *s, va_list *va) { - uword size = va_arg (*va, uword); + u64 size = va_arg (*va, u64); if (size < 1000) s = format (s, "%d", size); |