1. 02 8月, 2018 29 次提交
  2. 01 8月, 2018 8 次提交
  3. 31 7月, 2018 3 次提交
    • Y
      hv_netvsc: Add per-cpu ethtool stats for netvsc · 6ae74671
      Yidong Ren 提交于
      This patch implements following ethtool stats fields for netvsc:
      cpu<n>_tx/rx_packets/bytes
      cpu<n>_vf_tx/rx_packets/bytes
      
      Corresponding per-cpu counters already exist in current code. Exposing
      these counters will help troubleshooting performance issues.
      
      for_each_present_cpu() was used instead of for_each_possible_cpu().
      for_each_possible_cpu() would create very long and useless output.
      It is still being used for internal buffer, but not for ethtool
      output.
      
      There could be an overflow if cpu was added between ethtool
      call netvsc_get_sset_count() and netvsc_get_ethtool_stats() and
      netvsc_get_strings(). (still safe if cpu was removed)
      ethtool makes these three function calls separately.
      As long as we use ethtool, I can't see any clean solution.
      
      Currently and in foreseeable short term, Hyper-V doesn't support
      cpu hot-plug. Plus, ethtool is for admin use. Unlikely the admin
      would perform such combo operations.
      
      Changes in v2:
        - Remove cpp style comment
        - Resubmit after freeze
      
      Changes in v3:
        - Reimplemented with kvmalloc instead of alloc_percpu
      
      Changes in v4:
        - Fixed inconsistent array size
        - Use kvmalloc_array instead of kvmalloc
      Signed-off-by: NYidong Ren <yidren@microsoft.com>
      Reviewed-by: NStephen Hemminger <sthemmin@microsoft.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6ae74671
    • D
      Merge branch 'selftests-mirror-to-gretap-with-team' · 494f2e76
      David S. Miller 提交于
      Petr Machata says:
      
      ====================
      A test for mirror-to-gretap with team in UL packet path
      
      This patchset adds a test for "tc action mirred mirror" where the
      mirrored-to device is a gretap, and underlay path contains a team
      device.
      
      In patch #1 require_command() is added, which should henceforth be used
      to declare dependence on a certain tool.
      
      In patch #2, two new functions, team_create() and team_destroy(), are
      added to lib.sh.
      
      The newly-added test uses arping, which isn't necessarily available.
      Therefore patch #3 introduces $ARPING, and a preexisting test is fixed
      to require_command $ARPING.
      
      In patches #4 and #5, two new tests are added. In both cases, a team
      device is on egress path of a mirrored packet in a mirror-to-gretap
      scenario. In the first one, the team device is in loadbalance mode, in
      the second one it's in lacp mode. (The difference in modes necessitates
      a different testing strategy, hence two test cases instead of just
      parameterizing one.)
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      494f2e76
    • P
      selftests: forwarding: Test mirror-to-gretap w/ UL team LACP · 541c6ce3
      Petr Machata 提交于
      This tests mirror-to-gretap when an underlay packet path includes a team
      device which is not in loadbalance mode, but in LACP mode. The test
      manipulates LAG membership to achieve changes in txability, thus making
      sure that a driver that offloads mirror-to-gretap doesn't just consider
      upness of a device.
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      541c6ce3