1. 14 Aug, 2009 5 commits
  2. 12 Aug, 2009 3 commits
  3. 06 Aug, 2009 1 commit
    • Krishna Kumar's avatar
      net: Avoid enqueuing skb for default qdiscs · bbd8a0d3
      Krishna Kumar authored
      dev_queue_xmit enqueue's a skb and calls qdisc_run which
      dequeue's the skb and xmits it. In most cases, the skb that
      is enqueue'd is the same one that is dequeue'd (unless the
      queue gets stopped or multiple cpu's write to the same queue
      and ends in a race with qdisc_run). For default qdiscs, we
      can remove the redundant enqueue/dequeue and simply xmit the
      skb since the default qdisc is work-conserving.
      The patch uses a new flag - TCQ_F_CAN_BYPASS to identify the
      default fast queue. The controversial part of the patch is
      incrementing qlen when a skb is requeued - this is to avoid
      checks like the second line below:
      +  } else if ((q->flags & TCQ_F_CAN_BYPASS) && !qdisc_qlen(q) &&
      >>         !q->gso_skb &&
      +          !test_and_set_bit(__QDISC_STATE_RUNNING, &q->state)) {
      Results of a 2 hour testing for multiple netperf sessions (1,
      2, 4, 8, 12 sessions on a 4 cpu system-X). The BW numbers are
      aggregate Mb/s across iterations tested with this version on
      System-X boxes with Chelsio 10gbps cards:
      Size |  ORG BW          NEW BW   |
      128K |  156964          159381   |
      256K |  158650          162042   |
      Changes from ver1:
      1. Move sch_direct_xmit declaration from sch_generic.h to
      2. Update qdisc basic statistics for direct xmit path.
      3. Set qlen to zero in qdisc_reset.
      4. Changed some function names to more meaningful ones.
      Signed-off-by: default avatarKrishna Kumar <krkumar2@in.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
  4. 05 Aug, 2009 1 commit
  5. 04 Aug, 2009 3 commits
    • Igor Perminov's avatar
      mac80211: FIF_PSPOLL filter flag · e3b90ca2
      Igor Perminov authored
      When an interface is configured in the AP mode, the mac80211
      implementation doesn't inform the driver to receive PS Poll frames.
      It leads to inability to communicate with power-saving stations
      The FIF_CONTROL flag isn't passed by mac80211 to
      ieee80211_ops.configure_filter when an interface is in the AP mode.
      And it's ok, because we don't want to receive ACK frames and other
      control ones, but only PS Poll ones.
      This patch introduces the FIF_PSPOLL filter flag in addition to
      FIF_CONTROL, which means for the driver "pass PS Poll frames".
      This flag is passed to the driver:
      A) When an interface is configured in the AP mode.
      B) In all cases, when the FIF_CONTROL flag was passed earlier (in
      addition to it).
      Signed-off-by: default avatarIgor Perminov <igor.perminov@inbox.ru>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    • Luis R. Rodriguez's avatar
      cfg80211: enable country IE support to all cfg80211 drivers · 8b19e6ca
      Luis R. Rodriguez authored
      Since the bss is always set now once we are connected, if the
      bss has its own information element we refer to it and pass that
      instead of relying on mac80211's parsing.
      Now all cfg80211 drivers get country IE support, automatically and
      we reduce the call overhead that we had on mac80211 which called this
      upon every beacon and instead now call this only upon a successfull
      connection by a STA on cfg80211.
      Acked-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    • Luis R. Rodriguez's avatar
      mac80211: redefine usage of the mac80211 workqueue · 42935eca
      Luis R. Rodriguez authored
      The mac80211 workqueue exists to enable mac80211 and drivers
      to queue their own work on a single threaded workqueue. mac80211
      takes care to flush the workqueue during suspend but we never
      really had requirements on drivers for how they should use
      the workqueue in consideration for suspend.
      We extend mac80211 to document how the mac80211 workqueue should
      be used, how it should not be used and finally move raw access to
      the workqueue to mac80211 only. Drivers and mac80211 use helpers
      to queue work onto the mac80211 workqueue:
        * ieee80211_queue_work()
        * ieee80211_queue_delayed_work()
      These helpers will now warn if mac80211 already completed its
      suspend cycle and someone is trying to queue work. mac80211
      flushes the mac80211 workqueue prior to suspend a few times,
      but we haven't taken the care to ensure drivers won't add more
      work after suspend. To help with this we add a warning when
      someone tries to add work and mac80211 already completed the
      suspend cycle.
      Drivers should ensure they cancel any work or delayed work
      in the mac80211 stop() callback.
      Signed-off-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
  6. 03 Aug, 2009 2 commits
    • Luis R. Rodriguez's avatar
      cfg80211: fix regression on beacon world roaming feature · 37184244
      Luis R. Rodriguez authored
      A regression was added through patch a4ed90d6:
      "cfg80211: respect API on orig_flags on channel for beacon hint"
      We did indeed respect _orig flags but the intention was not clearly
      stated in the commit log. This patch fixes firmware issues picked
      up by iwlwifi when we lift passive scan of beaconing restrictions
      on channels its EEPROM has been configured to always enable.
      By doing so though we also disallowed beacon hints on devices
      registering their wiphy with custom world regulatory domains
      enabled, this happens to be currently ath5k, ath9k and ar9170.
      The passive scan and beacon restrictions on those devices would
      never be lifted even if we did find a beacon and the hardware did
      support such enhancements when world roaming.
      Since Johannes indicates iwlwifi firmware cannot be changed to
      allow beacon hinting we set up a flag now to specifically allow
      drivers to disable beacon hints for devices which cannot use them.
      We enable the flag on iwlwifi to disable beacon hints and by default
      enable it for all other drivers. It should be noted beacon hints lift
      passive scan flags and beacon restrictions when we receive a beacon from
      an AP on any 5 GHz non-DFS channels, and channels 12-14 on the 2.4 GHz
      band. We don't bother with channels 1-11 as those channels are allowed
      world wide.
      This should fix world roaming for ath5k, ath9k and ar9170, thereby
      improving scan time when we receive the first beacon from any AP,
      and also enabling beaconing operation (AP/IBSS/Mesh) on cards which
      would otherwise not be allowed to do so. Drivers not using custom
      regulatory stuff (wiphy_apply_custom_regulatory()) were not affected
      by this as the orig_flags for the channels would have been cleared
      upon wiphy registration.
      I tested this with a world roaming ath5k card.
      Cc: Jouni Malinen <jouni.malinen@atheros.com>
      Signed-off-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
      Reviewed-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    • Dave Young's avatar
      bluetooth: rfcomm_init bug fix · af0d3b10
      Dave Young authored
      rfcomm tty may be used before rfcomm_tty_driver initilized,
      The problem is that now socket layer init before tty layer, if userspace
      program do socket callback right here then oops will happen.
      reporting in:
      make 3 changes:
      1. remove #ifdef in rfcomm/core.c,
      make it blank function when rfcomm tty not selected in rfcomm.h
      2. tune the rfcomm_init error patch to ensure
      tty driver initilized before rfcomm socket usage.
      3. remove __exit for rfcomm_cleanup_sockets
      because above change need call it in a __init function.
      Reported-by: default avatarOliver Hartkopp <oliver@hartkopp.net>
      Tested-by: default avatarOliver Hartkopp <oliver@hartkopp.net>
      Signed-off-by: default avatarDave Young <hidave.darkstar@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
  7. 02 Aug, 2009 2 commits
  8. 30 Jul, 2009 2 commits
    • Neil Horman's avatar
      xfrm: select sane defaults for xfrm[4|6] gc_thresh · a33bc5c1
      Neil Horman authored
      Choose saner defaults for xfrm[4|6] gc_thresh values on init
      Currently, the xfrm[4|6] code has hard-coded initial gc_thresh values
      (set to 1024).  Given that the ipv4 and ipv6 routing caches are sized
      dynamically at boot time, the static selections can be non-sensical.
      This patch dynamically selects an appropriate gc threshold based on
      the corresponding main routing table size, using the assumption that
      we should in the worst case be able to handle as many connections as
      the routing table can.
      For ipv4, the maximum route cache size is 16 * the number of hash
      buckets in the route cache.  Given that xfrm4 starts garbage
      collection at the gc_thresh and prevents new allocations at 2 *
      gc_thresh, we set gc_thresh to half the maximum route cache size.
      For ipv6, its a bit trickier.  there is no maximum route cache size,
      but the ipv6 dst_ops gc_thresh is statically set to 1024.  It seems
      sane to select a simmilar gc_thresh for the xfrm6 code that is half
      the number of hash buckets in the v6 route cache times 16 (like the v4
      code does).
      Signed-off-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • Hannes Eder's avatar
      IPVS: use pr_fmt · 9aada7ac
      Hannes Eder authored
      While being at it cleanup whitespace.
      Signed-off-by: default avatarHannes Eder <heder@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
  9. 29 Jul, 2009 3 commits
  10. 27 Jul, 2009 2 commits
    • Johannes Berg's avatar
      mac80211: fix PS-poll response, race · 3fa52056
      Johannes Berg authored
      When a station queries us for a PS-poll response, we wrongly
      queue the frame on the virtual interface's queue rather than
      the pending queue.
      Additionally, fix a race condition where we could potentially
      send multiple frames to the sleeping station due to using a
      station flag rather than a packet flag. When converting to a
      packet flag, we can also convert p54 and remove the filter
      clearing we added for it.
      (Also remove a now dead function)
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Reported-by: default avatarBob Copeland <me@bobcopeland.com>
      Tested-by: default avatarBob Copeland <me@bobcopeland.com>
      Cc: Christian Lamparter <chunkeey@web.de>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    • Johannes Berg's avatar
      cfg80211: make aware of net namespaces · 463d0183
      Johannes Berg authored
      In order to make cfg80211/nl80211 aware of network namespaces,
      we have to do the following things:
       * del_virtual_intf method takes an interface index rather
         than a netdev pointer - simply change this
       * nl80211 uses init_net a lot, it changes to use the sender's
         network namespace
       * scan requests use the interface index, hold a netdev pointer
         and reference instead
       * we want a wiphy and its associated virtual interfaces to be
         in one netns together, so
          - we need to be able to change ns for a given interface, so
            export dev_change_net_namespace()
          - for each virtual interface set the NETIF_F_NETNS_LOCAL
            flag, and clear that flag only when the wiphy changes ns,
            to disallow breaking this invariant
       * when a network namespace goes away, we need to reparent the
         wiphy to init_net
       * cfg80211 users that support creating virtual interfaces must
         create them in the wiphy's namespace, currently this affects
         only mac80211
      The end result is that you can now switch an entire wiphy into
      a different network namespace with the new command
      	iw phy#<idx> set netns <pid>
      and all virtual interfaces will follow (or the operation fails).
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
  11. 26 Jul, 2009 1 commit
  12. 24 Jul, 2009 5 commits
  13. 23 Jul, 2009 3 commits
  14. 20 Jul, 2009 2 commits
  15. 16 Jul, 2009 1 commit
    • Eric Dumazet's avatar
      net: sock_copy() fixes · 4dc6dc71
      Eric Dumazet authored
      Commit e912b114
      (net: sk_prot_alloc() should not blindly overwrite memory)
      took care of not zeroing whole new socket at allocation time.
      sock_copy() is another spot where we should be very careful.
      We should not set refcnt to a non null value, until
      we are sure other fields are correctly setup, or
      a lockless reader could catch this socket by mistake,
      while not fully (re)initialized.
      This patch puts sk_node & sk_refcnt to the very beginning
      of struct sock to ease sock_copy() & sk_prot_alloc() job.
      We add appropriate smp_wmb() before sk_refcnt initializations
      to match our RCU requirements (changes to sock keys should
      be committed to memory before sk_refcnt setting)
      Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
  16. 15 Jul, 2009 1 commit
  17. 12 Jul, 2009 3 commits