cxgb4-abi.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */
  2. /*
  3. * Copyright (c) 2009-2010 Chelsio, Inc. All rights reserved.
  4. *
  5. * This software is available to you under a choice of one of two
  6. * licenses. You may choose to be licensed under the terms of the GNU
  7. * General Public License (GPL) Version 2, available from the file
  8. * COPYING in the main directory of this source tree, or the
  9. * OpenIB.org BSD license below:
  10. *
  11. * Redistribution and use in source and binary forms, with or
  12. * without modification, are permitted provided that the following
  13. * conditions are met:
  14. *
  15. * - Redistributions of source code must retain the above
  16. * copyright notice, this list of conditions and the following
  17. * disclaimer.
  18. *
  19. * - Redistributions in binary form must reproduce the above
  20. * copyright notice, this list of conditions and the following
  21. * disclaimer in the documentation and/or other materials
  22. * provided with the distribution.
  23. *
  24. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  25. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  26. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  27. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  28. * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  29. * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  30. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  31. * SOFTWARE.
  32. */
  33. #ifndef CXGB4_ABI_USER_H
  34. #define CXGB4_ABI_USER_H
  35. #include <linux/types.h>
  36. #define C4IW_UVERBS_ABI_VERSION 3
  37. /*
  38. * Make sure that all structs defined in this file remain laid out so
  39. * that they pack the same way on 32-bit and 64-bit architectures (to
  40. * avoid incompatibility between 32-bit userspace and 64-bit kernels).
  41. * In particular do not use pointer types -- pass pointers in __aligned_u64
  42. * instead.
  43. */
  44. struct c4iw_create_cq_resp {
  45. __aligned_u64 key;
  46. __aligned_u64 gts_key;
  47. __aligned_u64 memsize;
  48. __u32 cqid;
  49. __u32 size;
  50. __u32 qid_mask;
  51. __u32 reserved; /* explicit padding (optional for i386) */
  52. };
  53. enum {
  54. C4IW_QPF_ONCHIP = (1 << 0)
  55. };
  56. struct c4iw_create_qp_resp {
  57. __aligned_u64 ma_sync_key;
  58. __aligned_u64 sq_key;
  59. __aligned_u64 rq_key;
  60. __aligned_u64 sq_db_gts_key;
  61. __aligned_u64 rq_db_gts_key;
  62. __aligned_u64 sq_memsize;
  63. __aligned_u64 rq_memsize;
  64. __u32 sqid;
  65. __u32 rqid;
  66. __u32 sq_size;
  67. __u32 rq_size;
  68. __u32 qid_mask;
  69. __u32 flags;
  70. };
  71. struct c4iw_alloc_ucontext_resp {
  72. __aligned_u64 status_page_key;
  73. __u32 status_page_size;
  74. __u32 reserved; /* explicit padding (optional for i386) */
  75. };
  76. struct c4iw_alloc_pd_resp {
  77. __u32 pdid;
  78. };
  79. #endif /* CXGB4_ABI_USER_H */