Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

ib_cm.h 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #ifndef _GPXE_IB_CM_H
  2. #define _GPXE_IB_CM_H
  3. /** @file
  4. *
  5. * Infiniband communication management
  6. *
  7. */
  8. FILE_LICENCE ( GPL2_OR_LATER );
  9. #include <gpxe/infiniband.h>
  10. #include <gpxe/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. struct ib_gid_half service_id;
  40. /** Connection operations */
  41. struct ib_connection_operations *op;
  42. /** Path to target */
  43. struct ib_path *path;
  44. /** Connection request management transaction */
  45. struct ib_mad_transaction *madx;
  46. /** Length of connection request private data */
  47. size_t private_data_len;
  48. /** Connection request private data */
  49. uint8_t private_data[0];
  50. };
  51. extern struct ib_connection *
  52. ib_create_conn ( struct ib_device *ibdev, struct ib_queue_pair *qp,
  53. struct ib_gid *dgid, struct ib_gid_half *service_id,
  54. void *req_private_data, size_t req_private_data_len,
  55. struct ib_connection_operations *op );
  56. extern void ib_destroy_conn ( struct ib_device *ibdev,
  57. struct ib_queue_pair *qp,
  58. struct ib_connection *conn );
  59. #endif /* _GPXE_IB_CM_H */