verbs_api.h 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /*
  2. * Copyright (c) 2017, Mellanox Technologies inc. All rights reserved.
  3. *
  4. * This software is available to you under a choice of one of two
  5. * licenses. You may choose to be licensed under the terms of the GNU
  6. * General Public License (GPL) Version 2, available from the file
  7. * COPYING in the main directory of this source tree, or the
  8. * OpenIB.org BSD license below:
  9. *
  10. * Redistribution and use in source and binary forms, with or
  11. * without modification, are permitted provided that the following
  12. * conditions are met:
  13. *
  14. * - Redistributions of source code must retain the above
  15. * copyright notice, this list of conditions and the following
  16. * disclaimer.
  17. *
  18. * - Redistributions in binary form must reproduce the above
  19. * copyright notice, this list of conditions and the following
  20. * disclaimer in the documentation and/or other materials
  21. * provided with the distribution.
  22. *
  23. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  24. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  25. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  26. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  27. * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  28. * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  29. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  30. * SOFTWARE.
  31. */
  32. #ifndef VERBS_API_H
  33. #define VERBS_API_H
  34. #if UINTPTR_MAX == UINT32_MAX
  35. #if __BYTE_ORDER == __LITTLE_ENDIAN
  36. #define RDMA_UAPI_PTR(_type, _name) \
  37. union { \
  38. struct { \
  39. _type _name; \
  40. __u32 _name##_reserved; \
  41. }; \
  42. __aligned_u64 _name##_data_u64; \
  43. }
  44. #else
  45. #define RDMA_UAPI_PTR(_type, _name) \
  46. union { \
  47. struct { \
  48. __u32 _name##_reserved; \
  49. _type _name; \
  50. }; \
  51. __aligned_u64 _name##_data_u64; \
  52. }
  53. #endif
  54. #elif UINTPTR_MAX == UINT64_MAX
  55. #define RDMA_UAPI_PTR(_type, _name) \
  56. union { \
  57. _type _name; \
  58. __aligned_u64 _name##_data_u64; \
  59. }
  60. #else
  61. #error "Pointer size not supported"
  62. #endif
  63. #include <infiniband/ib_user_ioctl_verbs.h>
  64. #define ibv_flow_action_esp_keymat ib_uverbs_flow_action_esp_keymat
  65. #define IBV_FLOW_ACTION_ESP_KEYMAT_AES_GCM IB_UVERBS_FLOW_ACTION_ESP_KEYMAT_AES_GCM
  66. #define ibv_flow_action_esp_keymat_aes_gcm_iv_algo ib_uverbs_flow_action_esp_keymat_aes_gcm_iv_algo
  67. #define IBV_FLOW_ACTION_IV_ALGO_SEQ IB_UVERBS_FLOW_ACTION_IV_ALGO_SEQ
  68. #define ibv_flow_action_esp_keymat_aes_gcm ib_uverbs_flow_action_esp_keymat_aes_gcm
  69. #define ibv_flow_action_esp_replay ib_uverbs_flow_action_esp_replay
  70. #define IBV_FLOW_ACTION_ESP_REPLAY_NONE IB_UVERBS_FLOW_ACTION_ESP_REPLAY_NONE
  71. #define IBV_FLOW_ACTION_ESP_REPLAY_BMP IB_UVERBS_FLOW_ACTION_ESP_REPLAY_BMP
  72. #define ibv_flow_action_esp_replay_bmp ib_uverbs_flow_action_esp_replay_bmp
  73. #define ibv_flow_action_esp_flags ib_uverbs_flow_action_esp_flags
  74. #define IBV_FLOW_ACTION_ESP_FLAGS_INLINE_CRYPTO IB_UVERBS_FLOW_ACTION_ESP_FLAGS_INLINE_CRYPTO
  75. #define IBV_FLOW_ACTION_ESP_FLAGS_FULL_OFFLOAD IB_UVERBS_FLOW_ACTION_ESP_FLAGS_FULL_OFFLOAD
  76. #define IBV_FLOW_ACTION_ESP_FLAGS_TUNNEL IB_UVERBS_FLOW_ACTION_ESP_FLAGS_TUNNEL
  77. #define IBV_FLOW_ACTION_ESP_FLAGS_TRANSPORT IB_UVERBS_FLOW_ACTION_ESP_FLAGS_TRANSPORT
  78. #define IBV_FLOW_ACTION_ESP_FLAGS_DECRYPT IB_UVERBS_FLOW_ACTION_ESP_FLAGS_DECRYPT
  79. #define IBV_FLOW_ACTION_ESP_FLAGS_ENCRYPT IB_UVERBS_FLOW_ACTION_ESP_FLAGS_ENCRYPT
  80. #define IBV_FLOW_ACTION_ESP_FLAGS_ESN_NEW_WINDOW IB_UVERBS_FLOW_ACTION_ESP_FLAGS_ESN_NEW_WINDOW
  81. #define ibv_flow_action_esp_encap ib_uverbs_flow_action_esp_encap
  82. #define ibv_flow_action_esp ib_uverbs_flow_action_esp
  83. #define ibv_advise_mr_advice ib_uverbs_advise_mr_advice
  84. #define IBV_ADVISE_MR_ADVICE_PREFETCH IB_UVERBS_ADVISE_MR_ADVICE_PREFETCH
  85. #define IBV_ADVISE_MR_ADVICE_PREFETCH_WRITE IB_UVERBS_ADVISE_MR_ADVICE_PREFETCH_WRITE
  86. #define IBV_ADVISE_MR_FLAG_FLUSH IB_UVERBS_ADVISE_MR_FLAG_FLUSH
  87. #define IBV_QPF_GRH_REQUIRED IB_UVERBS_QPF_GRH_REQUIRED
  88. #define IBV_ACCESS_OPTIONAL_RANGE IB_UVERBS_ACCESS_OPTIONAL_RANGE
  89. #define IBV_ACCESS_OPTIONAL_FIRST IB_UVERBS_ACCESS_OPTIONAL_FIRST
  90. #endif