1. 14 12月, 2011 14 次提交
    • J
      mlx4_core: mtt modifications for SRIOV · ea51b377
      Jack Morgenstein 提交于
      MTTs are resources which are allocated and tracked by the PF driver.
      In multifunction mode, the allocation and icm mapping is done in
      the resource tracker (later patch in this sequence).
      
      To accomplish this, we have "work" functions whose names start with
      "__", and "request" functions (same name, no __). If we are operating
      in multifunction mode, the request function actually results in
      comm-channel commands being sent (ALLOC_RES or FREE_RES).
      The PF-driver comm-channel handler will ultimately invoke the
      "work" (__) function and return the result.
      
      If we are not in multifunction mode, the "work" handler is invoked
      immediately.
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ea51b377
    • J
      mlx4_core: cq modifications for SRIOV · d7233386
      Jack Morgenstein 提交于
      CQs are resources which are allocated and tracked by the PF driver.
      In multifunction mode, the allocation and icm mapping is done in
      the resource tracker (later patch in this sequence).
      
      To accomplish this, we have "work" functions whose names start with
      "__", and "request" functions (same name, no __). If we are operating
      in multifunction mode, the request function actually results in
      comm-channel commands being sent (ALLOC_RES or FREE_RES).
      The PF-driver comm-channel handler will ultimately invoke the
      "work" (__) function and return the result.
      
      If we are not in multifunction mode, the "work" handler is invoked
      immediately.
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d7233386
    • J
      mlx4_core: qp modifications for SRIOV · fe9a2603
      Jack Morgenstein 提交于
      QPs are resources which are allocated and tracked by the PF driver.
      In multifunction mode, the allocation and icm mapping is done in
      the resource tracker (later patch in this sequence).
      
      To accomplish this, we have "work" functions whose names start with
      "__", and "request" functions (same name, no __). If we are operating
      in multifunction mode, the request function actually results in
      comm-channel commands being sent (ALLOC_RES or FREE_RES).
      The PF-driver comm-channel handler will ultimately invoke the
      "work" (__) function and return the result.
      
      If we are not in multifunction mode, the "work" handler is invoked
      immediately.
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fe9a2603
    • J
      mlx4_core: srq modifications for SRIOV · 3ec65b2b
      Jack Morgenstein 提交于
      SRQs are resources which are allocated and tracked by the PF driver.
      In multifunction mode, the allocation and icm mapping is done in
      the resource tracker (later patch in this sequence).
      
      To accomplish this, we have "work" functions whose names start with
      "__", and "request" functions (same name, no __). If we are operating
      in multifunction mode, the request function actually results in
      comm-channel commands being sent (ALLOC_RES or FREE_RES).
      The PF-driver comm-channel handler will ultimately invoke the
      "work" (__) function and return the result.
      
      If we are not in multifunction mode, the "work" handler is invoked
      immediately.
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3ec65b2b
    • M
      mlx4_core: Added FW commands and their wrappers for supporting SRIOV · 5cc914f1
      Marcel Apfelbaum 提交于
      The following commands are added here:
      1. QUERY_FUNC_CAP and its wrapper.  This function is used by VFs when
         they start up to receive configuration information from the PF, such
         as resource quotas for this VF, which ports should be used (currently
         two), what protocol is running on the port (currently Ethernet ONLY,
         or port not active).
      
      2. QUERY_PORT and its wrapper. Previously, this FW command was invoked directly
         by the ETH driver (en_port.c) using mlx4_cmd_box. Virtualization is now
         required here (the VF's MAC address must be substituted for the PFs
         MAC address returned by the FW). We changed the invocation
         in the ETH driver to use mlx4_QUERY_PORT, and added the wrapper.
      
      3. QUERY_HCA. Used by the VF to determine how the HCA was initialized.
         For now, we need only the multicast table member entry size
         (log2_mc_table_entry_sz, in the ConnectX PRM).  No wrapper is needed
         here, because the data may be passed as is to the VF without modification).
      
         In this command, we have added a GLOBAL_CAPS field for passing required
         configuration information from FW to a VF (this field is to allow safely
                         adding new SRIOV capabilities which require support in VF drivers, too).
         Bits will set here by FW in response to PF-driver configuration commands which
         will activate as yet undefined new SRIOV features. The VF will test to see that
         all required capabilities indicated by this field are supported (i.e., if a bit
         is set and the VF driver does not recognize that bit, it must abort
         its initialization).  Currently, no bits are set.
      
      4. Added a CLOSE_PORT wrapper.  The PF context needs to keep track of how many VF contexts
         have the port open.  The PF context will not actually issue the FW close port command
         until the last port user issues a CLOSE_PORT request.
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NYevgeny Petrilin <yevgenyp@mellanox.co.il>
      Signed-off-by: NMarcel Apfelbaum <marcela@mellanox.co.il>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5cc914f1
    • Y
      net/mlx4_core: Implement the master-slave communication channel · e8f081aa
      Yevgeny Petrilin 提交于
      When SRIOV is enabled, pf and vfs communicate via shared comm channel.
      The vf gets its side of the comm channel via a VF BAR.
      Each VF (slave) creates its vHCR (virtual HCA Command Register),
      Its DMA address is passed to the PF (master) using Communication Channel Register.
      The same Register is used to notify the master of commands posted by the
      slaves and for the master to pass events to the slaves, such as command completions
      and asynchronous events.
      
      The vHCR format is identical to the HCR format, except for the 'go' and 't' bits,
      which are reserved in the vHCR. Posting commands to the vHCR is identical to
      the way it is done with the HCR, albeit that the function/PF token fields are
      used instead of the HCR go bit.
      Specifically:
      - When the function prepares a new command in the vHCR, it issues the Post_vHCR_cmd
        communication channel command and toggles the value of the function token;
        when PF token has an equal value, the command has been accepted and a new command may be posted.
      - When the PF detects a Post_vHCR_cmd command, it concludes that a new command is available in the vHCR;
        after processing the command, the PF toggles the PF token to match the function token.
      
      When the 'e' bit is not set, the completion of a Post_vHCR_cmd command also indicates
      the completion the vHCR command. If, however, the 'e' bit is set, the completion of a
      Post_vHCR_cmd command only indicates that the vHCR command has been accepted for execution by the PF.
      
      Function commands are processed by the PF as follows:
      -DMA (using the ACCESS_MEM command) the vHCR image into a shadow buffer.
      -Validate that the opcode is non-privileged, and that the opcode- and input-modifiers are legal.
      -DMA the in-box (if required) into a shadow buffer.
      -Validate the command:
      	o Resource ranges (e.g., QP ranges).
      	o Partition key.
      	o Ranges of referenced resources (e.g., CQs within QP contexts).
      -If the 'e' bit is set
      	o complete the Post_vHCR_cmd command
      -Execute the command on the HCR.
      -DMA the results to the vHCR out-box (if required).
      -If the 'e' bit is set
      	o Indicate command completion by generating a completion event using the GEN_EQE command
      -Otherwise
      	o DMA the command status to the vHCR
      	o Complete the Post_vHCR_cmd command
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NYevgeny Petrillin <yevgenyp@mellanox.com>
      Signed-off-by: NLiran Liss <liranl@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e8f081aa
    • 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_core: Add "native" argument to mlx4_cmd and its callers (where needed) · f9baff50
      Jack Morgenstein 提交于
      For SRIOV, some Hypervisor commands can be executed directly (native = 1).
      Others should go through the command wrapper flow (for tracking resource
      usage, for example, or for changing some HCA configurations that slaves
      need to be notified of).
      
      This patch sets the groundwork for this capability -- adding the correct
      value of "native" in each case.
      
      Note that if SRIOV is not activated, this parameter has no effect.
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f9baff50
    • 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
    • E
    • S
      be2net: refactor/cleanup vf configuration code · 11ac75ed
      Sathya Perla 提交于
      - use adapter->num_vfs (and not the module param) to store the actual
      number of vfs created. Use the same variable to reflect SRIOV
      enable/disable state. So, drop the adapter->sriov_enabled field.
      
      - use for_all_vfs() macro in VF configuration code
      
      - drop the "vf_" prefix for the fields of be_vf_cfg; the prefix is
      redundant and removing it helps reduce line wrap
      Signed-off-by: NSathya Perla <sathya.perla@emulex.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      11ac75ed
    • S
      be2net: fix ethtool ringparam reporting · 110b82bc
      Sathya Perla 提交于
      The ethtool "-g" option is supposed to report the max queue length and
      user modified queue length for RX and TX queues.  be2net doesn't support
      user modification of queue lengths. So, the correct values for these
      would be the max numbers.
      be2net incorrectly reports the queue used values for these fields.
      Signed-off-by: NSathya Perla <sathya.perla@emulex.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      110b82bc
    • D
      bnx2x: properly update skb when mtu > 1500 · 036d2df9
      Dmitry Kravkov 提交于
      Since commit e52fcb24 newly allocated
      skb for small packets are not updated properly and dropped by stack.
      Signed-off-by: NDmitry Kravkov <dmitry@broadcom.com>
      Signed-off-by: NEilon Greenstein <eilong@broadcom.com>
      Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      036d2df9
  2. 13 12月, 2011 13 次提交
  3. 12 12月, 2011 6 次提交
  4. 11 12月, 2011 2 次提交
  5. 10 12月, 2011 5 次提交