Linux Kernel
3.7.1
|
Go to the source code of this file.
Data Structures | |
struct | t4vf_port_stats |
struct | link_config |
struct | dev_params |
struct | sge_params |
struct | vpd_params |
struct | rss_params |
union | rss_vi_config |
struct | vf_resources |
struct | adapter_params |
Macros | |
#define | FW_LEN16(fw_struct) FW_CMD_LEN16(sizeof(fw_struct) / 16) |
#define | PCI_VENDOR_ID_CHELSIO 0x1425 |
#define | for_each_port(adapter, iter) for (iter = 0; iter < (adapter)->params.nports; iter++) |
Enumerations | |
enum | { PAUSE_RX = 1 << 0, PAUSE_TX = 1 << 1, PAUSE_AUTONEG = 1 << 2 } |
Definition at line 196 of file t4vf_common.h.
#define FW_LEN16 | ( | fw_struct | ) | FW_CMD_LEN16(sizeof(fw_struct) / 16) |
Definition at line 44 of file t4vf_common.h.
#define PCI_VENDOR_ID_CHELSIO 0x1425 |
Definition at line 193 of file t4vf_common.h.
anonymous enum |
Definition at line 90 of file t4vf_common.h.
int t4vf_alloc_mac_filt | ( | struct adapter * | adapter, |
unsigned int | viid, | ||
bool | free, | ||
unsigned int | naddr, | ||
const u8 ** | addr, | ||
u16 * | idx, | ||
u64 * | hash, | ||
bool | sleep_ok | ||
) |
t4vf_alloc_mac_filt - allocates exact-match filters for MAC addresses : the adapter : the Virtual Interface Identifier : if true any existing filters for this VI id are first removed : the number of MAC addresses to allocate filters for (up to 7) : the MAC address(es) : where to store the index of each allocated filter : pointer to hash address filter bitmap : call is allowed to sleep
Allocates an exact-match filter for each of the supplied addresses and sets it to the corresponding address. If is not NULL it should have at least entries, each of which will be set to the index of the filter allocated for the corresponding MAC address. If a filter could not be allocated for an address its index is set to 0xffff. If is not NULL addresses that fail to allocate an exact filter are hashed and update the hash filter bitmap pointed at by .
Returns a negative error number or the number of filters allocated.
int t4vf_change_mac | ( | struct adapter * | adapter, |
unsigned int | viid, | ||
int | idx, | ||
const u8 * | addr, | ||
bool | persist | ||
) |
t4vf_change_mac - modifies the exact-match filter for a MAC address : the adapter : the Virtual Interface ID : index of existing filter for old value of MAC address, or -1 : the new MAC address value : if idx < 0, the new MAC allocation should be persistent
Modifies an exact-match filter and sets it to the new MAC address. Note that in general it is not possible to modify the value of a given filter so the generic way to modify an address filter is to free the one being used by the old address value and allocate a new filter for the new address value. can be -1 if the address is a new addition.
Returns a negative error number or the index of the filter with the new MAC value.
int t4vf_config_rss_range | ( | struct adapter * | adapter, |
unsigned int | viid, | ||
int | start, | ||
int | n, | ||
const u16 * | rspq, | ||
int | nrspq | ||
) |
t4vf_config_rss_range - configure a portion of the RSS mapping table : the adapter : Virtual Interface of RSS Table Slice : starting entry in the table to write
: how many table entries to write : values for the "Response Queue" (Ingress Queue) lookup table : number of values in
Programs the selected part of the VI's RSS mapping table with the provided values. If <
the supplied values are used repeatedly until the full table range is populated.
The caller must ensure the values in are in the range 0..1023.
int t4vf_iq_free | ( | struct adapter * | adapter, |
unsigned int | iqtype, | ||
unsigned int | iqid, | ||
unsigned int | fl0id, | ||
unsigned int | fl1id | ||
) |
int t4vf_read_rss_vi_config | ( | struct adapter * | adapter, |
unsigned int | viid, | ||
union rss_vi_config * | config | ||
) |
int t4vf_set_addr_hash | ( | struct adapter * | adapter, |
unsigned int | viid, | ||
bool | ucast, | ||
u64 | vec, | ||
bool | sleep_ok | ||
) |
t4vf_set_addr_hash - program the MAC inexact-match hash filter : the adapter : the Virtual Interface Identifier : whether the hash filter should also match unicast addresses : the value to be written to the hash filter : call is allowed to sleep
Sets the 64-bit inexact-match hash filter for a virtual interface.
int t4vf_set_rxmode | ( | struct adapter * | adapter, |
unsigned int | viid, | ||
int | mtu, | ||
int | promisc, | ||
int | all_multi, | ||
int | bcast, | ||
int | vlanex, | ||
bool | sleep_ok | ||
) |
t4vf_set_rxmode - set Rx properties of a virtual interface : the adapter : the VI id : the new MTU or -1 for no change : 1 to enable promiscuous mode, 0 to disable it, -1 no change : 1 to enable all-multi mode, 0 to disable it, -1 no change : 1 to enable broadcast Rx, 0 to disable it, -1 no change : 1 to enable hardware VLAN Tag extraction, 0 to disable it, -1 no change
Sets Rx properties of a virtual interface.
int t4vf_wr_mbox_core | ( | struct adapter * | adapter, |
const void * | cmd, | ||
int | size, | ||
void * | rpl, | ||
bool | sleep_ok | ||
) |
t4vf_wr_mbox_core - send a command to FW through the mailbox : the adapter : the command to write : command length in bytes : where to optionally store the reply : if true we may sleep while awaiting command completion
Sends the given command to FW through the mailbox and waits for the FW to execute the command. If is not NULL it is used to store the FW's reply to the command. The command and its optional reply are of the same length. FW can take up to 500 ms to respond. determines whether we may sleep while awaiting the response. If sleeping is allowed we use progressive backoff otherwise we spin.
The return value is 0 on success or a negative errno on failure. A failure can happen either because we are not able to execute the command or FW executes it but signals an error. In the latter case the return value is the error code indicated by FW (negated).
int t4vf_write_rss_vi_config | ( | struct adapter * | adapter, |
unsigned int | viid, | ||
union rss_vi_config * | config | ||
) |