1. 26 6月, 2018 1 次提交
  2. 24 3月, 2018 1 次提交
    • P
      IB/cma: Resolve route only while receiving CM requests · 114cc9c4
      Parav Pandit 提交于
      Currently CM request for RoCE follows following flow.
      rdma_create_id()
      rdma_resolve_addr()
      rdma_resolve_route()
      For RC QPs:
      rdma_connect()
      ->cma_connect_ib()
        ->ib_send_cm_req()
          ->cm_init_av_by_path()
            ->ib_init_ah_attr_from_path()
      For UD QPs:
      rdma_connect()
      ->cma_resolve_ib_udp()
        ->ib_send_cm_sidr_req()
          ->cm_init_av_by_path()
            ->ib_init_ah_attr_from_path()
      
      In both the flows, route is already resolved before sending CM requests.
      Therefore, code is refactored to avoid resolving route second time in
      ib_cm layer.
      ib_init_ah_attr_from_path() is extended to resolve route when it is not
      yet resolved for RoCE link layer. This is achieved by caller setting
      route_resolved field in path record whenever it has route already
      resolved.
      Signed-off-by: NParav Pandit <parav@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      114cc9c4
  3. 16 3月, 2018 1 次提交
  4. 08 3月, 2018 1 次提交
  5. 23 12月, 2017 1 次提交
    • V
      IB/SA: Check dlid before SA agent queries for ClassPortInfo · af808ece
      Venkata Sandeep Dhanalakota 提交于
      SA queries SM for class port info when there is a LID_CHANGE event.
      
      When a base lid is configured before fm is started ie when smlid is
      not yet assigned, SA handles the LID_CHANGE event and tries query SM
      with lid 0. This will cause an hang.
      
      [ 1106.958820] INFO: task kworker/2:0:23 blocked for more than 120 seconds.
      [ 1106.965082] Tainted: G O 4.12.0+ #1
      [ 1106.969602] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables
       this message.
      [ 1106.977227] kworker/2:0 D 0 23 2 0x00000000
      [ 1106.977250] Workqueue: infiniband update_ib_cpi [ib_core]
      [ 1106.977261] Call Trace:
      [ 1106.977273] __schedule+0x28e/0x860
      [ 1106.977285] schedule+0x36/0x80
      [ 1106.977298] schedule_timeout+0x1a3/0x2e0
      [ 1106.977310] ? radix_tree_iter_tag_clear+0x1b/0x20
      [ 1106.977322] ? idr_alloc+0x64/0x90
      [ 1106.977334] wait_for_completion+0xe3/0x140
      [ 1106.977347] ? wake_up_q+0x80/0x80
      [ 1106.977369] update_ib_cpi+0x163/0x210 [ib_core]
      [ 1106.977381] process_one_work+0x147/0x370
      [ 1106.977394] worker_thread+0x4a/0x390
      [ 1106.977406] kthread+0x109/0x140
      [ 1106.977418] ? process_one_work+0x370/0x370
      [ 1106.977430] ? kthread_park+0x60/0x60
      [ 1106.977443] ret_from_fork+0x22/0x30
      
      Always ensure a proper smlid is assigned before querying SM for cpi.
      
      Fixes: ee1c60b1 ("IB/SA: Modify SA to implicitly cache Class Port info")
      Reviewed-by: NIra Weiny <ira.weiny@intel.com>
      Signed-off-by: NVenkata Sandeep Dhanalakota <venkata.s.dhanalakota@intel.com>
      Signed-off-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      af808ece
  6. 19 12月, 2017 1 次提交
  7. 25 8月, 2017 1 次提交
  8. 23 8月, 2017 1 次提交
  9. 10 8月, 2017 4 次提交
  10. 16 6月, 2017 1 次提交
    • J
      networking: make skb_put & friends return void pointers · 4df864c1
      Johannes Berg 提交于
      It seems like a historic accident that these return unsigned char *,
      and in many places that means casts are required, more often than not.
      
      Make these functions (skb_put, __skb_put and pskb_put) return void *
      and remove all the casts across the tree, adding a (u8 *) cast only
      where the unsigned char pointer was used directly, all done with the
      following spatch:
      
          @@
          expression SKB, LEN;
          typedef u8;
          identifier fn = { skb_put, __skb_put };
          @@
          - *(fn(SKB, LEN))
          + *(u8 *)fn(SKB, LEN)
      
          @@
          expression E, SKB, LEN;
          identifier fn = { skb_put, __skb_put };
          type T;
          @@
          - E = ((T *)(fn(SKB, LEN)))
          + E = fn(SKB, LEN)
      
      which actually doesn't cover pskb_put since there are only three
      users overall.
      
      A handful of stragglers were converted manually, notably a macro in
      drivers/isdn/i4l/isdn_bsdcomp.c and, oddly enough, one of the many
      instances in net/bluetooth/hci_sock.c. In the former file, I also
      had to fix one whitespace problem spatch introduced.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4df864c1
  11. 02 6月, 2017 1 次提交
    • M
      RDMA/SA: Fix kernel panic in CMA request handler flow · d3957b86
      Majd Dibbiny 提交于
      Commit 9fdca4da (IB/SA: Split struct sa_path_rec based on IB and
      ROCE specific fields) moved the service_id to be specific attribute
      for IB and OPA SA Path Record, and thus wasn't assigned for RoCE.
      
      This caused to the following kernel panic in the CMA request handler flow:
      
      [   27.074594] BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
      [   27.074731] IP: __radix_tree_lookup+0x1d/0xe0
      ...
      [   27.075356] Workqueue: ib_cm cm_work_handler [ib_cm]
      [   27.075401] task: ffff88022e3b8000 task.stack: ffffc90001298000
      [   27.075449] RIP: 0010:__radix_tree_lookup+0x1d/0xe0
      ...
      [   27.075979] Call Trace:
      [   27.076015]  radix_tree_lookup+0xd/0x10
      [   27.076055]  cma_ps_find+0x59/0x70 [rdma_cm]
      [   27.076097]  cma_id_from_event+0xd2/0x470 [rdma_cm]
      [   27.076144]  ? ib_init_ah_from_path+0x39a/0x590 [ib_core]
      [   27.076193]  cma_req_handler+0x25/0x480 [rdma_cm]
      [   27.076237]  cm_process_work+0x25/0x120 [ib_cm]
      [   27.076280]  ? cm_get_bth_pkey.isra.62+0x3c/0xa0 [ib_cm]
      [   27.076350]  cm_req_handler+0xb03/0xd40 [ib_cm]
      [   27.076430]  ? sched_clock_cpu+0x11/0xb0
      [   27.076478]  cm_work_handler+0x194/0x1588 [ib_cm]
      [   27.076525]  process_one_work+0x160/0x410
      [   27.076565]  worker_thread+0x137/0x4a0
      [   27.076614]  kthread+0x112/0x150
      [   27.076684]  ? max_active_store+0x60/0x60
      [   27.077642]  ? kthread_park+0x90/0x90
      [   27.078530]  ret_from_fork+0x2c/0x40
      
      This patch moves it back to the common SA Path Record structure
      and removes the redundant setter and getter.
      
      Tested on Connect-IB and Connect-X4 in Infiniband and RoCE respectively.
      
      Fixes: 9fdca4da (IB/SA: Split struct sa_path_rec based on IB ands
      	ROCE specific fields)
      Signed-off-by: NMajd Dibbiny <majd@mellanox.com>
      Reviewed-by: NParav Pandit <parav@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leon@kernel.org>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      d3957b86
  12. 02 5月, 2017 10 次提交
  13. 29 4月, 2017 6 次提交
  14. 14 4月, 2017 1 次提交
  15. 08 10月, 2016 1 次提交
  16. 04 8月, 2016 1 次提交
  17. 26 5月, 2016 1 次提交
  18. 25 5月, 2016 2 次提交
  19. 14 5月, 2016 2 次提交
  20. 22 3月, 2016 1 次提交
    • E
      IB/core: Support accessing SA in virtualized environment · a0c1b2a3
      Eli Cohen 提交于
      Per the ongoing standardisation process, when virtual HCAs are present
      in a network, traffic is routed based on a destination GID. In order to
      access the SA we use the well known SA GID.
      
      We also add a GRH required boolean field to the port attributes which is
      used to report to the verbs consumer whether this port is connected to a
      virtual network. We use this field to realize whether we need to create
      an address vector with GRH to access the subnet administrator. We clear
      the port attributes struct before calling the hardware driver to make
      sure the default remains that GRH is not required.
      Signed-off-by: NEli Cohen <eli@mellanox.com>
      Reviewed-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      a0c1b2a3
  21. 03 3月, 2016 1 次提交