1. 08 5月, 2013 2 次提交
  2. 02 5月, 2013 4 次提交
  3. 30 4月, 2013 2 次提交
  4. 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
  5. 20 4月, 2013 2 次提交
  6. 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
  7. 17 4月, 2013 9 次提交
    • M
      IB/qib: Correct qib_verbs_register_sysfs() error handling · c9bdad3c
      Mike Marciniszyn 提交于
      qib_verbs_register_sysfs() never cleans up from a failure.
      Additionally, the caller of qib_verbs_register_sysfs() doesn't
      return the correct "ret" value.
      
      This patch resolves both of those issues.
      Reported-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
      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>
      c9bdad3c
    • M
      IB/ipath: Correct ipath_verbs_register_sysfs() error handling · 137200a4
      Mike Marciniszyn 提交于
      ipath_verbs_register_sysfs() never returned the correct error
      code from device_create_file and never cleaned up from a failure.
      Additionally, the caller of ipath_verbs_register_sysfs() doesn't
      return the correct "ret" value.
      
      This patch resolves all of these issues.
      Reported-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
      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>
      137200a4
    • T
      RDMA/cxgb4: Fix SQ allocation when on-chip SQ is disabled · 5b0c2759
      Thadeu Lima de Souza Cascardo 提交于
      Commit c079c287 ("RDMA/cxgb4: Fix error handling in create_qp()")
      broke SQ allocation.  Instead of falling back to host allocation when
      on-chip allocation fails, it tries to allocate both.  And when it
      does, and we try to free the address from the genpool using the host
      address, we hit a BUG and the system crashes as below.
      
      We create a new function that has the previous behavior and properly
      propagate the error, as intended.
      
          kernel BUG at /usr/src/packages/BUILD/kernel-ppc64-3.0.68/linux-3.0/lib/genalloc.c:340!
          Oops: Exception in kernel mode, sig: 5 [#1]
          SMP NR_CPUS=1024 NUMA pSeries
          Modules linked in: rdma_ucm rdma_cm ib_addr ib_cm iw_cm ib_sa ib_mad ib_uverbs iw_cxgb4 ib_core ip6t_LOG xt_tcpudp xt_pkttype ipt_LOG xt_limit ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_raw xt_NOTRACK ipt_REJECT xt_state iptable_raw iptable_filter ip6table_mangle nf_conntrack_netbios_ns nf_conntrack_broadcast nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 ip_tables ip6table_filter ip6_tables x_tables fuse loop dm_mod ipv6 ipv6_lib sr_mod cdrom ibmveth(X) cxgb4 sg ext3 jbd mbcache sd_mod crc_t10dif scsi_dh_emc scsi_dh_hp_sw scsi_dh_alua scsi_dh_rdac scsi_dh ibmvscsic(X) scsi_transport_srp scsi_tgt scsi_mod
          Supported: Yes
          NIP: c00000000037d41c LR: d000000003913824 CTR: c00000000037d3b0
          REGS: c0000001f350ae50 TRAP: 0700   Tainted: G            X  (3.0.68-0.9-ppc64)
          MSR: 8000000000029032 <EE,ME,CE,IR,DR>  CR: 24042482  XER: 00000001
          TASK = c0000001f6f2a840[3616] 'rping' THREAD: c0000001f3508000 CPU: 0
          GPR00: c0000001f6e875c8 c0000001f350b0d0 c000000000fc9690 c0000001f6e875c0
          GPR04: 00000000000c0000 0000000000010000 0000000000000000 c0000000009d482a
          GPR08: 000000006a170000 0000000000100000 c0000001f350b140 c0000001f6e875c8
          GPR12: d000000003915dd0 c000000003f40000 000000003e3ecfa8 c0000001f350bea0
          GPR16: c0000001f350bcd0 00000000003c0000 0000000000040100 c0000001f6e74a80
          GPR20: d00000000399a898 c0000001f6e74ac8 c0000001fad91600 c0000001f6e74ab0
          GPR24: c0000001f7d23f80 0000000000000000 0000000000000002 000000006a170000
          GPR28: 000000000000000c c0000001f584c8d0 d000000003925180 c0000001f6e875c8
          NIP [c00000000037d41c] .gen_pool_free+0x6c/0xf8
          LR [d000000003913824] .c4iw_ocqp_pool_free+0x8c/0xd8 [iw_cxgb4]
          Call Trace:
          [c0000001f350b0d0] [c0000001f350b180] 0xc0000001f350b180 (unreliable)
          [c0000001f350b170] [d000000003913824] .c4iw_ocqp_pool_free+0x8c/0xd8 [iw_cxgb4]
          [c0000001f350b210] [d00000000390fd70] .dealloc_sq+0x90/0xb0 [iw_cxgb4]
          [c0000001f350b280] [d00000000390fe08] .destroy_qp+0x78/0xf8 [iw_cxgb4]
          [c0000001f350b310] [d000000003912738] .c4iw_destroy_qp+0x208/0x2d0 [iw_cxgb4]
          [c0000001f350b460] [d000000003861874] .ib_destroy_qp+0x5c/0x130 [ib_core]
          [c0000001f350b510] [d0000000039911bc] .ib_uverbs_cleanup_ucontext+0x174/0x4f8 [ib_uverbs]
          [c0000001f350b5f0] [d000000003991568] .ib_uverbs_close+0x28/0x70 [ib_uverbs]
          [c0000001f350b670] [c0000000001e7b2c] .__fput+0xdc/0x278
          [c0000001f350b720] [c0000000001a9590] .remove_vma+0x68/0xd8
          [c0000001f350b7b0] [c0000000001a9720] .exit_mmap+0x120/0x160
          [c0000001f350b8d0] [c0000000000af330] .mmput+0x80/0x160
          [c0000001f350b960] [c0000000000b5d0c] .exit_mm+0x1ac/0x1e8
          [c0000001f350ba10] [c0000000000b8154] .do_exit+0x1b4/0x4b8
          [c0000001f350bad0] [c0000000000b84b0] .do_group_exit+0x58/0xf8
          [c0000001f350bb60] [c0000000000ce9f4] .get_signal_to_deliver+0x2f4/0x5d0
          [c0000001f350bc60] [c000000000017ee4] .do_signal_pending+0x6c/0x3e0
          [c0000001f350bdb0] [c0000000000182cc] .do_signal+0x74/0x78
          [c0000001f350be30] [c000000000009e74] do_work+0x24/0x28
      Signed-off-by: NThadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
      Cc: Emil Goode <emilgoode@gmail.com>
      Cc: <stable@vger.kernel.org>
      Acked-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      5b0c2759
    • G
      SRPT: Fix odd use of WARN_ON() · 532ec6f1
      Grant Grundler 提交于
      While WARN_ON("const string") will work, it's intent is not obvious.
      The warning is more useful by showing the "state" value.
      Signed-off-by: NGrant Grundler <grundler@chromium.org>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      532ec6f1
    • D
      IPoIB: Fix ipoib_hard_header() return value · 83bdd3b9
      Doug Ledford 提交于
      If you have a patched up dhcp server (and dhclient), they will use
      AF_PACKET/SOCK_DGRAM pair to send dhcp packets over IPoIB.
      
      However, when testing an upstream kernel, this has been broken for a
      very long time (I tested 2.6.34, 2.6.38, 3.0, 3.1, 3.8, HEAD).
      
      It turns out that the hard_header routine in ipoib is not following
      the API and is returning 0 even when it pushed data onto the skb.
      This then causes af_packet.c to overwrite the header just pushed with
      data from user space.
      
      Fixing this gets DHCP working on IPoIB.
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      83bdd3b9
    • A
      RDMA: Rename random32() to prandom_u32() · cc529c0d
      Akinobu Mita 提交于
      Use more preferable function name which implies using a pseudo-random
      number generator.
      Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
      Reviewed-by: NSteve Wise <swise@opengridcomputing.com>
      Cc: Roland Dreier <roland@kernel.org>
      Cc: Sean Hefty <sean.hefty@intel.com>
      Cc: Hal Rosenstock <hal.rosenstock@gmail.com>
      Cc: Steve Wise <swise@chelsio.com>
      Cc: linux-rdma@vger.kernel.org
      Reviewed-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      cc529c0d
    • C
      RDMA/cxgb3: Fix uninitialized variable · bc4ba94c
      Cong Ding 提交于
      The variable npages might be used uninitialized.
      Signed-off-by: NCong Ding <dinggnu@gmail.com>
      Acked-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      bc4ba94c
    • S
      IB/mlx4: Fetch XRC SRQ in the CQ polling code · f3cca4b1
      Shlomo Pongratz 提交于
      An XRC target QP may redirect to more than one XRC SRQ.  This means
      that for work completions associated with a XRC TGT QP, the srq field
      in the QP has no usage and the real XRC SRQ need to be retrived using
      the information from the XRCETH placed into the CQE, do that.
      Signed-off-by: NShlomo Pongratz <shlomop@mellanox.com>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      f3cca4b1
    • S
      IB/core: Verify that QP handler is valid before dispatching events · eec9e29f
      Shlomo Pongratz 提交于
      For QPs of type IB_QPT_XRC_TGT the IB core assigns a common event
      handler __ib_shared_qp_event_handler(), and the optionally supplied
      event handler is stored. When the common handler is called it iterates
      on all opened QPs and calles the original handlers without checking if
      they are NULL.  Fix that.
      Signed-off-by: NShlomo Pongratz <shlomop@mellanox.com>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      eec9e29f
  8. 06 4月, 2013 1 次提交
  9. 23 3月, 2013 4 次提交
  10. 18 3月, 2013 1 次提交
    • C
      tcp: Remove TCPCT · 1a2c6181
      Christoph Paasch 提交于
      TCPCT uses option-number 253, reserved for experimental use and should
      not be used in production environments.
      Further, TCPCT does not fully implement RFC 6013.
      
      As a nice side-effect, removing TCPCT increases TCP's performance for
      very short flows:
      
      Doing an apache-benchmark with -c 100 -n 100000, sending HTTP-requests
      for files of 1KB size.
      
      before this patch:
      	average (among 7 runs) of 20845.5 Requests/Second
      after:
      	average (among 7 runs) of 21403.6 Requests/Second
      Signed-off-by: NChristoph Paasch <christoph.paasch@uclouvain.be>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1a2c6181
  11. 15 3月, 2013 1 次提交
  12. 14 3月, 2013 8 次提交