1. 11 Sep, 2016 31 commits
  2. 10 Sep, 2016 9 commits
    • Markus Elfring's avatar
      ATM-iphase: Use kmalloc_array() in tx_init() · e808bb6e
      Markus Elfring authored
      * Multiplications for the size determination of memory allocations
        indicated that array data structures should be processed.
        Thus use the corresponding function "kmalloc_array".
      
        This issue was detected by using the Coccinelle software.
      
      * Replace the specification of data types by pointer dereferences
        to make the corresponding size determination a bit safer according to
        the Linux coding style convention.
      Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e808bb6e
    • David S. Miller's avatar
      Merge branch 'alx-msix' · 171a6c52
      David S. Miller authored
      Tobias Regnery says:
      
      ====================
      alx: add msi-x support
      
      This patchset adds msi-x support to the alx driver. It is a preparatory
      series for multi queue support, which I am currently working on. As there
      is no advantage over msi interrupts without multi queue support, msi-x
      interrupts are disabled by default. In order to test for regressions, a
      new module parameter is added to enable msi-x interrupts.
      
      Based on information of the downstream driver at github.com/qca/alx
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      171a6c52
    • Tobias Regnery's avatar
      alx: add module parameter to enable msi-x support · 0c58ee0b
      Tobias Regnery authored
      msi-x support is default disabled in the alx driver. In order to test msi-x
      interrupts for regressions add a module parameter to the driver.
      Signed-off-by: default avatarTobias Regnery <tobias.regnery@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0c58ee0b
    • Tobias Regnery's avatar
      alx: add msi-x support · dc39a78b
      Tobias Regnery authored
      Add msi-x support to the alx driver. This is in preparation for multi queue
      support.
      
      msi-x interrupts are disabled by default because without multi queue support
      there is no advantage over msi interrupts. The performance numbers observed
      with iperf stay the same.
      
      Based on information of the downstream driver at github.com/qca/alx
      Signed-off-by: default avatarTobias Regnery <tobias.regnery@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dc39a78b
    • Tobias Regnery's avatar
      alx: factor out part of the interrupt handler · a0373aef
      Tobias Regnery authored
      Factor out the handling of misc interrupts into a new function.
      This function can be reused later for msi-x interrupts.
      Signed-off-by: default avatarTobias Regnery <tobias.regnery@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a0373aef
    • Tobias Regnery's avatar
      alx: refactor msi enablement and disablement · 9ee7b683
      Tobias Regnery authored
      Introduce a new flag field for the advanced interrupt capatibilities and add
      new functions to enable and disable msi interrupts. These functions will be
      extended later to cover msi-x interrupts.
      
      We enable msi interrupts earlier in alx_init_intr because with msi-x and multi
      queue support the number of queues must be set before we allocate resources for
      the rx and tx paths.
      Signed-off-by: default avatarTobias Regnery <tobias.regnery@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9ee7b683
    • Baoyou Xie's avatar
      qed: mark symbols static where possible · ba56947a
      Baoyou Xie authored
      We get a few warnings when building kernel with W=1:
      drivers/net/ethernet/qlogic/qed/qed_l2.c:112:5: warning: no previous prototype for 'qed_sp_vport_start' [-Wmissing-prototypes]
      drivers/net/ethernet/qlogic/qed/qed_sriov.c:110:6: warning: no previous prototype for 'qed_iov_is_valid_vfid' [-Wmissing-prototypes]
      drivers/net/ethernet/qlogic/qed/qed_sriov.c:188:5: warning: no previous prototype for 'qed_iov_post_vf_bulletin' [-Wmissing-prototypes]
      drivers/net/ethernet/qlogic/qed/qed_sriov.c:578:6: warning: no previous prototype for 'qed_iov_set_vfs_to_disable' [-Wmissing-prototypes]
      drivers/net/ethernet/qlogic/qed/qed_sriov.c:1135:28: warning: no previous prototype for 'qed_iov_get_public_vf_info' [-Wmissing-prototypes]
      drivers/net/ethernet/qlogic/qed/qed_sriov.c:1148:6: warning: no previous prototype for 'qed_iov_clean_vf' [-Wmissing-prototypes]
      drivers/net/ethernet/qlogic/qed/qed_sriov.c:2444:5: warning: no previous prototype for 'qed_iov_chk_ucast' [-Wmissing-prototypes]
      drivers/net/ethernet/qlogic/qed/qed_sriov.c:2762:5: warning: no previous prototype for 'qed_iov_vf_flr_cleanup' [-Wmissing-prototypes]
      ....
      
      In fact, these functions are only used in the file in which they are
      declared and don't need a declaration, but can be made static.
      so this patch marks these functions with 'static'.
      Signed-off-by: default avatarBaoyou Xie <baoyou.xie@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ba56947a
    • David S. Miller's avatar
      Merge branch 'bpf-helper-cleanups' · 349aa334
      David S. Miller authored
      Daniel Borkmann says:
      
      ====================
      Some BPF helper cleanups
      
      This series contains a couple of misc cleanups and improvements
      for BPF helpers. For details please see individual patches. We
      let this also sit for a few days with Fengguang's kbuild test
      robot, and there were no issues seen (besides one false positive,
      see last one for details).
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      349aa334
    • Daniel Borkmann's avatar
      bpf: add BPF_CALL_x macros for declaring helpers · f3694e00
      Daniel Borkmann authored
      This work adds BPF_CALL_<n>() macros and converts all the eBPF helper functions
      to use them, in a similar fashion like we do with SYSCALL_DEFINE<n>() macros
      that are used today. Motivation for this is to hide all the register handling
      and all necessary casts from the user, so that it is done automatically in the
      background when adding a BPF_CALL_<n>() call.
      
      This makes current helpers easier to review, eases to write future helpers,
      avoids getting the casting mess wrong, and allows for extending all helpers at
      once (f.e. build time checks, etc). It also helps detecting more easily in
      code reviews that unused registers are not instrumented in the code by accident,
      breaking compatibility with existing programs.
      
      BPF_CALL_<n>() internals are quite similar to SYSCALL_DEFINE<n>() ones with some
      fundamental differences, for example, for generating the actual helper function
      that carries all u64 regs, we need to fill unused regs, so that we always end up
      with 5 u64 regs as an argument.
      
      I reviewed several 0-5 generated BPF_CALL_<n>() variants of the .i results and
      they look all as expected. No sparse issue spotted. We let this also sit for a
      few days with Fengguang's kbuild test robot, and there were no issues seen. On
      s390, it barked on the "uses dynamic stack allocation" notice, which is an old
      one from bpf_perf_event_output{,_tp}() reappearing here due to the conversion
      to the call wrapper, just telling that the perf raw record/frag sits on stack
      (gcc with s390's -mwarn-dynamicstack), but that's all. Did various runtime tests
      and they were fine as well. All eBPF helpers are now converted to use these
      macros, getting rid of a good chunk of all the raw castings.
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f3694e00