1. 21 6月, 2013 16 次提交
  2. 05 6月, 2013 3 次提交
    • M
      IB/qib: Fix lockdep splat in qib_alloc_lkey() · f3bdf344
      Mike Marciniszyn 提交于
      The following backtrace is reported with CONFIG_PROVE_RCU:
      
          drivers/infiniband/hw/qib/qib_keys.c:64 suspicious rcu_dereference_check() usage!
          other info that might help us debug this:
          rcu_scheduler_active = 1, debug_locks = 1
          4 locks held by kworker/0:1/56:
          #0:  (events){.+.+.+}, at: [<ffffffff8107a4f5>] process_one_work+0x165/0x4a0
          #1:  ((&wfc.work)){+.+.+.}, at: [<ffffffff8107a4f5>] process_one_work+0x165/0x4a0
          #2:  (device_mutex){+.+.+.}, at: [<ffffffffa0148dd8>] ib_register_device+0x38/0x220 [ib_core]
          #3:  (&(&dev->lk_table.lock)->rlock){......}, at: [<ffffffffa017e81c>] qib_alloc_lkey+0x3c/0x1b0 [ib_qib]
      
          stack backtrace:
          Pid: 56, comm: kworker/0:1 Not tainted 3.10.0-rc1+ #6
          Call Trace:
          [<ffffffff810c0b85>] lockdep_rcu_suspicious+0xe5/0x130
          [<ffffffffa017e8e1>] qib_alloc_lkey+0x101/0x1b0 [ib_qib]
          [<ffffffffa0184886>] qib_get_dma_mr+0xa6/0xd0 [ib_qib]
          [<ffffffffa01461aa>] ib_get_dma_mr+0x1a/0x50 [ib_core]
          [<ffffffffa01678dc>] ib_mad_port_open+0x12c/0x390 [ib_mad]
          [<ffffffff810c2c55>] ?  trace_hardirqs_on_caller+0x105/0x190
          [<ffffffffa0167b92>] ib_mad_init_device+0x52/0x110 [ib_mad]
          [<ffffffffa01917c0>] ?  sl2vl_attr_show+0x30/0x30 [ib_qib]
          [<ffffffffa0148f49>] ib_register_device+0x1a9/0x220 [ib_core]
          [<ffffffffa01b1685>] qib_register_ib_device+0x735/0xa40 [ib_qib]
          [<ffffffff8106ba98>] ? mod_timer+0x118/0x220
          [<ffffffffa017d425>] qib_init_one+0x1e5/0x400 [ib_qib]
          [<ffffffff812ce86e>] local_pci_probe+0x4e/0x90
          [<ffffffff81078118>] work_for_cpu_fn+0x18/0x30
          [<ffffffff8107a566>] process_one_work+0x1d6/0x4a0
          [<ffffffff8107a4f5>] ?  process_one_work+0x165/0x4a0
          [<ffffffff8107c9c9>] worker_thread+0x119/0x370
          [<ffffffff8107c8b0>] ?  manage_workers+0x180/0x180
          [<ffffffff8108294e>] kthread+0xee/0x100
          [<ffffffff81082860>] ?  __init_kthread_worker+0x70/0x70
          [<ffffffff815c04ac>] ret_from_fork+0x7c/0xb0
          [<ffffffff81082860>] ?  __init_kthread_worker+0x70/0x70
      
      Per Documentation/RCU/lockdep-splat.txt, the code now uses rcu_access_pointer()
      vs. rcu_dereference().
      Reported-by: NJay Fenlason <fenlason@redhat.com>
      Reviewed-by: NDean Luick <dean.luick@intel.com>
      Signed-off-by: NMike Marciniszyn <mike.marciniszyn@intel.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      f3bdf344
    • O
      IB/iser: Add Mellanox copyright · 28f292e8
      Or Gerlitz 提交于
      Add Mellanox copyright to the iser initiator source code which I maintain.
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      28f292e8
    • R
      IB/iser: Fix device removal flow · 5b61ff43
      Roi Dayan 提交于
      Change the code to destroy the "last opened" rdma_cm id after making
      sure we released all other objects (QP, CQs, PD, etc) associated with
      the IB device.
      
      Since iser accesses the IB device using the rdma_cm id, we need to
      free any objects that are related to the device that is associated
      with the rdma_cm id prior to destroying that id.  When this isn't
      done, the low level driver that created this device can be unloaded
      before iser has a chance to free all the objects and a such a call may
      invoke code segment which isn't valid any more and crash.
      
      Cc: Sean Hefty <sean.hefty@intel.com
      Signed-off-by: NRoi Dayan <roid@mellanox.com>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      5b61ff43
  3. 30 5月, 2013 1 次提交
    • N
      ib_srpt: Call target_sess_cmd_list_set_waiting during shutdown_session · 1d19f780
      Nicholas Bellinger 提交于
      Given that srpt_release_channel_work() calls target_wait_for_sess_cmds()
      to allow outstanding se_cmd_t->cmd_kref a change to complete, the call
      to perform target_sess_cmd_list_set_waiting() needs to happen in
      srpt_shutdown_session()
      
      Also, this patch adds an explicit call to srpt_shutdown_session() within
      srpt_drain_channel() so that target_sess_cmd_list_set_waiting() will be
      called in the cases where TFO->shutdown_session() is not triggered
      directly by TCM.
      
      Cc: Joern Engel <joern@logfs.org>
      Cc: Roland Dreier <roland@kernel.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      1d19f780
  4. 29 5月, 2013 1 次提交
  5. 21 5月, 2013 1 次提交
  6. 08 5月, 2013 2 次提交
  7. 02 5月, 2013 4 次提交
  8. 30 4月, 2013 2 次提交
  9. 25 4月, 2013 5 次提交
    • N
      iser-target: Add iSCSI Extensions for RDMA (iSER) target driver · b8d26b3b
      Nicholas Bellinger 提交于
      This patch adds support for iSCSI Extensions for RDMA target mode,
      and includes CQ pooling per isert_device context distributed across
      multiple active iser target sessions.
      
      It also uses cmwq process context for RX / TX ib_post_cq() polling
      via isert_cq_desc->cq_[rx,tx]_work invoked by isert_cq_[rx,tx]_callback()
      hardIRQ context callbacks.
      
      v5 changes:
      
      - Use ISER_RECV_DATA_SEG_LEN instead of hardcoded value in ISER_RX_PAD_SIZE (Or)
      - Fix make W=1 warnings (Or)
      - Add missing depends on NET && INFINIBAND_ADDR_TRANS in Kconfig (Randy + Or)
      - Make isert_device_find_by_ib_dev() return proper ERR_PTR (Wei Yongjun)
      - Properly setup iscsi_np->np_sockaddr in isert_setup_np() (Shlomi + nab)
      - Add special case for early ISCSI_OP_SCSI_CMD exception handling (nab)
      
      v4 changes:
      - Mark isert_cq_rx_work as static (Or)
      - Drop unnecessary ib_dma_sync_single_for_cpu + ib_dma_sync_single_for_device
        calls for isert_cmd->sense_buf_dma from isert_put_response (Or)
      - Use 12288 for ISER_RX_PAD_SIZE base to save extra page per
        struct iser_rx_desc (Or + nab)
      - Drop now unnecessary isert_rx_desc usage, and convert RX users to
        iser_rx_desc (Or + nab)
      - Move isert_[alloc,free]_rx_descriptors() ahead of
        isert_create_device_ib_res() usage (nab)
      - Mark isert_cq_[rx,tx]_callback() + prototypes as static
      - Fix 'warning: 'ret' may be used uninitialized' warning for
        isert_create_device_ib_res on powerpc allmodconfig (fengguang + nab)
      - Fix 'warning: 'ret' may be used uninitialized' warning for
        isert_connect_request on i386 allyesconfig (fengguang + nab)
      - Fix pr_debug conversion specification in isert_rx_completion()
        (fengguang + nab)
      - Drop unnecessary isert_conn->conn_cm_id != NULL check in
        isert_connect_release causing the build warning:
        "variable dereferenced before check 'isert_conn->conn_cm_id'"
      - Fix isert_lid + isert_np leak in isert_setup_np failure path
      - Add isert_conn->conn_wait_comp_err usage in isert_free_conn()
        for isert_cq_comp_err completion path
      - Add isert_conn->logout_posted bit to determine decrement of
        isert_conn->post_send_buf_count from logout response completion
      - Always set ISER_CONN_DOWN from isert_disconnect_work() callback
      
      v3 changes:
      
      - Convert to use per isert_cq_desc->cq_[rx,tx]_work + drop tasklets (Or + nab)
      - Move IB_EVENT_QP_LAST_WQE_REACHED warn into correct
        isert_qp_event_callback (Or)
      - Drop unnecessary IB_ACCESS_REMOTE_* access flag usage in
        isert_create_device_ib_res (Or)
      - Add common isert_init_send_wr(), and convert isert_put_* calls (Or)
      - Move to verbs+core logic to single ib_isert.[c,h]  (Or + nab)
      - Add kmem_cache isert_cmd_cache usage for descriptor allocation (nab)
      - Move common ib_post_send() logic used by isert_put_*() to
        isert_post_response() (nab)
      - Add isert_put_reject call in isert_response_queue() for posting
        ISCSI_REJECT response. (nab)
      - Add ISTATE_SEND_REJECT checking in isert_do_control_comp. (nab)
      
      v2 changes:
      
      - Drop unused ISERT_ADDR_ROUTE_TIMEOUT define
      - Add rdma_notify() call for IB_EVENT_COMM_EST in isert_qp_event_callback()
      - Make isert_query_device() less verbose
      - Drop unused RDMA_CM_EVENT_ADDR_ERROR and RDMA_CM_EVENT_ROUTE_ERROR
        cases from isert_cma_handler()
      - Drop unused rdma/ib_fmr_pool.h include
      - Update isert_conn_setup_qp() to assign cq based upon least used
      - Add isert_create_device_ib_res() to setup PD, CQs and MRs for each
        underlying struct ib_device, instead of using per isert_conn resources.
      - Add isert_free_device_ib_res() to release PD, CQs and MRs for each
        underlying struct ib_device.
      - Add isert_device_find_by_ib_dev()
      - Change isert_connect_request() to drop PD, CQs and MRs allocation,
        and use isert_device_find_by_ib_dev() instead.
      - Add isert_device_try_release()
      - Change isert_connect_release() to decrement cq_active_qps, and drop
        PD, CQs and MRs resource release.
      - Update isert_connect_release() to call isert_device_try_release()
      - Make isert_create_device_ib_res() determine device->cqs_used based
        upon num_online_cpus()
      - Drop misleading isert_dump_ib_wc() usage
      - Drop unused rdma/ib_fmr_pool.h include
      - Use proper xfer_len for login PDUs in isert_rx_completion()
      - Add isert_release_cmd() usage
      - Change isert_alloc_cmd() to setup iscsi_cmd.release_cmd() pointer
      - Change isert_put_cmd() to perform per iscsi_opcode specific release
        logic
      - Add isert_unmap_cmd() call for ISCSI_OP_SCSI_CMD from isert_put_cmd()
      - Change isert_send_completion() to call
        atomic_dec(&isert_conn->post_send_buf_count)
        based upon per iscsi_opcode logic
      - Drop ISTATE_REMOVE processing from isert_immediate_queue()
      - Drop ISTATE_SEND_DATAIN processing from isert_response_queue()
      - Drop ISTATE_SEND_STATUS processing from isert_response_queue()
      - Drop iscsit_transport->iscsit_unmap_cmd() and ->iscsit_free_cmd()
      - Convert iser_cq_tx_tasklet() to use struct isert_cq_desc pooling logic
      - Convert isert_cq_tx_callback() to use struct isert_cq_desc pooling
        logic
      - Convert iser_cq_rx_tasklet() to use struct isert_cq_desc pooling logic
      - Convert isert_cq_rx_callback() to use struct isert_cq_desc pooling
        logic
      - Add explict iscsit_stop_dataout_timer() call to
        isert_do_rdma_read_comp()
      - Use isert_get_dataout() for iscsit_transport->iscsit_get_dataout()
        caller
      - Drop ISTATE_SEND_R2T processing from isert_immediate_queue()
      - Drop unused rdma/ib_fmr_pool.h include
      - Drop isert_cmd->cmd_kref in favor of se_cmd->cmd_kref usage
      - Add struct isert_device in order to support multiple EQs + CQ pooling
      - Add struct isert_cq_desc
      - Drop tasklets and cqs from isert_conn
      - Bump ISERT_MAX_CQ to 64
      - Various minor checkpatch fixes
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      b8d26b3b
    • E
      IB/mlx4: Set link type for RAW PACKET QPs in the QP context · 3528f696
      Eli Cohen 提交于
      When the link type is Ethernet, setting the link type in the QP
      context will enable TCP/IP stateless offloads (checksum, LSO, RSS) for
      RAW PACKET Ethernet QPs.  For IB UD QPs this worked OK since the value
      assumed by the firmware for IB link layer is zero.
      Signed-off-by: NEli Cohen <eli@mellanox.com>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      3528f696
    • D
      IB/mlx4: Disable VLAN stripping for RAW PACKET QPs · 02d7ef6f
      Dotan Barak 提交于
      Fix the asymmetric behavior w.r.t VLAN insertion/stripping for RAW
      PACKET QPs -- we don't insert on send and need not strip on receive.
      Signed-off-by: NDotan Barak <dotanb@dev.mellanox.co.il>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      02d7ef6f
    • S
      RDMA/iwcm: Don't touch cmid after dropping reference · e413a823
      Steve Wise 提交于
      The function cm_work_handler() cannot touch the cm_id after it derefs
      it, because it might be freed on another concurrent thread.  If there
      are more work items queued for this cm_id, then we know there must be
      more references because they are added when the work items are queued.
      So in the while loop inside cm_work_handler(), after derefing, if the
      queue is empty, then exit the function.  Otherwise we know it's safe
      to re-acquire the lock.
      Signed-off-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      e413a823
    • A
      net/mlx4_en: Add HW timestamping (TS) support · ec693d47
      Amir Vadai 提交于
      The patch allows to enable/disable HW timestamping for incoming and/or
      outgoing packets. It adds and initializes all structs and callbacks
      needed by kernel TS API.
      To enable/disable HW timestamping appropriate ioctl should be used.
      Currently HWTSTAMP_FILTER_ALL/NONE and HWTSAMP_TX_ON/OFF only are
      supported.
      When enabling TS on receive flow - VLAN stripping will be disabled.
      Also were made all relevant changes in RX/TX flows to consider TS request
      and plant HW timestamps into relevant structures.
      mlx4_ib was fixed to compile with new mlx4_cq_alloc() signature.
      Signed-off-by: NEugenia Emantayev <eugenia@mellanox.com>
      Signed-off-by: NAmir Vadai <amirv@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ec693d47
  10. 20 4月, 2013 2 次提交
  11. 18 4月, 2013 1 次提交
    • P
      IPoIB: add support for TIPC protocol · dc850b0e
      Patrick McHardy 提交于
      Support TIPC in the IPoIB driver. Since IPoIB now keeps track of its own
      neighbour entries and doesn't require the packet to have a dst_entry
      anymore, the only necessary changes are to:
      
      - not drop multicast TIPC packets because of the unknown ethernet type
      - handle unicast TIPC packets similar to IPv4/IPv6 unicast packets
      
      in ipoib_start_xmit().
      
      An alternative would be to remove all ethertype limitations since they're
      not necessary anymore, all TIPC needs to know about is ARP and RARP since
      it wants to always perform "path find", even if a path is already known.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dc850b0e
  12. 17 4月, 2013 2 次提交