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