1. 14 3月, 2017 1 次提交
  2. 28 2月, 2017 1 次提交
  3. 27 2月, 2017 2 次提交
    • M
      qed: Don't use attention PTT for configuring BW · 6f437d43
      Mintz, Yuval 提交于
      Commit 653d2ffd6405 ("qed*: Fix link indication race") introduced another
      race - one of the inner functions called from the link-change flow is
      explicitly using the slowpath context dedicated PTT instead of gaining
      that PTT from the caller. Since this flow can now be called from
      a different context as well, we're in risk of the PTT breaking.
      
      Fixes: 653d2ffd6405 ("qed*: Fix link indication race")
      Signed-off-by: NYuval Mintz <Yuval.Mintz@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6f437d43
    • M
      qed: Fix race with multiple VFs · fd3c615a
      Mintz, Yuval 提交于
      A PF syncronizes all IOV activity relating to its VFs
      by using a single workqueue handling the work.
      The workqueue would reach a bitmask of pending VF events
      and act upon each in turn.
      
      Problem is that the indication of a VF message [which sets
      the 'vf event' bit for that VF] arrives and is set in
      the slowpath attention context, which isn't syncronized with
      the processing of the events.
      When multiple VFs are present, it's possible that PF would
      lose the indication of one of the VF's pending evens, leading
      that VF to later timeout.
      
      Instead of adding locks/barriers, simply move from a bitmask
      into a per-VF indication inside that VF entry in the PF database.
      Signed-off-by: NYuval Mintz <Yuval.Mintz@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fd3c615a
  4. 23 2月, 2017 2 次提交
    • B
      qlogic: netxen: constify bin_attribute structures · ff292458
      Bhumika Goyal 提交于
      Declare bin_attribute structures as const as they are only passed as an
      arguments to the functions device_remove_bin_file and
      device_create_bin_file. These function arguments are of type const, so
      bin_attribute structures having this property can be made const too.
      Done using Coccinelle:
      
      @r1 disable optional_qualifier @
      identifier i;
      position p;
      @@
      static struct bin_attribute i@p = {...};
      
      @ok1@
      identifier r1.i;
      position p,p1;
      @@
      (
      device_remove_bin_file(...,&i@p)
      |
      device_create_bin_file(..., &i@p1)
      )
      
      @bad@
      position p!={r1.p,ok1.p,ok1.p1};
      identifier r1.i;
      @@
      i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r1.i;
      @@
      +const
      struct bin_attribute i;
      Signed-off-by: NBhumika Goyal <bhumirks@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ff292458
    • B
      qlogic: qlcnic_sysfs: constify bin_attribute structures · 0ccea221
      Bhumika Goyal 提交于
      Declare bin_attribute structures as const as they are only passed as an
      arguments to the functions device_remove_bin_file and
      device_create_bin_file. These function arguments are of type const, so
      bin_attribute structures having this property can be made const too.
      Done using Coccinelle:
      
      @r1 disable optional_qualifier @
      identifier i;
      position p;
      @@
      static struct bin_attribute i@p = {...};
      
      @ok1@
      identifier r1.i;
      position p,p1;
      @@
      (
      device_remove_bin_file(...,&i@p)
      |
      device_create_bin_file(..., &i@p1)
      )
      
      @bad@
      position p!={r1.p,ok1.p,ok1.p1};
      identifier r1.i;
      @@
      i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r1.i;
      @@
      +const
      struct bin_attribute i;
      Signed-off-by: NBhumika Goyal <bhumirks@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0ccea221
  5. 21 2月, 2017 12 次提交
  6. 20 2月, 2017 3 次提交
  7. 18 2月, 2017 1 次提交
  8. 16 2月, 2017 2 次提交
  9. 07 2月, 2017 1 次提交
  10. 06 2月, 2017 1 次提交
  11. 31 1月, 2017 1 次提交
  12. 26 1月, 2017 1 次提交
    • D
      bpf: add initial bpf tracepoints · a67edbf4
      Daniel Borkmann 提交于
      This work adds a number of tracepoints to paths that are either
      considered slow-path or exception-like states, where monitoring or
      inspecting them would be desirable.
      
      For bpf(2) syscall, tracepoints have been placed for main commands
      when they succeed. In XDP case, tracepoint is for exceptions, that
      is, f.e. on abnormal BPF program exit such as unknown or XDP_ABORTED
      return code, or when error occurs during XDP_TX action and the packet
      could not be forwarded.
      
      Both have been split into separate event headers, and can be further
      extended. Worst case, if they unexpectedly should get into our way in
      future, they can also removed [1]. Of course, these tracepoints (like
      any other) can be analyzed by eBPF itself, etc. Example output:
      
        # ./perf record -a -e bpf:* sleep 10
        # ./perf script
        sock_example  6197 [005]   283.980322:      bpf:bpf_map_create: map type=ARRAY ufd=4 key=4 val=8 max=256 flags=0
        sock_example  6197 [005]   283.980721:       bpf:bpf_prog_load: prog=a5ea8fa30ea6849c type=SOCKET_FILTER ufd=5
        sock_example  6197 [005]   283.988423:   bpf:bpf_prog_get_type: prog=a5ea8fa30ea6849c type=SOCKET_FILTER
        sock_example  6197 [005]   283.988443: bpf:bpf_map_lookup_elem: map type=ARRAY ufd=4 key=[06 00 00 00] val=[00 00 00 00 00 00 00 00]
        [...]
        sock_example  6197 [005]   288.990868: bpf:bpf_map_lookup_elem: map type=ARRAY ufd=4 key=[01 00 00 00] val=[14 00 00 00 00 00 00 00]
             swapper     0 [005]   289.338243:    bpf:bpf_prog_put_rcu: prog=a5ea8fa30ea6849c type=SOCKET_FILTER
      
        [1] https://lwn.net/Articles/705270/Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: NAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a67edbf4
  13. 21 1月, 2017 1 次提交
    • A
      qed: avoid possible stack overflow in qed_ll2_acquire_connection · 0629a330
      Arnd Bergmann 提交于
      struct qed_ll2_info is rather large, so putting it on the stack
      can cause an overflow, as this warning tries to tell us:
      
      drivers/net/ethernet/qlogic/qed/qed_ll2.c: In function 'qed_ll2_start':
      drivers/net/ethernet/qlogic/qed/qed_ll2.c:2159:1: error: the frame size of 1056 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
      
      qed_ll2_start_ooo() already uses a dynamic allocation for the structure
      to work around that problem, and we could do the same in qed_ll2_start()
      as well as qed_roce_ll2_start(), but since the structure is only
      used to pass a couple of initialization values here, it seems nicer
      to replace it with a different structure.
      
      Lacking any idea for better naming, I'm adding 'struct qed_ll2_conn',
      which now contains all the initialization data, and this now simply
      gets copied into struct qed_ll2_info rather than assigning all members
      one by one.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NYuval Mintz <Yuval.Mintz@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0629a330
  14. 18 1月, 2017 1 次提交
  15. 09 1月, 2017 1 次提交
  16. 02 1月, 2017 9 次提交