Uploaded image for project: 'vpp'
  1. vpp
  2. VPP-2032

moniter interface data is not correct

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • 22.02
    • 22.02, 22.06
    • VNET

      In vpp 22.02

      I get inaccurate results with monitor interface command,tx data is incorrect

      DBGvpp# monitor interface local0 interval 10 count 1              
      rx: 0pps 0bps tx: 2314885530.28Gpps 18446744069.41Gbps

      in  src/vnet/interface/monitor.c
      there use u32,but in  format_base10 it expects uword.
      This looks out of bounds.
       
      src/vppinfra/std-formats.c:

      format_base10 (u8 *s, va_list *va)
      {
        uword size = va_arg (*va, uword);
       
      src/vnet/interface/monitor.c:
       92       vlib_cli_output (
       93     vm, "rx: %Upps %Ubps tx: %Upps %Ubps%c", format_base10,
       94     (u32) ((vrx[spin].packets - vrx[spin ^ 1].packets) / tsd),
       95     format_base10, (u32) ((vrx[spin].bytes - vrx[spin ^ 1].bytes) / tsd),
       96     format_base10,
       97     (u32) ((vtx[spin].packets - vtx[spin ^ 1].packets) / tsd),
       98     format_base10, (u32) ((vtx[spin].bytes - vtx[spin ^ 1].bytes) / tsd));
       99     }

            Unassigned Unassigned
            aihua2013 ai hua
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: