Barrelfish
Data Structures | Macros | Functions
bulk_net_backend.h File Reference

Unidirectional bulk data transfer via shared memory. More...

Data Structures

struct  bulk_net_msgdesc
 

Macros

#define BULK_NET_ENABLE_DEBUG   1
 enables/disables the entire debug outputs of the bulk net backend
 
#define BULK_NET_ENABLE_STATUS   1
 enables/disables status messages
 
#define BULK_NET_ENABLE_TRACE   0
 enables/disables the tracing debug output
 
#define BULK_NET_ENABLE_DEBUG_E10K   0
 enables/disables the debug output for the e10k module
 
#define BULK_NET_ENABLE_DEBUG_TRANSF   0
 enables/disables the debug output for the transfer module
 
#define BULK_NET_ENABLE_DEBUG_BACKEND   1
 enables/disables the debug output for the backend module
 
#define DO_MSG_DUMP   0
 switch to turn on message dumping
 

Functions

errval_t bulk_e10k_init (struct bulk_e10k *bu, struct waitset *ws, const char *card, uint8_t queue, size_t buffer_size, size_t ring_size, void(*received)(struct bulk_e10k *, struct bulk_net_msgdesc *), void(*transmitted)(struct bulk_e10k *, void *))
 
errval_t bulk_e10k_rx_add (struct bulk_e10k *bu, uint64_t phys, uint64_t header, void *opaque)
 
errval_t bulk_e10k_send (struct bulk_e10k *bu, struct bulk_net_msgdesc *desc)
 
errval_t bulk_e10k_port_add (struct bulk_e10k *bu, uint16_t port)
 
errval_t bulk_e10k_port_alloc (struct bulk_e10k *bu, uint16_t *port)
 
errval_t bulk_e10k_ip_info (struct bulk_e10k *bu, uint32_t *ip)
 
errval_t bulk_e10k_arp_lookup (struct bulk_e10k *bu, uint32_t ip, uint64_t *mac)
 

Detailed Description

Unidirectional bulk data transfer via shared memory.

Function Documentation

errval_t bulk_e10k_arp_lookup ( struct bulk_e10k *  bu,
uint32_t  ip,
uint64_t *  mac 
)

Do an ARP lookup on this interface

Parameters
buChannnel struct
ipIP address to resolve (in host byte order)
macPointer to variable where MAC address will be stored
errval_t bulk_e10k_init ( struct bulk_e10k *  bu,
struct waitset ws,
const char *  card,
uint8_t  queue,
size_t  buffer_size,
size_t  ring_size,
void(*)(struct bulk_e10k *, struct bulk_net_msgdesc *)  received,
void(*)(struct bulk_e10k *, void *)  transmitted 
)

Initialize directly mapped RX/TX queue pair with e10k NIC.

Parameters
buChannel struct
wsWaitset
cardCard name
queueQueue ID to use
buffer_sizeSize of receive buffers in bytes
ring_sizeNumber of descriptors in the RX/TX rings
receivedCallback for a received packet
transmittedCallback for a transmitted packet
errval_t bulk_e10k_ip_info ( struct bulk_e10k *  bu,
uint32_t *  ip 
)

Get IP address configured for this interface.

Parameters
buChannel struct
ipPointer to variable where IP will be stored (host byte order)
errval_t bulk_e10k_port_add ( struct bulk_e10k *  bu,
uint16_t  port 
)

Steer a specific UDP port to this queue.

Parameters
buChannel struct
portPort to allocate (in host byte order)
errval_t bulk_e10k_port_alloc ( struct bulk_e10k *  bu,
uint16_t *  port 
)

Allocate an unused UDP port and steer it to this queue.

Parameters
buChannel struct
portPointer to variable where port number will be stored (host byte order)
errval_t bulk_e10k_rx_add ( struct bulk_e10k *  bu,
uint64_t  phys,
uint64_t  header,
void *  opaque 
)

Add a buffer to the receive queue.

Parameters
buChannel struct
physPhysical address of buffer
headerPhysical address of header buffer (needs E10K_HDRSZ bytes)
opaqueUser-Data for this buffer, will be returned when it is used in a received packet.
errval_t bulk_e10k_send ( struct bulk_e10k *  bu,
struct bulk_net_msgdesc desc 
)

Send out a packet.

Parameters
buChannel struct
decsDescriptor for buffer chain to transmit