19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
24 */
25
26 #ifndef _SYS_IB_CLIENTS_OF_SOL_OFS_SOL_CMA_H
27 #define _SYS_IB_CLIENTS_OF_SOL_OFS_SOL_CMA_H
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33
34 #include <sys/ib/clients/of/sol_ofs/sol_ofs_common.h>
35 #include <sys/ib/clients/of/rdma/rdma_cm.h>
36 #include <sys/ib/clients/of/sol_ofs/sol_ib_cma.h> /* Transport Specific */
37
38 #if !defined(offsetof)
39 #define offsetof(s, m) (size_t)(&(((s *)0)->m))
40 #endif
41
42 #define IS_UDP_CMID(idp) ((idp)->ps == RDMA_PS_UDP || \
43 (idp)->ps == RDMA_PS_IPOIB)
44 #define IS_VALID_SOCKADDR(sockaddrp) \
45 ((sockaddrp)->sa_family == AF_INET || \
46 (sockaddrp)->sa_family == AF_INET6)
47
48 /*
49 * Global structure which contains information about all
50 * CMIDs, which have called rdma_listen().
51 */
52 typedef struct sol_cma_glbl_listen_s {
53 avl_node_t cma_listen_node;
54
55 uint64_t cma_listen_chan_sid;
56 void *cma_listen_clnt_hdl;
57 void *cma_listen_svc_hdl;
58 genlist_t cma_listen_chan_list;
59 } sol_cma_glbl_listen_t;
|
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
24 */
25
26 #ifndef _SYS_IB_CLIENTS_OF_SOL_OFS_SOL_CMA_H
27 #define _SYS_IB_CLIENTS_OF_SOL_OFS_SOL_CMA_H
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33
34 #include <sys/ib/clients/of/sol_ofs/sol_ofs_common.h>
35 #include <sys/ib/clients/of/rdma/rdma_cm.h>
36 #include <sys/ib/clients/of/sol_ofs/sol_ib_cma.h> /* Transport Specific */
37
38 #if !defined(offsetof)
39 #if defined(__GNUC__)
40 #define offsetof(s, m) __builtin_offsetof(s, m)
41 #else
42 #define offsetof(s, m) ((size_t)(&(((s *)0)->m)))
43 #endif
44 #endif
45
46 #define IS_UDP_CMID(idp) ((idp)->ps == RDMA_PS_UDP || \
47 (idp)->ps == RDMA_PS_IPOIB)
48 #define IS_VALID_SOCKADDR(sockaddrp) \
49 ((sockaddrp)->sa_family == AF_INET || \
50 (sockaddrp)->sa_family == AF_INET6)
51
52 /*
53 * Global structure which contains information about all
54 * CMIDs, which have called rdma_listen().
55 */
56 typedef struct sol_cma_glbl_listen_s {
57 avl_node_t cma_listen_node;
58
59 uint64_t cma_listen_chan_sid;
60 void *cma_listen_clnt_hdl;
61 void *cma_listen_svc_hdl;
62 genlist_t cma_listen_chan_list;
63 } sol_cma_glbl_listen_t;
|