You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ib_cm.h 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #ifndef _IPXE_IB_CM_H
  2. #define _IPXE_IB_CM_H
  3. /** @file
  4. *
  5. * Infiniband communication management
  6. *
  7. */
  8. FILE_LICENCE ( GPL2_OR_LATER );
  9. #include <ipxe/infiniband.h>
  10. #include <ipxe/retry.h>
  11. struct ib_mad_transaction;
  12. struct ib_connection;
  13. /** Infiniband connection operations */
  14. struct ib_connection_operations {
  15. /** Handle change of connection status
  16. *
  17. * @v ibdev Infiniband device
  18. * @v qp Queue pair
  19. * @v conn Connection
  20. * @v rc Connection status code
  21. * @v private_data Private data, if available
  22. * @v private_data_len Length of private data
  23. */
  24. void ( * changed ) ( struct ib_device *ibdev, struct ib_queue_pair *qp,
  25. struct ib_connection *conn, int rc,
  26. void *private_data, size_t private_data_len );
  27. };
  28. /** An Infiniband connection */
  29. struct ib_connection {
  30. /** Infiniband device */
  31. struct ib_device *ibdev;
  32. /** Queue pair */
  33. struct ib_queue_pair *qp;
  34. /** Local communication ID */
  35. uint32_t local_id;
  36. /** Remote communication ID */
  37. uint32_t remote_id;
  38. /** Target service ID */
  39. union ib_guid service_id;
  40. /** Connection operations */
  41. struct ib_connection_operations *op;
  42. /** List of connections */
  43. struct list_head list;
  44. /** Path to target */
  45. struct ib_path *path;
  46. /** Connection request management transaction */
  47. struct ib_mad_transaction *madx;
  48. /** Length of connection request private data */
  49. size_t private_data_len;
  50. /** Connection request private data */
  51. uint8_t private_data[0];
  52. };
  53. extern struct ib_connection *
  54. ib_create_conn ( struct ib_device *ibdev, struct ib_queue_pair *qp,
  55. union ib_gid *dgid, union ib_guid *service_id,
  56. void *req_private_data, size_t req_private_data_len,
  57. struct ib_connection_operations *op );
  58. extern void ib_destroy_conn ( struct ib_device *ibdev,
  59. struct ib_queue_pair *qp,
  60. struct ib_connection *conn );
  61. #endif /* _IPXE_IB_CM_H */