1. 19 May, 2015 29 commits
  2. 15 May, 2015 4 commits
    • Frederic Danis's avatar
      Bluetooth: btbcm: Fix calls to __hci_cmd_sync() · 43b79209
      Frederic Danis authored
      Remove test of command reply status as it is already performed by
      __hci_cmd_sync().
      
      __hci_cmd_sync_ev() function already returns an error if it got a
      non-zero status either through a Command Complete or a Command
      Status event.
      
      For both of these events the status is collected up in the event
      handlers called by hci_event_packet() and then passed as the second
      parameter to req_complete_skb(). The req_complete_skb() callback in
      turn is hci_req_sync_complete() for __hci_cmd_sync_ev() which stores
      the status in hdev->req_result. The hdev->req_result is then further
      converted through bt_to_errno() back in __hci_cmd_sync_ev().
      Signed-off-by: default avatarFrederic Danis <frederic.danis@linux.intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      43b79209
    • Frederic Danis's avatar
      Bluetooth: btintel: Fix calls to __hci_cmd_sync() · b1f5cf0c
      Frederic Danis authored
      Remove test of command reply status as it is already performed by
      __hci_cmd_sync().
      
      __hci_cmd_sync_ev() function already returns an error if it got a
      non-zero status either through a Command Complete or a Command
      Status event.
      
      For both of these events the status is collected up in the event
      handlers called by hci_event_packet() and then passed as the second
      parameter to req_complete_skb(). The req_complete_skb() callback in
      turn is hci_req_sync_complete() for __hci_cmd_sync_ev() which stores
      the status in hdev->req_result. The hdev->req_result is then further
      converted through bt_to_errno() back in __hci_cmd_sync_ev().
      Signed-off-by: default avatarFrederic Danis <frederic.danis@linux.intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      b1f5cf0c
    • Frederic Danis's avatar
      Bluetooth: btusb: Fix calls to __hci_cmd_sync() · 5e13441c
      Frederic Danis authored
      Remove test of command reply status as it is already performed by
      __hci_cmd_sync().
      
      __hci_cmd_sync_ev() function already returns an error if it got a
      non-zero status either through a Command Complete or a Command
      Status event.
      
      For both of these events the status is collected up in the event
      handlers called by hci_event_packet() and then passed as the second
      parameter to req_complete_skb(). The req_complete_skb() callback in
      turn is hci_req_sync_complete() for __hci_cmd_sync_ev() which stores
      the status in hdev->req_result. The hdev->req_result is then further
      converted through bt_to_errno() back in __hci_cmd_sync_ev().
      Signed-off-by: default avatarFrederic Danis <frederic.danis@linux.intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      5e13441c
    • Frederic Danis's avatar
      Bluetooth: Fix calls to __hci_cmd_sync() · cffd2eed
      Frederic Danis authored
      Remove test of command reply status as it is already performed by
      __hci_cmd_sync().
      
      __hci_cmd_sync_ev() function already returns an error if it got a
      non-zero status either through a Command Complete or a Command
      Status event.
      
      For both of these events the status is collected up in the event
      handlers called by hci_event_packet() and then passed as the second
      parameter to req_complete_skb(). The req_complete_skb() callback in
      turn is hci_req_sync_complete() for __hci_cmd_sync_ev() which stores
      the status in hdev->req_result. The hdev->req_result is then further
      converted through bt_to_errno() back in __hci_cmd_sync_ev().
      Signed-off-by: default avatarFrederic Danis <frederic.danis@linux.intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      cffd2eed
  3. 14 May, 2015 1 commit
  4. 13 May, 2015 6 commits
    • Xinming Hu's avatar
      Bluetooth: btmrvl: fix compilation warning · a1e85f04
      Xinming Hu authored
      This patch fixes a compile warnning "dump_num maybe used uninitialized in
      this function".
      Signed-off-by: default avatarXinming Hu <huxm@marvell.com>
      Signed-off-by: default avatarAmitkumar Karwar <akarwar@marvell.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      a1e85f04
    • Leo Yan's avatar
      Bluetooth: btwilink: remove DEBUG define · 4541c561
      Leo Yan authored
      Remove the DEBUG define as the debug code; so can remove mass debug info
      from log buffer when using dmesg.
      Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      4541c561
    • Pablo Neira's avatar
      net: kill useless net_*_ingress_queue() definitions when NET_CLS_ACT is unset · f0b5e8a4
      Pablo Neira authored
      This fixes 4577139b ("net: use jump label patching for ingress qdisc in
      __netif_receive_skb_core").
      
      The only client of this is sch_ingress and it depends on NET_CLS_ACT. So
      there is no way these definition can be of any help.
      
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      Acked-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarAlexei Starovoitov <ast@plumgrid.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f0b5e8a4
    • David S. Miller's avatar
      Merge branch 'packet_rollover' · 9f0a74d7
      David S. Miller authored
      Willem de Bruijn says:
      
      ====================
      refine packet socket rollover:
      
      1. mitigate a case of lock contention
      2. avoid exporting resource exhaustion to other sockets,
         by migrating only to a victim socket that has ample room
      3. avoid reordering of most flows on the socket,
         by migrating first the flow responsible for load imbalance
      4. help processes detect load imbalance,
         by exporting rollover counters
      
      Context: rollover implements flow migration in packet socket fanout
      groups in case of extreme load imbalance. It is a specific
      implementation of migration that minimizes reordering by selecting
      the same victim socket when possible (and by selecting subsequent
      victims in a round robin fashion, from which its name derives).
      
      Changes:
        v2 -> v3:
          - statistics: replace unsigned long with __aligned_u64
        v1 -> v2:
          - huge flow detection: run lockless
          - huge flow detection: replace stored index with random
          - contention avoidance: test in packet_poll while lock held
          - contention avoidance: clear pressure sooner
      
                packet_poll and packet_recvmsg would clear only if the sock
                is empty to avoid taking the necessary lock. But,
                * packet_poll already holds this lock, so a lockless variant
                  __packet_rcv_has_room is cheap.
                * packet_recvmsg is usually called only for non-ring sockets,
                  which also runs lockless.
      
          - preparation: drop "single return" patch
      
                packet_rcv_has_room is now a locked wrapper around
                __packet_rcv_has_room, achieving the same (single footer).
      
      The benchmark mentioned in the patches is at
      https://github.com/wdebruij/kerneltools/blob/master/tests/bench_rollover.c
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9f0a74d7
    • Willem de Bruijn's avatar
      packet: rollover statistics · a9b63918
      Willem de Bruijn authored
      Rollover indicates exceptional conditions. Export a counter to inform
      socket owners of this state.
      
      If no socket with sufficient room is found, rollover fails. Also count
      these events.
      
      Finally, also count when flows are rolled over early thanks to huge
      flow detection, to validate its correctness.
      
      Tested:
        Read counters in bench_rollover on all other tests in the patchset
      Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a9b63918
    • Willem de Bruijn's avatar
      packet: rollover huge flows before small flows · 3b3a5b0a
      Willem de Bruijn authored
      Migrate flows from a socket to another socket in the fanout group not
      only when the socket is full. Start migrating huge flows early, to
      divert possible 4-tuple attacks without affecting normal traffic.
      
      Introduce fanout_flow_is_huge(). This detects huge flows, which are
      defined as taking up more than half the load. It does so cheaply, by
      storing the rxhashes of the N most recent packets. If over half of
      these are the same rxhash as the current packet, then drop it. This
      only protects against 4-tuple attacks. N is chosen to fit all data in
      a single cache line.
      
      Tested:
        Ran bench_rollover for 10 sec with 1.5 Mpps of single flow input.
      
          lpbb5:/export/hda3/willemb# ./bench_rollover -l 1000 -r -s
          cpu         rx       rx.k     drop.k   rollover     r.huge   r.failed
            0         14         14          0          0          0          0
            1         20         20          0          0          0          0
            2         16         16          0          0          0          0
            3    6168824    6168824          0    4867721    4867721          0
            4    4867741    4867741          0          0          0          0
            5         12         12          0          0          0          0
            6         15         15          0          0          0          0
            7         17         17          0          0          0          0
      Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3b3a5b0a