270 size_t private_data_len = 0;
276 DBGC (
local_id,
"CM %08x connection request failed: %s\n",
293 DBGC (
local_id,
"CM %08x connected to QPN %#lx PSN %#x\n",
314 DBGC (
local_id,
"CM %08x connection rejected (reason %d)\n",
325 DBGC (
local_id,
"CM %08x unexpected response (attribute " 362 size_t private_data_len;
391 htonl ( (
qp->recv.psn << 8 ) | ( 0x14 << 3 ) |
395 ( (
IB_MTU_2048 << 4 ) | ( 1 << 3 ) | ( 0x07 << 0 ) );
407 ( ( conn->
qp->
av.
sl << 4 ) | ( 1 << 3 ) );
419 if ( ! conn->
madx ) {
465 qp->av.gid_present = 1;
476 goto err_create_path;
482 DBGC (
local_id,
"CM %08x created for IBDEV %s QPN %#lx\n",
#define IB_CM_CLASS_VERSION
Communication management class version.
uint16_t pkey
Partition key.
uint32_t starting_psn__local_timeout__retry_count
Starting PSN, local CM response timeout and retry count.
uint16_t remote_lid
Remote port LID.
A communication management connection reply.
#define IB_CM_ATTR_CONNECT_REJECT
uint32_t flow_label__rate
Flow label and rate.
static struct ib_mad_transaction_operations ib_cm_req_op
Connection request operations.
struct arbelprm_rc_send_wqe rc
Infiniband management interfaces.
uint16_t reason
Rejection reason.
uint32_t remote_id
Remote communication ID.
char name[IBDEV_NAME_LEN]
Name of this Infiniband device.
union ib_gid gid
Port GID (comprising GID prefix and port GUID)
struct list_head list
List of connections.
#define list_add(new, head)
Add a new entry to the head of a list.
uint32_t local_id
Local communication ID.
Infiniband connection operations.
uint8_t private_data[0]
Connection request private data.
int ib_modify_qp(struct ib_device *ibdev, struct ib_queue_pair *qp)
Modify queue pair.
size_t private_data_len
Length of connection request private data.
#define IB_GUID_ARGS(guid)
Infiniband Globally Unique Identifier debug message arguments.
#define IB_CM_TRANSPORT_RC
CM transport types.
#define IB_CM_REJECT_CONSUMER
struct ib_cm_path primary
Primary path.
uint8_t private_data[196]
Private data.
static void ib_cm_path_complete(struct ib_device *ibdev, struct ib_path *path, int rc, struct ib_address_vector *av)
Handle connection path transaction completion.
uint32_t remote_id
Remote communication ID.
struct ib_mad_interface * gsi
General services interface.
uint8_t hop_limit
Hop limit.
static LIST_HEAD(ib_cm_conns)
List of connections.
static int ib_cm_send_rtu(struct ib_device *ibdev, struct ib_mad_interface *mi, struct ib_mad_tid *tid, struct ib_address_vector *av, uint32_t local_id, uint32_t remote_id)
Send "ready to use" response.
A communication management disconnection reply.
union ib_guid service_id
Service ID.
void(* complete)(struct ib_device *ibdev, struct ib_path *path, int rc, struct ib_address_vector *av)
Handle path transaction completion.
uint32_t remote_id
Remote communication ID.
An Infiniband management interface.
#define IB_CM_REJECT_STALE_CONN
struct ib_connection * ib_create_conn(struct ib_device *ibdev, struct ib_queue_pair *qp, union ib_gid *dgid, union ib_guid *service_id, void *private_data, size_t private_data_len, struct ib_connection_operations *op)
Create connection to remote QP.
An Infiniband Global Identifier.
union ib_guid service_id
Target service ID.
uint8_t private_data[92]
Private data.
#define IB_QKEY_GSI
General service interface queue key.
#define IB_CM_ATTR_DISCONNECT_REQUEST
uint32_t starting_psn
Starting PSN.
static __always_inline void ib_path_set_ownerdata(struct ib_path *path, void *priv)
Set Infiniband path owner-private data.
#define ENOTSUP
Operation not supported.
static void ib_cm_recv_dreq(struct ib_device *ibdev, struct ib_mad_interface *mi, union ib_mad *mad, struct ib_address_vector *av)
Handle disconnection requests.
#define IB_CM_ATTR_READY_TO_USE
uint32_t local_id
Local communication ID.
void(* changed)(struct ib_device *ibdev, struct ib_queue_pair *qp, struct ib_connection *conn, int rc, void *private_data, size_t private_data_len)
Handle change of connection status.
#define list_del(list)
Delete an entry from a list.
void * memcpy(void *dest, const void *src, size_t len) __nonnull
uint32_t local_qpn__responder_resources
Local QPN and responder resources.
#define IB_GUID_FMT
Infiniband Globally Unique Identifier debug message format.
static void ib_cm_recv_rep(struct ib_device *ibdev, struct ib_mad_interface *mi, union ib_mad *mad, struct ib_address_vector *av)
Handle duplicate connection replies.
unsigned long qkey
Queue key.
A communication management ready to use reply.
static int ib_cm_rejection_reason_to_rc(uint16_t reason)
Convert connection rejection reason to return status code.
Infiniband path operations.
An Infiniband management transaction.
#define list_for_each_entry(pos, head, member)
Iterate over entries in a list.
#define __unused
Declare a variable or data structure as unused.
uint32_t local_eecn__initiator_depth
Local EECN and initiator depth.
static int ib_cm_send_drep(struct ib_device *ibdev, struct ib_mad_interface *mi, struct ib_mad_tid *tid, struct ib_address_vector *av, uint32_t local_id, uint32_t remote_id)
Send reply to disconnection request.
static __always_inline void * ib_path_get_ownerdata(struct ib_path *path)
Get Infiniband path owner-private data.
#define IB_CM_ATTR_CONNECT_REQUEST
struct ib_mad_transaction * ib_create_madx(struct ib_device *ibdev, struct ib_mad_interface *mi, union ib_mad *mad, struct ib_address_vector *av, struct ib_mad_transaction_operations *op)
Create management transaction.
uint32_t remote_id
Remote communication ID.
An Infiniband management agent.
uint32_t remote_eecn__remote_timeout__service_type__ee_flow_ctrl
Remote EECN, remote CM response timeout, transport service type, EE flow control.
static __always_inline void ib_madx_set_ownerdata(struct ib_mad_transaction *madx, void *priv)
Set Infiniband management transaction owner-private data.
struct ib_cm_common common
A communication management disconnection request.
uint8_t local_ack_timeout
Local ACK timeout.
struct ib_path * ib_create_path(struct ib_device *ibdev, struct ib_address_vector *av, struct ib_path_operations *op)
Create path.
uint16_t local_lid
Local port LID.
struct ib_cm_connect_reply connect_reply
#define IB_MGMT_METHOD_SEND
#define IB_GID_ARGS(gid)
Infiniband Global Identifier debug message arguments.
#define ENOTCONN
The socket is not connected.
#define IB_CM_ATTR_DISCONNECT_REPLY
#define IB_QPN_GSI
General service interface QPN.
Communication management common fields.
char * strerror(int errno)
Retrieve string representation of error number.
union ib_gid remote_gid
Remote port GID.
A communication management connection request.
static void(* free)(struct refcnt *refcnt))
void * zalloc(size_t size)
Allocate cleared memory.
#define IB_CM_ATTR_CONNECT_REPLY
struct ib_connection_operations * op
Connection operations.
An Infiniband Globally Unique Identifier.
struct ib_cm_ready_to_use ready_to_use
struct ib_cm_disconnect_reply disconnect_reply
long int random(void)
Generate a pseudo-random number between 0 and 2147483647L or 2147483562?
uint8_t private_data[148]
Private data.
union ib_guid node_guid
Node GUID.
#define ENODEV
No such device.
uint8_t private_data[220]
Private data.
struct ib_cm_connect_reject connect_reject
unsigned long qpn
Queue Pair Number.
uint32_t local_id
Local communication ID.
struct ib_address_vector av
Address vector.
uint32_t remote_id
Remote communication ID.
struct ib_cm_common common
An Infiniband connection.
#define EALREADY
Connection already in progress.
static __always_inline void * ib_madx_get_ownerdata(struct ib_mad_transaction *madx)
Get Infiniband management transaction owner-private data.
struct ib_path * path
Path to target.
union ib_gid local_gid
Local port GID.
An Infiniband Queue Pair.
struct ib_cm_connect_request connect_request
unsigned int sl
Service level.
#define EPERM
Operation not permitted.
uint32_t local_qpn
Local QPN.
struct arbelprm_qp_db_record qp
static uint16_t struct vmbus_xfer_pages_operations * op
uint32_t local_id
Local communication ID.
A communication management connection rejection.
uint8_t max_cm_retries__srq
Max CM retries and SRQ.
#define ENOTTY
Inappropriate I/O control operation.
union ib_guid local_ca
Local CA GUID.
struct ib_queue_pair * qp
Queue pair.
void ib_destroy_conn(struct ib_device *ibdev, struct ib_queue_pair *qp __unused, struct ib_connection *conn)
Destroy connection to remote QP.
uint8_t mgmt_class
Management class.
#define IB_MGMT_STATUS_OK
struct ib_cm_disconnect_request disconnect_request
#define EIO
Input/output error.
uint8_t private_data[92]
Private data.
union ib_gid gid
GID, if present.
#define IB_GID_FMT
Infiniband Global Identifier debug message format.
uint16_t reason
Rejection reason.
uint8_t payload_mtu__rdc_exists__rnr_retry
Path packet payload MTU, RDC exists, RNR retry count.
struct ib_device * ibdev
Infiniband device.
Infiniband communication management.
uint16_t pkey
Partition key.
An Infiniband Address Vector.
uint32_t local_id
Local communication ID.
static struct ib_path_operations ib_cm_path_op
Connection path operations.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
struct ib_mad_transaction * madx
Connection request management transaction.
unsigned int lid
Local ID.
union ib_guid service_id
Service ID.
uint32_t remote_id
Remote communication ID.
void(* complete)(struct ib_device *ibdev, struct ib_mad_interface *mi, struct ib_mad_transaction *madx, int rc, union ib_mad *mad, struct ib_address_vector *av)
Handle transaction completion.
Infiniband management transaction operations.
void ib_destroy_path(struct ib_device *ibdev, struct ib_path *path)
Destroy path.
static struct ib_connection * ib_cm_find(uint32_t local_id)
Find connection by local communication ID.
struct ib_mad_agent ib_cm_agent [] __ib_mad_agent
Communication management agents.
#define NULL
NULL pointer (VOID *)
A management datagram transaction identifier.
uint32_t local_id
Local communication ID.
int ib_mi_send(struct ib_device *ibdev, struct ib_mad_interface *mi, union ib_mad *mad, struct ib_address_vector *av)
Transmit MAD.
uint8_t sl__subnet_local
SL and subnet local.
#define IB_CM_REJECT_BAD_SERVICE_ID
CM rejection reasons.
uint32_t local_id
Local communication ID.
static void ib_cm_req_complete(struct ib_device *ibdev, struct ib_mad_interface *mi, struct ib_mad_transaction *madx, int rc, union ib_mad *mad, struct ib_address_vector *av)
Handle connection request transaction completion.
void ib_destroy_madx(struct ib_device *ibdev __unused, struct ib_mad_interface *mi __unused, struct ib_mad_transaction *madx)
Destroy management transaction.
void * memset(void *dest, int character, size_t len) __nonnull