Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
0002 /*
0003  * Copyright (c) 2004, 2005 Intel Corporation.  All rights reserved.
0004  * Copyright (c) 2004 Topspin Corporation.  All rights reserved.
0005  * Copyright (c) 2004 Voltaire Corporation.  All rights reserved.
0006  * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
0007  * Copyright (c) 2019, Mellanox Technologies inc.  All rights reserved.
0008  */
0009 
0010 #ifndef IB_CM_H
0011 #define IB_CM_H
0012 
0013 #include <rdma/ib_mad.h>
0014 #include <rdma/ib_sa.h>
0015 #include <rdma/rdma_cm.h>
0016 
0017 enum ib_cm_state {
0018     IB_CM_IDLE,
0019     IB_CM_LISTEN,
0020     IB_CM_REQ_SENT,
0021     IB_CM_REQ_RCVD,
0022     IB_CM_MRA_REQ_SENT,
0023     IB_CM_MRA_REQ_RCVD,
0024     IB_CM_REP_SENT,
0025     IB_CM_REP_RCVD,
0026     IB_CM_MRA_REP_SENT,
0027     IB_CM_MRA_REP_RCVD,
0028     IB_CM_ESTABLISHED,
0029     IB_CM_DREQ_SENT,
0030     IB_CM_DREQ_RCVD,
0031     IB_CM_TIMEWAIT,
0032     IB_CM_SIDR_REQ_SENT,
0033     IB_CM_SIDR_REQ_RCVD
0034 };
0035 
0036 enum ib_cm_lap_state {
0037     IB_CM_LAP_UNINIT,
0038     IB_CM_LAP_IDLE,
0039     IB_CM_LAP_SENT,
0040     IB_CM_LAP_RCVD,
0041     IB_CM_MRA_LAP_SENT,
0042     IB_CM_MRA_LAP_RCVD,
0043 };
0044 
0045 enum ib_cm_event_type {
0046     IB_CM_REQ_ERROR,
0047     IB_CM_REQ_RECEIVED,
0048     IB_CM_REP_ERROR,
0049     IB_CM_REP_RECEIVED,
0050     IB_CM_RTU_RECEIVED,
0051     IB_CM_USER_ESTABLISHED,
0052     IB_CM_DREQ_ERROR,
0053     IB_CM_DREQ_RECEIVED,
0054     IB_CM_DREP_RECEIVED,
0055     IB_CM_TIMEWAIT_EXIT,
0056     IB_CM_MRA_RECEIVED,
0057     IB_CM_REJ_RECEIVED,
0058     IB_CM_LAP_ERROR,
0059     IB_CM_LAP_RECEIVED,
0060     IB_CM_APR_RECEIVED,
0061     IB_CM_SIDR_REQ_ERROR,
0062     IB_CM_SIDR_REQ_RECEIVED,
0063     IB_CM_SIDR_REP_RECEIVED
0064 };
0065 
0066 enum ib_cm_data_size {
0067     IB_CM_REQ_PRIVATE_DATA_SIZE  = 92,
0068     IB_CM_MRA_PRIVATE_DATA_SIZE  = 222,
0069     IB_CM_REJ_PRIVATE_DATA_SIZE  = 148,
0070     IB_CM_REP_PRIVATE_DATA_SIZE  = 196,
0071     IB_CM_RTU_PRIVATE_DATA_SIZE  = 224,
0072     IB_CM_DREQ_PRIVATE_DATA_SIZE     = 220,
0073     IB_CM_DREP_PRIVATE_DATA_SIZE     = 224,
0074     IB_CM_REJ_ARI_LENGTH         = 72,
0075     IB_CM_LAP_PRIVATE_DATA_SIZE  = 168,
0076     IB_CM_APR_PRIVATE_DATA_SIZE  = 148,
0077     IB_CM_APR_INFO_LENGTH        = 72,
0078     IB_CM_SIDR_REQ_PRIVATE_DATA_SIZE = 216,
0079     IB_CM_SIDR_REP_PRIVATE_DATA_SIZE = 136,
0080     IB_CM_SIDR_REP_INFO_LENGTH   = 72,
0081 };
0082 
0083 struct ib_cm_id;
0084 
0085 struct ib_cm_req_event_param {
0086     struct ib_cm_id     *listen_id;
0087 
0088     /* P_Key that was used by the GMP's BTH header */
0089     u16         bth_pkey;
0090 
0091     u8          port;
0092 
0093     struct sa_path_rec  *primary_path;
0094     struct sa_path_rec  *alternate_path;
0095 
0096     /*
0097      * SGID attribute of the primary path. Currently only
0098      * useful for RoCE. Alternate path GID attributes
0099      * are not yet supported.
0100      */
0101     const struct ib_gid_attr *ppath_sgid_attr;
0102 
0103     __be64          remote_ca_guid;
0104     u32         remote_qkey;
0105     u32         remote_qpn;
0106     enum ib_qp_type     qp_type;
0107 
0108     u32         starting_psn;
0109     u8          responder_resources;
0110     u8          initiator_depth;
0111     unsigned int        local_cm_response_timeout:5;
0112     unsigned int        flow_control:1;
0113     unsigned int        remote_cm_response_timeout:5;
0114     unsigned int        retry_count:3;
0115     unsigned int        rnr_retry_count:3;
0116     unsigned int        srq:1;
0117     struct rdma_ucm_ece ece;
0118 };
0119 
0120 struct ib_cm_rep_event_param {
0121     __be64          remote_ca_guid;
0122     u32         remote_qkey;
0123     u32         remote_qpn;
0124     u32         starting_psn;
0125     u8          responder_resources;
0126     u8          initiator_depth;
0127     unsigned int        target_ack_delay:5;
0128     unsigned int        failover_accepted:2;
0129     unsigned int        flow_control:1;
0130     unsigned int        rnr_retry_count:3;
0131     unsigned int        srq:1;
0132     struct rdma_ucm_ece ece;
0133 };
0134 
0135 enum ib_cm_rej_reason {
0136     IB_CM_REJ_NO_QP             = 1,
0137     IB_CM_REJ_NO_EEC            = 2,
0138     IB_CM_REJ_NO_RESOURCES          = 3,
0139     IB_CM_REJ_TIMEOUT           = 4,
0140     IB_CM_REJ_UNSUPPORTED           = 5,
0141     IB_CM_REJ_INVALID_COMM_ID       = 6,
0142     IB_CM_REJ_INVALID_COMM_INSTANCE     = 7,
0143     IB_CM_REJ_INVALID_SERVICE_ID        = 8,
0144     IB_CM_REJ_INVALID_TRANSPORT_TYPE    = 9,
0145     IB_CM_REJ_STALE_CONN            = 10,
0146     IB_CM_REJ_RDC_NOT_EXIST         = 11,
0147     IB_CM_REJ_INVALID_GID           = 12,
0148     IB_CM_REJ_INVALID_LID           = 13,
0149     IB_CM_REJ_INVALID_SL            = 14,
0150     IB_CM_REJ_INVALID_TRAFFIC_CLASS     = 15,
0151     IB_CM_REJ_INVALID_HOP_LIMIT     = 16,
0152     IB_CM_REJ_INVALID_PACKET_RATE       = 17,
0153     IB_CM_REJ_INVALID_ALT_GID       = 18,
0154     IB_CM_REJ_INVALID_ALT_LID       = 19,
0155     IB_CM_REJ_INVALID_ALT_SL        = 20,
0156     IB_CM_REJ_INVALID_ALT_TRAFFIC_CLASS = 21,
0157     IB_CM_REJ_INVALID_ALT_HOP_LIMIT     = 22,
0158     IB_CM_REJ_INVALID_ALT_PACKET_RATE   = 23,
0159     IB_CM_REJ_PORT_CM_REDIRECT      = 24,
0160     IB_CM_REJ_PORT_REDIRECT         = 25,
0161     IB_CM_REJ_INVALID_MTU           = 26,
0162     IB_CM_REJ_INSUFFICIENT_RESP_RESOURCES   = 27,
0163     IB_CM_REJ_CONSUMER_DEFINED      = 28,
0164     IB_CM_REJ_INVALID_RNR_RETRY     = 29,
0165     IB_CM_REJ_DUPLICATE_LOCAL_COMM_ID   = 30,
0166     IB_CM_REJ_INVALID_CLASS_VERSION     = 31,
0167     IB_CM_REJ_INVALID_FLOW_LABEL        = 32,
0168     IB_CM_REJ_INVALID_ALT_FLOW_LABEL    = 33,
0169     IB_CM_REJ_VENDOR_OPTION_NOT_SUPPORTED   = 35,
0170 };
0171 
0172 struct ib_cm_rej_event_param {
0173     enum ib_cm_rej_reason   reason;
0174     void            *ari;
0175     u8          ari_length;
0176 };
0177 
0178 struct ib_cm_mra_event_param {
0179     u8  service_timeout;
0180 };
0181 
0182 struct ib_cm_lap_event_param {
0183     struct sa_path_rec  *alternate_path;
0184 };
0185 
0186 enum ib_cm_apr_status {
0187     IB_CM_APR_SUCCESS,
0188     IB_CM_APR_INVALID_COMM_ID,
0189     IB_CM_APR_UNSUPPORTED,
0190     IB_CM_APR_REJECT,
0191     IB_CM_APR_REDIRECT,
0192     IB_CM_APR_IS_CURRENT,
0193     IB_CM_APR_INVALID_QPN_EECN,
0194     IB_CM_APR_INVALID_LID,
0195     IB_CM_APR_INVALID_GID,
0196     IB_CM_APR_INVALID_FLOW_LABEL,
0197     IB_CM_APR_INVALID_TCLASS,
0198     IB_CM_APR_INVALID_HOP_LIMIT,
0199     IB_CM_APR_INVALID_PACKET_RATE,
0200     IB_CM_APR_INVALID_SL
0201 };
0202 
0203 struct ib_cm_apr_event_param {
0204     enum ib_cm_apr_status   ap_status;
0205     void            *apr_info;
0206     u8          info_len;
0207 };
0208 
0209 struct ib_cm_sidr_req_event_param {
0210     struct ib_cm_id     *listen_id;
0211     __be64          service_id;
0212 
0213     /*
0214      * SGID attribute of the request. Currently only
0215      * useful for RoCE.
0216      */
0217     const struct ib_gid_attr *sgid_attr;
0218     /* P_Key that was used by the GMP's BTH header */
0219     u16         bth_pkey;
0220     u8          port;
0221     u16         pkey;
0222 };
0223 
0224 enum ib_cm_sidr_status {
0225     IB_SIDR_SUCCESS,
0226     IB_SIDR_UNSUPPORTED,
0227     IB_SIDR_REJECT,
0228     IB_SIDR_NO_QP,
0229     IB_SIDR_REDIRECT,
0230     IB_SIDR_UNSUPPORTED_VERSION
0231 };
0232 
0233 struct ib_cm_sidr_rep_event_param {
0234     enum ib_cm_sidr_status  status;
0235     u32         qkey;
0236     u32         qpn;
0237     void            *info;
0238     const struct ib_gid_attr *sgid_attr;
0239     u8          info_len;
0240 };
0241 
0242 struct ib_cm_event {
0243     enum ib_cm_event_type   event;
0244     union {
0245         struct ib_cm_req_event_param    req_rcvd;
0246         struct ib_cm_rep_event_param    rep_rcvd;
0247         /* No data for RTU received events. */
0248         struct ib_cm_rej_event_param    rej_rcvd;
0249         struct ib_cm_mra_event_param    mra_rcvd;
0250         struct ib_cm_lap_event_param    lap_rcvd;
0251         struct ib_cm_apr_event_param    apr_rcvd;
0252         /* No data for DREQ/DREP received events. */
0253         struct ib_cm_sidr_req_event_param sidr_req_rcvd;
0254         struct ib_cm_sidr_rep_event_param sidr_rep_rcvd;
0255         enum ib_wc_status       send_status;
0256     } param;
0257 
0258     void            *private_data;
0259 };
0260 
0261 #define CM_REQ_ATTR_ID      cpu_to_be16(0x0010)
0262 #define CM_MRA_ATTR_ID      cpu_to_be16(0x0011)
0263 #define CM_REJ_ATTR_ID      cpu_to_be16(0x0012)
0264 #define CM_REP_ATTR_ID      cpu_to_be16(0x0013)
0265 #define CM_RTU_ATTR_ID      cpu_to_be16(0x0014)
0266 #define CM_DREQ_ATTR_ID     cpu_to_be16(0x0015)
0267 #define CM_DREP_ATTR_ID     cpu_to_be16(0x0016)
0268 #define CM_SIDR_REQ_ATTR_ID cpu_to_be16(0x0017)
0269 #define CM_SIDR_REP_ATTR_ID cpu_to_be16(0x0018)
0270 #define CM_LAP_ATTR_ID      cpu_to_be16(0x0019)
0271 #define CM_APR_ATTR_ID      cpu_to_be16(0x001A)
0272 
0273 /**
0274  * ib_cm_handler - User-defined callback to process communication events.
0275  * @cm_id: Communication identifier associated with the reported event.
0276  * @event: Information about the communication event.
0277  *
0278  * IB_CM_REQ_RECEIVED and IB_CM_SIDR_REQ_RECEIVED communication events
0279  * generated as a result of listen requests result in the allocation of a
0280  * new @cm_id.  The new @cm_id is returned to the user through this callback.
0281  * Clients are responsible for destroying the new @cm_id.  For peer-to-peer
0282  * IB_CM_REQ_RECEIVED and all other events, the returned @cm_id corresponds
0283  * to a user's existing communication identifier.
0284  *
0285  * Users may not call ib_destroy_cm_id while in the context of this callback;
0286  * however, returning a non-zero value instructs the communication manager to
0287  * destroy the @cm_id after the callback completes.
0288  */
0289 typedef int (*ib_cm_handler)(struct ib_cm_id *cm_id,
0290                  const struct ib_cm_event *event);
0291 
0292 struct ib_cm_id {
0293     ib_cm_handler       cm_handler;
0294     void            *context;
0295     struct ib_device    *device;
0296     __be64          service_id;
0297     __be64          service_mask;
0298     enum ib_cm_state    state;      /* internal CM/debug use */
0299     enum ib_cm_lap_state    lap_state;  /* internal CM/debug use */
0300     __be32          local_id;
0301     __be32          remote_id;
0302     u32         remote_cm_qpn;  /* 1 unless redirected */
0303 };
0304 
0305 /**
0306  * ib_create_cm_id - Allocate a communication identifier.
0307  * @device: Device associated with the cm_id.  All related communication will
0308  * be associated with the specified device.
0309  * @cm_handler: Callback invoked to notify the user of CM events.
0310  * @context: User specified context associated with the communication
0311  *   identifier.
0312  *
0313  * Communication identifiers are used to track connection states, service
0314  * ID resolution requests, and listen requests.
0315  */
0316 struct ib_cm_id *ib_create_cm_id(struct ib_device *device,
0317                  ib_cm_handler cm_handler,
0318                  void *context);
0319 
0320 /**
0321  * ib_destroy_cm_id - Destroy a connection identifier.
0322  * @cm_id: Connection identifier to destroy.
0323  *
0324  * This call blocks until the connection identifier is destroyed.
0325  */
0326 void ib_destroy_cm_id(struct ib_cm_id *cm_id);
0327 
0328 #define IB_SERVICE_ID_AGN_MASK  cpu_to_be64(0xFF00000000000000ULL)
0329 #define IB_CM_ASSIGN_SERVICE_ID cpu_to_be64(0x0200000000000000ULL)
0330 #define IB_CMA_SERVICE_ID   cpu_to_be64(0x0000000001000000ULL)
0331 #define IB_CMA_SERVICE_ID_MASK  cpu_to_be64(0xFFFFFFFFFF000000ULL)
0332 #define IB_SDP_SERVICE_ID   cpu_to_be64(0x0000000000010000ULL)
0333 #define IB_SDP_SERVICE_ID_MASK  cpu_to_be64(0xFFFFFFFFFFFF0000ULL)
0334 
0335 /**
0336  * ib_cm_listen - Initiates listening on the specified service ID for
0337  *   connection and service ID resolution requests.
0338  * @cm_id: Connection identifier associated with the listen request.
0339  * @service_id: Service identifier matched against incoming connection
0340  *   and service ID resolution requests.  The service ID should be specified
0341  *   network-byte order.  If set to IB_CM_ASSIGN_SERVICE_ID, the CM will
0342  *   assign a service ID to the caller.
0343  * @service_mask: Mask applied to service ID used to listen across a
0344  *   range of service IDs.  If set to 0, the service ID is matched
0345  *   exactly.  This parameter is ignored if %service_id is set to
0346  *   IB_CM_ASSIGN_SERVICE_ID.
0347  */
0348 int ib_cm_listen(struct ib_cm_id *cm_id, __be64 service_id,
0349          __be64 service_mask);
0350 
0351 struct ib_cm_id *ib_cm_insert_listen(struct ib_device *device,
0352                      ib_cm_handler cm_handler,
0353                      __be64 service_id);
0354 
0355 struct ib_cm_req_param {
0356     struct sa_path_rec  *primary_path;
0357     struct sa_path_rec  *alternate_path;
0358     const struct ib_gid_attr *ppath_sgid_attr;
0359     __be64          service_id;
0360     u32         qp_num;
0361     enum ib_qp_type     qp_type;
0362     u32         starting_psn;
0363     const void      *private_data;
0364     u8          private_data_len;
0365     u8          responder_resources;
0366     u8          initiator_depth;
0367     u8          remote_cm_response_timeout;
0368     u8          flow_control;
0369     u8          local_cm_response_timeout;
0370     u8          retry_count;
0371     u8          rnr_retry_count;
0372     u8          max_cm_retries;
0373     u8          srq;
0374     struct rdma_ucm_ece ece;
0375 };
0376 
0377 /**
0378  * ib_send_cm_req - Sends a connection request to the remote node.
0379  * @cm_id: Connection identifier that will be associated with the
0380  *   connection request.
0381  * @param: Connection request information needed to establish the
0382  *   connection.
0383  */
0384 int ib_send_cm_req(struct ib_cm_id *cm_id,
0385            struct ib_cm_req_param *param);
0386 
0387 struct ib_cm_rep_param {
0388     u32     qp_num;
0389     u32     starting_psn;
0390     const void  *private_data;
0391     u8      private_data_len;
0392     u8      responder_resources;
0393     u8      initiator_depth;
0394     u8      failover_accepted;
0395     u8      flow_control;
0396     u8      rnr_retry_count;
0397     u8      srq;
0398     struct rdma_ucm_ece ece;
0399 };
0400 
0401 /**
0402  * ib_send_cm_rep - Sends a connection reply in response to a connection
0403  *   request.
0404  * @cm_id: Connection identifier that will be associated with the
0405  *   connection request.
0406  * @param: Connection reply information needed to establish the
0407  *   connection.
0408  */
0409 int ib_send_cm_rep(struct ib_cm_id *cm_id,
0410            struct ib_cm_rep_param *param);
0411 
0412 /**
0413  * ib_send_cm_rtu - Sends a connection ready to use message in response
0414  *   to a connection reply message.
0415  * @cm_id: Connection identifier associated with the connection request.
0416  * @private_data: Optional user-defined private data sent with the
0417  *   ready to use message.
0418  * @private_data_len: Size of the private data buffer, in bytes.
0419  */
0420 int ib_send_cm_rtu(struct ib_cm_id *cm_id,
0421            const void *private_data,
0422            u8 private_data_len);
0423 
0424 /**
0425  * ib_send_cm_dreq - Sends a disconnection request for an existing
0426  *   connection.
0427  * @cm_id: Connection identifier associated with the connection being
0428  *   released.
0429  * @private_data: Optional user-defined private data sent with the
0430  *   disconnection request message.
0431  * @private_data_len: Size of the private data buffer, in bytes.
0432  */
0433 int ib_send_cm_dreq(struct ib_cm_id *cm_id,
0434             const void *private_data,
0435             u8 private_data_len);
0436 
0437 /**
0438  * ib_send_cm_drep - Sends a disconnection reply to a disconnection request.
0439  * @cm_id: Connection identifier associated with the connection being
0440  *   released.
0441  * @private_data: Optional user-defined private data sent with the
0442  *   disconnection reply message.
0443  * @private_data_len: Size of the private data buffer, in bytes.
0444  *
0445  * If the cm_id is in the correct state, the CM will transition the connection
0446  * to the timewait state, even if an error occurs sending the DREP message.
0447  */
0448 int ib_send_cm_drep(struct ib_cm_id *cm_id,
0449             const void *private_data,
0450             u8 private_data_len);
0451 
0452 /**
0453  * ib_cm_notify - Notifies the CM of an event reported to the consumer.
0454  * @cm_id: Connection identifier to transition to established.
0455  * @event: Type of event.
0456  *
0457  * This routine should be invoked by users to notify the CM of relevant
0458  * communication events.  Events that should be reported to the CM and
0459  * when to report them are:
0460  *
0461  * IB_EVENT_COMM_EST - Used when a message is received on a connected
0462  *    QP before an RTU has been received.
0463  * IB_EVENT_PATH_MIG - Notifies the CM that the connection has failed over
0464  *   to the alternate path.
0465  */
0466 int ib_cm_notify(struct ib_cm_id *cm_id, enum ib_event_type event);
0467 
0468 /**
0469  * ib_send_cm_rej - Sends a connection rejection message to the
0470  *   remote node.
0471  * @cm_id: Connection identifier associated with the connection being
0472  *   rejected.
0473  * @reason: Reason for the connection request rejection.
0474  * @ari: Optional additional rejection information.
0475  * @ari_length: Size of the additional rejection information, in bytes.
0476  * @private_data: Optional user-defined private data sent with the
0477  *   rejection message.
0478  * @private_data_len: Size of the private data buffer, in bytes.
0479  */
0480 int ib_send_cm_rej(struct ib_cm_id *cm_id,
0481            enum ib_cm_rej_reason reason,
0482            void *ari,
0483            u8 ari_length,
0484            const void *private_data,
0485            u8 private_data_len);
0486 
0487 #define IB_CM_MRA_FLAG_DELAY 0x80  /* Send MRA only after a duplicate msg */
0488 
0489 /**
0490  * ib_send_cm_mra - Sends a message receipt acknowledgement to a connection
0491  *   message.
0492  * @cm_id: Connection identifier associated with the connection message.
0493  * @service_timeout: The lower 5-bits specify the maximum time required for
0494  *   the sender to reply to the connection message.  The upper 3-bits
0495  *   specify additional control flags.
0496  * @private_data: Optional user-defined private data sent with the
0497  *   message receipt acknowledgement.
0498  * @private_data_len: Size of the private data buffer, in bytes.
0499  */
0500 int ib_send_cm_mra(struct ib_cm_id *cm_id,
0501            u8 service_timeout,
0502            const void *private_data,
0503            u8 private_data_len);
0504 
0505 /**
0506  * ib_cm_init_qp_attr - Initializes the QP attributes for use in transitioning
0507  *   to a specified QP state.
0508  * @cm_id: Communication identifier associated with the QP attributes to
0509  *   initialize.
0510  * @qp_attr: On input, specifies the desired QP state.  On output, the
0511  *   mandatory and desired optional attributes will be set in order to
0512  *   modify the QP to the specified state.
0513  * @qp_attr_mask: The QP attribute mask that may be used to transition the
0514  *   QP to the specified state.
0515  *
0516  * Users must set the @qp_attr->qp_state to the desired QP state.  This call
0517  * will set all required attributes for the given transition, along with
0518  * known optional attributes.  Users may override the attributes returned from
0519  * this call before calling ib_modify_qp.
0520  */
0521 int ib_cm_init_qp_attr(struct ib_cm_id *cm_id,
0522                struct ib_qp_attr *qp_attr,
0523                int *qp_attr_mask);
0524 
0525 struct ib_cm_sidr_req_param {
0526     struct sa_path_rec  *path;
0527     const struct ib_gid_attr *sgid_attr;
0528     __be64          service_id;
0529     unsigned long       timeout_ms;
0530     const void      *private_data;
0531     u8          private_data_len;
0532     u8          max_cm_retries;
0533 };
0534 
0535 /**
0536  * ib_send_cm_sidr_req - Sends a service ID resolution request to the
0537  *   remote node.
0538  * @cm_id: Communication identifier that will be associated with the
0539  *   service ID resolution request.
0540  * @param: Service ID resolution request information.
0541  */
0542 int ib_send_cm_sidr_req(struct ib_cm_id *cm_id,
0543             struct ib_cm_sidr_req_param *param);
0544 
0545 struct ib_cm_sidr_rep_param {
0546     u32         qp_num;
0547     u32         qkey;
0548     enum ib_cm_sidr_status  status;
0549     const void      *info;
0550     u8          info_length;
0551     const void      *private_data;
0552     u8          private_data_len;
0553     struct rdma_ucm_ece ece;
0554 };
0555 
0556 /**
0557  * ib_send_cm_sidr_rep - Sends a service ID resolution reply to the
0558  *   remote node.
0559  * @cm_id: Communication identifier associated with the received service ID
0560  *   resolution request.
0561  * @param: Service ID resolution reply information.
0562  */
0563 int ib_send_cm_sidr_rep(struct ib_cm_id *cm_id,
0564             struct ib_cm_sidr_rep_param *param);
0565 
0566 /**
0567  * ibcm_reject_msg - return a pointer to a reject message string.
0568  * @reason: Value returned in the REJECT event status field.
0569  */
0570 const char *__attribute_const__ ibcm_reject_msg(int reason);
0571 
0572 #endif /* IB_CM_H */