1. 13 3月, 2014 4 次提交
    • J
      mlx4: Implement IP based gids support for RoCE/SRIOV · 5ea8bbfc
      Jack Morgenstein 提交于
      Since there is no connection between the MAC/VLAN and the GID
      when using IP-based addressing, the proxy QP1 (running on the
      slave) must pass the source-mac, destination-mac, and vlan_id
      information separately from the GID. Additionally, the Host
      must pass the remote source-mac and vlan_id back to the slave,
      
      This is achieved as follows:
      Outgoing MADs:
          1. Source MAC: obtained from the CQ completion structure
             (struct ib_wc, smac field).
          2. Destination MAC: obtained from the tunnel header
          3. vlan_id: obtained from the tunnel header.
      Incoming MADs
          1. The source (i.e., remote) MAC and vlan_id are passed in
             the tunnel header to the proxy QP1.
      
      VST mode support:
           For outgoing MADs,  the vlan_id obtained from the header is
              discarded, and the vlan_id specified by the Hypervisor is used
              instead.
           For incoming MADs, the incoming vlan_id (in the wc) is discarded, and the
              "invalid" vlan (0xffff)  is substituted when forwarding to the slave.
      Signed-off-by: NMoni Shoua <monis@mellanox.co.il>
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5ea8bbfc
    • J
      mlx4: Add ref counting to port MAC table for RoCE · 2f5bb473
      Jack Morgenstein 提交于
      The IB side of RoCE requires the MAC table index of the
      MAC address used by its QPs.
      
      To obtain the real MAC index, the IB side registers the
      MAC (increasing its ref count, and also returning the
      real MAC index) during the modify-qp sequence.
      
      This protects against the ETH side deleting or modifying
      that MAC table entry while the QP is active.
      
      Note that until the modify-qp command returns success,
      the MAC and VLAN information only has "candidate" status.
      If the modify-qp succeeds, the "candidate" info is promoted
      to the operational MAC/VLAN info for the qp. If the modify fails,
      the candidate MAC/VLAN is unregistered, and the old qp info
      is preserved.
      
      The patch is a bit complex, because there are multiple qp
      transitions where the primary-path information may be
      modified:  INIT-to-RTR, and SQD-to-SQD.
      
      Similarly for the alternate path information.
      
      Therefore the code must handle cases where path information
      has already been entered into the QP context by previous
      qp transitions.
      
      For the MAC address, the success logic is as follows:
      1. If there was no previous MAC, simply move the candidate
         MAC information to the operational information, and reset
         the candidate MAC info.
      2. If there was a previous MAC, unregister it.  Then move
         the MAC information from candidate to operational, and
         reset the candidate info (as in 1. above).
      
      The MAC address failure logic is the same for all cases:
       - Unregister the candidate MAC, and reset the candidate MAC info.
      
      For Vlan registration, the logic is similar.
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2f5bb473
    • J
      mlx4: In RoCE allow guests to have multiple GIDS · b6ffaeff
      Jack Morgenstein 提交于
      The GIDs are statically distributed, as follows:
      PF: gets 16 GIDs
      VFs:  Remaining GIDS are divided evenly between VFs activated by the driver.
            If the division is not even, lower-numbered VFs get an extra GID.
      
      For an IB interface, the number of gids per guest remains as before: one gid per guest.
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b6ffaeff
    • J
      mlx4: Adjust QP1 multiplexing for RoCE/SRIOV · 6ee51a4e
      Jack Morgenstein 提交于
      This requires the following modifications:
      1. Fix build_mlx4_header to properly fill in the ETH fields
      2. Adjust mux and demux QP1 flow to support RoCE.
      
      This commit still assumes only one GID per slave for RoCE.
      The commit enabling multiple GIDs is a subsequent commit, and
      is done separately because of its complexity.
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6ee51a4e
  2. 26 2月, 2014 1 次提交
  3. 15 2月, 2014 5 次提交
  4. 14 2月, 2014 10 次提交
  5. 13 2月, 2014 4 次提交
  6. 07 2月, 2014 3 次提交
  7. 25 1月, 2014 1 次提交
  8. 23 1月, 2014 12 次提交