1. 27 Mar, 2016 20 commits
  2. 21 Mar, 2016 11 commits
  3. 14 Mar, 2016 3 commits
  4. 06 Mar, 2016 6 commits
    • Stephen Hemminger's avatar
      Merge branch 'master' into net-next · 0cfb9f6a
      Stephen Hemminger authored
      0cfb9f6a
    • Phil Sutter's avatar
      tc: pedit: Fix retain value for ihl adjustments · 338b003b
      Phil Sutter authored
      Since the IP Header Length field is just half a byte, adjust retain to
      only match these bits so the Version field is not overwritten by
      accident.
      
      The whole concept is actually broken due to dependency on endianness
      which pedit ignores.
      Signed-off-by: default avatarPhil Sutter <phil@nwl.cc>
      338b003b
    • Phil Sutter's avatar
      tc: pedit: Fix parse_cmd() · f440e9d8
      Phil Sutter authored
      This was horribly broken:
      * pack_key8() and pack_key16() ...
        * missed to invert retain value when applying it to the mask,
        * did not sanitize val by ANDing it with retain,
        * and ignored the mask which is necessary for 'invert' command.
      * pack_key16() did not convert mask to network byte order.
      * Changing the retain value for 'invert' or 'retain' operation seems
        just plain wrong.
      * While here, also got rid of unnecessary offset sanitization in
        pack_key32().
      * Simplify code a bit by always assigning the local mask variable to
        tkey->mask before calling any of the pack_key*() variants.
      Signed-off-by: default avatarPhil Sutter <phil@nwl.cc>
      f440e9d8
    • Phil Sutter's avatar
      tc: pedit: Fix layered op parsing · ec0ceeec
      Phil Sutter authored
      After lookup of the layered op submodule, pedit would pass argv and argc
      including the layered op identifier at first position which confused the
      submodule parser. Fix this by calling NEXT_ARG() before calling the
      parse_peopt() callback.
      Signed-off-by: default avatarPhil Sutter <phil@nwl.cc>
      ec0ceeec
    • Phil Sutter's avatar
      libnetlink: Double the dump buffer size · 72b365e8
      Phil Sutter authored
      There have been reports about 'ip addr' printing "Message truncated" on
      systems with large numbers of VFs. Although I haven't been able to get
      my hands on hardware suitable to reproduce this, increasing the dump
      buffer has been reported to resolve the issue. For want of a better
      idea, just double the buffer size to 32k.
      
      Feels like this opportunistic buffer size selection is rather
      workarounding a design flaw in libnetlink or maybe even the netlink
      protocol itself.
      Signed-off-by: default avatarPhil Sutter <phil@nwl.cc>
      72b365e8
    • Phil Sutter's avatar
      ifstat, nstat: fix daemon mode · dd81ee04
      Phil Sutter authored
      Since the relevant code (and it's bugs) is identical in both files, fix
      them in one go. This patch fixes multiple issues:
      
      * Using 'int' for the 'tdiff' variable does not suffice on 64bit
        systems, the assigned initial time difference makes it wrap and
        contain a negative value afterwards. Instead use the more appropriate
        'time_t' type.
      
      * As far as I understood the code, poll() is supposed to time out just
        at the right time to trigger update_db() in the configured interval.
        Therefore it's timeout must be set to the desired interval *minus* the
        time that has already passed since then.
      
      * With the last change to the algorithm in place, it does not make sense
        to call update_db() before returning data to the connected client.
        Actually, it never does otherwise we could skip the periodic updates
        in the first place.
      Signed-off-by: default avatarPhil Sutter <phil@nwl.cc>
      dd81ee04