1. 05 Apr, 2015 2 commits
  2. 07 Jan, 2015 1 commit
    • Jiri Popelka's avatar
      ifconfig can incorrectly round PiB · e5f1be13
      Jiri Popelka authored
      When an interface has transferred exbibytes
      (> 0.8 EiB, i.e. > 819 PiB) of traffic,
      the short display is rounded incorrectly.
      
      For example:
      bytes 2154408931384050514 (275.0 PiB)
      while correct is (1913.4 PiB)
      
      This happens because we times the rx/tx bytes values by 10,
      then calculate the short version from that result:
      
      lib/interface.c:ife_print_long()
      
      tx = ptr->stats.tx_bytes;
      short_tx = tx * 10;
      if (tx > 1125899906842624ull) {
        short_tx /= 1125899906842624ull;
        Text = "PiB";
      }
      
      But multiplying anything more than 819 PiB by 10 overflows a ull
      which is a uint64_t (max value of 9223372036854775807).
      
      We'll never get accuracy over 8192 PiB (2^64) when using ull,
      but we can at least correctly handle values between 819 - 8192 PiB.
      e5f1be13
  3. 11 Nov, 2014 1 commit
  4. 19 Oct, 2014 6 commits
  5. 07 Oct, 2014 5 commits
  6. 06 Oct, 2014 1 commit
  7. 04 Oct, 2014 2 commits
  8. 26 Apr, 2014 1 commit
  9. 18 Feb, 2014 1 commit
  10. 17 Feb, 2014 1 commit
  11. 14 Feb, 2014 2 commits
  12. 13 Feb, 2014 1 commit
  13. 26 Nov, 2013 1 commit
  14. 21 Oct, 2013 1 commit
  15. 10 Oct, 2013 1 commit
  16. 08 Oct, 2013 1 commit
  17. 30 Sep, 2013 2 commits
  18. 30 Aug, 2013 4 commits
  19. 29 Aug, 2013 1 commit
  20. 21 Jun, 2013 1 commit
  21. 15 Jun, 2013 3 commits
  22. 14 Jun, 2013 1 commit