iPXE
Data Structures | Defines | Functions
ipoib.h File Reference

IP over Infiniband. More...

#include <ipxe/if_arp.h>
#include <ipxe/infiniband.h>

Go to the source code of this file.

Data Structures

struct  ipoib_mac
 An IPoIB MAC address. More...
struct  ipoib_hdr
 IPoIB link-layer header. More...
struct  ipoib_remac
 eIPoIB Remote Ethernet MAC address More...

Defines

#define IPOIB_ALEN   20
 IPoIB MAC address length.
#define IPOIB_HLEN   4
 IPoIB link-layer header length.
#define IPOIB_GUID_MASK   0xe7
 GUID mask used for constructing eIPoIB Local Ethernet MAC address (LEMAC)
#define EIPOIB_QPN_LA   0x02000000UL
 eIPoIB REMAC locally-assigned address indicator

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
const char * ipoib_ntoa (const void *ll_addr)
struct net_devicealloc_ipoibdev (size_t priv_size)
 Allocate IPoIB device.
struct net_deviceipoib_netdev (struct ib_device *ibdev)
 Find IPoIB network device.

Detailed Description

IP over Infiniband.

Definition in file ipoib.h.


Define Documentation

#define IPOIB_ALEN   20

IPoIB MAC address length.

Definition at line 15 of file ipoib.h.

#define IPOIB_HLEN   4

IPoIB link-layer header length.

Definition at line 30 of file ipoib.h.

#define IPOIB_GUID_MASK   0xe7

GUID mask used for constructing eIPoIB Local Ethernet MAC address (LEMAC)

Definition at line 41 of file ipoib.h.

Referenced by ipoib_init_addr().

#define EIPOIB_QPN_LA   0x02000000UL

eIPoIB REMAC locally-assigned address indicator

Definition at line 61 of file ipoib.h.

Referenced by ipoib_complete_recv().


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )
const char* ipoib_ntoa ( const void *  ll_addr)
struct net_device* alloc_ipoibdev ( size_t  priv_size) [read]

Allocate IPoIB device.

Parameters:
priv_sizeSize of driver private data
Return values:
netdevNetwork device, or NULL

Definition at line 315 of file ipoib.c.

References alloc_netdev(), eth_broadcast, IB_MAX_PAYLOAD_SIZE, net_device::ll_broadcast, net_device::ll_protocol, net_device::max_pkt_len, and netdev.

Referenced by ipoib_probe().

                                                        {
        struct net_device *netdev;

        netdev = alloc_netdev ( priv_size );
        if ( netdev ) {
                netdev->ll_protocol = &ipoib_protocol;
                netdev->ll_broadcast = eth_broadcast;
                netdev->max_pkt_len = IB_MAX_PAYLOAD_SIZE;
        }
        return netdev;
}
struct net_device* ipoib_netdev ( struct ib_device ibdev) [read]

Find IPoIB network device.

Parameters:
ibdevInfiniband device
Return values:
netdevIPoIB network device, or NULL if not found

Definition at line 1036 of file ipoib.c.

References ipoib_device::ibdev, ipoib_device::list, list_for_each_entry, ipoib_device::netdev, and NULL.

Referenced by golan_register_ibdev().

                                                             {
        struct ipoib_device *ipoib;

        /* Find matching IPoIB device */
        list_for_each_entry ( ipoib, &ipoib_devices, list ) {
                if ( ipoib->ibdev != ibdev )
                        continue;
                return ipoib->netdev;
        }
        return NULL;
}