nvme-rdma.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. * Copyright (c) 2015 Mellanox Technologies. All rights reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or modify it
  5. * under the terms and conditions of the GNU General Public License,
  6. * version 2, as published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope it will be useful, but WITHOUT
  9. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  10. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  11. * more details.
  12. */
  13. #ifndef _LINUX_NVME_RDMA_H
  14. #define _LINUX_NVME_RDMA_H
  15. enum nvme_rdma_cm_fmt {
  16. NVME_RDMA_CM_FMT_1_0 = 0x0,
  17. };
  18. enum nvme_rdma_cm_status {
  19. NVME_RDMA_CM_INVALID_LEN = 0x01,
  20. NVME_RDMA_CM_INVALID_RECFMT = 0x02,
  21. NVME_RDMA_CM_INVALID_QID = 0x03,
  22. NVME_RDMA_CM_INVALID_HSQSIZE = 0x04,
  23. NVME_RDMA_CM_INVALID_HRQSIZE = 0x05,
  24. NVME_RDMA_CM_NO_RSC = 0x06,
  25. NVME_RDMA_CM_INVALID_IRD = 0x07,
  26. NVME_RDMA_CM_INVALID_ORD = 0x08,
  27. };
  28. /**
  29. * struct nvme_rdma_cm_req - rdma connect request
  30. *
  31. * @recfmt: format of the RDMA Private Data
  32. * @qid: queue Identifier for the Admin or I/O Queue
  33. * @hrqsize: host receive queue size to be created
  34. * @hsqsize: host send queue size to be created
  35. */
  36. struct nvme_rdma_cm_req {
  37. __le16 recfmt;
  38. __le16 qid;
  39. __le16 hrqsize;
  40. __le16 hsqsize;
  41. u8 rsvd[24];
  42. };
  43. /**
  44. * struct nvme_rdma_cm_rep - rdma connect reply
  45. *
  46. * @recfmt: format of the RDMA Private Data
  47. * @crqsize: controller receive queue size
  48. */
  49. struct nvme_rdma_cm_rep {
  50. __le16 recfmt;
  51. __le16 crqsize;
  52. u8 rsvd[28];
  53. };
  54. /**
  55. * struct nvme_rdma_cm_rej - rdma connect reject
  56. *
  57. * @recfmt: format of the RDMA Private Data
  58. * @fsts: error status for the associated connect request
  59. */
  60. struct nvme_rdma_cm_rej {
  61. __le16 recfmt;
  62. __le16 sts;
  63. };
  64. #endif /* _LINUX_NVME_RDMA_H */