xref: /linux/net/rds/rdma_transport.h (revision ef030ab17e060b0ef47028e86cf85b68988b56ae)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _RDMA_TRANSPORT_H
3 #define _RDMA_TRANSPORT_H
4 
5 #include <rdma/ib_verbs.h>
6 #include <rdma/rdma_cm.h>
7 #include "rds.h"
8 
9 /* RDMA_CM also uses 16385 as the listener port. */
10 #define RDS_CM_PORT	16385
11 
12 #define RDS_RDMA_RESOLVE_TIMEOUT_MS     5000
13 
14 /* Below reject reason is for legacy interoperability issue with non-linux
15  * RDS endpoints where older version incompatibility is conveyed via value 1.
16  * For future version(s), proper encoded reject reason should be used.
17  */
18 #define RDS_RDMA_REJ_INCOMPAT		1
19 
20 int rds_rdma_cm_event_handler(struct rdma_cm_id *cm_id,
21 			      struct rdma_cm_event *event);
22 int rds6_rdma_cm_event_handler(struct rdma_cm_id *cm_id,
23 			       struct rdma_cm_event *event);
24 
25 /* from ib.c */
26 extern struct rds_transport rds_ib_transport;
27 int rds_ib_init(void);
28 void rds_ib_exit(void);
29 
30 #endif
31