1. 13 8月, 2013 1 次提交
  2. 01 8月, 2013 7 次提交
    • E
      IPoIB: Fix pkey change flow for virtualization environments · c2904141
      Erez Shitrit 提交于
      IPoIB's required behaviour w.r.t to the pkey used by the device is the following:
      
      - For "parent" interfaces (e.g ib0, ib1, etc) who are created
        automatically as a result of hot-plug events from the IB core, the
        driver needs to take whatever pkey vlaue it finds in index 0, and
        stick to that index.
      
      - For child interfaces (e.g ib0.8001, etc) created by admin directive,
        the driver needs to use and stick to the value provided during its
        creation.
      
      In SR-IOV environment its possible for the VF probe to take place
      before the cloud management software provisions the suitable pkey for
      the VF in the paravirtualed PKEY table index 0. When this is the case,
      the VF IB stack will find in index 0 an invalide pkey, which is all
      zeros.
      
      Moreover, the cloud managment can assign the pkey value at index 0 at
      any time of the guest life cycle.
      
      The correct behavior for IPoIB to address these requirements for
      parent interfaces is to use PKEY_CHANGE event as trigger to optionally
      re-init the device pkey value and re-create all the relevant resources
      accordingly, if the value of the pkey in index 0 has changed (from
      invalid to valid or from valid value X to invalid value Y).
      
      This patch enhances the heavy flushing code which is triggered by pkey
      change event, to behave correctly for parent devices. For child
      devices, the code remains the same, namely chases pkey value and not
      index.
      Signed-off-by: NErez Shitrit <erezsh@mellanox.com>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      c2904141
    • O
      IPoIB: Make sure child devices use valid/proper pkeys · 3d790a4c
      Or Gerlitz 提交于
      Make sure that the IB invalid pkey (0x0000 or 0x8000) isn't used for
      child devices.
      
      Also, make sure to always set the full membership bit for the pkey of
      devices created by rtnl link ops.
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      3d790a4c
    • J
      IB/core: Create QP1 using the pkey index which contains the default pkey · ef5ed416
      Jack Morgenstein 提交于
      Currently, QP1 is created using pkey index 0. This patch simply looks
      for the index containing the default pkey, rather than hard-coding
      pkey index 0.
      
      This change will have no effect in native mode, since QP0 and QP1 are
      created before the SM configures the port, so pkey table will still be
      the default table defined by the IB Spec, in C10-123: "If non-volatile
      storage is not used to hold P_Key Table contents, then if a PM
      (Partition Manager) is not present, and prior to PM initialization of
      the P_Key Table, the P_Key Table must act as if it contains a single
      valid entry, at P_Key_ix = 0, containing the default partition
      key. All other entries in the P_Key Table must be invalid."
      
      Thus, in the native mode case, the driver will find the default pkey
      at index 0 (so it will be no different than the hard-coding).
      
      However, in SR-IOV mode, for VFs, the pkey table may be
      paravirtualized, so that the VF's pkey index zero may not necessarily
      be mapped to the real pkey index 0. For VFs, therefore, it is
      important to find the virtual index which maps to the real default
      pkey.
      
      This commit does the following for QP1 creation:
      
      1. Find the pkey index containing the default pkey, and use that index
         if found.  ib_find_pkey() returns the index of the
         limited-membership default pkey (0x7FFF) if the full-member default
         pkey is not in the table.
      
      2. If neither form of the default pkey is found, use pkey index 0
         (previous behavior).
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Reviewed-by: NSean Hefty <sean.hefty@intel.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      ef5ed416
    • A
      mlx5_core: Variable may be used uninitialized · 618af384
      Andi Shyti 提交于
      In the sq_overhead() function, if qp_typ is equal to IB_QPT_RC, size
      will be used uninitialized.
      Signed-off-by: NAndi Shyti <andi@etezian.org>
      Acked-by: NEli Cohen <eli@mellanox.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      618af384
    • D
      IB/mlx5: Fix stack info leak in mlx5_ib_alloc_ucontext() · 92b0ca7c
      Dan Carpenter 提交于
      We don't set "resp.reserved".  Since it's at the end of the struct
      that means we don't have to copy it to the user.
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Acked-by: NEli Cohen <eli@mellanox.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      92b0ca7c
    • W
      IB/mlx5: Fix error return code in init_one() · 281d1a92
      Wei Yongjun 提交于
      Fix to return a negative error code from the error handling case
      instead of 0, as done elsewhere in this function.
      Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      281d1a92
    • J
      IB/mlx4: Use default pkey when creating tunnel QPs · 3eac103f
      Jack Morgenstein 提交于
      When creating tunnel QPs for special QP tunneling, look for the
      default pkey in the slave's virtual pkey table.  If it is present, use
      the real pkey index where the default pkey is located.
      
      If the default pkey is not found in the pkey table, use the real pkey
      index which is stored at index 0 in the slave's virtual pkey table
      (this is the current behavior).
      
      This change is required to support cloud computing, where the
      paravirtualized index of the default pkey is moved to index 1 or
      higher.  The pkey at paravirtualized index 0 is used for the default
      IPoIB interface created by the VF.
      
      Its possible for the pkey value at paravirtualized index 0 to be
      invalid (zero) at VF probe time (pkey index 0 is mapped to real pkey
      index 127, which contains pkey = 0).
      
      At some point after the VF probe, the cloud computing interface at the
      hypervisor maps virtual index 0 for the VF to the pkey index
      containing the pkey that IPoIB will use in its operation.  However,
      when the tunnel QP is created, the pkey at the slave's virtual index 0
      is still mapped to the invalid pkey index, so tunnel QP creation
      fails.
      
      This commit causes the hypervisor to search for the default pkey in
      the slave's pkey table -- and this pkey is present in the table (at
      index > 0) at tunnel QP creation time, so that the tunnel QP creation
      will succeed.
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      3eac103f
  3. 31 7月, 2013 9 次提交
  4. 27 7月, 2013 1 次提交
  5. 12 7月, 2013 4 次提交
  6. 09 7月, 2013 3 次提交
  7. 08 7月, 2013 6 次提交
  8. 07 7月, 2013 4 次提交
    • N
      iscsi-target: Fix ISCSI_OP_SCSI_TMFUNC handling for iser · 186a9647
      Nicholas Bellinger 提交于
      This patch adds target_get_sess_cmd reference counting for
      iscsit_handle_task_mgt_cmd(), and adds a target_put_sess_cmd()
      for the failure case.
      
      It also fixes a bug where ISCSI_OP_SCSI_TMFUNC type commands
      where leaking iscsi_cmd->i_conn_node and eventually triggering
      an OOPs during struct isert_conn shutdown.
      
      Cc: stable@vger.kernel.org  # 3.10+
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      186a9647
    • N
      iscsi-target: Fix iscsit_sequence_cmd reject handling for iser · 561bf158
      Nicholas Bellinger 提交于
      This patch moves ISCSI_OP_REJECT failures into iscsit_sequence_cmd()
      in order to avoid external iscsit_reject_cmd() reject usage for all
      PDU types.
      
      It also updates PDU specific handlers for traditional iscsi-target
      code to not reset the session after posting a ISCSI_OP_REJECT during
      setup.
      
      (v2: Fix CMDSN_LOWER_THAN_EXP for ISCSI_OP_SCSI to call
           target_put_sess_cmd() after iscsit_sequence_cmd() failure)
      
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Cc: Mike Christie <michaelc@cs.wisc.edu>
      Cc: stable@vger.kernel.org  # 3.10+
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      561bf158
    • N
      iscsi-target: Fix iscsit_add_reject* usage for iser · ba159914
      Nicholas Bellinger 提交于
      This patch changes iscsit_add_reject() + iscsit_add_reject_from_cmd()
      usage to not sleep on iscsi_cmd->reject_comp to address a free-after-use
      usage bug in v3.10 with iser-target code.
      
      It saves ->reject_reason for use within iscsit_build_reject() so the
      correct value for both transport cases.  It also drops the legacy
      fail_conn parameter usage throughput iscsi-target code and adds
      two iscsit_add_reject_cmd() and iscsit_reject_cmd helper functions,
      along with various small cleanups.
      
      (v2: Re-enable target_put_sess_cmd() to be called from
           iscsit_add_reject_from_cmd() for rejects invoked after
           target_get_sess_cmd() has been called)
      
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Cc: Mike Christie <michaelc@cs.wisc.edu>
      Cc: stable@vger.kernel.org  # 3.10+
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      ba159914
    • N
      iser-target: Fix isert_put_reject payload buffer post · 3df8f68a
      Nicholas Bellinger 提交于
      This patch adds the missing isert_put_reject() logic to post
      a outgoing payload buffer to hold the 48 bytes of original PDU
      header request payload for the rejected cmd.
      
      It also fixes ISTATE_SEND_REJECT handling in isert_response_completion()
      -> isert_do_control_comp() code, and drops incorrect iscsi_cmd_t->reject_comp
      usage.
      
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Cc: Mike Christie <michaelc@cs.wisc.edu>
      Cc: stable@vger.kernel.org  # 3.10+
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      3df8f68a
  9. 04 7月, 2013 1 次提交
  10. 02 7月, 2013 4 次提交