Merge tag 'rdma-for-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
Pull InfiniBand/RDMA changes from Roland Dreier: - Updates to the qib low-level driver - First chunk of changes for SR-IOV support for mlx4 IB - RDMA CM support for IPv6-only binding - Other misc cleanups and fixes Fix up some add-add conflicts in include/linux/mlx4/device.h and drivers/net/ethernet/mellanox/mlx4/main.c * tag 'rdma-for-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (30 commits) IB/qib: checkpatch fixes IB/qib: Add congestion control agent implementation IB/qib: Reduce sdma_lock contention IB/qib: Fix an incorrect log message IB/qib: Fix QP RCU sparse warnings mlx4: Put physical GID and P_Key table sizes in mlx4_phys_caps struct and paravirtualize them mlx4_core: Allow guests to have IB ports mlx4_core: Implement mechanism for reserved Q_Keys net/mlx4_core: Free ICM table in case of error IB/cm: Destroy idr as part of the module init error flow mlx4_core: Remove double function declarations IB/mlx4: Fill the masked_atomic_cap attribute in query device IB/mthca: Fill in sq_sig_type in query QP IB/mthca: Warning about event for non-existent QPs should show event type IB/qib: Fix sparse RCU warnings in qib_keys.c net/mlx4_core: Initialize IB port capabilities for all slaves mlx4: Use port management change event instead of smp_snoop IB/qib: RCU locking for MR validation IB/qib: Avoid returning EBUSY from MR deregister IB/qib: Fix UC MR refs for immediate operations ...
This commit is contained in:
@@ -57,6 +57,13 @@ enum {
|
||||
MLX4_MAX_PORTS = 2
|
||||
};
|
||||
|
||||
/* base qkey for use in sriov tunnel-qp/proxy-qp communication.
|
||||
* These qkeys must not be allowed for general use. This is a 64k range,
|
||||
* and to test for violation, we use the mask (protect against future chg).
|
||||
*/
|
||||
#define MLX4_RESERVED_QKEY_BASE (0xFFFF0000)
|
||||
#define MLX4_RESERVED_QKEY_MASK (0xFFFF0000)
|
||||
|
||||
enum {
|
||||
MLX4_BOARD_ID_LEN = 64
|
||||
};
|
||||
@@ -127,7 +134,8 @@ enum {
|
||||
MLX4_DEV_CAP_FLAG_VEP_UC_STEER = 1LL << 41,
|
||||
MLX4_DEV_CAP_FLAG_VEP_MC_STEER = 1LL << 42,
|
||||
MLX4_DEV_CAP_FLAG_COUNTERS = 1LL << 48,
|
||||
MLX4_DEV_CAP_FLAG_SENSE_SUPPORT = 1LL << 55
|
||||
MLX4_DEV_CAP_FLAG_SENSE_SUPPORT = 1LL << 55,
|
||||
MLX4_DEV_CAP_FLAG_PORT_MNG_CHG_EV = 1LL << 59,
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -170,6 +178,7 @@ enum mlx4_event {
|
||||
MLX4_EVENT_TYPE_COMM_CHANNEL = 0x18,
|
||||
MLX4_EVENT_TYPE_FATAL_WARNING = 0x1b,
|
||||
MLX4_EVENT_TYPE_FLR_EVENT = 0x1c,
|
||||
MLX4_EVENT_TYPE_PORT_MNG_CHG_EVENT = 0x1d,
|
||||
MLX4_EVENT_TYPE_NONE = 0xff,
|
||||
};
|
||||
|
||||
@@ -267,12 +276,32 @@ enum {
|
||||
MLX4_MAX_FAST_REG_PAGES = 511,
|
||||
};
|
||||
|
||||
enum {
|
||||
MLX4_DEV_PMC_SUBTYPE_GUID_INFO = 0x14,
|
||||
MLX4_DEV_PMC_SUBTYPE_PORT_INFO = 0x15,
|
||||
MLX4_DEV_PMC_SUBTYPE_PKEY_TABLE = 0x16,
|
||||
};
|
||||
|
||||
/* Port mgmt change event handling */
|
||||
enum {
|
||||
MLX4_EQ_PORT_INFO_MSTR_SM_LID_CHANGE_MASK = 1 << 0,
|
||||
MLX4_EQ_PORT_INFO_GID_PFX_CHANGE_MASK = 1 << 1,
|
||||
MLX4_EQ_PORT_INFO_LID_CHANGE_MASK = 1 << 2,
|
||||
MLX4_EQ_PORT_INFO_CLIENT_REREG_MASK = 1 << 3,
|
||||
MLX4_EQ_PORT_INFO_MSTR_SM_SL_CHANGE_MASK = 1 << 4,
|
||||
};
|
||||
|
||||
#define MSTR_SM_CHANGE_MASK (MLX4_EQ_PORT_INFO_MSTR_SM_SL_CHANGE_MASK | \
|
||||
MLX4_EQ_PORT_INFO_MSTR_SM_LID_CHANGE_MASK)
|
||||
|
||||
static inline u64 mlx4_fw_ver(u64 major, u64 minor, u64 subminor)
|
||||
{
|
||||
return (major << 32) | (minor << 16) | subminor;
|
||||
}
|
||||
|
||||
struct mlx4_phys_caps {
|
||||
u32 gid_phys_table_len[MLX4_MAX_PORTS + 1];
|
||||
u32 pkey_phys_table_len[MLX4_MAX_PORTS + 1];
|
||||
u32 num_phys_eqs;
|
||||
};
|
||||
|
||||
@@ -305,6 +334,8 @@ struct mlx4_caps {
|
||||
int max_qp_init_rdma;
|
||||
int max_qp_dest_rdma;
|
||||
int sqp_start;
|
||||
u32 base_sqpn;
|
||||
u32 base_tunnel_sqpn;
|
||||
int num_srqs;
|
||||
int max_srq_wqes;
|
||||
int max_srq_sge;
|
||||
@@ -547,6 +578,81 @@ struct mlx4_dev {
|
||||
u64 regid_allmulti_array[MLX4_MAX_PORTS + 1];
|
||||
};
|
||||
|
||||
struct mlx4_eqe {
|
||||
u8 reserved1;
|
||||
u8 type;
|
||||
u8 reserved2;
|
||||
u8 subtype;
|
||||
union {
|
||||
u32 raw[6];
|
||||
struct {
|
||||
__be32 cqn;
|
||||
} __packed comp;
|
||||
struct {
|
||||
u16 reserved1;
|
||||
__be16 token;
|
||||
u32 reserved2;
|
||||
u8 reserved3[3];
|
||||
u8 status;
|
||||
__be64 out_param;
|
||||
} __packed cmd;
|
||||
struct {
|
||||
__be32 qpn;
|
||||
} __packed qp;
|
||||
struct {
|
||||
__be32 srqn;
|
||||
} __packed srq;
|
||||
struct {
|
||||
__be32 cqn;
|
||||
u32 reserved1;
|
||||
u8 reserved2[3];
|
||||
u8 syndrome;
|
||||
} __packed cq_err;
|
||||
struct {
|
||||
u32 reserved1[2];
|
||||
__be32 port;
|
||||
} __packed port_change;
|
||||
struct {
|
||||
#define COMM_CHANNEL_BIT_ARRAY_SIZE 4
|
||||
u32 reserved;
|
||||
u32 bit_vec[COMM_CHANNEL_BIT_ARRAY_SIZE];
|
||||
} __packed comm_channel_arm;
|
||||
struct {
|
||||
u8 port;
|
||||
u8 reserved[3];
|
||||
__be64 mac;
|
||||
} __packed mac_update;
|
||||
struct {
|
||||
__be32 slave_id;
|
||||
} __packed flr_event;
|
||||
struct {
|
||||
__be16 current_temperature;
|
||||
__be16 warning_threshold;
|
||||
} __packed warming;
|
||||
struct {
|
||||
u8 reserved[3];
|
||||
u8 port;
|
||||
union {
|
||||
struct {
|
||||
__be16 mstr_sm_lid;
|
||||
__be16 port_lid;
|
||||
__be32 changed_attr;
|
||||
u8 reserved[3];
|
||||
u8 mstr_sm_sl;
|
||||
__be64 gid_prefix;
|
||||
} __packed port_info;
|
||||
struct {
|
||||
__be32 block_ptr;
|
||||
__be32 tbl_entries_mask;
|
||||
} __packed tbl_change_info;
|
||||
} params;
|
||||
} __packed port_mgmt_change;
|
||||
} event;
|
||||
u8 slave_id;
|
||||
u8 reserved3[2];
|
||||
u8 owner;
|
||||
} __packed;
|
||||
|
||||
struct mlx4_init_port_param {
|
||||
int set_guid0;
|
||||
int set_node_guid;
|
||||
@@ -570,6 +676,15 @@ struct mlx4_init_port_param {
|
||||
if (((dev)->caps.port_mask[port] == MLX4_PORT_TYPE_IB) || \
|
||||
((dev)->caps.flags & MLX4_DEV_CAP_FLAG_IBOE))
|
||||
|
||||
#define MLX4_INVALID_SLAVE_ID 0xFF
|
||||
|
||||
void handle_port_mgmt_change_event(struct work_struct *work);
|
||||
|
||||
static inline int mlx4_master_func_num(struct mlx4_dev *dev)
|
||||
{
|
||||
return dev->caps.function;
|
||||
}
|
||||
|
||||
static inline int mlx4_is_master(struct mlx4_dev *dev)
|
||||
{
|
||||
return dev->flags & MLX4_FLAG_MASTER;
|
||||
@@ -799,4 +914,6 @@ int mlx4_flow_attach(struct mlx4_dev *dev,
|
||||
struct mlx4_net_trans_rule *rule, u64 *reg_id);
|
||||
int mlx4_flow_detach(struct mlx4_dev *dev, u64 reg_id);
|
||||
|
||||
int mlx4_get_parav_qkey(struct mlx4_dev *dev, u32 qpn, u32 *qkey);
|
||||
|
||||
#endif /* MLX4_DEVICE_H */
|
||||
|
Reference in New Issue
Block a user