iPXE
Data Structures | Macros | Functions
ice.h File Reference

Intel 100 Gigabit Ethernet network card driver. More...

#include <ipxe/if_ether.h>
#include "intelxl.h"

Go to the source code of this file.

Data Structures

struct  ice_context_tx
 Transmit queue context. More...
 
struct  ice_schedule_tx
 Transmit scheduler configuration. More...
 
struct  ice_admin_version
 Admin queue version number. More...
 
struct  ice_admin_version_params
 Admin queue Get Version command parameters. More...
 
struct  ice_admin_mac_read_params
 Admin queue Manage MAC Address Read command parameters. More...
 
struct  ice_admin_mac_read_address
 MAC Address description. More...
 
struct  ice_admin_mac_read_buffer
 Admin queue Manage MAC Address Read data buffer. More...
 
struct  ice_admin_mac_write_params
 Admin queue Manage MAC Address Write command parameters. More...
 
struct  ice_admin_switch_params
 Admin queue Get Switch Configuration command parameters. More...
 
struct  ice_admin_switch_config
 Switching element configuration. More...
 
struct  ice_admin_switch_buffer
 Admin queue Get Switch Configuration data buffer. More...
 
struct  ice_admin_rules_params
 Admin queue Add Switch Rules command parameters. More...
 
struct  ice_admin_rules_buffer
 Admin queue Add Switch Rules data buffer. More...
 
struct  ice_admin_schedule_params
 Admin queue Query Default Scheduling Tree Topology command parameters. More...
 
struct  ice_admin_schedule_node
 Admin queue Query Default Scheduling Tree Topology node. More...
 
struct  ice_admin_schedule_branch
 Admin queue Query Default Scheduling Tree Topology branch. More...
 
union  ice_admin_schedule_buffer
 Admin queue Query Default Scheduling Tree Topology data buffer. More...
 
struct  ice_admin_autoneg_params
 Admin queue Restart Autonegotiation command parameters. More...
 
struct  ice_admin_link_params
 Admin queue Get Link Status command parameters. More...
 
struct  ice_admin_link_buffer
 Admin queue Get Link Status data buffer. More...
 
struct  ice_admin_add_txq_params
 Admin queue Add Transmit Queues command parameters. More...
 
struct  ice_admin_add_txq_buffer
 Admin queue Add Transmit Queues data buffer. More...
 
struct  ice_admin_disable_txq_params
 Admin queue Disable Transmit Queues command parameters. More...
 
struct  ice_admin_disable_txq_buffer
 Admin queue Disable Transmit Queues data buffer. More...
 
union  ice_admin_params
 Admin queue command parameters. More...
 
union  ice_admin_buffer
 Admin queue data buffer. More...
 
struct  ice_admin_descriptor
 Admin queue descriptor. More...
 

Macros

#define ICE_BAR_SIZE   0x800000
 BAR size. More...
 
#define ICE_QRX_CTRL   0x120000
 Global Receive Queue Control Register. More...
 
#define ICE_QRX_CONTEXT(x)   ( 0x280000 + ( 0x2000 * (x) ) )
 Receive Queue Context Registers. More...
 
#define ICE_QRX_TAIL   0x290000
 Receive Queue Tail Register. More...
 
#define ICE_QTX_COMM_DBELL   0x2c0000
 Transmit Comm Scheduler Queue Doorbell Register. More...
 
#define ICE_GLCOMM_QTX_CNTX_DATA(x)   ( 0x2d2d40 + ( 0x4 * (x) ) )
 Transmit Comm Scheduler Queue Context Data Registers. More...
 
#define ICE_GLCOMM_QTX_CNTX_CTL   0x2d2dc8
 Transmit Comm Scheduler Queue Context Control Register. More...
 
#define ICE_GLCOMM_QTX_CNTX_CTL_CMD(x)   ( (x) << 16 )
 Command. More...
 
#define ICE_GLCOMM_QTX_CNTX_CTL_CMD_READ   ICE_GLCOMM_QTX_CNTX_CTL_CMD ( 0 )
 Read context. More...
 
#define ICE_GLCOMM_QTX_CNTX_CTL_EXEC   0x00080000UL
 Execute. More...
 
#define ICE_GLCOMM_QTX_CNTX_STAT   0x2d2dcc
 Transmit Comm Scheduler Queue Context Status Register. More...
 
#define ICE_GLCOMM_QTX_CNTX_BUSY   0x00000001UL
 In progress. More...
 
#define ICE_QRX_FLXP_CNTXT   0x480000
 Queue Context Flex Extension Register. More...
 
#define ICE_QRX_FLXP_CNTXT_RXDID_IDX(x)   ( (x) << 0 )
 RX profile. More...
 
#define ICE_QRX_FLXP_CNTXT_RXDID_IDX_LEGACY_32   ICE_QRX_FLXP_CNTXT_RXDID_IDX ( 1 )
 32-byte legacy More...
 
#define ICE_QRX_FLXP_CNTXT_RXDID_PRIO(x)   ( (x) << 8 )
 Priority. More...
 
#define ICE_QRX_FLXP_CNTXT_RXDID_PRIO_MAX   ICE_QRX_FLXP_CNTXT_RXDID_PRIO ( 7 )
 Maximum priority. More...
 
#define ICE_ADMIN_MAC_READ_TYPE_LAN   0
 LAN MAC address type. More...
 
#define ICE_ADMIN_SWITCH_TYPE_MASK   0xc000
 Switching element ID type mask. More...
 
#define ICE_ADMIN_SWITCH_TYPE_VSI   0x8000
 Virtual Station Interface element type. More...
 
#define ICE_ADMIN_ADD_RULES   0x02a0
 Admin queue Add Switch Rules command. More...
 
#define ICE_ADMIN_RULES_RECIPE_PROMISC   0x0003
 Switch rule promiscuous recipe ID. More...
 
#define ICE_ADMIN_RULES_ACTION_VALID   0x00020000UL
 Switch rule action valid. More...
 
#define ICE_ADMIN_RULES_ACTION_VSI(x)   ( (x) << 4 )
 Switch rule VSI number. More...
 
#define ICE_ADMIN_SCHEDULE   0x0400
 Admin queue Query Default Scheduling Tree Topology command. More...
 
#define ICE_SCHEDULE_GENERIC   0x01
 Transmit scheduler configuration generic section is valid. More...
 
#define ICE_SCHEDULE_COMMIT   0x02
 Transmit scheduler configuration committed bandwidth section is valid. More...
 
#define ICE_SCHEDULE_EXCESS   0x04
 Transmit scheduler configuration excess bandwidth section is valid. More...
 
#define ICE_SCHEDULE_WEIGHT   0x0004
 Transmit scheduler configuration default weight. More...
 
#define ICE_ADMIN_ADD_TXQ   0x0c30
 Admin queue Add Transmit Queues command. More...
 
#define ICE_TXQ_BASE_PORT(addr, port)   ( ( (addr) >> 7 ) | ( ( ( uint64_t ) (port) ) << 57 ) )
 Transmit queue base address and port number. More...
 
#define ICE_TXQ_PF_TYPE(pf)   ( ( (pf) << 1 ) | ( 0x2 << 14 ) )
 Transmit queue PF number. More...
 
#define ICE_TXQ_LEN(count)   ( (count) >> 1 )
 Transmit queue length. More...
 
#define ICE_TXQ_FL_TSO   0x0001
 Transmit queue uses TSO. More...
 
#define ICE_TXQ_FL_LEGACY   0x1000
 Transmit queue uses legacy mode. More...
 
#define ICE_ADMIN_DISABLE_TXQ   0x0c31
 Admin queue Disable Transmit Queues command. More...
 
#define ICE_TXQ_FL_FLUSH   0x08
 Disable queue and flush pipe. More...
 
#define ICE_TXQ_TIMEOUT   0xc8
 Disable queue timeout. More...
 
#define ICE_PFFUNC_RID   0x09e880
 Function Requester ID Information Register. More...
 
#define ICE_PFFUNC_RID_FUNC_NUM(x)   ( ( (x) >> 0 ) & 0x7 )
 Function number. More...
 
#define ICE_PFGEN_PORTNUM   0x1d2400
 PF LAN Port Number Register. More...
 
#define ICE_PFGEN_PORTNUM_PORT_NUM(x)   ( ( (x) >> 0 ) & 0x7 )
 Port number. More...
 
#define ICE_QINT_TQCTL   0x140000
 Transmit Queue Interrupt Cause Control Register. More...
 
#define ICE_QINT_TQCTL_ITR_INDX(x)   ( (x) << 11 )
 Throttling. More...
 
#define ICE_QINT_TQCTL_ITR_INDX_NONE   ICE_QINT_TQCTL_ITR_INDX ( 0x3 )
 No throttling. More...
 
#define ICE_QINT_TQCTL_CAUSE_ENA   0x40000000UL
 Enable. More...
 
#define ICE_QINT_RQCTL   0x150000
 Receive Queue Interrupt Cause Control Register. More...
 
#define ICE_QINT_RQCTL_ITR_INDX(x)   ( (x) << 11 )
 Throttling. More...
 
#define ICE_QINT_RQCTL_ITR_INDX_NONE   ICE_QINT_RQCTL_ITR_INDX ( 0x3 )
 No throttling. More...
 
#define ICE_QINT_RQCTL_CAUSE_ENA   0x40000000UL
 Enable. More...
 
#define ICE_GLINT_DYN_CTL   0x160000
 Global Interrupt Dynamic Control Register. More...
 

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 
struct ice_admin_descriptorice_admin_command_descriptor (struct intelxl_nic *intelxl)
 Get next admin command queue descriptor. More...
 
static union ice_admin_bufferice_admin_command_buffer (struct intelxl_nic *intelxl)
 Get next admin command queue data buffer. More...
 

Detailed Description

Intel 100 Gigabit Ethernet network card driver.

Definition in file ice.h.

Macro Definition Documentation

◆ ICE_BAR_SIZE

#define ICE_BAR_SIZE   0x800000

BAR size.

Definition at line 16 of file ice.h.

◆ ICE_QRX_CTRL

#define ICE_QRX_CTRL   0x120000

Global Receive Queue Control Register.

Definition at line 68 of file ice.h.

◆ ICE_QRX_CONTEXT

#define ICE_QRX_CONTEXT (   x)    ( 0x280000 + ( 0x2000 * (x) ) )

Receive Queue Context Registers.

Definition at line 71 of file ice.h.

◆ ICE_QRX_TAIL

#define ICE_QRX_TAIL   0x290000

Receive Queue Tail Register.

Definition at line 74 of file ice.h.

◆ ICE_QTX_COMM_DBELL

#define ICE_QTX_COMM_DBELL   0x2c0000

Transmit Comm Scheduler Queue Doorbell Register.

Definition at line 77 of file ice.h.

◆ ICE_GLCOMM_QTX_CNTX_DATA

#define ICE_GLCOMM_QTX_CNTX_DATA (   x)    ( 0x2d2d40 + ( 0x4 * (x) ) )

Transmit Comm Scheduler Queue Context Data Registers.

Definition at line 80 of file ice.h.

◆ ICE_GLCOMM_QTX_CNTX_CTL

#define ICE_GLCOMM_QTX_CNTX_CTL   0x2d2dc8

Transmit Comm Scheduler Queue Context Control Register.

Definition at line 83 of file ice.h.

◆ ICE_GLCOMM_QTX_CNTX_CTL_CMD

#define ICE_GLCOMM_QTX_CNTX_CTL_CMD (   x)    ( (x) << 16 )

Command.

Definition at line 84 of file ice.h.

◆ ICE_GLCOMM_QTX_CNTX_CTL_CMD_READ

#define ICE_GLCOMM_QTX_CNTX_CTL_CMD_READ   ICE_GLCOMM_QTX_CNTX_CTL_CMD ( 0 )

Read context.

Definition at line 85 of file ice.h.

◆ ICE_GLCOMM_QTX_CNTX_CTL_EXEC

#define ICE_GLCOMM_QTX_CNTX_CTL_EXEC   0x00080000UL

Execute.

Definition at line 87 of file ice.h.

◆ ICE_GLCOMM_QTX_CNTX_STAT

#define ICE_GLCOMM_QTX_CNTX_STAT   0x2d2dcc

Transmit Comm Scheduler Queue Context Status Register.

Definition at line 90 of file ice.h.

◆ ICE_GLCOMM_QTX_CNTX_BUSY

#define ICE_GLCOMM_QTX_CNTX_BUSY   0x00000001UL

In progress.

Definition at line 91 of file ice.h.

◆ ICE_QRX_FLXP_CNTXT

#define ICE_QRX_FLXP_CNTXT   0x480000

Queue Context Flex Extension Register.

Definition at line 94 of file ice.h.

◆ ICE_QRX_FLXP_CNTXT_RXDID_IDX

#define ICE_QRX_FLXP_CNTXT_RXDID_IDX (   x)    ( (x) << 0 )

RX profile.

Definition at line 95 of file ice.h.

◆ ICE_QRX_FLXP_CNTXT_RXDID_IDX_LEGACY_32

#define ICE_QRX_FLXP_CNTXT_RXDID_IDX_LEGACY_32   ICE_QRX_FLXP_CNTXT_RXDID_IDX ( 1 )

32-byte legacy

Definition at line 96 of file ice.h.

◆ ICE_QRX_FLXP_CNTXT_RXDID_PRIO

#define ICE_QRX_FLXP_CNTXT_RXDID_PRIO (   x)    ( (x) << 8 )

Priority.

Definition at line 98 of file ice.h.

◆ ICE_QRX_FLXP_CNTXT_RXDID_PRIO_MAX

#define ICE_QRX_FLXP_CNTXT_RXDID_PRIO_MAX   ICE_QRX_FLXP_CNTXT_RXDID_PRIO ( 7 )

Maximum priority.

Definition at line 99 of file ice.h.

◆ ICE_ADMIN_MAC_READ_TYPE_LAN

#define ICE_ADMIN_MAC_READ_TYPE_LAN   0

LAN MAC address type.

Definition at line 156 of file ice.h.

◆ ICE_ADMIN_SWITCH_TYPE_MASK

#define ICE_ADMIN_SWITCH_TYPE_MASK   0xc000

Switching element ID type mask.

Definition at line 199 of file ice.h.

◆ ICE_ADMIN_SWITCH_TYPE_VSI

#define ICE_ADMIN_SWITCH_TYPE_VSI   0x8000

Virtual Station Interface element type.

Definition at line 202 of file ice.h.

◆ ICE_ADMIN_ADD_RULES

#define ICE_ADMIN_ADD_RULES   0x02a0

Admin queue Add Switch Rules command.

Definition at line 211 of file ice.h.

◆ ICE_ADMIN_RULES_RECIPE_PROMISC

#define ICE_ADMIN_RULES_RECIPE_PROMISC   0x0003

Switch rule promiscuous recipe ID.

Definition at line 247 of file ice.h.

◆ ICE_ADMIN_RULES_ACTION_VALID

#define ICE_ADMIN_RULES_ACTION_VALID   0x00020000UL

Switch rule action valid.

Definition at line 250 of file ice.h.

◆ ICE_ADMIN_RULES_ACTION_VSI

#define ICE_ADMIN_RULES_ACTION_VSI (   x)    ( (x) << 4 )

Switch rule VSI number.

Definition at line 253 of file ice.h.

◆ ICE_ADMIN_SCHEDULE

#define ICE_ADMIN_SCHEDULE   0x0400

Admin queue Query Default Scheduling Tree Topology command.

Definition at line 256 of file ice.h.

◆ ICE_SCHEDULE_GENERIC

#define ICE_SCHEDULE_GENERIC   0x01

Transmit scheduler configuration generic section is valid.

Definition at line 269 of file ice.h.

◆ ICE_SCHEDULE_COMMIT

#define ICE_SCHEDULE_COMMIT   0x02

Transmit scheduler configuration committed bandwidth section is valid.

Definition at line 272 of file ice.h.

◆ ICE_SCHEDULE_EXCESS

#define ICE_SCHEDULE_EXCESS   0x04

Transmit scheduler configuration excess bandwidth section is valid.

Definition at line 275 of file ice.h.

◆ ICE_SCHEDULE_WEIGHT

#define ICE_SCHEDULE_WEIGHT   0x0004

Transmit scheduler configuration default weight.

Definition at line 278 of file ice.h.

◆ ICE_ADMIN_ADD_TXQ

#define ICE_ADMIN_ADD_TXQ   0x0c30

Admin queue Add Transmit Queues command.

Definition at line 349 of file ice.h.

◆ ICE_TXQ_BASE_PORT

#define ICE_TXQ_BASE_PORT (   addr,
  port 
)    ( ( (addr) >> 7 ) | ( ( ( uint64_t ) (port) ) << 57 ) )

Transmit queue base address and port number.

Definition at line 380 of file ice.h.

◆ ICE_TXQ_PF_TYPE

#define ICE_TXQ_PF_TYPE (   pf)    ( ( (pf) << 1 ) | ( 0x2 << 14 ) )

Transmit queue PF number.

Definition at line 384 of file ice.h.

◆ ICE_TXQ_LEN

#define ICE_TXQ_LEN (   count)    ( (count) >> 1 )

Transmit queue length.

Definition at line 387 of file ice.h.

◆ ICE_TXQ_FL_TSO

#define ICE_TXQ_FL_TSO   0x0001

Transmit queue uses TSO.

Definition at line 390 of file ice.h.

◆ ICE_TXQ_FL_LEGACY

#define ICE_TXQ_FL_LEGACY   0x1000

Transmit queue uses legacy mode.

Definition at line 393 of file ice.h.

◆ ICE_ADMIN_DISABLE_TXQ

#define ICE_ADMIN_DISABLE_TXQ   0x0c31

Admin queue Disable Transmit Queues command.

Definition at line 396 of file ice.h.

◆ ICE_TXQ_FL_FLUSH

#define ICE_TXQ_FL_FLUSH   0x08

Disable queue and flush pipe.

Definition at line 413 of file ice.h.

◆ ICE_TXQ_TIMEOUT

#define ICE_TXQ_TIMEOUT   0xc8

Disable queue timeout.

Definition at line 416 of file ice.h.

◆ ICE_PFFUNC_RID

#define ICE_PFFUNC_RID   0x09e880

Function Requester ID Information Register.

Definition at line 539 of file ice.h.

◆ ICE_PFFUNC_RID_FUNC_NUM

#define ICE_PFFUNC_RID_FUNC_NUM (   x)    ( ( (x) >> 0 ) & 0x7 )

Function number.

Definition at line 540 of file ice.h.

◆ ICE_PFGEN_PORTNUM

#define ICE_PFGEN_PORTNUM   0x1d2400

PF LAN Port Number Register.

Definition at line 545 of file ice.h.

◆ ICE_PFGEN_PORTNUM_PORT_NUM

#define ICE_PFGEN_PORTNUM_PORT_NUM (   x)    ( ( (x) >> 0 ) & 0x7 )

Port number.

Definition at line 546 of file ice.h.

◆ ICE_QINT_TQCTL

#define ICE_QINT_TQCTL   0x140000

Transmit Queue Interrupt Cause Control Register.

Definition at line 551 of file ice.h.

◆ ICE_QINT_TQCTL_ITR_INDX

#define ICE_QINT_TQCTL_ITR_INDX (   x)    ( (x) << 11 )

Throttling.

Definition at line 552 of file ice.h.

◆ ICE_QINT_TQCTL_ITR_INDX_NONE

#define ICE_QINT_TQCTL_ITR_INDX_NONE   ICE_QINT_TQCTL_ITR_INDX ( 0x3 )

No throttling.

Definition at line 553 of file ice.h.

◆ ICE_QINT_TQCTL_CAUSE_ENA

#define ICE_QINT_TQCTL_CAUSE_ENA   0x40000000UL

Enable.

Definition at line 555 of file ice.h.

◆ ICE_QINT_RQCTL

#define ICE_QINT_RQCTL   0x150000

Receive Queue Interrupt Cause Control Register.

Definition at line 558 of file ice.h.

◆ ICE_QINT_RQCTL_ITR_INDX

#define ICE_QINT_RQCTL_ITR_INDX (   x)    ( (x) << 11 )

Throttling.

Definition at line 559 of file ice.h.

◆ ICE_QINT_RQCTL_ITR_INDX_NONE

#define ICE_QINT_RQCTL_ITR_INDX_NONE   ICE_QINT_RQCTL_ITR_INDX ( 0x3 )

No throttling.

Definition at line 560 of file ice.h.

◆ ICE_QINT_RQCTL_CAUSE_ENA

#define ICE_QINT_RQCTL_CAUSE_ENA   0x40000000UL

Enable.

Definition at line 562 of file ice.h.

◆ ICE_GLINT_DYN_CTL

#define ICE_GLINT_DYN_CTL   0x160000

Global Interrupt Dynamic Control Register.

Definition at line 565 of file ice.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ ice_admin_command_descriptor()

struct ice_admin_descriptor* ice_admin_command_descriptor ( struct intelxl_nic intelxl)

Get next admin command queue descriptor.

Parameters
intelxlIntel device
Return values
cmdCommand descriptor

Definition at line 510 of file ice.h.

510  {
511  struct intelxl_admin_descriptor *xlcmd =
513 
514  return container_of ( xlcmd, struct ice_admin_descriptor, xl );
515 }
struct intelxl_admin_descriptor * intelxl_admin_command_descriptor(struct intelxl_nic *intelxl)
Get next admin command queue descriptor.
Definition: intelxl.c:239
#define container_of(ptr, type, field)
Get containing structure.
Definition: stddef.h:35
Admin queue descriptor.
Definition: ice.h:478
Admin queue descriptor.
Definition: intelxl.h:415

References container_of, and intelxl_admin_command_descriptor().

Referenced by ice_admin_add_txq(), ice_admin_autoneg(), ice_admin_disable_txq(), ice_admin_link(), ice_admin_mac_read(), ice_admin_mac_write(), ice_admin_rules(), ice_admin_schedule(), ice_admin_switch(), and ice_admin_version().

◆ ice_admin_command_buffer()

static union ice_admin_buffer* ice_admin_command_buffer ( struct intelxl_nic intelxl)
static

Get next admin command queue data buffer.

Parameters
intelxlIntel device
Return values
bufData buffer

Definition at line 524 of file ice.h.

524  {
525  union intelxl_admin_buffer *xlbuf =
526  intelxl_admin_command_buffer ( intelxl );
527 
528  return container_of ( xlbuf, union ice_admin_buffer, xl );
529 }
Admin queue data buffer.
Definition: ice.h:458
union intelxl_admin_buffer * intelxl_admin_command_buffer(struct intelxl_nic *intelxl)
Get next admin command queue data buffer.
Definition: intelxl.c:256
#define container_of(ptr, type, field)
Get containing structure.
Definition: stddef.h:35
Admin queue data buffer.
Definition: intelxl.h:401

References container_of, and intelxl_admin_command_buffer().

Referenced by ice_admin_add_txq(), ice_admin_disable_txq(), ice_admin_link(), ice_admin_mac_read(), ice_admin_rules(), ice_admin_schedule(), and ice_admin_switch().