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.

ipoib.h 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #ifndef _GPXE_IPOIB_H
  2. #define _GPXE_IPOIB_H
  3. /** @file
  4. *
  5. * IP over Infiniband
  6. */
  7. FILE_LICENCE ( GPL2_OR_LATER );
  8. #include <gpxe/infiniband.h>
  9. /** IPoIB MAC address length */
  10. #define IPOIB_ALEN 20
  11. /** An IPoIB MAC address */
  12. struct ipoib_mac {
  13. /** Queue pair number
  14. *
  15. * MSB indicates support for IPoIB "connected mode". Lower 24
  16. * bits are the QPN.
  17. */
  18. uint32_t flags__qpn;
  19. /** Port GID */
  20. struct ib_gid gid;
  21. } __attribute__ (( packed ));
  22. /** IPoIB link-layer header length */
  23. #define IPOIB_HLEN 4
  24. /** IPoIB link-layer header */
  25. struct ipoib_hdr {
  26. /** Network-layer protocol */
  27. uint16_t proto;
  28. /** Reserved, must be zero */
  29. union {
  30. /** Reserved, must be zero */
  31. uint16_t reserved;
  32. /** Peer addresses
  33. *
  34. * We use these fields internally to represent the
  35. * peer addresses using a lookup key. There simply
  36. * isn't enough room in the IPoIB header to store
  37. * literal source or destination MAC addresses.
  38. */
  39. struct {
  40. /** Destination address key */
  41. uint8_t dest;
  42. /** Source address key */
  43. uint8_t src;
  44. } __attribute__ (( packed )) peer;
  45. } __attribute__ (( packed )) u;
  46. } __attribute__ (( packed ));
  47. extern const char * ipoib_ntoa ( const void *ll_addr );
  48. extern void ipoib_link_state_changed ( struct ib_device *ibdev );
  49. extern int ipoib_probe ( struct ib_device *ibdev );
  50. extern void ipoib_remove ( struct ib_device *ibdev );
  51. extern struct net_device * alloc_ipoibdev ( size_t priv_size );
  52. #endif /* _GPXE_IPOIB_H */