1. 03 May, 2016 10 commits
    • Eric Dumazet's avatar
      fq_codel: add batch ability to fq_codel_drop() · 9d18562a
      Eric Dumazet authored
      In presence of inelastic flows and stress, we can call
      fq_codel_drop() for every packet entering fq_codel qdisc.
      
      fq_codel_drop() is quite expensive, as it does a linear scan
      of 4 KB of memory to find a fat flow.
      Once found, it drops the oldest packet of this flow.
      
      Instead of dropping a single packet, try to drop 50% of the backlog
      of this fat flow, with a configurable limit of 64 packets per round.
      
      TCA_FQ_CODEL_DROP_BATCH_SIZE is the new attribute to make this
      limit configurable.
      
      With this strategy the 4 KB search is amortized to a single cache line
      per drop [1], so fq_codel_drop() no longer appears at the top of kernel
      profile in presence of few inelastic flows.
      
      [1] Assuming a 64byte cache line, and 1024 buckets
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Reported-by: default avatarDave Taht <dave.taht@gmail.com>
      Cc: Jonathan Morton <chromatix99@gmail.com>
      Acked-by: default avatarJesper Dangaard Brouer <brouer@redhat.com>
      Acked-by: Dave Taht
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9d18562a
    • Kazuya Mizuguchi's avatar
      ravb: Remove rx buffer ALIGN · 094e43d5
      Kazuya Mizuguchi authored
      Aligning the reception data size is not required.
      Signed-off-by: default avatarKazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
      Signed-off-by: default avatarYoshihiro Kaneko <ykaneko0929@gmail.com>
      Tested-by: default avatarSimon Horman <horms+renesas@verge.net.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      094e43d5
    • David S. Miller's avatar
      Merge tag 'wireless-drivers-next-for-davem-2016-05-02' of... · ede00a5c
      David S. Miller authored
      Merge tag 'wireless-drivers-next-for-davem-2016-05-02' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next
      
      Kalle Valo says:
      
      ====================
      wireless-drivers patches for 4.7
      
      Major changes:
      
      brcmfmac
      
      * add support for nl80211 BSS_SELECT feature
      
      mwifiex
      
      * add platform specific wakeup interrupt support
      
      ath10k
      
      * implement set_tsf() for 10.2.4 branch
      * remove rare MSI range support
      * remove deprecated firmware API 1 support
      
      ath9k
      
      * add module parameter to invert LED polarity
      
      wcn36xx
      
      * fixes to get the driver properly working on Dragonboard 410c
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ede00a5c
    • Eric Dumazet's avatar
      net: relax expensive skb_unclone() in iptunnel_handle_offloads() · 9580bf2e
      Eric Dumazet authored
      Locally generated TCP GSO packets having to go through a GRE/SIT/IPIP
      tunnel have to go through an expensive skb_unclone()
      
      Reallocating skb->head is a lot of work.
      
      Test should really check if a 'real clone' of the packet was done.
      
      TCP does not care if the original gso_type is changed while the packet
      travels in the stack.
      
      This adds skb_header_unclone() which is a variant of skb_clone()
      using skb_header_cloned() check instead of skb_cloned().
      
      This variant can probably be used from other points.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9580bf2e
    • Florian Westphal's avatar
      netdevice: shrink size of struct netdev_queue · c0ef079c
      Florian Westphal authored
      - trans_timeout is incremented when tx queue timed out (tx watchdog).
      - tx_maxrate is set via sysfs
      
      Moving tx_maxrate to read-mostly part shrinks the struct by 64 bytes.
      While at it, also move trans_timeout (it is out-of-place in the
      'write-mostly' part).
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Acked-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c0ef079c
    • David S. Miller's avatar
      Merge branch 'bridge-per-vlan-stats' · e8194d4f
      David S. Miller authored
      Nikolay Aleksandrov says:
      
      ====================
      bridge: per-vlan stats
      
      This set adds support for bridge per-vlan statistics.
      In order to be able to dump statistics for many vlans we need a way to
      continue dumping after reaching maximum size, thus patches 01 and 02 extend
      the new stats API with a per-device extended link stats attribute and
      callback which can save its local state and continue where it left off
      afterwards. I considered using the already existing "fill_xstats" callback
      but it gets confusing since we need to separate the linkinfo dump from the
      new stats api dump and adding a flag/argument to do that just looks messy.
      I don't think the rtnl_link_ops size is an issue, so adding these seemed
      like the cleaner approach.
      
      Patches 03 and 04 add the stats support and netlink dump support
      respectively. The stats accounting is controlled via a bridge option which
      is default off, thus the performance impact is kept minimal.
      I've tested this set with both old and modified iproute2, kmemleak on and
      some traffic stress tests while adding/removing vlans and ports.
      
      v3:
       - drop the RCU pvid patch and remove one pointer fetch as requested
       - make stats accounting optional with default to off, the option is in the
         same cache line as vlan_proto and vlan_enabled, so it is already fetched
         before the fast path check thus the performance impact is minimal, this
         also allows us to avoid one vlan lookup and return early when using pvid
       - rebased and retested
      
      v2:
       - Improve the error checking, rename lidx to prividx and save the current
         idx user instead of restricting it to one in patch 01
       - squash patch 02 into 01 and remove the restriction
       - add callback descriptions, improve the size calculation and change the
         xstats message structure to have an embedding level per rtnl link type
         so we can avoid one call to get the link type (and thus filter on it)
         and also each link type can now have any number of private attributes
         inside
       - fix a problem where the vlan stats are not dumped if the bridge has 0
         vlans on it but has vlans on the ports, add bridge link type private
         attributes and also add paddings for future extensions to avoid at least
         a few netlink attributes and improve struct alignment
       - drop the is_skb_forwardable argument constifying patch as it's not
         needed anymore, but it's a nice cleanup which I'll send separately
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e8194d4f
    • Nikolay Aleksandrov's avatar
      bridge: netlink: export per-vlan stats · a60c0903
      Nikolay Aleksandrov authored
      Add a new LINK_XSTATS_TYPE_BRIDGE attribute and implement the
      RTM_GETSTATS callbacks for IFLA_STATS_LINK_XSTATS (fill_linkxstats and
      get_linkxstats_size) in order to export the per-vlan stats.
      The paddings were added because soon these fields will be needed for
      per-port per-vlan stats (or something else if someone beats me to it) so
      avoiding at least a few more netlink attributes.
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a60c0903
    • Nikolay Aleksandrov's avatar
      bridge: vlan: learn to count · 6dada9b1
      Nikolay Aleksandrov authored
      Add support for per-VLAN Tx/Rx statistics. Every global vlan context gets
      allocated a per-cpu stats which is then set in each per-port vlan context
      for quick access. The br_allowed_ingress() common function is used to
      account for Rx packets and the br_handle_vlan() common function is used
      to account for Tx packets. Stats accounting is performed only if the
      bridge-wide vlan_stats_enabled option is set either via sysfs or netlink.
      A struct hole between vlan_enabled and vlan_proto is used for the new
      option so it is in the same cache line. Currently it is binary (on/off)
      but it is intentionally restricted to exactly 0 and 1 since other values
      will be used in the future for different purposes (e.g. per-port stats).
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6dada9b1
    • Nikolay Aleksandrov's avatar
      net: rtnetlink: add linkxstats callbacks and attribute · 97a47fac
      Nikolay Aleksandrov authored
      Add callbacks to calculate the size and fill link extended statistics
      which can be split into multiple messages and are dumped via the new
      rtnl stats API (RTM_GETSTATS) with the IFLA_STATS_LINK_XSTATS attribute.
      Also add that attribute to the idx mask check since it is expected to
      be able to save state and resume dumping (e.g. future bridge per-vlan
      stats will be dumped via this attribute and callbacks).
      Each link type should nest its private attributes under the per-link type
      attribute. This allows to have any number of separated private attributes
      and to avoid one call to get the dev link type.
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      97a47fac
    • Nikolay Aleksandrov's avatar
      net: rtnetlink: allow rtnl_fill_statsinfo to save private state counter · e8872a25
      Nikolay Aleksandrov authored
      The new prividx argument allows the current dumping device to save a
      private state counter which would enable it to continue dumping from
      where it left off. And the idxattr is used to save the current idx user
      so multiple prividx using attributes can be requested at the same time
      as suggested by Roopa Prabhu.
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e8872a25
  2. 02 May, 2016 30 commits