1. 30 7月, 2014 2 次提交
  2. 29 7月, 2014 5 次提交
    • J
      tipc: make tipc_buf_append() more robust · 13e9b997
      Jon Paul Maloy 提交于
      As per comment from David Miller, we try to make the buffer reassembly
      function more resilient to user errors than it is today.
      
      - We check that the "*buf" parameter always is set, since this is
        mandatory input.
      
      - We ensure that *buf->next always is set to NULL before linking in
        the buffer, instead of relying of the caller to have done this.
      
      - We ensure that the "tail" pointer in the head buffer's control
        block is initialized to NULL when the first fragment arrives.
      Signed-off-by: NJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      13e9b997
    • D
      Merge tag 'master-2014-07-25' of... · 3fd0202a
      David S. Miller 提交于
      Merge tag 'master-2014-07-25' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next
      
      John W. Linville says:
      
      ====================
      pull request: wireless-next 2014-07-25
      
      Please pull this batch of updates intended for the 3.17 stream!
      
      For the mac80211 bits, Johannes says:
      
      "We have a lot of TDLS patches, among them a fix that should make hwsim
      tests happy again. The rest, this time, is mostly small fixes."
      
      For the Bluetooth bits, Gustavo says:
      
      "Some more patches for 3.17. The most important change here is the move of
      the 6lowpan code to net/6lowpan. It has been agreed with Davem that this
      change will go through the bluetooth tree. The rest are mostly clean up and
      fixes."
      
      and,
      
      "Here follows some more patches for 3.17. These are mostly fixes to what
      we've sent to you before for next merge window."
      
      For the iwlwifi bits, Emmanuel says:
      
      "I have the usual amount of BT Coex stuff. Arik continues to work
      on TDLS and Ariej contributes a few things for HS2.0. I added a few
      more things to the firmware debugging infrastructure. Eran fixes a
      small bug - pretty normal content."
      
      And for the Atheros bits, Kalle says:
      
      "For ath6kl me and Jessica added support for ar6004 hw3.0, our latest
      version of ar6004.
      
      For ath10k Janusz added a printout so that it's easier to check what
      ath10k kconfig options are enabled. He also added a debugfs file to
      configure maximum amsdu and ampdu values. Also we had few fixes as
      usual."
      
      On top of that is the usual large batch of various driver updates --
      brcmfmac, mwifiex, the TI drivers, and wil6210 all get some action.
      Rafał has also been very busy with b43 and related updates.
      
      Also, I pulled the wireless tree into this in order to resolve a
      merge conflict...
      
      P.S.  The change to fs/compat_ioctl.c reflects a name change in a
      Bluetooth header file...
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3fd0202a
    • D
      bonding: fix a memory leak in bond_arp_send_all() · a67eed57
      Dan Carpenter 提交于
      This test is reversed so the memory is always leaked.  It's better style
      to remove the test anyway.
      
      Fixes: 3e403a77 ('bonding: make it possible to have unlimited nested upper vlans')
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Acked-by: NVeaceslav Falico <vfalico@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a67eed57
    • M
      netlink: Fix shadow warning on jiffies · d87de1f3
      Mark Rustad 提交于
      Change formal parameter name to not shadow the global jiffies.
      Signed-off-by: NMark Rustad <mark.d.rustad@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d87de1f3
    • D
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next · f1b714bb
      David S. Miller 提交于
      Jeff Kirsher says:
      
      ====================
      Intel Wired LAN Driver Updates 2014-07-25
      
      This series contains updates to e1000e, ixgbe and ixgbevf.
      
      Mark provides all the changes for ixgbe and ixgbevf.  Converts some udelay()
      calls to the preferred usleep_range().  Fixes a spurious release of the
      semaphore in several functions when there was a failure to acquire the
      semaphore in the first place.  Fixes a X540 semaphore error where an
      incorrect check was treating success as failure and vice-versa.  Fixed
      ixgbe_write_mbx() error when it was being called and there was no
      mbx->ops.write method defined, so no error code was returned.  The
      corresponding read function would explicitly return an error in such a
      case as do other functions.  Cleans up unused (dead) code by removing it.
      Finally make return values more direct, eliminating some gotos and
      otherwise unneeded conditionals, which allows the removal of some local
      variables.
      
      David provides all the changes for e1000e.  Fix CRC errors with jumbo
      traffic for 82579, i217 and i218 client parts to increase the gap
      between the read and write pointers in the transmit FIFO.  Added code
      to check and respond to previously ignored return values from NVM
      access functions.  Added support for EEE in Sx states and fixed EEE in
      S5 with runtime PM enabled.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f1b714bb
  3. 28 7月, 2014 10 次提交
    • D
      Merge branch 'inet_frag_kill_lru_list' · 6ceed786
      David S. Miller 提交于
      Nikolay Aleksandrov says:
      
      ====================
      inet: frag: cleanup and update
      
      The end goal of this patchset is to remove the LRU list and to move the
      frag eviction to a work queue. It also does a couple of necessary cleanups
      and fixes. Brief patch descriptions:
      Patches 1 - 3 inclusive: necessary clean ups
      Patch 4 moves the eviction from the softirqs to a workqueue.
      Patch 5 removes the nqueues counter which was protected by the LRU lock
      Patch 6 removes the, by now unused, lru list.
      Patch 7 moves the rebuild timer to the workqueue and schedules the rebuilds
              only if we've hit the maximum queue length on some of the chains.
      Patch 8 migrate the rwlock to a seqlock since the rehash is usually a rare
              operation.
      Patch 9 introduces an artificial global memory limit based on the value of
              init_net's high_thresh which is used to cap the high_thresh of the
              other namespaces. Also introduces some sane limits on the other
              tunables, and makes it impossible to have low_thresh > high_thresh.
      
      Here are some numbers from running netperf before and after the patchset:
      Each test consists of the following setting: -I 95,5 -i 15,10
      
      1. Bound test (-T 4,4)
      1.1 Virtio before the patchset -
      MIGRATED UDP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.122.177 () port 0 AF_INET : +/-2.500% @ 95% conf.  : cpu bind
      Socket  Message  Elapsed      Messages                   CPU      Service
      Size    Size     Time         Okay Errors   Throughput   Util     Demand
      bytes   bytes    secs            #      #   10^6bits/sec % SS     us/KB
      
      212992   64000   30.00      722177      0    12325.1     34.55    2.025
      212992           30.00      368020            6280.9     34.05    0.752
      
      1.2 Virtio after the patchset -
      MIGRATED UDP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.122.177 () port 0 AF_INET : +/-2.500% @ 95% conf.  : cpu bind
      Socket  Message  Elapsed      Messages                   CPU      Service
      Size    Size     Time         Okay Errors   Throughput   Util     Demand
      bytes   bytes    secs            #      #   10^6bits/sec % SS     us/KB
      
      212992   64000   30.00      727030      0    12407.9     35.45    1.876
      212992           30.00      505405            8625.5     34.92    0.693
      
      2. Virtio unbound test
      2.1 Before the patchset
      MIGRATED UDP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.122.177 () port 0 AF_INET : +/-2.500% @ 95% conf.
      Socket  Message  Elapsed      Messages
      Size    Size     Time         Okay Errors   Throughput
      bytes   bytes    secs            #      #   10^6bits/sec
      
      212992   64000   30.00      730008      0    12458.77
      212992           30.00      416721           7112.02
      
      2.2 After the patchset
      MIGRATED UDP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.122.177 () port 0 AF_INET : +/-2.500% @ 95% conf.
      Socket  Message  Elapsed      Messages
      Size    Size     Time         Okay Errors   Throughput
      bytes   bytes    secs            #      #   10^6bits/sec
      
      212992   64000   30.00      731129      0    12477.89
      212992           30.00      487707           8323.50
      
      3. 10 gig unbound tests
      3.1 Before the patchset
      MIGRATED UDP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.133.1 () port 0 AF_INET : +/-2.500% @ 95% conf.
      Socket  Message  Elapsed      Messages
      Size    Size     Time         Okay Errors   Throughput
      bytes   bytes    secs            #      #   10^6bits/sec
      
      212992   64000   30.00      417209      0    7120.33
      212992           30.00      416740           7112.33
      
      3.2 After the patchset
      MIGRATED UDP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.133.1 () port 0 AF_INET : +/-2.500% @ 95% conf.
      Socket  Message  Elapsed      Messages
      Size    Size     Time         Okay Errors   Throughput
      bytes   bytes    secs            #      #   10^6bits/sec
      
      212992   64000   30.00      438009      0    7475.33
      212992           30.00      437630           7468.87
      
      Given the options each netperf ran between 10 and 15 times for 30 seconds
      to get the necessary confidence, also the tests themselves ran 3 times and
      were consistent.
      Another set of tests that I ran were parallel stress tests which consisted
      of flooding the machine with fragmented packets from different sources with
      frag timeout set to 0 (so there're lots of timeouts) and low_thresh set to
      1 byte (so evictions are happening all the time) and on top of that running
      a namespace create/destroy endless loop with network interfaces and
      addresses that got flooded (for the brief periods they were up) in parallel.
      This test ran for an hour without any issues.
      ====================
      6ceed786
    • N
      inet: frag: set limits and make init_net's high_thresh limit global · 1bab4c75
      Nikolay Aleksandrov 提交于
      This patch makes init_net's high_thresh limit to be the maximum for all
      namespaces, thus introducing a global memory limit threshold equal to the
      sum of the individual high_thresh limits which are capped.
      It also introduces some sane minimums for low_thresh as it shouldn't be
      able to drop below 0 (or > high_thresh in the unsigned case), and
      overall low_thresh should not ever be above high_thresh, so we make the
      following relations for a namespace:
      init_net:
       high_thresh - max(not capped), min(init_net low_thresh)
       low_thresh - max(init_net high_thresh), min (0)
      
      all other namespaces:
       high_thresh = max(init_net high_thresh), min(namespace's low_thresh)
       low_thresh = max(namespace's high_thresh), min(0)
      
      The major issue with having low_thresh > high_thresh is that we'll
      schedule eviction but never evict anything and thus rely only on the
      timers.
      Signed-off-by: NNikolay Aleksandrov <nikolay@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1bab4c75
    • F
      inet: frag: use seqlock for hash rebuild · ab1c724f
      Florian Westphal 提交于
      rehash is rare operation, don't force readers to take
      the read-side rwlock.
      
      Instead, we only have to detect the (rare) case where
      the secret was altered while we are trying to insert
      a new inetfrag queue into the table.
      
      If it was changed, drop the bucket lock and recompute
      the hash to get the 'new' chain bucket that we have to
      insert into.
      
      Joint work with Nikolay Aleksandrov.
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NNikolay Aleksandrov <nikolay@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ab1c724f
    • F
      inet: frag: remove periodic secret rebuild timer · e3a57d18
      Florian Westphal 提交于
      merge functionality into the eviction workqueue.
      
      Instead of rebuilding every n seconds, take advantage of the upper
      hash chain length limit.
      
      If we hit it, mark table for rebuild and schedule workqueue.
      To prevent frequent rebuilds when we're completely overloaded,
      don't rebuild more than once every 5 seconds.
      
      ipfrag_secret_interval sysctl is now obsolete and has been marked as
      deprecated, it still can be changed so scripts won't be broken but it
      won't have any effect. A comment is left above each unused secret_timer
      variable to avoid confusion.
      
      Joint work with Nikolay Aleksandrov.
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NNikolay Aleksandrov <nikolay@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e3a57d18
    • F
      inet: frag: remove lru list · 3fd588eb
      Florian Westphal 提交于
      no longer used.
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3fd588eb
    • F
      inet: frag: don't account number of fragment queues · 434d3054
      Florian Westphal 提交于
      The 'nqueues' counter is protected by the lru list lock,
      once thats removed this needs to be converted to atomic
      counter.  Given this isn't used for anything except for
      reporting it to userspace via /proc, just remove it.
      
      We still report the memory currently used by fragment
      reassembly queues.
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      434d3054
    • F
      inet: frag: move eviction of queues to work queue · b13d3cbf
      Florian Westphal 提交于
      When the high_thresh limit is reached we try to toss the 'oldest'
      incomplete fragment queues until memory limits are below the low_thresh
      value.  This happens in softirq/packet processing context.
      
      This has two drawbacks:
      
      1) processors might evict a queue that was about to be completed
      by another cpu, because they will compete wrt. resource usage and
      resource reclaim.
      
      2) LRU list maintenance is expensive.
      
      But when constantly overloaded, even the 'least recently used' element is
      recent, so removing 'lru' queue first is not 'fairer' than removing any
      other fragment queue.
      
      This moves eviction out of the fast path:
      
      When the low threshold is reached, a work queue is scheduled
      which then iterates over the table and removes the queues that exceed
      the memory limits of the namespace. It sets a new flag called
      INET_FRAG_EVICTED on the evicted queues so the proper counters will get
      incremented when the queue is forcefully expired.
      
      When the high threshold is reached, no more fragment queues are
      created until we're below the limit again.
      
      The LRU list is now unused and will be removed in a followup patch.
      
      Joint work with Nikolay Aleksandrov.
      Suggested-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NNikolay Aleksandrov <nikolay@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b13d3cbf
    • F
      inet: frag: move evictor calls into frag_find function · 86e93e47
      Florian Westphal 提交于
      First step to move eviction handling into a work queue.
      
      We lose two spots that accounted evicted fragments in MIB counters.
      
      Accounting will be restored since the upcoming work-queue evictor
      invokes the frag queue timer callbacks instead.
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      86e93e47
    • F
      inet: frag: remove hash size assumptions from callers · fb3cfe6e
      Florian Westphal 提交于
      hide actual hash size from individual users: The _find
      function will now fold the given hash value into the required range.
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fb3cfe6e
    • F
  4. 26 7月, 2014 12 次提交
  5. 25 7月, 2014 11 次提交