2007-05-09 08:00:38 +07:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2004, 2005 Topspin Communications. All rights reserved.
|
2008-07-26 00:32:52 +07:00
|
|
|
* Copyright (c) 2005, 2006, 2007, 2008 Mellanox Technologies. All rights reserved.
|
2007-05-09 08:00:38 +07:00
|
|
|
* Copyright (c) 2006, 2007 Cisco Systems. All rights reserved.
|
|
|
|
*
|
|
|
|
* This software is available to you under a choice of one of two
|
|
|
|
* licenses. You may choose to be licensed under the terms of the GNU
|
|
|
|
* General Public License (GPL) Version 2, available from the file
|
|
|
|
* COPYING in the main directory of this source tree, or the
|
|
|
|
* OpenIB.org BSD license below:
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or
|
|
|
|
* without modification, are permitted provided that the following
|
|
|
|
* conditions are met:
|
|
|
|
*
|
|
|
|
* - Redistributions of source code must retain the above
|
|
|
|
* copyright notice, this list of conditions and the following
|
|
|
|
* disclaimer.
|
|
|
|
*
|
|
|
|
* - Redistributions in binary form must reproduce the above
|
|
|
|
* copyright notice, this list of conditions and the following
|
|
|
|
* disclaimer in the documentation and/or other materials
|
|
|
|
* provided with the distribution.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
|
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
|
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
|
|
|
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
|
|
|
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
|
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
|
* SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MLX4_FW_H
|
|
|
|
#define MLX4_FW_H
|
|
|
|
|
|
|
|
#include "mlx4.h"
|
|
|
|
#include "icm.h"
|
|
|
|
|
2008-07-15 13:48:53 +07:00
|
|
|
struct mlx4_mod_stat_cfg {
|
|
|
|
u8 log_pg_sz;
|
|
|
|
u8 log_pg_sz_m;
|
|
|
|
};
|
|
|
|
|
2007-05-09 08:00:38 +07:00
|
|
|
struct mlx4_dev_cap {
|
|
|
|
int max_srq_sz;
|
|
|
|
int max_qp_sz;
|
|
|
|
int reserved_qps;
|
|
|
|
int max_qps;
|
|
|
|
int reserved_srqs;
|
|
|
|
int max_srqs;
|
|
|
|
int max_cq_sz;
|
|
|
|
int reserved_cqs;
|
|
|
|
int max_cqs;
|
|
|
|
int max_mpts;
|
|
|
|
int reserved_eqs;
|
|
|
|
int max_eqs;
|
|
|
|
int reserved_mtts;
|
|
|
|
int max_mrw_sz;
|
|
|
|
int reserved_mrws;
|
|
|
|
int max_mtt_seg;
|
|
|
|
int max_requester_per_qp;
|
|
|
|
int max_responder_per_qp;
|
|
|
|
int max_rdma_global;
|
|
|
|
int local_ca_ack_delay;
|
|
|
|
int num_ports;
|
2007-06-26 19:55:28 +07:00
|
|
|
u32 max_msg_sz;
|
2008-10-23 00:56:48 +07:00
|
|
|
int ib_mtu[MLX4_MAX_PORTS + 1];
|
2007-06-18 22:15:02 +07:00
|
|
|
int max_port_width[MLX4_MAX_PORTS + 1];
|
|
|
|
int max_vl[MLX4_MAX_PORTS + 1];
|
|
|
|
int max_gids[MLX4_MAX_PORTS + 1];
|
|
|
|
int max_pkeys[MLX4_MAX_PORTS + 1];
|
2008-10-23 00:56:48 +07:00
|
|
|
u64 def_mac[MLX4_MAX_PORTS + 1];
|
|
|
|
u16 eth_mtu[MLX4_MAX_PORTS + 1];
|
2010-08-24 10:46:23 +07:00
|
|
|
int trans_type[MLX4_MAX_PORTS + 1];
|
|
|
|
int vendor_oui[MLX4_MAX_PORTS + 1];
|
|
|
|
u16 wavelength[MLX4_MAX_PORTS + 1];
|
|
|
|
u64 trans_code[MLX4_MAX_PORTS + 1];
|
2007-05-09 08:00:38 +07:00
|
|
|
u16 stat_rate_support;
|
{NET, IB}/mlx4: Add device managed flow steering firmware API
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: Hadar Hen Zion <hadarh@mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-05 11:03:46 +07:00
|
|
|
int fs_log_max_ucast_qp_range_size;
|
|
|
|
int fs_max_num_qp_per_entry;
|
2011-06-15 21:41:42 +07:00
|
|
|
u64 flags;
|
2012-04-29 21:04:25 +07:00
|
|
|
u64 flags2;
|
2007-05-09 08:00:38 +07:00
|
|
|
int reserved_uars;
|
|
|
|
int uar_size;
|
|
|
|
int min_page_sz;
|
|
|
|
int bf_reg_size;
|
|
|
|
int bf_regs_per_page;
|
|
|
|
int max_sq_sg;
|
|
|
|
int max_sq_desc_sz;
|
|
|
|
int max_rq_sg;
|
|
|
|
int max_rq_desc_sz;
|
|
|
|
int max_qp_per_mcg;
|
|
|
|
int reserved_mgms;
|
|
|
|
int max_mcgs;
|
|
|
|
int reserved_pds;
|
|
|
|
int max_pds;
|
2011-06-02 23:01:33 +07:00
|
|
|
int reserved_xrcds;
|
|
|
|
int max_xrcds;
|
2007-05-09 08:00:38 +07:00
|
|
|
int qpc_entry_sz;
|
|
|
|
int rdmarc_entry_sz;
|
|
|
|
int altc_entry_sz;
|
|
|
|
int aux_entry_sz;
|
|
|
|
int srq_entry_sz;
|
|
|
|
int cqc_entry_sz;
|
|
|
|
int eqc_entry_sz;
|
|
|
|
int dmpt_entry_sz;
|
|
|
|
int cmpt_entry_sz;
|
|
|
|
int mtt_entry_sz;
|
|
|
|
int resize_srq;
|
2008-07-23 22:12:26 +07:00
|
|
|
u32 bmme_flags;
|
2007-05-09 08:00:38 +07:00
|
|
|
u32 reserved_lkey;
|
|
|
|
u64 max_icm_sz;
|
2008-04-17 11:09:27 +07:00
|
|
|
int max_gso_sz;
|
2012-04-29 21:04:25 +07:00
|
|
|
int max_rss_tbl_sz;
|
2008-10-23 05:38:42 +07:00
|
|
|
u8 supported_port_types[MLX4_MAX_PORTS + 1];
|
2011-12-19 11:00:34 +07:00
|
|
|
u8 suggested_type[MLX4_MAX_PORTS + 1];
|
|
|
|
u8 default_sense[MLX4_MAX_PORTS + 1];
|
2008-10-23 00:25:29 +07:00
|
|
|
u8 log_max_macs[MLX4_MAX_PORTS + 1];
|
|
|
|
u8 log_max_vlans[MLX4_MAX_PORTS + 1];
|
2011-06-15 21:47:14 +07:00
|
|
|
u32 max_counters;
|
2007-05-09 08:00:38 +07:00
|
|
|
};
|
|
|
|
|
mlx4_core: Added FW commands and their wrappers for supporting SRIOV
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: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: Marcel Apfelbaum <marcela@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-13 11:12:40 +07:00
|
|
|
struct mlx4_func_cap {
|
|
|
|
u8 num_ports;
|
|
|
|
u8 flags;
|
|
|
|
u32 pf_context_behaviour;
|
|
|
|
int qp_quota;
|
|
|
|
int cq_quota;
|
|
|
|
int srq_quota;
|
|
|
|
int mpt_quota;
|
|
|
|
int mtt_quota;
|
|
|
|
int max_eq;
|
|
|
|
int reserved_eq;
|
|
|
|
int mcg_quota;
|
2014-05-29 20:31:03 +07:00
|
|
|
u32 qp0_qkey;
|
mlx4: Modify proxy/tunnel QP mechanism so that guests do no calculations
Previously, the structure of a guest's proxy QPs followed the
structure of the PPF special qps (qp0 port 1, qp0 port 2, qp1 port 1,
qp1 port 2, ...). The guest then did offset calculations on the
sqp_base qp number that the PPF passed to it in QUERY_FUNC_CAP().
This is now changed so that the guest does no offset calculations
regarding proxy or tunnel QPs to use. This change frees the PPF from
needing to adhere to a specific order in allocating proxy and tunnel
QPs.
Now QUERY_FUNC_CAP provides each port individually with its proxy
qp0, proxy qp1, tunnel qp0, and tunnel qp1 QP numbers, and these are
used directly where required (with no offset calculations).
To accomplish this change, several fields were added to the phys_caps
structure for use by the PPF and by non-SR-IOV mode:
base_sqpn -- in non-sriov mode, this was formerly sqp_start.
base_proxy_sqpn -- the first physical proxy qp number -- used by PPF
base_tunnel_sqpn -- the first physical tunnel qp number -- used by PPF.
The current code in the PPF still adheres to the previous layout of
sqps, proxy-sqps and tunnel-sqps. However, the PPF can change this
layout without affecting VF or (paravirtualized) PF code.
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <roland@purestorage.com>
2012-08-03 15:40:57 +07:00
|
|
|
u32 qp0_tunnel_qpn;
|
|
|
|
u32 qp0_proxy_qpn;
|
|
|
|
u32 qp1_tunnel_qpn;
|
|
|
|
u32 qp1_proxy_qpn;
|
|
|
|
u8 physical_port;
|
|
|
|
u8 port_flags;
|
2013-12-20 02:20:11 +07:00
|
|
|
u8 flags1;
|
2013-12-20 02:20:12 +07:00
|
|
|
u64 phys_port_id;
|
mlx4_core: Added FW commands and their wrappers for supporting SRIOV
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: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: Marcel Apfelbaum <marcela@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-13 11:12:40 +07:00
|
|
|
};
|
|
|
|
|
2007-05-09 08:00:38 +07:00
|
|
|
struct mlx4_adapter {
|
|
|
|
char board_id[MLX4_BOARD_ID_LEN];
|
|
|
|
u8 inta_pin;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct mlx4_init_hca_param {
|
|
|
|
u64 qpc_base;
|
|
|
|
u64 rdmarc_base;
|
|
|
|
u64 auxc_base;
|
|
|
|
u64 altc_base;
|
|
|
|
u64 srqc_base;
|
|
|
|
u64 cqc_base;
|
|
|
|
u64 eqc_base;
|
|
|
|
u64 mc_base;
|
|
|
|
u64 dmpt_base;
|
|
|
|
u64 cmpt_base;
|
|
|
|
u64 mtt_base;
|
mlx4_core: Added FW commands and their wrappers for supporting SRIOV
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: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: Marcel Apfelbaum <marcela@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-13 11:12:40 +07:00
|
|
|
u64 global_caps;
|
2007-05-09 08:00:38 +07:00
|
|
|
u16 log_mc_entry_sz;
|
|
|
|
u16 log_mc_hash_sz;
|
2013-04-23 13:06:48 +07:00
|
|
|
u16 hca_core_clock; /* Internal Clock Frequency (in MHz) */
|
2007-05-09 08:00:38 +07:00
|
|
|
u8 log_num_qps;
|
|
|
|
u8 log_num_srqs;
|
|
|
|
u8 log_num_cqs;
|
|
|
|
u8 log_num_eqs;
|
|
|
|
u8 log_rd_per_qp;
|
|
|
|
u8 log_mc_table_sz;
|
|
|
|
u8 log_mpt_sz;
|
|
|
|
u8 log_uar_sz;
|
2013-02-06 23:19:11 +07:00
|
|
|
u8 mw_enabled; /* Enable memory windows */
|
mlx4_core: Modify driver initialization flow to accommodate SRIOV for Ethernet
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: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: Liran Liss <liranl@mellanox.co.il>
Signed-off-by: Marcel Apfelbaum <marcela@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-13 11:18:30 +07:00
|
|
|
u8 uar_page_sz; /* log pg sz in 4k chunks */
|
2012-12-07 00:11:59 +07:00
|
|
|
u8 steering_mode; /* for QUERY_HCA */
|
2012-10-21 21:59:24 +07:00
|
|
|
u64 dev_cap_enabled;
|
2007-05-09 08:00:38 +07:00
|
|
|
};
|
|
|
|
|
|
|
|
struct mlx4_init_ib_param {
|
|
|
|
int port_width;
|
|
|
|
int vl_cap;
|
|
|
|
int mtu_cap;
|
|
|
|
u16 gid_cap;
|
|
|
|
u16 pkey_cap;
|
|
|
|
int set_guid0;
|
|
|
|
u64 guid0;
|
|
|
|
int set_node_guid;
|
|
|
|
u64 node_guid;
|
|
|
|
int set_si_guid;
|
|
|
|
u64 si_guid;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct mlx4_set_ib_param {
|
|
|
|
int set_si_guid;
|
|
|
|
int reset_qkey_viol;
|
|
|
|
u64 si_guid;
|
|
|
|
u32 cap_mask;
|
|
|
|
};
|
|
|
|
|
|
|
|
int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap);
|
mlx4: Modify proxy/tunnel QP mechanism so that guests do no calculations
Previously, the structure of a guest's proxy QPs followed the
structure of the PPF special qps (qp0 port 1, qp0 port 2, qp1 port 1,
qp1 port 2, ...). The guest then did offset calculations on the
sqp_base qp number that the PPF passed to it in QUERY_FUNC_CAP().
This is now changed so that the guest does no offset calculations
regarding proxy or tunnel QPs to use. This change frees the PPF from
needing to adhere to a specific order in allocating proxy and tunnel
QPs.
Now QUERY_FUNC_CAP provides each port individually with its proxy
qp0, proxy qp1, tunnel qp0, and tunnel qp1 QP numbers, and these are
used directly where required (with no offset calculations).
To accomplish this change, several fields were added to the phys_caps
structure for use by the PPF and by non-SR-IOV mode:
base_sqpn -- in non-sriov mode, this was formerly sqp_start.
base_proxy_sqpn -- the first physical proxy qp number -- used by PPF
base_tunnel_sqpn -- the first physical tunnel qp number -- used by PPF.
The current code in the PPF still adheres to the previous layout of
sqps, proxy-sqps and tunnel-sqps. However, the PPF can change this
layout without affecting VF or (paravirtualized) PF code.
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <roland@purestorage.com>
2012-08-03 15:40:57 +07:00
|
|
|
int mlx4_QUERY_FUNC_CAP(struct mlx4_dev *dev, u32 gen_or_port,
|
|
|
|
struct mlx4_func_cap *func_cap);
|
mlx4_core: Added FW commands and their wrappers for supporting SRIOV
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: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: Marcel Apfelbaum <marcela@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-13 11:12:40 +07:00
|
|
|
int mlx4_QUERY_FUNC_CAP_wrapper(struct mlx4_dev *dev, int slave,
|
|
|
|
struct mlx4_vhcr *vhcr,
|
|
|
|
struct mlx4_cmd_mailbox *inbox,
|
|
|
|
struct mlx4_cmd_mailbox *outbox,
|
|
|
|
struct mlx4_cmd_info *cmd);
|
2007-05-09 08:00:38 +07:00
|
|
|
int mlx4_MAP_FA(struct mlx4_dev *dev, struct mlx4_icm *icm);
|
|
|
|
int mlx4_UNMAP_FA(struct mlx4_dev *dev);
|
|
|
|
int mlx4_RUN_FW(struct mlx4_dev *dev);
|
|
|
|
int mlx4_QUERY_FW(struct mlx4_dev *dev);
|
|
|
|
int mlx4_QUERY_ADAPTER(struct mlx4_dev *dev, struct mlx4_adapter *adapter);
|
|
|
|
int mlx4_INIT_HCA(struct mlx4_dev *dev, struct mlx4_init_hca_param *param);
|
mlx4_core: Modify driver initialization flow to accommodate SRIOV for Ethernet
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: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: Liran Liss <liranl@mellanox.co.il>
Signed-off-by: Marcel Apfelbaum <marcela@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-13 11:18:30 +07:00
|
|
|
int mlx4_QUERY_HCA(struct mlx4_dev *dev, struct mlx4_init_hca_param *param);
|
2007-05-09 08:00:38 +07:00
|
|
|
int mlx4_CLOSE_HCA(struct mlx4_dev *dev, int panic);
|
|
|
|
int mlx4_map_cmd(struct mlx4_dev *dev, u16 op, struct mlx4_icm *icm, u64 virt);
|
|
|
|
int mlx4_SET_ICM_SIZE(struct mlx4_dev *dev, u64 icm_size, u64 *aux_pages);
|
|
|
|
int mlx4_MAP_ICM_AUX(struct mlx4_dev *dev, struct mlx4_icm *icm);
|
|
|
|
int mlx4_UNMAP_ICM_AUX(struct mlx4_dev *dev);
|
|
|
|
int mlx4_NOP(struct mlx4_dev *dev);
|
2008-07-15 13:48:53 +07:00
|
|
|
int mlx4_MOD_STAT_CFG(struct mlx4_dev *dev, struct mlx4_mod_stat_cfg *cfg);
|
2013-07-28 22:54:21 +07:00
|
|
|
void mlx4_opreq_action(struct work_struct *work);
|
2007-05-09 08:00:38 +07:00
|
|
|
|
|
|
|
#endif /* MLX4_FW_H */
|