Skip to content
  1. Mar 09, 2018
  2. Mar 08, 2018
    • Yishai Hadas's avatar
      IB/mlx4: Move mlx4_uverbs_ex_query_device_resp to include/uapi/ · d50a8a96
      Yishai Hadas authored
      
      
      This struct is involved in the user API for mlx4 and should not be hidden
      inside a driver header file.
      
      Fixes: 09d208b2 ("IB/mlx4: Add report for RSS capabilities by vendor channel")
      Reviewed-by: default avatarMark Bloch <markb@mellanox.com>
      Signed-off-by: default avatarYishai Hadas <yishaih@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      d50a8a96
    • Doug Ledford's avatar
      Merge tag 'mlx5-updates-2018-02-28-1' of... · 1abb791f
      Doug Ledford authored
      Merge tag 'mlx5-updates-2018-02-28-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux
      
       into k.o/wip/dl-for-next
      
      mlx5-updates-2018-02-28-1 (IPSec-1)
      
      This series consists of some fixes and refactors for the mlx5 drivers,
      especially around the FPGA and flow steering. Most of them are trivial
      fixes and are the foundation of allowing IPSec acceleration from user-space.
      
      We use flow steering abstraction in order to accelerate IPSec packets.
      When a user creates a steering rule, [s]he states that we'll carry an
      encrypt/decrypt flow action (using a specific configuration) for every
      packet which conforms to a certain match. Since currently offloading these
      packets is done via FPGA, we'll add another set of flow steering ops.
      These ops will execute the required FPGA commands and then call the
      standard steering ops.
      
      In order to achieve this, we need that the commands will get all the
      required information. Therefore, we pass the fte object and embed the
      flow_action struct inside the fte. In addition, we add the shim layer
      that will later be used for alternating between the standard and the
      FPGA steering commands.
      
      Some fixes, like " net/mlx5e: Wait for FPGA command responses with a timeout"
      are very relevant for user-space applications, as these applications could
      be killed, but we still want to wait for the FPGA and update the kernel's
      database.
      
      Regards,
      Aviad and Matan
      
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      1abb791f
    • Zhu Yanjun's avatar
      IB/rxe: change the function rxe_init_device_param type · befd8d98
      Zhu Yanjun authored
      
      
      The function rxe_init_device_param always return 0. So the function
      type is changed to void.
      
      CC: Srinivas Eeda <srinivas.eeda@oracle.com>
      CC: Junxiao Bi <junxiao.bi@oracle.com>
      Signed-off-by: default avatarZhu Yanjun <yanjun.zhu@oracle.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      befd8d98
    • Zhu Yanjun's avatar
      IB/rxe: remove unnecessary rxe in rxe_send · 31f1bd14
      Zhu Yanjun authored
      
      
      In the function rxe_send, the variable rxe is not used in it.
      So it should be removed.
      
      CC: Srinivas Eeda <srinivas.eeda@oracle.com>
      CC: Junxiao Bi <junxiao.bi@oracle.com>
      Signed-off-by: default avatarZhu Yanjun <yanjun.zhu@oracle.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      31f1bd14
    • Zhu Yanjun's avatar
      IB/rxe: remove unnecessary skb_clone · 86af6176
      Zhu Yanjun authored
      
      
      In send_atomic_ack function, it is not necessary to make a
      skb_clone. To gain better performance (high throughput and
      low latency), this skb_clone is removed.
      
      The following tests are made.
      
       server                       client
      ---------                    ---------
      |1.1.1.1|<----rxe-channel--->|1.1.1.2|
      ---------                    ---------
      
      On server: rping -s -a 1.1.1.1 -v -C 1000 -S 512
      On client: rping -c -a 1.1.1.1 -v -C 1000 -S 512
      
      The kernel config CONFIG_DEBUG_KMEMLEAK is enabled on both server
      and client.
      
      This test runs for several hours. There is no memory leak and the whole
      system can work well.
      
      Based on the above network, the following tests are made.
      
      Server: ibv_rc_pingpong -d rxe0 -g 1
      Client: ibv_rc_pingpong -d rxe0 -g 1 1.1.1.1
      
      The test results on Server(10 tests are made).
      Before:
      Throughput is 137.07 Mbit/sec
      Latency is 517.76 usec/iter
      
      After:
      Throughput is 148.85 Mbit/sec
      Latency is 476.64 usec/iter
      
      The throughput is enhanced and the latency is reduced.
      
      CC: Srinivas Eeda <srinivas.eeda@oracle.com>
      CC: Junxiao Bi <junxiao.bi@oracle.com>
      Signed-off-by: default avatarZhu Yanjun <yanjun.zhu@oracle.com>
      
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      86af6176
    • Bart Van Assche's avatar
      IB/srpt: Add RDMA/CM support · 63cf1a90
      Bart Van Assche authored
      
      
      Add a parameter for configuring the port on which the ib_srpt driver
      listens for incoming RDMA/CM connections, namely
      /sys/kernel/config/target/srpt/discovery_auth/rdma_cm_port. The default
      value for this parameter is 0 which means "do not listen for incoming
      RDMA/CM connections". Add RDMA/CM support to all code that handles
      connection state changes. Modify srpt_init_nodeacl() such that ACLs can
      be configured for IPv4 and IPv6 addresses.
      
      Note: incoming connection requests are only accepted for ports that
      have been enabled. See also the "if (!sport->enabled)" code in the
      connection request handler. See also the following configfs attribute:
      /sys/kernel/config/target/srpt/$port/$port/enable.
      
      Signed-off-by: default avatarBart Van Assche <bart.vanassche@wdc.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      63cf1a90
  3. Mar 07, 2018
  4. Mar 01, 2018
    • Hernán Gonzalez's avatar
      IB/rxe: Remove unused variable (char *rxe_qp_state_name[]) · c33bab62
      Hernán Gonzalez authored
      
      
      Note: This is compile only tested as I have no access to the hw.  This
      variable was not used anywhere in the code. Removing it saves 24 bytes.
      
      add/remove: 0/1 grow/shrink: 0/0 up/down: 0/-24 (-24)
      Function                                     old     new   delta
      rxe_qp_state_name                             24       -     -24
      Total: Before=3348732, After=3348708, chg -0.00%
      
      Signed-off-by: default avatarHernán Gonzalez <hernan@vanguardiasur.com.ar>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      c33bab62
    • Hernán Gonzalez's avatar
      IB/qib: Move char *qib_sdma_state_names[] and constify while there. · 7f566a91
      Hernán Gonzalez authored
      
      
      Note: This is compile only tested as I have no access to the hw.
      This variable was not used in qib_sdma.c but in qib_iba7322.c. Declaring it
      there, as static, saves 56 bytes.
      
      add/remove: 0/2 grow/shrink: 0/0 up/down: 0/-144 (-144)
      Function                                     old     new   delta
      qib_sdma_state_names                          56       -     -56
      qib_sdma_event_names                          88       -     -88
      Total: Before=2874565, After=2874421, chg -0.01%
      
      Signed-off-by: default avatarHernán Gonzalez <hernan@vanguardiasur.com.ar>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      7f566a91
    • Hernán Gonzalez's avatar
      IB/qib: Remove unused variable (char *qib_sdma_event_names[]) · 4f1d5834
      Hernán Gonzalez authored
      
      
      Note: This is compile only tested as I have no access to the hw.
      
      This variable was not used anywhere in the code. Removing it saves 88
      bytes.
      
      add/remove: 0/1 grow/shrink: 0/0 up/down: 0/-88 (-88)
      Function                                     old     new   delta
      qib_sdma_event_names                          88       -     -88
      Total: Before=2874565, After=2874477, chg -0.00%
      
      Signed-off-by: default avatarHernán Gonzalez <hernan@vanguardiasur.com.ar>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      4f1d5834
    • Bart Van Assche's avatar
      IB/srp: Use %pIS instead of inet_ntop() · 7da09af9
      Bart Van Assche authored
      
      
      Except for a minor log message change, this patch does not change
      any functionality. For the introduction of %pIS, see also commit
      10679643 ("lib: vsprintf: add IPv4/v6 generic %p[Ii]S[pfs]
      format specifier").
      
      Signed-off-by: default avatarBart Van Assche <bart.vanassche@wdc.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      7da09af9
    • Bart Van Assche's avatar
      Revert "IB/srp: Avoid that a cable pull can trigger a kernel crash" · c74ff750
      Bart Van Assche authored
      
      
      The caller of srp_ib_lookup_path() is responsible for holding a reference
      on the SCSI host. That means that commit 8a0d18c6 was not necessary.
      Hence revert it.
      
      Signed-off-by: default avatarBart Van Assche <bart.vanassche@wdc.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      c74ff750
    • Bart Van Assche's avatar
      IB/srp: Fix srp_abort() · e68088e7
      Bart Van Assche authored
      
      
      Before commit e494f6a7 ("[SCSI] improved eh timeout handler") it
      did not really matter whether or not abort handlers like srp_abort()
      called .scsi_done() when returning another value than SUCCESS. Since
      that commit however this matters. Hence only call .scsi_done() when
      returning SUCCESS.
      
      Signed-off-by: default avatarBart Van Assche <bart.vanassche@wdc.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      e68088e7
    • Arnd Bergmann's avatar
      infiniband: bnxt_re: use BIT_ULL() for 64-bit bit masks · a8ed7487
      Arnd Bergmann authored
      
      
      On 32-bit targets, we otherwise get a warning about an impossible constant
      integer expression:
      
      In file included from include/linux/kernel.h:11,
                       from include/linux/interrupt.h:6,
                       from drivers/infiniband/hw/bnxt_re/ib_verbs.c:39:
      drivers/infiniband/hw/bnxt_re/ib_verbs.c: In function 'bnxt_re_query_device':
      include/linux/bitops.h:7:24: error: left shift count >= width of type [-Werror=shift-count-overflow]
       #define BIT(nr)   (1UL << (nr))
                              ^~
      drivers/infiniband/hw/bnxt_re/bnxt_re.h:61:34: note: in expansion of macro 'BIT'
       #define BNXT_RE_MAX_MR_SIZE_HIGH BIT(39)
                                        ^~~
      drivers/infiniband/hw/bnxt_re/bnxt_re.h:62:30: note: in expansion of macro 'BNXT_RE_MAX_MR_SIZE_HIGH'
       #define BNXT_RE_MAX_MR_SIZE  BNXT_RE_MAX_MR_SIZE_HIGH
                                    ^~~~~~~~~~~~~~~~~~~~~~~~
      drivers/infiniband/hw/bnxt_re/ib_verbs.c:149:25: note: in expansion of macro 'BNXT_RE_MAX_MR_SIZE'
        ib_attr->max_mr_size = BNXT_RE_MAX_MR_SIZE;
                               ^~~~~~~~~~~~~~~~~~~
      
      Fixes: 872f3578 ("RDMA/bnxt_re: Add support for MRs with Huge pages")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      a8ed7487
    • Arnd Bergmann's avatar
      infiniband: qplib_fp: fix pointer cast · e5d6574d
      Arnd Bergmann authored
      
      
      Building for a 32-bit target results in a couple of warnings from casting
      between a 32-bit pointer and a 64-bit integer:
      
      drivers/infiniband/hw/bnxt_re/qplib_fp.c: In function 'bnxt_qplib_service_nq':
      drivers/infiniband/hw/bnxt_re/qplib_fp.c:333:23: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
          bnxt_qplib_arm_srq((struct bnxt_qplib_srq *)q_handle,
                             ^
      drivers/infiniband/hw/bnxt_re/qplib_fp.c:336:12: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
                  (struct bnxt_qplib_srq *)q_handle,
                  ^
      In file included from include/linux/byteorder/little_endian.h:5,
                       from arch/arm/include/uapi/asm/byteorder.h:22,
                       from include/asm-generic/bitops/le.h:6,
                       from arch/arm/include/asm/bitops.h:342,
                       from include/linux/bitops.h:38,
                       from include/linux/kernel.h:11,
                       from include/linux/interrupt.h:6,
                       from drivers/infiniband/hw/bnxt_re/qplib_fp.c:39:
      drivers/infiniband/hw/bnxt_re/qplib_fp.c: In function 'bnxt_qplib_create_srq':
      include/uapi/linux/byteorder/little_endian.h:31:43: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
       #define __cpu_to_le64(x) ((__force __le64)(__u64)(x))
                                                 ^
      include/linux/byteorder/generic.h:86:21: note: in expansion of macro '__cpu_to_le64'
       #define cpu_to_le64 __cpu_to_le64
                           ^~~~~~~~~~~~~
      drivers/infiniband/hw/bnxt_re/qplib_fp.c:569:19: note: in expansion of macro 'cpu_to_le64'
        req.srq_handle = cpu_to_le64(srq);
      
      Using a uintptr_t as an intermediate works on all architectures.
      
      Fixes: 37cb11ac ("RDMA/bnxt_re: Add SRQ support for Broadcom adapters")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      e5d6574d