iPXE
|
Etherfabric bitfield access. More...
Go to the source code of this file.
Data Structures | |
union | efab_dword |
A doubleword (i.e. More... | |
union | efab_qword |
A quadword (i.e. More... | |
union | efab_oword |
An octword (eight-word, i.e. More... | |
Macros | |
#define | EFAB_BITFIELD_H |
#define | EFAB_DUMMY_FIELD_LBN 0 |
Dummy field low bit number. More... | |
#define | EFAB_DUMMY_FIELD_WIDTH 0 |
Dummy field width. More... | |
#define | EFAB_DWORD_0_LBN 0 |
Dword 0 low bit number. More... | |
#define | EFAB_DWORD_0_WIDTH 32 |
Dword 0 width. More... | |
#define | EFAB_DWORD_1_LBN 32 |
Dword 1 low bit number. More... | |
#define | EFAB_DWORD_1_WIDTH 32 |
Dword 1 width. More... | |
#define | EFAB_DWORD_2_LBN 64 |
Dword 2 low bit number. More... | |
#define | EFAB_DWORD_2_WIDTH 32 |
Dword 2 width. More... | |
#define | EFAB_DWORD_3_LBN 96 |
Dword 3 low bit number. More... | |
#define | EFAB_DWORD_3_WIDTH 32 |
Dword 3 width. More... | |
#define | EFAB_VAL(field, attribute) field ## _ ## attribute |
Specified attribute (e.g. More... | |
#define | EFAB_LOW_BIT(field) EFAB_VAL ( field, LBN ) |
Low bit number of the specified field. More... | |
#define | EFAB_WIDTH(field) EFAB_VAL ( field, WIDTH ) |
Bit width of the specified field. More... | |
#define | EFAB_HIGH_BIT(field) ( EFAB_LOW_BIT(field) + EFAB_WIDTH(field) - 1 ) |
High bit number of the specified field. More... | |
#define | EFAB_MASK64(field) |
Mask equal in width to the specified field. More... | |
#define | EFAB_MASK32(field) |
Mask equal in width to the specified field. More... | |
#define | EFAB_DWORD_FMT "%08x" |
Format string for printing an efab_dword_t. More... | |
#define | EFAB_QWORD_FMT "%08x:%08x" |
Format string for printing an efab_qword_t. More... | |
#define | EFAB_OWORD_FMT "%08x:%08x:%08x:%08x" |
Format string for printing an efab_oword_t. More... | |
#define | EFAB_DWORD_VAL(dword) ( ( unsigned int ) le32_to_cpu ( (dword).u32[0] ) ) |
printk parameters for printing an efab_dword_t More... | |
#define | EFAB_QWORD_VAL(qword) |
printk parameters for printing an efab_qword_t More... | |
#define | EFAB_OWORD_VAL(oword) |
printk parameters for printing an efab_oword_t More... | |
#define | EFAB_EXTRACT_NATIVE(native_element, min, max, low, high) |
Extract bit field portion [low,high) from the native-endian element which contains bits [min,max). More... | |
#define | EFAB_EXTRACT64(element, min, max, low, high) EFAB_EXTRACT_NATIVE ( le64_to_cpu(element), min, max, low, high ) |
Extract bit field portion [low,high) from the 64-bit little-endian element which contains bits [min,max) More... | |
#define | EFAB_EXTRACT32(element, min, max, low, high) EFAB_EXTRACT_NATIVE ( le32_to_cpu(element), min, max, low, high ) |
Extract bit field portion [low,high) from the 32-bit little-endian element which contains bits [min,max) More... | |
#define | EFAB_EXTRACT_OWORD64(oword, low, high) |
#define | EFAB_EXTRACT_QWORD64(qword, low, high) ( EFAB_EXTRACT64 ( (qword).u64[0], 0, 63, low, high ) ) |
#define | EFAB_EXTRACT_OWORD32(oword, low, high) |
#define | EFAB_EXTRACT_QWORD32(qword, low, high) |
#define | EFAB_EXTRACT_DWORD(dword, low, high) ( EFAB_EXTRACT32 ( (dword).u32[0], 0, 31, low, high ) ) |
#define | EFAB_OWORD_FIELD64(oword, field) |
#define | EFAB_QWORD_FIELD64(qword, field) |
#define | EFAB_OWORD_FIELD32(oword, field) |
#define | EFAB_QWORD_FIELD32(qword, field) |
#define | EFAB_DWORD_FIELD(dword, field) |
#define | EFAB_OWORD_IS_ZERO64(oword) ( ! ( (oword).u64[0] || (oword).u64[1] ) ) |
#define | EFAB_QWORD_IS_ZERO64(qword) ( ! ( (qword).u64[0] ) ) |
#define | EFAB_OWORD_IS_ZERO32(oword) |
#define | EFAB_QWORD_IS_ZERO32(qword) ( ! ( (qword).u32[0] || (qword).u32[1] ) ) |
#define | EFAB_DWORD_IS_ZERO(dword) ( ! ( (dword).u32[0] ) ) |
#define | EFAB_OWORD_IS_ALL_ONES64(oword) ( ( (oword).u64[0] & (oword).u64[1] ) == ~( ( uint64_t ) 0 ) ) |
#define | EFAB_QWORD_IS_ALL_ONES64(qword) ( (qword).u64[0] == ~( ( uint64_t ) 0 ) ) |
#define | EFAB_OWORD_IS_ALL_ONES32(oword) |
#define | EFAB_QWORD_IS_ALL_ONES32(qword) ( ( (qword).u32[0] & (qword).u32[1] ) == ~( ( uint32_t ) 0 ) ) |
#define | EFAB_DWORD_IS_ALL_ONES(dword) ( (dword).u32[0] == ~( ( uint32_t ) 0 ) ) |
#define | EFAB_OWORD_FIELD EFAB_OWORD_FIELD32 |
#define | EFAB_QWORD_FIELD EFAB_QWORD_FIELD32 |
#define | EFAB_OWORD_IS_ZERO EFAB_OWORD_IS_ZERO32 |
#define | EFAB_QWORD_IS_ZERO EFAB_QWORD_IS_ZERO32 |
#define | EFAB_OWORD_IS_ALL_ONES EFAB_OWORD_IS_ALL_ONES32 |
#define | EFAB_QWORD_IS_ALL_ONES EFAB_QWORD_IS_ALL_ONES32 |
#define | EFAB_INSERT_NATIVE64(min, max, low, high, value) |
Construct bit field portion. More... | |
#define | EFAB_INSERT_NATIVE32(min, max, low, high, value) |
#define | EFAB_INSERT_NATIVE(min, max, low, high, value) |
#define | EFAB_INSERT_FIELD_NATIVE(min, max, field, value) |
Construct bit field portion. More... | |
#define | EFAB_INSERT_FIELDS_NATIVE(min, max, field1, value1, field2, value2, field3, value3, field4, value4, field5, value5, field6, value6, field7, value7, field8, value8, field9, value9, field10, value10) |
Construct bit field. More... | |
#define | EFAB_INSERT_FIELDS64(...) cpu_to_le64 ( EFAB_INSERT_FIELDS_NATIVE ( __VA_ARGS__ ) ) |
#define | EFAB_INSERT_FIELDS32(...) cpu_to_le32 ( EFAB_INSERT_FIELDS_NATIVE ( __VA_ARGS__ ) ) |
#define | EFAB_POPULATE_OWORD64(oword, ...) |
#define | EFAB_POPULATE_QWORD64(qword, ...) |
#define | EFAB_POPULATE_OWORD32(oword, ...) |
#define | EFAB_POPULATE_QWORD32(qword, ...) |
#define | EFAB_POPULATE_DWORD(dword, ...) |
#define | EFAB_POPULATE_OWORD EFAB_POPULATE_OWORD32 |
#define | EFAB_POPULATE_QWORD EFAB_POPULATE_QWORD32 |
#define | EFAB_POPULATE_OWORD_10 EFAB_POPULATE_OWORD |
#define | EFAB_POPULATE_OWORD_9(oword, ...) EFAB_POPULATE_OWORD_10 ( oword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
#define | EFAB_POPULATE_OWORD_8(oword, ...) EFAB_POPULATE_OWORD_9 ( oword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
#define | EFAB_POPULATE_OWORD_7(oword, ...) EFAB_POPULATE_OWORD_8 ( oword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
#define | EFAB_POPULATE_OWORD_6(oword, ...) EFAB_POPULATE_OWORD_7 ( oword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
#define | EFAB_POPULATE_OWORD_5(oword, ...) EFAB_POPULATE_OWORD_6 ( oword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
#define | EFAB_POPULATE_OWORD_4(oword, ...) EFAB_POPULATE_OWORD_5 ( oword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
#define | EFAB_POPULATE_OWORD_3(oword, ...) EFAB_POPULATE_OWORD_4 ( oword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
#define | EFAB_POPULATE_OWORD_2(oword, ...) EFAB_POPULATE_OWORD_3 ( oword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
#define | EFAB_POPULATE_OWORD_1(oword, ...) EFAB_POPULATE_OWORD_2 ( oword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
#define | EFAB_ZERO_OWORD(oword) EFAB_POPULATE_OWORD_1 ( oword, EFAB_DUMMY_FIELD, 0 ) |
#define | EFAB_SET_OWORD(oword) |
#define | EFAB_POPULATE_QWORD_10 EFAB_POPULATE_QWORD |
#define | EFAB_POPULATE_QWORD_9(qword, ...) EFAB_POPULATE_QWORD_10 ( qword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
#define | EFAB_POPULATE_QWORD_8(qword, ...) EFAB_POPULATE_QWORD_9 ( qword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
#define | EFAB_POPULATE_QWORD_7(qword, ...) EFAB_POPULATE_QWORD_8 ( qword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
#define | EFAB_POPULATE_QWORD_6(qword, ...) EFAB_POPULATE_QWORD_7 ( qword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
#define | EFAB_POPULATE_QWORD_5(qword, ...) EFAB_POPULATE_QWORD_6 ( qword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
#define | EFAB_POPULATE_QWORD_4(qword, ...) EFAB_POPULATE_QWORD_5 ( qword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
#define | EFAB_POPULATE_QWORD_3(qword, ...) EFAB_POPULATE_QWORD_4 ( qword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
#define | EFAB_POPULATE_QWORD_2(qword, ...) EFAB_POPULATE_QWORD_3 ( qword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
#define | EFAB_POPULATE_QWORD_1(qword, ...) EFAB_POPULATE_QWORD_2 ( qword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
#define | EFAB_ZERO_QWORD(qword) EFAB_POPULATE_QWORD_1 ( qword, EFAB_DUMMY_FIELD, 0 ) |
#define | EFAB_SET_QWORD(qword) |
#define | EFAB_POPULATE_DWORD_10 EFAB_POPULATE_DWORD |
#define | EFAB_POPULATE_DWORD_9(dword, ...) EFAB_POPULATE_DWORD_10 ( dword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
#define | EFAB_POPULATE_DWORD_8(dword, ...) EFAB_POPULATE_DWORD_9 ( dword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
#define | EFAB_POPULATE_DWORD_7(dword, ...) EFAB_POPULATE_DWORD_8 ( dword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
#define | EFAB_POPULATE_DWORD_6(dword, ...) EFAB_POPULATE_DWORD_7 ( dword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
#define | EFAB_POPULATE_DWORD_5(dword, ...) EFAB_POPULATE_DWORD_6 ( dword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
#define | EFAB_POPULATE_DWORD_4(dword, ...) EFAB_POPULATE_DWORD_5 ( dword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
#define | EFAB_POPULATE_DWORD_3(dword, ...) EFAB_POPULATE_DWORD_4 ( dword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
#define | EFAB_POPULATE_DWORD_2(dword, ...) EFAB_POPULATE_DWORD_3 ( dword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
#define | EFAB_POPULATE_DWORD_1(dword, ...) EFAB_POPULATE_DWORD_2 ( dword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
#define | EFAB_ZERO_DWORD(dword) EFAB_POPULATE_DWORD_1 ( dword, EFAB_DUMMY_FIELD, 0 ) |
#define | EFAB_SET_DWORD(dword) EFAB_POPULATE_DWORD_1 ( dword, EFAB_DWORD_0, 0xffffffff ) |
#define | EFAB_INSERT_FIELD64(...) cpu_to_le64 ( EFAB_INSERT_FIELD_NATIVE ( __VA_ARGS__ ) ) |
#define | EFAB_INSERT_FIELD32(...) cpu_to_le32 ( EFAB_INSERT_FIELD_NATIVE ( __VA_ARGS__ ) ) |
#define | EFAB_INPLACE_MASK64(min, max, field) EFAB_INSERT_FIELD64 ( min, max, field, EFAB_MASK64 ( field ) ) |
#define | EFAB_INPLACE_MASK32(min, max, field) EFAB_INSERT_FIELD32 ( min, max, field, EFAB_MASK32 ( field ) ) |
#define | EFAB_SET_OWORD_FIELD64(oword, field, value) |
#define | EFAB_SET_QWORD_FIELD64(qword, field, value) |
#define | EFAB_SET_OWORD_FIELD32(oword, field, value) |
#define | EFAB_SET_QWORD_FIELD32(qword, field, value) |
#define | EFAB_SET_DWORD_FIELD(dword, field, value) |
#define | EFAB_SET_OWORD_FIELD EFAB_SET_OWORD_FIELD32 |
#define | EFAB_SET_QWORD_FIELD EFAB_SET_QWORD_FIELD32 |
#define | DMA_ADDR_T_WIDTH ( 8 * sizeof ( dma_addr_t ) ) |
#define | EFAB_DMA_TYPE_WIDTH(width) ( ( (width) < DMA_ADDR_T_WIDTH ) ? (width) : DMA_ADDR_T_WIDTH ) |
#define | EFAB_DMA_MAX_MASK |
#define | EFAB_DMA_MASK(mask) ( (mask) & EFAB_DMA_MAX_MASK ) |
Typedefs | |
typedef union efab_dword | efab_dword_t |
A doubleword (i.e. More... | |
typedef union efab_qword | efab_qword_t |
A quadword (i.e. More... | |
typedef union efab_oword | efab_oword_t |
An octword (eight-word, i.e. More... | |
Functions | |
FILE_LICENCE (GPL_ANY) | |
Etherfabric bitfield access.
Etherfabric NICs make extensive use of bitfields up to 128 bits wide. Since there is no native 128-bit datatype on most systems, and since 64-bit datatypes are inefficient on 32-bit systems and vice versa, we wrap accesses in a way that uses the most efficient datatype.
The NICs are PCI devices and therefore little-endian. Since most of the quantities that we deal with are DMAed to/from host memory, we define our datatypes (efab_oword_t, efab_qword_t and efab_dword_t) to be little-endian.
In the less common case of using PIO for individual register writes, we construct the little-endian datatype in host memory and then use non-swapping equivalents of writel/writeq, rather than constructing a native-endian datatype and relying on the implicit byte-swapping done by writel/writeq. (We use a similar strategy for register reads.)
Definition in file etherfabric.h.
#define EFAB_BITFIELD_H |
Definition at line 23 of file etherfabric.h.
#define EFAB_DUMMY_FIELD_LBN 0 |
Dummy field low bit number.
Definition at line 49 of file etherfabric.h.
#define EFAB_DUMMY_FIELD_WIDTH 0 |
Dummy field width.
Definition at line 51 of file etherfabric.h.
#define EFAB_DWORD_0_LBN 0 |
Dword 0 low bit number.
Definition at line 53 of file etherfabric.h.
#define EFAB_DWORD_0_WIDTH 32 |
Dword 0 width.
Definition at line 55 of file etherfabric.h.
#define EFAB_DWORD_1_LBN 32 |
Dword 1 low bit number.
Definition at line 57 of file etherfabric.h.
#define EFAB_DWORD_1_WIDTH 32 |
Dword 1 width.
Definition at line 59 of file etherfabric.h.
#define EFAB_DWORD_2_LBN 64 |
Dword 2 low bit number.
Definition at line 61 of file etherfabric.h.
#define EFAB_DWORD_2_WIDTH 32 |
Dword 2 width.
Definition at line 63 of file etherfabric.h.
#define EFAB_DWORD_3_LBN 96 |
Dword 3 low bit number.
Definition at line 65 of file etherfabric.h.
#define EFAB_DWORD_3_WIDTH 32 |
Dword 3 width.
Definition at line 67 of file etherfabric.h.
#define EFAB_VAL | ( | field, | |
attribute | |||
) | field ## _ ## attribute |
#define EFAB_LOW_BIT | ( | field | ) | EFAB_VAL ( field, LBN ) |
Low bit number of the specified field.
Definition at line 72 of file etherfabric.h.
#define EFAB_WIDTH | ( | field | ) | EFAB_VAL ( field, WIDTH ) |
Bit width of the specified field.
Definition at line 74 of file etherfabric.h.
#define EFAB_HIGH_BIT | ( | field | ) | ( EFAB_LOW_BIT(field) + EFAB_WIDTH(field) - 1 ) |
High bit number of the specified field.
Definition at line 76 of file etherfabric.h.
#define EFAB_MASK64 | ( | field | ) |
Mask equal in width to the specified field.
For example, a field with width 5 would have a mask of 0x1f.
The maximum width mask that can be generated is 64 bits.
Definition at line 83 of file etherfabric.h.
#define EFAB_MASK32 | ( | field | ) |
Mask equal in width to the specified field.
For example, a field with width 5 would have a mask of 0x1f.
The maximum width mask that can be generated is 32 bits. Use EFAB_MASK64 for higher width fields.
Definition at line 94 of file etherfabric.h.
#define EFAB_DWORD_FMT "%08x" |
Format string for printing an efab_dword_t.
Definition at line 130 of file etherfabric.h.
#define EFAB_QWORD_FMT "%08x:%08x" |
Format string for printing an efab_qword_t.
Definition at line 133 of file etherfabric.h.
#define EFAB_OWORD_FMT "%08x:%08x:%08x:%08x" |
Format string for printing an efab_oword_t.
Definition at line 136 of file etherfabric.h.
#define EFAB_DWORD_VAL | ( | dword | ) | ( ( unsigned int ) le32_to_cpu ( (dword).u32[0] ) ) |
printk parameters for printing an efab_dword_t
Definition at line 139 of file etherfabric.h.
#define EFAB_QWORD_VAL | ( | qword | ) |
printk parameters for printing an efab_qword_t
Definition at line 143 of file etherfabric.h.
#define EFAB_OWORD_VAL | ( | oword | ) |
printk parameters for printing an efab_oword_t
Definition at line 148 of file etherfabric.h.
Extract bit field portion [low,high) from the native-endian element which contains bits [min,max).
For example, suppose "element" represents the high 32 bits of a 64-bit value, and we wish to extract the bits belonging to the bit field occupying bits 28-45 of this 64-bit value.
Then EFAB_EXTRACT ( element, 32, 63, 28, 45 ) would give
( element ) << 4
The result will contain the relevant bits filled in in the range [0,high-low), with garbage in bits [high-low+1,...).
Definition at line 169 of file etherfabric.h.
#define EFAB_EXTRACT64 | ( | element, | |
min, | |||
max, | |||
low, | |||
high | |||
) | EFAB_EXTRACT_NATIVE ( le64_to_cpu(element), min, max, low, high ) |
Extract bit field portion [low,high) from the 64-bit little-endian element which contains bits [min,max)
Definition at line 179 of file etherfabric.h.
#define EFAB_EXTRACT32 | ( | element, | |
min, | |||
max, | |||
low, | |||
high | |||
) | EFAB_EXTRACT_NATIVE ( le32_to_cpu(element), min, max, low, high ) |
Extract bit field portion [low,high) from the 32-bit little-endian element which contains bits [min,max)
Definition at line 186 of file etherfabric.h.
Definition at line 189 of file etherfabric.h.
#define EFAB_EXTRACT_QWORD64 | ( | qword, | |
low, | |||
high | |||
) | ( EFAB_EXTRACT64 ( (qword).u64[0], 0, 63, low, high ) ) |
Definition at line 193 of file etherfabric.h.
Definition at line 196 of file etherfabric.h.
Definition at line 202 of file etherfabric.h.
#define EFAB_EXTRACT_DWORD | ( | dword, | |
low, | |||
high | |||
) | ( EFAB_EXTRACT32 ( (dword).u32[0], 0, 31, low, high ) ) |
Definition at line 206 of file etherfabric.h.
#define EFAB_OWORD_FIELD64 | ( | oword, | |
field | |||
) |
Definition at line 209 of file etherfabric.h.
#define EFAB_QWORD_FIELD64 | ( | qword, | |
field | |||
) |
Definition at line 214 of file etherfabric.h.
#define EFAB_OWORD_FIELD32 | ( | oword, | |
field | |||
) |
Definition at line 219 of file etherfabric.h.
#define EFAB_QWORD_FIELD32 | ( | qword, | |
field | |||
) |
Definition at line 224 of file etherfabric.h.
#define EFAB_DWORD_FIELD | ( | dword, | |
field | |||
) |
Definition at line 229 of file etherfabric.h.
Definition at line 234 of file etherfabric.h.
#define EFAB_QWORD_IS_ZERO64 | ( | qword | ) | ( ! ( (qword).u64[0] ) ) |
Definition at line 237 of file etherfabric.h.
#define EFAB_OWORD_IS_ZERO32 | ( | oword | ) |
Definition at line 240 of file etherfabric.h.
Definition at line 244 of file etherfabric.h.
Definition at line 247 of file etherfabric.h.
#define EFAB_OWORD_IS_ALL_ONES64 | ( | oword | ) | ( ( (oword).u64[0] & (oword).u64[1] ) == ~( ( uint64_t ) 0 ) ) |
Definition at line 250 of file etherfabric.h.
Definition at line 253 of file etherfabric.h.
#define EFAB_OWORD_IS_ALL_ONES32 | ( | oword | ) |
Definition at line 256 of file etherfabric.h.
#define EFAB_QWORD_IS_ALL_ONES32 | ( | qword | ) | ( ( (qword).u32[0] & (qword).u32[1] ) == ~( ( uint32_t ) 0 ) ) |
Definition at line 260 of file etherfabric.h.
Definition at line 263 of file etherfabric.h.
#define EFAB_OWORD_FIELD EFAB_OWORD_FIELD32 |
Definition at line 274 of file etherfabric.h.
#define EFAB_QWORD_FIELD EFAB_QWORD_FIELD32 |
Definition at line 275 of file etherfabric.h.
#define EFAB_OWORD_IS_ZERO EFAB_OWORD_IS_ZERO32 |
Definition at line 276 of file etherfabric.h.
#define EFAB_QWORD_IS_ZERO EFAB_QWORD_IS_ZERO32 |
Definition at line 277 of file etherfabric.h.
#define EFAB_OWORD_IS_ALL_ONES EFAB_OWORD_IS_ALL_ONES32 |
Definition at line 278 of file etherfabric.h.
#define EFAB_QWORD_IS_ALL_ONES EFAB_QWORD_IS_ALL_ONES32 |
Definition at line 279 of file etherfabric.h.
Construct bit field portion.
Creates the portion of the bit field [low,high) that lies within the range [min,max).
Definition at line 288 of file etherfabric.h.
Definition at line 294 of file etherfabric.h.
Definition at line 300 of file etherfabric.h.
Construct bit field portion.
Creates the portion of the named bit field that lies within the range [min,max).
Definition at line 312 of file etherfabric.h.
#define EFAB_INSERT_FIELDS_NATIVE | ( | min, | |
max, | |||
field1, | |||
value1, | |||
field2, | |||
value2, | |||
field3, | |||
value3, | |||
field4, | |||
value4, | |||
field5, | |||
value5, | |||
field6, | |||
value6, | |||
field7, | |||
value7, | |||
field8, | |||
value8, | |||
field9, | |||
value9, | |||
field10, | |||
value10 | |||
) |
Construct bit field.
Creates the portion of the named bit fields that lie within the range [min,max).
Definition at line 322 of file etherfabric.h.
#define EFAB_INSERT_FIELDS64 | ( | ... | ) | cpu_to_le64 ( EFAB_INSERT_FIELDS_NATIVE ( __VA_ARGS__ ) ) |
Definition at line 344 of file etherfabric.h.
#define EFAB_INSERT_FIELDS32 | ( | ... | ) | cpu_to_le32 ( EFAB_INSERT_FIELDS_NATIVE ( __VA_ARGS__ ) ) |
Definition at line 347 of file etherfabric.h.
#define EFAB_POPULATE_OWORD64 | ( | oword, | |
... | |||
) |
Definition at line 350 of file etherfabric.h.
#define EFAB_POPULATE_QWORD64 | ( | qword, | |
... | |||
) |
Definition at line 355 of file etherfabric.h.
#define EFAB_POPULATE_OWORD32 | ( | oword, | |
... | |||
) |
Definition at line 359 of file etherfabric.h.
#define EFAB_POPULATE_QWORD32 | ( | qword, | |
... | |||
) |
Definition at line 366 of file etherfabric.h.
#define EFAB_POPULATE_DWORD | ( | dword, | |
... | |||
) |
Definition at line 371 of file etherfabric.h.
#define EFAB_POPULATE_OWORD EFAB_POPULATE_OWORD32 |
Definition at line 379 of file etherfabric.h.
#define EFAB_POPULATE_QWORD EFAB_POPULATE_QWORD32 |
Definition at line 380 of file etherfabric.h.
#define EFAB_POPULATE_OWORD_10 EFAB_POPULATE_OWORD |
Definition at line 384 of file etherfabric.h.
#define EFAB_POPULATE_OWORD_9 | ( | oword, | |
... | |||
) | EFAB_POPULATE_OWORD_10 ( oword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
Definition at line 385 of file etherfabric.h.
#define EFAB_POPULATE_OWORD_8 | ( | oword, | |
... | |||
) | EFAB_POPULATE_OWORD_9 ( oword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
Definition at line 387 of file etherfabric.h.
#define EFAB_POPULATE_OWORD_7 | ( | oword, | |
... | |||
) | EFAB_POPULATE_OWORD_8 ( oword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
Definition at line 389 of file etherfabric.h.
#define EFAB_POPULATE_OWORD_6 | ( | oword, | |
... | |||
) | EFAB_POPULATE_OWORD_7 ( oword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
Definition at line 391 of file etherfabric.h.
#define EFAB_POPULATE_OWORD_5 | ( | oword, | |
... | |||
) | EFAB_POPULATE_OWORD_6 ( oword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
Definition at line 393 of file etherfabric.h.
#define EFAB_POPULATE_OWORD_4 | ( | oword, | |
... | |||
) | EFAB_POPULATE_OWORD_5 ( oword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
Definition at line 395 of file etherfabric.h.
#define EFAB_POPULATE_OWORD_3 | ( | oword, | |
... | |||
) | EFAB_POPULATE_OWORD_4 ( oword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
Definition at line 397 of file etherfabric.h.
#define EFAB_POPULATE_OWORD_2 | ( | oword, | |
... | |||
) | EFAB_POPULATE_OWORD_3 ( oword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
Definition at line 399 of file etherfabric.h.
#define EFAB_POPULATE_OWORD_1 | ( | oword, | |
... | |||
) | EFAB_POPULATE_OWORD_2 ( oword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
Definition at line 401 of file etherfabric.h.
#define EFAB_ZERO_OWORD | ( | oword | ) | EFAB_POPULATE_OWORD_1 ( oword, EFAB_DUMMY_FIELD, 0 ) |
Definition at line 403 of file etherfabric.h.
#define EFAB_SET_OWORD | ( | oword | ) |
Definition at line 405 of file etherfabric.h.
#define EFAB_POPULATE_QWORD_10 EFAB_POPULATE_QWORD |
Definition at line 413 of file etherfabric.h.
#define EFAB_POPULATE_QWORD_9 | ( | qword, | |
... | |||
) | EFAB_POPULATE_QWORD_10 ( qword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
Definition at line 414 of file etherfabric.h.
#define EFAB_POPULATE_QWORD_8 | ( | qword, | |
... | |||
) | EFAB_POPULATE_QWORD_9 ( qword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
Definition at line 416 of file etherfabric.h.
#define EFAB_POPULATE_QWORD_7 | ( | qword, | |
... | |||
) | EFAB_POPULATE_QWORD_8 ( qword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
Definition at line 418 of file etherfabric.h.
#define EFAB_POPULATE_QWORD_6 | ( | qword, | |
... | |||
) | EFAB_POPULATE_QWORD_7 ( qword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
Definition at line 420 of file etherfabric.h.
#define EFAB_POPULATE_QWORD_5 | ( | qword, | |
... | |||
) | EFAB_POPULATE_QWORD_6 ( qword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
Definition at line 422 of file etherfabric.h.
#define EFAB_POPULATE_QWORD_4 | ( | qword, | |
... | |||
) | EFAB_POPULATE_QWORD_5 ( qword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
Definition at line 424 of file etherfabric.h.
#define EFAB_POPULATE_QWORD_3 | ( | qword, | |
... | |||
) | EFAB_POPULATE_QWORD_4 ( qword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
Definition at line 426 of file etherfabric.h.
#define EFAB_POPULATE_QWORD_2 | ( | qword, | |
... | |||
) | EFAB_POPULATE_QWORD_3 ( qword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
Definition at line 428 of file etherfabric.h.
#define EFAB_POPULATE_QWORD_1 | ( | qword, | |
... | |||
) | EFAB_POPULATE_QWORD_2 ( qword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
Definition at line 430 of file etherfabric.h.
#define EFAB_ZERO_QWORD | ( | qword | ) | EFAB_POPULATE_QWORD_1 ( qword, EFAB_DUMMY_FIELD, 0 ) |
Definition at line 432 of file etherfabric.h.
#define EFAB_SET_QWORD | ( | qword | ) |
Definition at line 434 of file etherfabric.h.
#define EFAB_POPULATE_DWORD_10 EFAB_POPULATE_DWORD |
Definition at line 440 of file etherfabric.h.
#define EFAB_POPULATE_DWORD_9 | ( | dword, | |
... | |||
) | EFAB_POPULATE_DWORD_10 ( dword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
Definition at line 441 of file etherfabric.h.
#define EFAB_POPULATE_DWORD_8 | ( | dword, | |
... | |||
) | EFAB_POPULATE_DWORD_9 ( dword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
Definition at line 443 of file etherfabric.h.
#define EFAB_POPULATE_DWORD_7 | ( | dword, | |
... | |||
) | EFAB_POPULATE_DWORD_8 ( dword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
Definition at line 445 of file etherfabric.h.
#define EFAB_POPULATE_DWORD_6 | ( | dword, | |
... | |||
) | EFAB_POPULATE_DWORD_7 ( dword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
Definition at line 447 of file etherfabric.h.
#define EFAB_POPULATE_DWORD_5 | ( | dword, | |
... | |||
) | EFAB_POPULATE_DWORD_6 ( dword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
Definition at line 449 of file etherfabric.h.
#define EFAB_POPULATE_DWORD_4 | ( | dword, | |
... | |||
) | EFAB_POPULATE_DWORD_5 ( dword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
Definition at line 451 of file etherfabric.h.
#define EFAB_POPULATE_DWORD_3 | ( | dword, | |
... | |||
) | EFAB_POPULATE_DWORD_4 ( dword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
Definition at line 453 of file etherfabric.h.
#define EFAB_POPULATE_DWORD_2 | ( | dword, | |
... | |||
) | EFAB_POPULATE_DWORD_3 ( dword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
Definition at line 455 of file etherfabric.h.
#define EFAB_POPULATE_DWORD_1 | ( | dword, | |
... | |||
) | EFAB_POPULATE_DWORD_2 ( dword, EFAB_DUMMY_FIELD, 0, __VA_ARGS__ ) |
Definition at line 457 of file etherfabric.h.
#define EFAB_ZERO_DWORD | ( | dword | ) | EFAB_POPULATE_DWORD_1 ( dword, EFAB_DUMMY_FIELD, 0 ) |
Definition at line 459 of file etherfabric.h.
#define EFAB_SET_DWORD | ( | dword | ) | EFAB_POPULATE_DWORD_1 ( dword, EFAB_DWORD_0, 0xffffffff ) |
Definition at line 461 of file etherfabric.h.
#define EFAB_INSERT_FIELD64 | ( | ... | ) | cpu_to_le64 ( EFAB_INSERT_FIELD_NATIVE ( __VA_ARGS__ ) ) |
Definition at line 470 of file etherfabric.h.
#define EFAB_INSERT_FIELD32 | ( | ... | ) | cpu_to_le32 ( EFAB_INSERT_FIELD_NATIVE ( __VA_ARGS__ ) ) |
Definition at line 473 of file etherfabric.h.
#define EFAB_INPLACE_MASK64 | ( | min, | |
max, | |||
field | |||
) | EFAB_INSERT_FIELD64 ( min, max, field, EFAB_MASK64 ( field ) ) |
Definition at line 476 of file etherfabric.h.
#define EFAB_INPLACE_MASK32 | ( | min, | |
max, | |||
field | |||
) | EFAB_INSERT_FIELD32 ( min, max, field, EFAB_MASK32 ( field ) ) |
Definition at line 479 of file etherfabric.h.
#define EFAB_SET_OWORD_FIELD64 | ( | oword, | |
field, | |||
value | |||
) |
Definition at line 482 of file etherfabric.h.
#define EFAB_SET_QWORD_FIELD64 | ( | qword, | |
field, | |||
value | |||
) |
Definition at line 491 of file etherfabric.h.
#define EFAB_SET_OWORD_FIELD32 | ( | oword, | |
field, | |||
value | |||
) |
Definition at line 497 of file etherfabric.h.
#define EFAB_SET_QWORD_FIELD32 | ( | qword, | |
field, | |||
value | |||
) |
Definition at line 512 of file etherfabric.h.
Definition at line 521 of file etherfabric.h.
#define EFAB_SET_OWORD_FIELD EFAB_SET_OWORD_FIELD32 |
Definition at line 531 of file etherfabric.h.
#define EFAB_SET_QWORD_FIELD EFAB_SET_QWORD_FIELD32 |
Definition at line 532 of file etherfabric.h.
#define DMA_ADDR_T_WIDTH ( 8 * sizeof ( dma_addr_t ) ) |
Definition at line 538 of file etherfabric.h.
#define EFAB_DMA_TYPE_WIDTH | ( | width | ) | ( ( (width) < DMA_ADDR_T_WIDTH ) ? (width) : DMA_ADDR_T_WIDTH ) |
Definition at line 539 of file etherfabric.h.
#define EFAB_DMA_MAX_MASK |
Definition at line 541 of file etherfabric.h.
#define EFAB_DMA_MASK | ( | mask | ) | ( (mask) & EFAB_DMA_MAX_MASK ) |
Definition at line 543 of file etherfabric.h.
typedef union efab_dword efab_dword_t |
A doubleword (i.e.
4 byte) datatype
This datatype is defined to be little-endian.
typedef union efab_qword efab_qword_t |
A quadword (i.e.
8 byte) datatype
This datatype is defined to be little-endian.
typedef union efab_oword efab_oword_t |
An octword (eight-word, i.e.
16 byte) datatype
This datatype is defined to be little-endian.
FILE_LICENCE | ( | GPL_ANY | ) |