1. 21 4月, 2016 5 次提交
    • A
      fm10k: Add support for bulk Tx cleanup & cleanup boolean logic · 144d8305
      Alexander Duyck 提交于
      This patch enables bulk free in Tx cleanup for fm10k and cleans up the
      boolean logic in the polling routines for fm10k in the hopes of avoiding
      any mix-ups similar to what occurred with i40e and i40evf.
      Signed-off-by: NAlexander Duyck <aduyck@mirantis.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      144d8305
    • J
      fm10k: remove debug-statistics support · 3ef2f563
      Jacob Keller 提交于
      This change fixes an (ab)use of the ethtool stats API, which could
      result in corrupt memory or misleading stat output. The ethtool stats
      API is not robust enough to handle varying number of statistics due to
      how it requests the size and allocates memory. Remove the poorly conceived
      support originally added for extra debug statistics. In the future,
      a new stats API may open up the ability to display these statistics.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NKrishneil Singh <Krishneil.k.singh@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      3ef2f563
    • J
      fm10k: add helper functions to set strings and data for ethtool stats · 09401ae2
      Jacob Keller 提交于
      Reduce duplicate code and the amount of indentation by adding
      fm10k_add_stat_strings and fm10k_add_ethtool_stats functions which help
      add fm10k_stat structures to the ethtool stats callbacks. This helps
      increase ease of use for future stat additions, and increases code
      readability.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NKrishneil Singh <Krishneil.k.singh@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      09401ae2
    • R
      rtnetlink: add new RTM_GETSTATS message to dump link stats · 10c9ead9
      Roopa Prabhu 提交于
      This patch adds a new RTM_GETSTATS message to query link stats via netlink
      from the kernel. RTM_NEWLINK also dumps stats today, but RTM_NEWLINK
      returns a lot more than just stats and is expensive in some cases when
      frequent polling for stats from userspace is a common operation.
      
      RTM_GETSTATS is an attempt to provide a light weight netlink message
      to explicity query only link stats from the kernel on an interface.
      The idea is to also keep it extensible so that new kinds of stats can be
      added to it in the future.
      
      This patch adds the following attribute for NETDEV stats:
      struct nla_policy ifla_stats_policy[IFLA_STATS_MAX + 1] = {
              [IFLA_STATS_LINK_64]  = { .len = sizeof(struct rtnl_link_stats64) },
      };
      
      Like any other rtnetlink message, RTM_GETSTATS can be used to get stats of
      a single interface or all interfaces with NLM_F_DUMP.
      
      Future possible new types of stat attributes:
      link af stats:
          - IFLA_STATS_LINK_IPV6  (nested. for ipv6 stats)
          - IFLA_STATS_LINK_MPLS  (nested. for mpls/mdev stats)
      extended stats:
          - IFLA_STATS_LINK_EXTENDED (nested. extended software netdev stats like bridge,
            vlan, vxlan etc)
          - IFLA_STATS_LINK_HW_EXTENDED (nested. extended hardware stats which are
            available via ethtool today)
      
      This patch also declares a filter mask for all stat attributes.
      User has to provide a mask of stats attributes to query. filter mask
      can be specified in the new hdr 'struct if_stats_msg' for stats messages.
      Other important field in the header is the ifindex.
      
      This api can also include attributes for global stats (eg tcp) in the future.
      When global stats are included in a stats msg, the ifindex in the header
      must be zero. A single stats message cannot contain both global and
      netdev specific stats. To easily distinguish them, netdev specific stat
      attributes name are prefixed with IFLA_STATS_LINK_
      
      Without any attributes in the filter_mask, no stats will be returned.
      
      This patch has been tested with mofified iproute2 ifstat.
      Suggested-by: NJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: NRoopa Prabhu <roopa@cumulusnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      10c9ead9
    • D
      net: nla_align_64bit() needs to test the right pointer. · e6f268ef
      David S. Miller 提交于
      Netlink messages are appended, one object at a time, to the end of
      the SKB.  Therefore we need to test skb_tail_pointer() not skb->data
      for alignment.
      
      Fixes: 35c58459 ("net: Add helpers for 64-bit aligning netlink attributes.")
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e6f268ef
  2. 20 4月, 2016 11 次提交
  3. 19 4月, 2016 12 次提交
  4. 18 4月, 2016 10 次提交
  5. 17 4月, 2016 2 次提交
    • D
      Merge branch 'nfp-next' · efde611b
      David S. Miller 提交于
      Jakub Kicinski says
      
      ====================
      nfp: cleanups and improvements
      
      Main purpose of this set is to get rid of doing potentially long
      mdelay()s but it also contains some trivial changes I've accumulated.
      First two patches fix harmless copy-paste errors, next two clean up
      the documentation and remove unused defines.  Patch 5 clarifies the
      interpretation of RX descriptor fields.  Patch 6, by far the biggest,
      adds ability to perform FW reconfig asynchronously thanks to which
      we can stop using mdelay().
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      efde611b
    • J
      nfp: add async reconfiguration mechanism · 3d780b92
      Jakub Kicinski 提交于
      Some callers of nfp_net_reconfig() are in atomic context so
      we used to busy wait for commands to complete.  In worst case
      scenario that means locking up a core for up to 5 seconds
      when a command times out.  Lets add a timer-based mechanism
      of asynchronously checking whether reconfiguration completed
      successfully for atomic callers to use.  Non-atomic callers
      can now just sleep.
      
      The approach taken is quite simple because (1) synchronous
      reconfigurations always happen under RTNL (or before device
      is registered); (2) we can coalesce pending reconfigs.
      There is no need for request queues, timer which eventually
      takes a look at reconfiguration result to report errors is
      good enough.
      Signed-off-by: NJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3d780b92