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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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 must be zero; QPNs are only 24-bit.
  16. */
  17. uint32_t qpn;
  18. /** Port GID */
  19. struct ib_gid gid;
  20. } __attribute__ (( packed ));
  21. /** IPoIB link-layer header length */
  22. #define IPOIB_HLEN 4
  23. /** IPoIB link-layer header */
  24. struct ipoib_hdr {
  25. /** Network-layer protocol */
  26. uint16_t proto;
  27. /** Reserved, must be zero */
  28. union {
  29. /** Reserved, must be zero */
  30. uint16_t reserved;
  31. /** Peer addresses
  32. *
  33. * We use these fields internally to represent the
  34. * peer addresses using a lookup key. There simply
  35. * isn't enough room in the IPoIB header to store
  36. * literal source or destination MAC addresses.
  37. */
  38. struct {
  39. /** Destination address key */
  40. uint8_t dest;
  41. /** Source address key */
  42. uint8_t src;
  43. } __attribute__ (( packed )) peer;
  44. } __attribute__ (( packed )) u;
  45. } __attribute__ (( packed ));
  46. extern const char * ipoib_ntoa ( const void *ll_addr );
  47. extern void ipoib_link_state_changed ( struct ib_device *ibdev );
  48. extern int ipoib_probe ( struct ib_device *ibdev );
  49. extern void ipoib_remove ( struct ib_device *ibdev );
  50. extern struct net_device * alloc_ipoibdev ( size_t priv_size );
  51. #endif /* _GPXE_IPOIB_H */