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.4KB

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