1. 19 7月, 2012 1 次提交
  2. 08 7月, 2012 3 次提交
    • H
      net/mlx4: Implement promiscuous mode with device managed flow-steering · 592e49dd
      Hadar Hen Zion 提交于
      The device managed flow steering API has three promiscuous modes:
      
      1. Uplink - captures all the packets that arrive to the port.
      2. Allmulti - captures all multicast packets arriving to the port.
      3. Function port - for future use, this mode is not implemented yet.
      
      Use these modes with the flow_attach and flow_detach firmware commands
      according to the promiscuous state of the netdevice.
      Signed-off-by: NHadar Hen Zion <hadarh@mellanox.co.il>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      592e49dd
    • H
      {NET, IB}/mlx4: Add device managed flow steering firmware API · 0ff1fb65
      Hadar Hen Zion 提交于
      The driver is modified to support three operation modes.
      
      If supported by firmware use the device managed flow steering
      API, that which we call device managed steering mode. Else, if
      the firmware supports the B0 steering mode use it, and finally,
      if none of the above, use the A0 steering mode.
      
      When the steering mode is device managed, the code is modified
      such that L2 based rules set by the mlx4_en driver for Ethernet
      unicast and multicast, and the IB stack multicast attach calls
      done through the mlx4_ib driver are all routed to use the device
      managed API.
      
      When attaching rule using device managed flow steering API,
      the firmware returns a 64 bit registration id, which is to be
      provided during detach.
      
      Currently the firmware is always programmed during HCA initialization
      to use standard L2 hashing. Future work should be done to allow
      configuring the flow-steering hash function with common, non
      proprietary means.
      Signed-off-by: NHadar Hen Zion <hadarh@mellanox.co.il>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0ff1fb65
    • H
      net/mlx4: Set steering mode according to device capabilities · c96d97f4
      Hadar Hen Zion 提交于
      Instead of checking the firmware supported steering mode in various
      places in the code, add a dedicated field in the mlx4 device capabilities
      structure which is written once during the initialization flow and read
      across the code.
      
      This also set the grounds for add new steering modes. Currently two modes
      are supported, and are named after the ConnectX HW versions A0 and B0.
      
      A0 steering uses mac_index, vlan_index and priority to steer traffic
      into pre-defined range of QPs.
      
      B0 steering uses Ethernet L2 hashing rules and is enabled only
      if the firmware supports both unicast and multicast B0 steering,
      
      The current steering modes are relevant for Ethernet traffic only,
      such that Infiniband steering remains untouched.
      Signed-off-by: NHadar Hen Zion <hadarh@mellanox.co.il>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c96d97f4
  3. 01 6月, 2012 1 次提交
    • M
      net/mlx4_core: Fix number of EQs used in ICM initialisation · 3fc929e2
      Marcel Apfelbaum 提交于
      In SRIOV mode, the number of EQs used when computing the total ICM size
      was incorrect.
      
      To fix this, we do the following:
      1. We add a new structure to mlx4_dev, mlx4_phys_caps, to contain physical HCA
         capabilities.  The PPF uses the phys capabilities when it computes things
         like ICM size.
      
         The dev_caps structure will then contain the paravirtualized values, making
         bookkeeping much easier in SRIOV mode. We add a structure rather than a
         single parameter because there will be other fields in the phys_caps.
      
         The first field we add to the mlx4_phys_caps structure is num_phys_eqs.
      
      2. In INIT_HCA, when running in SRIOV mode, the "log_num_eqs" parameter
         passed to the FW is the number of EQs per VF/PF; each function (PF or VF)
         has this number of EQs available.
      
         However, the total number of EQs which must be allowed for in the ICM is
         (1 << log_num_eqs) * (#VFs + #PFs).  Rather than compute this quantity,
         we allocate ICM space for 1024 EQs (which is the device maximum
         number of EQs, and which is the value we place in the mlx4_phys_caps structure).
      
         For INIT_HCA, however, we use the per-function number of EQs as described
         above.
      Signed-off-by: NMarcel Apfelbaum <marcela@dev.mellanox.co.il>
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Reviewed-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3fc929e2
  4. 09 5月, 2012 1 次提交
    • S
      mlx4_core: Add second capabilities flags field · b3416f44
      Shlomo Pongratz 提交于
      This patch adds a 64-bit flags2 features member to struct mlx4_dev to
      export further features of the hardware.  The original flags field
      tracks features whose support bits are advertised by the firmware in
      offsets 0x40 and 0x44 of the query device capabilities command.
      flags2 will track features whose support bits are scattered at various
      offsets.
      
      RSS support is the first feature to be exported through flags2.  RSS
      capabilities are located at offset 0x2e.  The size of the RSS
      indirection table is also given in this offset.
      Signed-off-by: NShlomo Pongratz <shlomop@mellanox.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      b3416f44
  5. 05 4月, 2012 1 次提交
  6. 13 3月, 2012 2 次提交
  7. 07 3月, 2012 2 次提交
  8. 26 2月, 2012 1 次提交
  9. 23 1月, 2012 1 次提交
  10. 20 12月, 2011 2 次提交
  11. 14 12月, 2011 6 次提交
    • J
      mlx4_core: Modify driver initialization flow to accommodate SRIOV for Ethernet · ab9c17a0
      Jack Morgenstein 提交于
      1. Added module parameters sr_iov and probe_vf for controlling enablement of
         SRIOV mode.
      2. Increased default max num-qps, num-mpts and log_num_macs to accomodate
         SRIOV mode
      3. Added port_type_array as a module parameter to allow driver startup with
         ports configured as desired.
         In SRIOV mode, only ETH is supported, and this array is ignored; otherwise,
         for the case where the FW supports both port types (ETH and IB), the
         port_type_array parameter is used.
         By default, the port_type_array is set to configure both ports as IB.
      4. When running in sriov mode, the master needs to initialize the ICM eq table
         to hold the eq's for itself and also for all the slaves.
      5. mlx4_set_port_mask() now invoked from mlx4_init_hca, instead of in mlx4_dev_cap.
      6. Introduced sriov VF (slave) device startup/teardown logic (mainly procedures
         mlx4_init_slave, mlx4_slave_exit, mlx4_slave_cap, mlx4_slave_exit and flow
         modifications in __mlx4_init_one, mlx4_init_hca, and mlx4_setup_hca).
         VFs obtain their startup information from the PF (master) device via the
         comm channel.
      7. In SRIOV mode (both PF and VF), MSI_X must be enabled, or the driver
         aborts loading the device.
      8. Do not allow setting port type via sysfs when running in SRIOV mode.
      9. mlx4_get_ownership:  Currently, only one PF is supported by the driver.
         If the HCA is burned with FW which enables more than one PF, only one
         of the PFs is allowed to run.  The first one up grabs a FW ownership
         semaphone -- all other PFs will find that semaphore taken, and the
         driver will not allow them to run.
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NYevgeny Petrilin <yevgenyp@mellanox.co.il>
      Signed-off-by: NLiran Liss <liranl@mellanox.co.il>
      Signed-off-by: NMarcel Apfelbaum <marcela@mellanox.co.il>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ab9c17a0
    • M
      mlx4_core: mtts resources units changed to offset · 2b8fb286
      Marcel Apfelbaum 提交于
      In the previous implementation mtts are managed by:
      1. order     - log(mtt segments), 'mtt segment' groups several mtts together.
      2. first_seg - segment location relative to mtt table.
      In the current implementation:
      1. order     - log(mtts) rather than segments
      2. offset    - mtt index in mtt table
      
      Note: The actual mtt allocation is made in segments but it is
            transparent to callers.
      
      Rational: The mtt resource holders are not interested on how the allocation
                of mtt is done, but rather on how they will use it.
      Signed-off-by: NMarcel Apfelbaum <marcela@dev.mellanox.co.il>
      Reviewed-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2b8fb286
    • E
      mlx4: Ethernet port management modifications · ffe455ad
      Eugenia Emantayev 提交于
      The physical port is now common to the PF and VFs.
      The port resources and configuration is managed by the PF, VFs can
      only influence the MTU of the port, it is set as max among all functions,
      Each function allocates RX buffers of required size to meet it's MTU enforcement.
      Port management code was moved to mlx4_core, as the mlx4_en module is
      virtualization unaware
      
      Move handling qp functionality to mlx4_get_eth_qp/mlx4_put_eth_qp
      including reserve/release range and add/release unicast steering.
      Let mlx4_register/unregister_mac deal only with MAC (un)registration.
      Signed-off-by: NEugenia Emantayev <eugenia@mellanox.co.il>
      Signed-off-by: NYevgeny Petrilin <yevgenyp@mellanox.co.il>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ffe455ad
    • J
      mlx4_core: Reduce number of PD bits to 17 · f5311ac1
      Jack Morgenstein 提交于
      When SRIOV is enabled on the chip (at FW burning time),
      the HCA uses only 17 bits for the PD. The remaining 7 high-order bits
      are ignored.
      
      Change the allocator to return only 17 bits for the PD.  The MSB 7
      bits will be used to encode the slave number for consistency
      checking later on in the resource tracker.
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f5311ac1
    • J
      mlx4: Extanding port_mask functionality · 65dab25d
      Jack Morgenstein 提交于
      Port mask now has additional state.
      Port can be set as "none". In this case neither the mlx4_en or mlx4_ib
      drivers take ownership of the port.
      In multifunction mode there is an option to set the vfs as single ported devices.
      (in single function mode, both physical ports belong to same function)
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NYevgeny Petrilin <yevgenyp@mellanox.co.il>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      65dab25d
    • J
      mlx4_core: initial header-file changes for SRIOV support · 623ed84b
      Jack Morgenstein 提交于
      These changes will not affect module operation as yet. They
      are only to get some structs and enums in place for use by
      subsequent patches (making those smaller).
      
      Added here:
      * sriov state structs and inlines (mlx4_is_master/slave/mfunc)
      * comm-channel and vhcr support structures
      * enum values for new FW and comm-channel virtual commands
        (i.e., commands, passed via the comm channel to the PF-driver).
      * prototypes for many command wrapper functions (used by the
        PF context for processing FW commands passed to it by the VFs).
      * struct mlx4_eqe is moved from eq.c to mlx4.h (it will be used
        by other mlx4_core source files).
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      623ed84b
  12. 28 11月, 2011 1 次提交
  13. 29 10月, 2011 1 次提交
  14. 19 10月, 2011 1 次提交
  15. 14 10月, 2011 2 次提交
  16. 27 7月, 2011 1 次提交
  17. 19 7月, 2011 3 次提交
  18. 24 3月, 2011 6 次提交
  19. 13 1月, 2011 1 次提交
    • A
      IB/mlx4: Handle protocol field in multicast table · da995a8a
      Aleksey Senin 提交于
      The newest device firmware stores IB vs. Ethernet protocol in two bits
      in members_count field of multicast group table (0: Infiniband, 1:
      Ethernet).  When changing the QP members count for a multicast group,
      it important not to reset this information.  When calling multicast
      attach first time, the protocol type should be specified.  In this
      patch we always set it IB, but in the future we will handle Ethernet
      too.  When looking for a QP, the protocol type shoud be checked too.
      Signed-off-by: NAleksey Senin <alekseys@voltaire.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      da995a8a
  20. 26 10月, 2010 3 次提交
    • E
      IB/mlx4: Add VLAN support for IBoE · 4c3eb3ca
      Eli Cohen 提交于
      This patch allows IBoE traffic to be encapsulated in 802.1Q tagged
      VLAN frames.  The VLAN tag is encoded in the GID and derived from it
      by a simple computation.
      
      The netdev notifier callback is modified to catch VLAN device
      addition/removal and the port's GID table is updated to reflect the
      change, so that for each netdevice there is an entry in the GID table.
      When the port's GID table is exhausted, GID entries will not be added.
      Only children of the main interfaces can add to the GID table; if a
      VLAN interface is added on another VLAN interface (e.g. "vconfig add
      eth2.6 8"), then that interfaces will not add an entry to the GID
      table.
      Signed-off-by: NEli Cohen <eli@mellanox.co.il>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      4c3eb3ca
    • E
      IB/mlx4: Add support for IBoE · fa417f7b
      Eli Cohen 提交于
      Add support for IBoE to mlx4_ib.  The bulk of the code is handling the
      new address vector fields; mlx4 needs the MAC address of a remote node
      to include it in a WQE (for datagrams) or in the QP context (for
      connected QPs).  Address resolution is done by assuming all unicast
      GIDs are either link-local IPv6 addresses.
      
      Multicast group attach/detach needs to update the NIC's multicast
      filters; but since attaching a QP to a multicast group can be done
      before the QP is bound to a port, for IBoE we need to keep track of
      all multicast groups that a QP is attached too before it transitions
      from INIT to RTR (since it does not have a port in the INIT state).
      Signed-off-by: NEli Cohen <eli@mellanox.co.il>
      
      [ Many things cleaned up and otherwise monkeyed with; hope I didn't
        introduce too many bugs.  - Roland ]
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      fa417f7b
    • E
      mlx4_core: Update data structures and constants for IBoE · 96dfa684
      Eli Cohen 提交于
      Add fields to hardware data structures and add new constants required for IBoE
      support.
      Signed-off-by: NEli Cohen <eli@mellanox.co.il>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      96dfa684