1. 08 Feb, 2019 11 commits
  2. 07 Feb, 2019 15 commits
  3. 05 Feb, 2019 3 commits
    • Steve Wise's avatar
      RDMA/iwpm: move kdoc comments to functions · a2bfd708
      Steve Wise authored
      Move the iwpm kdoc comments from the prototype declarations to above
      the function bodies.  There are no functional changes in this patch.
      Signed-off-by: default avatarSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      a2bfd708
    • Leon Romanovsky's avatar
      RDMA/cma: Remove CM_ID statistics provided by rdma-cm module · a78e8723
      Leon Romanovsky authored
      Netlink statistics exported by rdma-cm never had any working user space
      component published to the mailing list or to any open source
      project. Canvassing various proprietary users, and the original requester,
      we find that there are no real users of this interface.
      
      This patch simply removes all occurrences of RDMA CM netlink in favour of
      modern nldev implementation, which provides the same information and
      accompanied by widely used user space component.
      Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Reviewed-by: default avatarSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      a78e8723
    • Bart Van Assche's avatar
      IB/mlx5: Do not use hw_access_flags for be and CPU data · bf3b4f06
      Bart Van Assche authored
      Avoid that sparse reports the following for the mlx5 driver:
      
      drivers/infiniband/hw/mlx5/qp.c:2671:34: warning: invalid assignment: |=
      drivers/infiniband/hw/mlx5/qp.c:2671:34:    left side has type restricted __be32
      drivers/infiniband/hw/mlx5/qp.c:2671:34:    right side has type int
      drivers/infiniband/hw/mlx5/qp.c:2679:34: warning: invalid assignment: |=
      drivers/infiniband/hw/mlx5/qp.c:2679:34:    left side has type restricted __be32
      drivers/infiniband/hw/mlx5/qp.c:2679:34:    right side has type int
      drivers/infiniband/hw/mlx5/qp.c:2680:34: warning: invalid assignment: |=
      drivers/infiniband/hw/mlx5/qp.c:2680:34:    left side has type restricted __be32
      drivers/infiniband/hw/mlx5/qp.c:2680:34:    right side has type int
      drivers/infiniband/hw/mlx5/qp.c:2684:34: warning: invalid assignment: |=
      drivers/infiniband/hw/mlx5/qp.c:2684:34:    left side has type restricted __be32
      drivers/infiniband/hw/mlx5/qp.c:2684:34:    right side has type int
      drivers/infiniband/hw/mlx5/qp.c:2686:28: warning: cast from restricted __be32
      drivers/infiniband/hw/mlx5/qp.c:2686:28: warning: incorrect type in argument 1 (different base types)
      drivers/infiniband/hw/mlx5/qp.c:2686:28:    expected unsigned int [usertype] val
      drivers/infiniband/hw/mlx5/qp.c:2686:28:    got restricted __be32 [usertype]
      drivers/infiniband/hw/mlx5/qp.c:2686:28: warning: cast from restricted __be32
      drivers/infiniband/hw/mlx5/qp.c:2686:28: warning: cast from restricted __be32
      drivers/infiniband/hw/mlx5/qp.c:2686:28: warning: cast from restricted __be32
      drivers/infiniband/hw/mlx5/qp.c:2686:28: warning: cast from restricted __be32
      
      This patch does not change any functionality.
      
      Fixes: a60109dc ("IB/mlx5: Add support for extended atomic operations")
      Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
      Acked-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      bf3b4f06
  4. 04 Feb, 2019 11 commits
    • Steve Wise's avatar
      RDMA/IWPM: Support no port mapping requirements · b0bad9ad
      Steve Wise authored
      A soft iwarp driver that uses the host TCP stack via a kernel mode socket
      does not need port mapping.  In fact, if the port map daemon, iwpmd, is
      running, then iwpmd must not try and create/bind a socket to the actual
      port for a soft iwarp connection, since the driver already has that socket
      bound.
      
      Yet if the soft iwarp driver wants to interoperate with hard iwarp devices
      that -are- using port mapping, then the soft iwarp driver's mappings still
      need to be maintained and advertised by the iwpm protocol.
      
      This patch enhances the rdma driver<->iwcm interface to allow an iwarp
      driver to specify that it does not want port mapping.  The iwpm
      kernel<->iwpmd interface is also enhanced to pass up this information on
      map requests.
      
      Care is taken to interoperate with the current iwpmd version (ABI version
      3) and only use the new NL attributes if iwpmd supports ABI version 4.
      
      The ABI version define has also been created in rdma_netlink.h so both
      kernel and user code can share it.  The iwcm and iwpmd negotiate the ABI
      version to use with a new HELLO netlink message.
      Signed-off-by: default avatarSteve Wise <swise@opengridcomputing.com>
      Reviewed-by: default avatarTatyana Nikolova <Tatyana.E.Nikolova@intel.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      b0bad9ad
    • Steve Wise's avatar
      RDMA/IWPM: refactor the IWPM message attribute names · f76903d5
      Steve Wise authored
      In order to add new IWPM_NL attributes, the enums for the IWPM commands
      attributes are refactored such that a new attribute can be added without
      breaking ABI version 3. Instead of sharing nl attribute enums for both
      request and response messages, we create separate enums for each IWPM
      message request and reply.  This allows us to extend any given IWPM
      message by adding new attributes for just that message.  These new enums
      are created, though, in a way to avoid breaking ABI version 3.
      Signed-off-by: default avatarSteve Wise <swise@opengridcomputing.com>
      Reviewed-by: default avatarTatyana Nikolova <Tatyana.E.Nikolova@intel.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      f76903d5
    • Steve Wise's avatar
      iw_cxgb*: kzalloc the iwcm verbs struct · 95b8e384
      Steve Wise authored
      So future additions to that struct get initialized by default.
      Signed-off-by: default avatarSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      95b8e384
    • Wei Hu (Xavier)'s avatar
      RDMA/hns: Fix the chip hanging caused by sending doorbell during reset · d3743fa9
      Wei Hu (Xavier) authored
      On hi08 chip, There is a possibility of chip hanging when sending doorbell
      during reset. We can fix it by prohibiting doorbell during reset.
      
      Fixes: 2d407888 ("RDMA/hns: Add support for processing send wr and receive wr")
      Signed-off-by: default avatarWei Hu (Xavier) <xavier.huwei@huawei.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      d3743fa9
    • Wei Hu (Xavier)'s avatar
      RDMA/hns: Fix the chip hanging caused by sending mailbox&CMQ during reset · 6a04aed6
      Wei Hu (Xavier) authored
      On hi08 chip, There is a possibility of chip hanging and some errors when
      sending mailbox & doorbell during reset.  We can fix it by prohibiting
      mailbox and doorbell during reset and reset occurred to ensure that
      hardware can work normally.
      
      Fixes: a04ff739 ("RDMA/hns: Add command queue support for hip08 RoCE driver")
      Signed-off-by: default avatarWei Hu (Xavier) <xavier.huwei@huawei.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      6a04aed6
    • Wei Hu (Xavier)'s avatar
      RDMA/hns: Fix the Oops during rmmod or insmod ko when reset occurs · d061effc
      Wei Hu (Xavier) authored
      In the reset process, the hns3 NIC driver notifies the RoCE driver to
      perform reset related processing by calling the .reset_notify() interface
      registered by the RoCE driver in hip08 SoC.
      
      In the current version, if a reset occurs simultaneously during the
      execution of rmmod or insmod ko, there may be Oops error as below:
      
       Internal error: Oops: 86000007 [#1] PREEMPT SMP
       Modules linked in: hns_roce(O) hns3(O) hclge(O) hnae3(O) [last unloaded: hns_roce_hw_v2]
       CPU: 0 PID: 14 Comm: kworker/0:1 Tainted: G           O      4.19.0-ge00d540 #1
       Hardware name: Huawei Technologies Co., Ltd.
       Workqueue: events hclge_reset_service_task [hclge]
       pstate: 60c00009 (nZCv daif +PAN +UAO)
       pc : 0xffff00000100b0b8
       lr : 0xffff00000100aea0
       sp : ffff000009afbab0
       x29: ffff000009afbab0 x28: 0000000000000800
       x27: 0000000000007ff0 x26: ffff80002f90c004
       x25: 00000000000007ff x24: ffff000008f97000
       x23: ffff80003efee0a8 x22: 0000000000001000
       x21: ffff80002f917ff0 x20: ffff8000286ea070
       x19: 0000000000000800 x18: 0000000000000400
       x17: 00000000c4d3225d x16: 00000000000021b8
       x15: 0000000000000400 x14: 0000000000000400
       x13: 0000000000000000 x12: ffff80003fac6e30
       x11: 0000800036303000 x10: 0000000000000001
       x9 : 0000000000000000 x8 : ffff80003016d000
       x7 : 0000000000000000 x6 : 000000000000003f
       x5 : 0000000000000040 x4 : 0000000000000000
       x3 : 0000000000000004 x2 : 00000000000007ff
       x1 : 0000000000000000 x0 : 0000000000000000
       Process kworker/0:1 (pid: 14, stack limit = 0x00000000af8f0ad9)
       Call trace:
        0xffff00000100b0b8
        0xffff00000100b3a0
        hns_roce_init+0x624/0xc88 [hns_roce]
        0xffff000001002df8
        0xffff000001006960
        hclge_notify_roce_client+0x74/0xe0 [hclge]
        hclge_reset_service_task+0xa58/0xbc0 [hclge]
        process_one_work+0x1e4/0x458
        worker_thread+0x40/0x450
        kthread+0x12c/0x130
        ret_from_fork+0x10/0x18
       Code: bad PC value
      
      In the reset process, we will release the resources firstly, and after the
      hardware reset is completed, we will reapply resources and reconfigure the
      hardware.
      
      We can solve this problem by modifying both the NIC and the RoCE
      driver. We can modify the concurrent processing in the NIC driver to avoid
      calling the .reset_notify and .uninit_instance ops at the same time. And
      we need to modify the RoCE driver to record the reset stage and the
      driver's init/uninit state, and check the state in the .reset_notify,
      .init_instance. and uninit_instance functions to avoid NULL pointer
      operation.
      
      Fixes: cb7a94c9 ("RDMA/hns: Add reset process for RoCE in hip08")
      Signed-off-by: default avatarWei Hu (Xavier) <xavier.huwei@huawei.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      d061effc
    • Kamal Heib's avatar
      RDMA/rxe: Improve loopback marking · 668aa15b
      Kamal Heib authored
      Currently a packet is marked for loopback only if the source and
      destination addresses equals. This is not enough when multiple gids are
      present in rxe device's gid table and the traffic is from one gid to
      another. Fix it by marking the packet for loopback if the destination MAC
      address is equal to the source MAC address.
      Signed-off-by: default avatarKamal Heib <kamalheib1@gmail.com>
      Reviewed-by: default avatarYuval Shaia <yuval.shaia@oracle.com>
      Tested-by: default avatarYuval Shaia <yuval.shaia@oracle.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      668aa15b
    • Kamal Heib's avatar
      RDMA/rxe: Move rxe_init_av() to rxe_av.c · fa407188
      Kamal Heib authored
      Move the function rxe_init_av() to rxe_av.c file and use it instead of
      calling rxe_av_from_attr() and rxe_av_fill_ip_info(), also remove the
      unused rxe_dev parameter from rxe_init_av().
      Signed-off-by: default avatarKamal Heib <kamalheib1@gmail.com>
      Reviewed-by: default avatarYuval Shaia <yuval.shaia@oracle.com>
      Reviewed-by: default avatarZhu Yanjun <yanjun.zhu@oracle.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      fa407188
    • YueHaibing's avatar
      RDMA/hns: Make some function static · c3c668e7
      YueHaibing authored
      Fixes the following sparse warnings:
      
      drivers/infiniband/hw/hns/hns_roce_hw_v2.c:5822:5: warning:
       symbol 'hns_roce_v2_query_srq' was not declared. Should it be static?
      drivers/infiniband/hw/hns/hns_roce_srq.c:158:6: warning:
       symbol 'hns_roce_srq_free' was not declared. Should it be static?
      drivers/infiniband/hw/hns/hns_roce_srq.c:81:5: warning:
       symbol 'hns_roce_srq_alloc' was not declared. Should it be static?
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      c3c668e7
    • Jason Gunthorpe's avatar
      Merge tag 'v5.0-rc5' into rdma.git for-next · 6a8a2aa6
      Jason Gunthorpe authored
      Linux 5.0-rc5
      
      Needed to merge the include/uapi changes so we have an up to date
      single-tree for these files. Patches already posted are also expected to
      need this for dependencies.
      6a8a2aa6
    • Bart Van Assche's avatar
      IB/core: Remove ib_sg_dma_address() and ib_sg_dma_len() · a163afc8
      Bart Van Assche authored
      Keeping single line wrapper functions is not useful. Hence remove the
      ib_sg_dma_address() and ib_sg_dma_len() functions. This patch does not
      change any functionality.
      Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      a163afc8