blob: bfafd4a6d8271008997de9dbef33d5bf3dd193a4 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Andy Grover55b7ed02009-02-24 15:30:37 +00002#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
Ka-Cheong Poon1e2b44e2018-07-23 20:51:22 -07009/* RDMA_CM also uses 16385 as the listener port. */
10#define RDS_CM_PORT 16385
11
Andy Grover55b7ed02009-02-24 15:30:37 +000012#define RDS_RDMA_RESOLVE_TIMEOUT_MS 5000
13
Santosh Shilimkard021fab2018-10-23 23:09:00 -040014/* 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 be used.
17 */
18#define RDS_RDMA_REJ_INCOMPAT 1
19
Andy Grover55b7ed02009-02-24 15:30:37 +000020int rds_rdma_conn_connect(struct rds_connection *conn);
21int rds_rdma_cm_event_handler(struct rdma_cm_id *cm_id,
22 struct rdma_cm_event *event);
Ka-Cheong Poon1e2b44e2018-07-23 20:51:22 -070023int rds6_rdma_cm_event_handler(struct rdma_cm_id *cm_id,
24 struct rdma_cm_event *event);
Andy Grover55b7ed02009-02-24 15:30:37 +000025
Andy Grover55b7ed02009-02-24 15:30:37 +000026/* from ib.c */
27extern struct rds_transport rds_ib_transport;
28int rds_ib_init(void);
29void rds_ib_exit(void);
30
Andy Grover55b7ed02009-02-24 15:30:37 +000031#endif