nvme-rdma.h (a23e1966932464e1c5226cb9ac4ce1d5fc10ba22) nvme-rdma.h (03c3d7c74371a46d967fbf41628874ec04ddda96)
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (c) 2015 Mellanox Technologies. All rights reserved.
4 */
5
6#ifndef _LINUX_NVME_RDMA_H
7#define _LINUX_NVME_RDMA_H
8

--- 11 unchanged lines hidden (view full) ---

20 NVME_RDMA_CM_INVALID_LEN = 0x01,
21 NVME_RDMA_CM_INVALID_RECFMT = 0x02,
22 NVME_RDMA_CM_INVALID_QID = 0x03,
23 NVME_RDMA_CM_INVALID_HSQSIZE = 0x04,
24 NVME_RDMA_CM_INVALID_HRQSIZE = 0x05,
25 NVME_RDMA_CM_NO_RSC = 0x06,
26 NVME_RDMA_CM_INVALID_IRD = 0x07,
27 NVME_RDMA_CM_INVALID_ORD = 0x08,
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (c) 2015 Mellanox Technologies. All rights reserved.
4 */
5
6#ifndef _LINUX_NVME_RDMA_H
7#define _LINUX_NVME_RDMA_H
8

--- 11 unchanged lines hidden (view full) ---

20 NVME_RDMA_CM_INVALID_LEN = 0x01,
21 NVME_RDMA_CM_INVALID_RECFMT = 0x02,
22 NVME_RDMA_CM_INVALID_QID = 0x03,
23 NVME_RDMA_CM_INVALID_HSQSIZE = 0x04,
24 NVME_RDMA_CM_INVALID_HRQSIZE = 0x05,
25 NVME_RDMA_CM_NO_RSC = 0x06,
26 NVME_RDMA_CM_INVALID_IRD = 0x07,
27 NVME_RDMA_CM_INVALID_ORD = 0x08,
28 NVME_RDMA_CM_INVALID_CNTLID = 0x09,
28};
29
30static inline const char *nvme_rdma_cm_msg(enum nvme_rdma_cm_status status)
31{
32 switch (status) {
33 case NVME_RDMA_CM_INVALID_LEN:
34 return "invalid length";
35 case NVME_RDMA_CM_INVALID_RECFMT:

--- 5 unchanged lines hidden (view full) ---

41 case NVME_RDMA_CM_INVALID_HRQSIZE:
42 return "invalid host RQ size";
43 case NVME_RDMA_CM_NO_RSC:
44 return "resource not found";
45 case NVME_RDMA_CM_INVALID_IRD:
46 return "invalid IRD";
47 case NVME_RDMA_CM_INVALID_ORD:
48 return "Invalid ORD";
29};
30
31static inline const char *nvme_rdma_cm_msg(enum nvme_rdma_cm_status status)
32{
33 switch (status) {
34 case NVME_RDMA_CM_INVALID_LEN:
35 return "invalid length";
36 case NVME_RDMA_CM_INVALID_RECFMT:

--- 5 unchanged lines hidden (view full) ---

42 case NVME_RDMA_CM_INVALID_HRQSIZE:
43 return "invalid host RQ size";
44 case NVME_RDMA_CM_NO_RSC:
45 return "resource not found";
46 case NVME_RDMA_CM_INVALID_IRD:
47 return "invalid IRD";
48 case NVME_RDMA_CM_INVALID_ORD:
49 return "Invalid ORD";
50 case NVME_RDMA_CM_INVALID_CNTLID:
51 return "invalid controller ID";
49 default:
50 return "unrecognized reason";
51 }
52}
53
54/**
55 * struct nvme_rdma_cm_req - rdma connect request
56 *
57 * @recfmt: format of the RDMA Private Data
58 * @qid: queue Identifier for the Admin or I/O Queue
59 * @hrqsize: host receive queue size to be created
60 * @hsqsize: host send queue size to be created
61 */
62struct nvme_rdma_cm_req {
63 __le16 recfmt;
64 __le16 qid;
65 __le16 hrqsize;
66 __le16 hsqsize;
52 default:
53 return "unrecognized reason";
54 }
55}
56
57/**
58 * struct nvme_rdma_cm_req - rdma connect request
59 *
60 * @recfmt: format of the RDMA Private Data
61 * @qid: queue Identifier for the Admin or I/O Queue
62 * @hrqsize: host receive queue size to be created
63 * @hsqsize: host send queue size to be created
64 */
65struct nvme_rdma_cm_req {
66 __le16 recfmt;
67 __le16 qid;
68 __le16 hrqsize;
69 __le16 hsqsize;
67 u8 rsvd[24];
70 __le16 cntlid;
71 u8 rsvd[22];
68};
69
70/**
71 * struct nvme_rdma_cm_rep - rdma connect reply
72 *
73 * @recfmt: format of the RDMA Private Data
74 * @crqsize: controller receive queue size
75 */

--- 18 unchanged lines hidden ---
72};
73
74/**
75 * struct nvme_rdma_cm_rep - rdma connect reply
76 *
77 * @recfmt: format of the RDMA Private Data
78 * @crqsize: controller receive queue size
79 */

--- 18 unchanged lines hidden ---