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ů.

ipoib.h 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #ifndef _IPXE_IPOIB_H
  2. #define _IPXE_IPOIB_H
  3. /** @file
  4. *
  5. * IP over Infiniband
  6. */
  7. FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
  8. #include <ipxe/if_arp.h>
  9. #include <ipxe/infiniband.h>
  10. /** IPoIB MAC address length */
  11. #define IPOIB_ALEN 20
  12. /** An IPoIB MAC address */
  13. struct ipoib_mac {
  14. /** Queue pair number
  15. *
  16. * MSB indicates support for IPoIB "connected mode". Lower 24
  17. * bits are the QPN.
  18. */
  19. uint32_t flags__qpn;
  20. /** Port GID */
  21. union ib_gid gid;
  22. } __attribute__ (( packed ));
  23. /** IPoIB link-layer header length */
  24. #define IPOIB_HLEN 4
  25. /** IPoIB link-layer header */
  26. struct ipoib_hdr {
  27. /** Network-layer protocol */
  28. uint16_t proto;
  29. /** Reserved, must be zero */
  30. uint16_t reserved;
  31. } __attribute__ (( packed ));
  32. /** GUID mask used for constructing eIPoIB Local Ethernet MAC address (LEMAC) */
  33. #define IPOIB_GUID_MASK 0xe7
  34. /** eIPoIB Remote Ethernet MAC address
  35. *
  36. * An eIPoIB REMAC address is an Ethernet-like (6 byte) link-layer
  37. * pseudo-address used to look up a full IPoIB link-layer address.
  38. */
  39. struct ipoib_remac {
  40. /** Remote QPN
  41. *
  42. * Must be ORed with EIPOIB_QPN_LA so that eIPoIB REMAC
  43. * addresses are considered as locally-assigned Ethernet MAC
  44. * addreses.
  45. */
  46. uint32_t qpn;
  47. /** Remote LID */
  48. uint16_t lid;
  49. } __attribute__ (( packed ));
  50. /** eIPoIB REMAC locally-assigned address indicator */
  51. #define EIPOIB_QPN_LA 0x02000000UL
  52. extern const char * ipoib_ntoa ( const void *ll_addr );
  53. extern struct net_device * alloc_ipoibdev ( size_t priv_size );
  54. extern struct net_device * ipoib_netdev ( struct ib_device *ibdev );
  55. #endif /* _IPXE_IPOIB_H */