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_sma.h 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #ifndef _GPXE_IB_SMA_H
  2. #define _GPXE_IB_SMA_H
  3. /** @file
  4. *
  5. * Infiniband Subnet Management Agent
  6. *
  7. */
  8. #include <gpxe/infiniband.h>
  9. #include <gpxe/process.h>
  10. /** Infiniband Subnet Management Agent operations */
  11. struct ib_sma_operations {
  12. /** Set port information
  13. *
  14. * @v ibdev Infiniband device
  15. * @v port_info New port information
  16. */
  17. int ( * set_port_info ) ( struct ib_device *ibdev,
  18. const struct ib_port_info *port_info );
  19. };
  20. /** An Infiniband Subnet Management Agent */
  21. struct ib_sma {
  22. /** Infiniband device */
  23. struct ib_device *ibdev;
  24. /** SMA operations */
  25. struct ib_sma_operations *op;
  26. /** SMA completion queue */
  27. struct ib_completion_queue *cq;
  28. /** SMA queue pair */
  29. struct ib_queue_pair *qp;
  30. /** Poll process */
  31. struct process poll;
  32. };
  33. /** SMA payload size allocated for received packets */
  34. #define IB_SMA_PAYLOAD_LEN 2048
  35. /** SMA number of send WQEs
  36. *
  37. * This is a policy decision.
  38. */
  39. #define IB_SMA_NUM_SEND_WQES 4
  40. /** SMA number of receive WQEs
  41. *
  42. * This is a policy decision.
  43. */
  44. #define IB_SMA_NUM_RECV_WQES 2
  45. /** SMA number of completion queue entries
  46. *
  47. * This is a policy decision
  48. */
  49. #define IB_SMA_NUM_CQES 8
  50. extern int ib_create_sma ( struct ib_sma *sma, struct ib_device *ibdev,
  51. struct ib_sma_operations *op );
  52. extern void ib_destroy_sma ( struct ib_sma *sma );
  53. #endif /* _GPXE_IB_SMA_H */