/* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright 2008-2010 Cisco Systems, Inc. All rights reserved. * Copyright 2007 Nuova Systems, Inc. All rights reserved.
*/
/* * mcpu fw info in mem: * in: * (u64)a0=paddr to struct vnic_devcmd_fw_info * action: * Fills in struct vnic_devcmd_fw_info (128 bytes) * note: * An old definition of CMD_MCPU_FW_INFO
*/
CMD_MCPU_FW_INFO_OLD = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ALL, 1),
/* * mcpu fw info in mem: * in: * (u64)a0=paddr to struct vnic_devcmd_fw_info * (u16)a1=size of the structure * out: * (u16)a1=0 for in:a1 = 0, * data size actually written for other values. * action: * Fills in first 128 bytes of vnic_devcmd_fw_info for in:a1 = 0, * first in:a1 bytes for 0 < in:a1 <= 132, * 132 bytes for other values of in:a1. * note: * CMD_MCPU_FW_INFO and CMD_MCPU_FW_INFO_OLD have the same enum 1 * for source compatibility.
*/
CMD_MCPU_FW_INFO = _CMDC(_CMD_DIR_RW, _CMD_VTYPE_ALL, 1),
/* initiate open sequence (u32)a0=flags (see CMD_OPENF_*) */
CMD_OPEN = _CMDCNW(_CMD_DIR_WRITE, _CMD_VTYPE_ALL, 23),
/* open status:
* out: a0=0 open complete, a0=1 open in progress */
CMD_OPEN_STATUS = _CMDC(_CMD_DIR_READ, _CMD_VTYPE_ALL, 24),
/* close vnic */
CMD_CLOSE = _CMDC(_CMD_DIR_NONE, _CMD_VTYPE_ALL, 25),
/* initialize virtual link: (u32)a0=flags (see CMD_INITF_*) */ /***** Replaced by CMD_INIT *****/
CMD_INIT_v1 = _CMDCNW(_CMD_DIR_READ, _CMD_VTYPE_ALL, 26),
/* variant of CMD_INIT, with provisioning info * (u64)a0=paddr of vnic_devcmd_provinfo
* (u32)a1=sizeof provision info */
CMD_INIT_PROV_INFO = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 27),
/* enable virtual link */
CMD_ENABLE = _CMDCNW(_CMD_DIR_WRITE, _CMD_VTYPE_ALL, 28),
/* disable virtual link */
CMD_DISABLE = _CMDC(_CMD_DIR_NONE, _CMD_VTYPE_ALL, 29),
/* stats dump sum of all vnic stats on same uplink in mem: * (u64)a0=paddr
* (u16)a1=sizeof stats area */
CMD_STATS_DUMP_ALL = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ALL, 30),
/* * in: (u16)a0=bdf of target vnic * (u32)a1=cmd to proxy * a2-a15=args to cmd in a1 * out: (u32)a0=status of proxied cmd
* a1-a15=out args of proxied cmd */
CMD_PROXY_BY_BDF = _CMDC(_CMD_DIR_RW, _CMD_VTYPE_ALL, 42),
/* * As for BY_BDF except a0 is index of hvnlink subordinate vnic * or SR-IOV virtual vnic
*/
CMD_PROXY_BY_INDEX = _CMDC(_CMD_DIR_RW, _CMD_VTYPE_ALL, 43),
/* * For HPP toggle: * adapter-info-get * in: (u64)a0=phsical address of buffer passed in from caller. * (u16)a1=size of buffer specified in a0. * out: (u64)a0=phsical address of buffer passed in from caller. * (u16)a1=actual bytes from VIF-CONFIG-INFO TLV, or
* 0 if no VIF-CONFIG-INFO TLV was ever received. */
CMD_CONFIG_INFO_GET = _CMDC(_CMD_DIR_RW, _CMD_VTYPE_ALL, 44),
/* Set default vlan: * in: (u16)a0=new default vlan * (u16)a1=zero for overriding vlan with param a0, * non-zero for resetting vlan to the default * out: (u16)a0=old default vlan
*/
CMD_SET_DEFAULT_VLAN = _CMDC(_CMD_DIR_RW, _CMD_VTYPE_ALL, 46),
/* init_prov_info2: * Variant of CMD_INIT_PROV_INFO, where it will not try to enable * the vnic until CMD_ENABLE2 is issued. * (u64)a0=paddr of vnic_devcmd_provinfo * (u32)a1=sizeof provision info
*/
CMD_INIT_PROV_INFO2 = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 47),
/* * cmd_status: * Returns the status of the specified command * Input: * a0 = command for which status is being queried. * Possible values are: * CMD_SOFT_RESET * CMD_HANG_RESET * CMD_OPEN * CMD_INIT * CMD_INIT_PROV_INFO * CMD_DEINIT * CMD_INIT_PROV_INFO2 * CMD_ENABLE2 * Output: * if status == STAT_ERROR * a0 = ERR_ENOTSUPPORTED - status for command in a0 is * not supported * if status == STAT_NONE * a0 = status of the devcmd specified in a0 as follows. * ERR_SUCCESS - command in a0 completed successfully * ERR_EINPROGRESS - command in a0 is still in progress
*/
CMD_STATUS = _CMDC(_CMD_DIR_RW, _CMD_VTYPE_ALL, 49),
/* * Returns interrupt coalescing timer conversion factors. * After calling this devcmd, ENIC driver can convert * interrupt coalescing timer in usec into CPU cycles as follows: * * intr_timer_cycles = intr_timer_usec * multiplier / divisor * * Interrupt coalescing timer in usecs can be obtained from * CPU cycles as follows: * * intr_timer_usec = intr_timer_cycles * divisor / multiplier * * in: none * out: (u32)a0 = multiplier * (u32)a1 = divisor * (u32)a2 = maximum timer value in usec
*/
CMD_INTR_COAL_CONVERT = _CMDC(_CMD_DIR_READ, _CMD_VTYPE_ALL, 50),
/* * Set the predefined mac address as default * in: * (u48)a0 = mac addr
*/
CMD_SET_MAC_ADDR = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 55),
/* Update the provisioning info of the given VIF * (u64)a0=paddr of vnic_devcmd_provinfo * (u32)a1=sizeof provision info
*/
CMD_PROV_INFO_UPDATE = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 56),
/* Initialization for the devcmd2 interface. * in: (u64) a0 = host result buffer physical address * in: (u16) a1 = number of entries in result buffer
*/
CMD_INITIALIZE_DEVCMD2 = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ALL, 57),
/* Enable a Queue Pair in User space NIC * in: (u32) a0=Queue Pair number * (u32) a1= command
*/
CMD_QP_ENABLE = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 60),
/* Disable a Queue Pair in User space NIC * in: (u32) a0=Queue Pair number * (u32) a1= command
*/
CMD_QP_DISABLE = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 61),
/* Stats dump Queue Pair in User space NIC * in: (u32) a0=Queue Pair number * (u64) a1=host buffer addr for status dump * (u32) a2=length of the buffer
*/
CMD_QP_STATS_DUMP = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 62),
/* Clear stats for Queue Pair in User space NIC * in: (u32) a0=Queue Pair number
*/
CMD_QP_STATS_CLEAR = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 63),
/* Use this devcmd for agreeing on the highest common version supported * by both driver and fw for features who need such a facility. * in: (u64) a0 = feature (driver requests for the supported versions * on this feature) * out: (u64) a0 = bitmap of all supported versions for that feature
*/
CMD_GET_SUPP_FEATURE_VER = _CMDC(_CMD_DIR_RW, _CMD_VTYPE_ENET, 69),
/* Control (Enable/Disable) overlay offloads on the given vnic * in: (u8) a0 = OVERLAY_FEATURE_NVGRE : NVGRE * a0 = OVERLAY_FEATURE_VXLAN : VxLAN * in: (u8) a1 = OVERLAY_OFFLOAD_ENABLE : Enable or * a1 = OVERLAY_OFFLOAD_DISABLE : Disable or * a1 = OVERLAY_OFFLOAD_ENABLE_V2 : Enable with version 2
*/
CMD_OVERLAY_OFFLOAD_CTRL = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 72),
/* Configuration of overlay offloads feature on a given vNIC * in: (u8) a0 = DEVCMD_OVERLAY_NVGRE : NVGRE * a0 = DEVCMD_OVERLAY_VXLAN : VxLAN * in: (u8) a1 = VXLAN_PORT_UPDATE : VxLAN * in: (u16) a2 = unsigned short int port information
*/
CMD_OVERLAY_OFFLOAD_CFG = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 73),
/* * Set extended CQ field in MREGS of RQ (or all RQs) * for given vNIC * in: (u64) a0 = RQ selection (VNIC_RQ_ALL for all RQs) * (u32) a1 = CQ entry size * VNIC_RQ_CQ_ENTRY_SIZE_16 --> 16 bytes * VNIC_RQ_CQ_ENTRY_SIZE_32 --> 32 bytes * VNIC_RQ_CQ_ENTRY_SIZE_64 --> 64 bytes * * Capability query: * out: (u32) a0 = errno, 0:valid cmd * (u32) a1 = value consisting of supported entries * bit 0: 16 bytes * bit 1: 32 bytes * bit 2: 64 bytes
*/
CMD_CQ_ENTRY_SIZE_SET = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 90),
/* flags for CMD_OPEN */ #define CMD_OPENF_OPROM 0x1 /* open coming from option rom */ #define CMD_OPENF_IG_DESCCACHE 0x2 /* Do not flush IG DESC cache */
/* flags for CMD_INIT */ #define CMD_INITF_DEFAULT_MAC 0x1 /* init with default mac addr */
/* * note: hw_version and asic_rev refer to the same thing, * but have different formats. hw_version is * a 32-byte string (e.g. "A2") and asic_rev is * a 16-bit integer (e.g. 0xA2).
*/ struct vnic_devcmd_fw_info { char fw_version[32]; char fw_build[32]; char hw_version[32]; char hw_serial_number[32];
u16 asic_type;
u16 asic_rev;
};
struct vnic_devcmd_notify {
u32 csum; /* checksum over following words */
u32 link_state; /* link up == 1 */
u32 port_speed; /* effective port speed (rate limit) */
u32 mtu; /* MTU */
u32 msglvl; /* requested driver msg lvl */
u32 uif; /* uplink interface */
u32 status; /* status bits (see VNIC_STF_*) */
u32 error; /* error code (see ERR_*) for first ERR */
u32 link_down_cnt; /* running count of link down transitions */
u32 perbi_rebuild_cnt; /* running count of perbi rebuilds */
}; #define VNIC_STF_FATAL_ERR 0x0001 /* fatal fw error */ #define VNIC_STF_STD_PAUSE 0x0002 /* standard link-level pause on */ #define VNIC_STF_PFC_PAUSE 0x0004 /* priority flow control pause on */ /* all supported status flags */ #define VNIC_STF_ALL (VNIC_STF_FATAL_ERR |\
VNIC_STF_STD_PAUSE |\
VNIC_STF_PFC_PAUSE |\
0)
/* * Writing cmd register causes STAT_BUSY to get set in status register. * When cmd completes, STAT_BUSY will be cleared. * * If cmd completed successfully STAT_ERROR will be clear * and args registers contain cmd-specific results. * * If cmd error, STAT_ERROR will be set and args[0] contains error code. * * status register is read-only. While STAT_BUSY is set, * all other register contents are read-only.
*/
/* Make sizeof(vnic_devcmd) a power-of-2 for I/O BAR. */ #define VNIC_DEVCMD_NARGS 15 struct vnic_devcmd {
u32 status; /* RO */
u32 cmd; /* RW */
u64 args[VNIC_DEVCMD_NARGS]; /* RW cmd args (little-endian) */
};
#define DEVCMD2_FNORESULT 0x1 /* Don't copy result to host */
/* Use this enum to get the supported versions for each of these features * If you need to use the devcmd_get_supported_feature_version(), add * the new feature into this enum and install function handler in devcmd.c
*/ enum vic_feature_t {
VIC_FEATURE_VXLAN,
VIC_FEATURE_RDMA,
VIC_FEATURE_VXLAN_PATCH,
VIC_FEATURE_MAX,
};
#endif/* _VNIC_DEVCMD_H_ */
Messung V0.5
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.