mana-abi.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) */
  2. /*
  3. * Copyright (c) 2022, Microsoft Corporation. All rights reserved.
  4. */
  5. #ifndef MANA_ABI_USER_H
  6. #define MANA_ABI_USER_H
  7. #include <linux/types.h>
  8. #include <rdma/ib_user_ioctl_verbs.h>
  9. /*
  10. * Increment this value if any changes that break userspace ABI
  11. * compatibility are made.
  12. */
  13. #define MANA_IB_UVERBS_ABI_VERSION 1
  14. struct mana_ib_create_cq {
  15. __aligned_u64 buf_addr;
  16. };
  17. struct mana_ib_create_qp {
  18. __aligned_u64 sq_buf_addr;
  19. __u32 sq_buf_size;
  20. __u32 port;
  21. };
  22. struct mana_ib_create_qp_resp {
  23. __u32 sqid;
  24. __u32 cqid;
  25. __u32 tx_vp_offset;
  26. __u32 reserved;
  27. };
  28. struct mana_ib_create_wq {
  29. __aligned_u64 wq_buf_addr;
  30. __u32 wq_buf_size;
  31. __u32 reserved;
  32. };
  33. /* RX Hash function flags */
  34. enum mana_ib_rx_hash_function_flags {
  35. MANA_IB_RX_HASH_FUNC_TOEPLITZ = 1 << 0,
  36. };
  37. struct mana_ib_create_qp_rss {
  38. __aligned_u64 rx_hash_fields_mask;
  39. __u8 rx_hash_function;
  40. __u8 reserved[7];
  41. __u32 rx_hash_key_len;
  42. __u8 rx_hash_key[40];
  43. __u32 port;
  44. };
  45. struct rss_resp_entry {
  46. __u32 cqid;
  47. __u32 wqid;
  48. };
  49. struct mana_ib_create_qp_rss_resp {
  50. __aligned_u64 num_entries;
  51. struct rss_resp_entry entries[64];
  52. };
  53. #endif