Linux Kernel
3.7.1
|
Go to the source code of this file.
Data Structures | |
struct | netio_ipp_address_t |
union | __netio_getset_offset_t |
struct | netio_fastio_rv3_t |
union | __netio_checksum_header_t |
struct | lepp_cmd_t |
struct | lepp_frag_t |
struct | lepp_tso_cmd_t |
struct | lepp_queue_t |
Typedefs | |
typedef void * | lepp_comp_t |
Functions | |
int | __netio_fastio0 (uint32_t fastio_index) |
int | __netio_fastio1 (uint32_t fastio_index, uint32_t arg0) |
netio_fastio_rv3_t | __netio_fastio3_rv3 (uint32_t fastio_index, uint32_t arg0, uint32_t arg1, uint32_t arg2) |
int | __netio_fastio4 (uint32_t fastio_index, uint32_t arg0, uint32_t arg1, uint32_t arg2, uint32_t arg3) |
int | __netio_fastio6 (uint32_t fastio_index, uint32_t arg0, uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5) |
int | __netio_fastio9 (uint32_t fastio_index, uint32_t arg0, uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t arg4, uint32_t arg5, uint32_t arg6, uint32_t arg7, uint32_t arg8) |
Interface to the hypervisor XGBE driver.
Definition in file drv_xgbe_intf.h.
#define __netio_fastio_allocate | ( | fastio_index, | |
size | |||
) | __netio_fastio1((fastio_index) + NETIO_FASTIO_ALLOCATE, size) |
Allocate an empty packet.
fastio_index | Fast I/O index. |
size | Size of the packet to allocate. |
Definition at line 199 of file drv_xgbe_intf.h.
#define __netio_fastio_free_buffer | ( | fastio_index, | |
handle | |||
) | __netio_fastio1((fastio_index) + NETIO_FASTIO_FREE_BUFFER, handle) |
Free a buffer.
fastio_index | Fast I/O index. |
handle | Handle for the packet to free. |
Definition at line 206 of file drv_xgbe_intf.h.
#define __netio_fastio_return_credits | ( | fastio_index, | |
credits | |||
) | __netio_fastio1((fastio_index) + NETIO_FASTIO_RETURN_CREDITS, credits) |
Increment our receive credits.
fastio_index | Fast I/O index. |
credits | Number of credits to add. |
Definition at line 213 of file drv_xgbe_intf.h.
#define __netio_fastio_send_pcie_pkt | ( | fastio_index, | |
flags, | |||
confno, | |||
csum0, | |||
va_F, | |||
va_L, | |||
len_F_L | |||
) |
Send packet on PCIe interface.
fastio_index | Fast I/O index. |
flags | Ack/csum/notify flags in low 3 bits. |
confno | Confirmation number to request, if notify flag set. |
csum0 | Checksum descriptor; Hard wired 0, not needed for PCIe. |
va_F | Virtual address of the packet buffer. |
va_L | Virtual address of last segment, if 2 segments. Hard wired 0. |
len_F_L | Length of the packet buffer in low 16 bits. |
Definition at line 284 of file drv_xgbe_intf.h.
Send packet, calculate checksum.
fastio_index | Fast I/O index. |
ackflag | Nonzero if we want an ack. |
size | Size of the packet. |
va | Virtual address of start of packet. |
handle | Packet handle. |
csum0 | Shim checksum header. |
csum1 | Checksum seed. |
Definition at line 236 of file drv_xgbe_intf.h.
Send packet, no checksum.
fastio_index | Fast I/O index. |
ackflag | Nonzero if we want an ack. |
size | Size of the packet. |
va | Virtual address of start of packet. |
handle | Packet handle. |
Definition at line 223 of file drv_xgbe_intf.h.
Send vector of packets.
fastio_index | Fast I/O index. |
seqno | Number of packets transmitted so far on this interface; used to decide which packets should be acknowledged. |
nentries | Number of entries in vector. |
va | Virtual address of start of vector entry array. |
Definition at line 329 of file drv_xgbe_intf.h.
#define __netio_fastio_sendv_pkt_1_2 | ( | fastio_index, | |
flags, | |||
confno, | |||
csum0, | |||
va_F, | |||
va_L, | |||
len_F_L | |||
) |
Sendv packet with 1 or 2 segments.
fastio_index | Fast I/O index. |
flags | Ack/csum/notify flags in low 3 bits; number of segments minus 1 in next 2 bits; expected checksum in high 16 bits. |
confno | Confirmation number to request, if notify flag set. |
csum0 | Checksum descriptor; if zero, no checksum. |
va_F | Virtual address of first segment. |
va_L | Virtual address of last segment, if 2 segments. |
len_F_L | Length of first segment in low 16 bits; length of last segment, if 2 segments, in high 16 bits. |
Definition at line 270 of file drv_xgbe_intf.h.
#define __netio_fastio_sendv_pkt_3_4 | ( | fastio_index, | |
flags, | |||
confno, | |||
csum0, | |||
va_F, | |||
va_L, | |||
len_F_L, | |||
va_M0, | |||
va_M1, | |||
len_M0_M1 | |||
) |
Sendv packet with 3 or 4 segments.
fastio_index | Fast I/O index. |
flags | Ack/csum/notify flags in low 3 bits; number of segments minus 1 in next 2 bits; expected checksum in high 16 bits. |
confno | Confirmation number to request, if notify flag set. |
csum0 | Checksum descriptor; if zero, no checksum. |
va_F | Virtual address of first segment. |
va_L | Virtual address of last segment (third segment if 3 segments, fourth segment if 4 segments). |
len_F_L | Length of first segment in low 16 bits; length of last segment in high 16 bits. |
va_M0 | Virtual address of "middle 0" segment; this segment is sent second when there are three segments, and third if there are four. |
va_M1 | Virtual address of "middle 1" segment; this segment is sent second when there are four segments. |
len_M0_M1 | Length of middle 0 segment in low 16 bits; length of middle 1 segment, if 4 segments, in high 16 bits. |
Definition at line 307 of file drv_xgbe_intf.h.
#define LEPP_CMD_LIMIT (LEPP_CMD_QUEUE_BYTES - LEPP_MAX_CMD_SIZE) |
The largest possible value of lepp_queue_t::cmd_{head, tail} (inclusive).
Definition at line 481 of file drv_xgbe_intf.h.
#define LEPP_CMD_QUEUE_BYTES |
The size of the lepp "cmd" queue.
Definition at line 472 of file drv_xgbe_intf.h.
#define LEPP_COMP_QUEUE_SIZE ((LEPP_CMD_LIMIT + sizeof(lepp_cmd_t) - 1) / sizeof(lepp_cmd_t)) |
The maximum number of completions in an LEPP queue.
Definition at line 485 of file drv_xgbe_intf.h.
#define LEPP_MAX_CMD_SIZE LEPP_TSO_CMD_SIZE(LEPP_MAX_FRAGS, 128) |
The largest possible command that can go in lepp_queue_t::cmds[].
Definition at line 477 of file drv_xgbe_intf.h.
#define LEPP_MAX_FRAGS (65536 / HV_DEFAULT_PAGE_SIZE_SMALL + 2 + 1) |
Maximum number of frags for one TSO command. This is adapted from linux's "MAX_SKB_FRAGS", and presumably over-estimates by one, for our page size of exactly 65536. We add one for a "body" fragment.
Definition at line 463 of file drv_xgbe_intf.h.
#define LEPP_QINC | ( | var | ) | (var = __insn_mnz(var - (LEPP_COMP_QUEUE_SIZE - 1), var + 1)) |
Increment an index modulo the queue size.
Definition at line 489 of file drv_xgbe_intf.h.
#define LEPP_TSO_CMD_SIZE | ( | num_frags, | |
header_size | |||
) |
Total number of bytes needed for an lepp_tso_cmd_t.
Definition at line 466 of file drv_xgbe_intf.h.
#define LIPP_LARGE_BUFFERS 6785 |
The maximum number of "large" buffers. This is enough for 53 network cpus with 128 credits.
Definition at line 613 of file drv_xgbe_intf.h.
#define LIPP_PACKET_PADDING 2 |
We use exactly two bytes of alignment padding.
Definition at line 594 of file drv_xgbe_intf.h.
#define LIPP_SMALL_BUFFERS 6785 |
The maximum number of "small" buffers. This is enough for 53 network cpus with 128 credits. Note that if these are exhausted, we will fall back to using large buffers.
Definition at line 608 of file drv_xgbe_intf.h.
#define LIPP_SMALL_PACKET_SIZE 128 |
The minimum size of a "small" buffer (including the padding).
Definition at line 597 of file drv_xgbe_intf.h.
#define LIPP_VERSION 1 |
FIXME: Check this from linux, via a new "pwrite()" call.
Definition at line 590 of file drv_xgbe_intf.h.
#define NETIO_BASE_OFFSET | ( | off | ) | ((off) & 0xFF00000000000000ULL) |
Extract the base offset from an offset
Definition at line 133 of file drv_xgbe_intf.h.
#define NETIO_LOCAL_OFFSET | ( | off | ) | ((off) & 0x00FFFFFFFFFFFFFFULL) |
Extract the local offset from an offset
Definition at line 135 of file drv_xgbe_intf.h.
typedef void* lepp_comp_t |
An LEPP completion ring entry.
Definition at line 456 of file drv_xgbe_intf.h.
enum netio_fastio_index_t |
Fast I/O index offsets (must be contiguous).
Definition at line 157 of file drv_xgbe_intf.h.
enum netio_hv_offset_t |
The various pread/pwrite offsets into the hypervisor-level driver.
NETIO_FIXED_ADDR |
Inform the Linux driver of the address of the NetIO arena memory. This offset is actually only used to convey information from netio to the Linux driver; it never makes it from there to the hypervisor. Write-only; takes a uint32_t specifying the VA address. |
NETIO_FIXED_SIZE |
Inform the Linux driver of the size of the NetIO arena memory. This offset is actually only used to convey information from netio to the Linux driver; it never makes it from there to the hypervisor. Write-only; takes a uint32_t specifying the VA size. |
NETIO_IPP_INPUT_REGISTER_OFF |
Register current tile with IPP. Write then read: write, takes a netio_input_config_t, read returns a pointer to a netio_queue_impl_t. |
NETIO_IPP_INPUT_UNREGISTER_OFF |
Unregister current tile from IPP. Write-only, takes a dummy argument. |
NETIO_IPP_INPUT_INIT_OFF |
Start packets flowing. Write-only, takes a dummy argument. |
NETIO_IPP_INPUT_UNINIT_OFF |
Stop packets flowing. Write-only, takes a dummy argument. |
NETIO_IPP_INPUT_GROUP_CFG_OFF |
Configure group (typically we group on VLAN). Write-only: takes an array of netio_group_t's, low 24 bits of the offset is the base group number times the size of a netio_group_t. |
NETIO_IPP_INPUT_BUCKET_CFG_OFF |
Configure bucket. Write-only: takes an array of netio_bucket_t's, low 24 bits of the offset is the base bucket number times the size of a netio_bucket_t. |
NETIO_IPP_PARAM_OFF |
Get/set a parameter. Read or write: read or write data is the parameter value, low 32 bits of the offset is a __netio_getset_offset_t. |
NETIO_IPP_GET_FASTIO_OFF |
Get fast I/O index. Read-only; returns a 4-byte base index value. |
NETIO_IPP_INPUT_HIJACK_CFG_OFF |
Configure hijack IP address. Packets with this IPv4 dest address go to bucket NETIO_NUM_BUCKETS - 1. Write-only: takes an IP address in some standard form. FIXME: Define the form! |
NETIO_IPP_USER_MAX_OFF |
Offsets beyond this point are reserved for the supervisor (although that enforcement must be done by the supervisor driver itself). |
NETIO_IPP_IOMEM_REGISTER_OFF |
Register I/O memory. Write-only, takes a netio_ipp_address_t. |
NETIO_IPP_IOMEM_UNREGISTER_OFF |
Unregister I/O memory. Write-only, takes a netio_ipp_address_t. |
NETIO_IPP_DRAIN_OFF |
Drain LIPP buffers. |
NETIO_EPP_SHM_OFF |
Supply a netio_ipp_address_t to be used as shared memory for the LEPP command queue. |
NETIO_IPP_STOP_SHIM_OFF |
Stop IPP/EPP tiles. Write-only, takes a dummy argument. |
NETIO_IPP_START_SHIM_OFF |
Start IPP/EPP tiles. Write-only, takes a dummy argument. |
NETIO_IPP_ADDRESS_OFF |
Supply packet arena. Write-only, takes an array of netio_ipp_address_t values. |
Definition at line 48 of file drv_xgbe_intf.h.
netio_fastio_rv3_t __netio_fastio3_rv3 | ( | uint32_t | fastio_index, |
uint32_t | arg0, | ||
uint32_t | arg1, | ||
uint32_t | arg2 | ||
) |
3-argument fast I/O call, 2-word return value
int __netio_fastio4 | ( | uint32_t | fastio_index, |
uint32_t | arg0, | ||
uint32_t | arg1, | ||
uint32_t | arg2, | ||
uint32_t | arg3 | ||
) |
4-argument fast I/O call
int __netio_fastio6 | ( | uint32_t | fastio_index, |
uint32_t | arg0, | ||
uint32_t | arg1, | ||
uint32_t | arg2, | ||
uint32_t | arg3, | ||
uint32_t | arg4, | ||
uint32_t | arg5 | ||
) |
6-argument fast I/O call