8#ifndef _NXHAL_NIC_INTERFACE_H_
9#define _NXHAL_NIC_INTERFACE_H_
82#define NX_CDRP_SIGNATURE_TO_PCIFN(sign) ((sign) & 0xff)
83#define NX_CDRP_SIGNATURE_TO_VERSION(sign) (((sign)>>8) & 0xff)
84#define NX_CDRP_SIGNATURE_TO_MAGIC(sign) (((sign)>>16) & 0xffff)
85#define NX_CDRP_SIGNATURE_VALID(sign) \
86 ( NX_CDRP_SIGNATURE_TO_MAGIC(sign) == 0xcafe && \
87 NX_CDRP_SIGNATURE_TO_PCIFN(sign) < 8)
88#define NX_CDRP_SIGNATURE_MAKE(pcifn,version) \
89 ( ((pcifn) & 0xff) | \
90 (((version) & 0xff) << 8) | \
93#define NX_CDRP_CLEAR 0x00000000
94#define NX_CDRP_CMD_BIT 0x80000000
98#define NX_CDRP_FORM_RSP(rsp) (rsp)
99#define NX_CDRP_IS_RSP(rsp) (((rsp) & NX_CDRP_CMD_BIT) == 0)
101#define NX_CDRP_RSP_OK 0x00000001
102#define NX_CDRP_RSP_FAIL 0x00000002
103#define NX_CDRP_RSP_TIMEOUT 0x00000003
109#define NX_CDRP_FORM_CMD(cmd) (NX_CDRP_CMD_BIT | (cmd))
110#define NX_CDRP_IS_CMD(cmd) (((cmd) & NX_CDRP_CMD_BIT) != 0)
113#define NX_CDRP_CMD_SUBMIT_CAPABILITIES 0x00000001
116#define NX_CDRP_CMD_READ_MAX_RDS_PER_CTX 0x00000002
119#define NX_CDRP_CMD_READ_MAX_SDS_PER_CTX 0x00000003
122#define NX_CDRP_CMD_READ_MAX_RULES_PER_CTX 0x00000004
125#define NX_CDRP_CMD_READ_MAX_RX_CTX 0x00000005
128#define NX_CDRP_CMD_READ_MAX_TX_CTX 0x00000006
131#define NX_CDRP_CMD_CREATE_RX_CTX 0x00000007
134#define NX_CDRP_CMD_DESTROY_RX_CTX 0x00000008
137#define NX_CDRP_CMD_CREATE_TX_CTX 0x00000009
140#define NX_CDRP_CMD_DESTROY_TX_CTX 0x0000000a
143#define NX_CDRP_CMD_SETUP_STATISTICS 0x0000000e
146#define NX_CDRP_CMD_GET_STATISTICS 0x0000000f
149#define NX_CDRP_CMD_DELETE_STATISTICS 0x00000010
151#define NX_CDRP_CMD_MAX 0x00000011
157#define NX_CAP_BIT(class, bit) (1 << bit)
161#define NX_CAP0_LEGACY_CONTEXT NX_CAP_BIT(0, 0)
162#define NX_CAP0_MULTI_CONTEXT NX_CAP_BIT(0, 1)
163#define NX_CAP0_LEGACY_MN NX_CAP_BIT(0, 2)
164#define NX_CAP0_LEGACY_MS NX_CAP_BIT(0, 3)
165#define NX_CAP0_CUT_THROUGH NX_CAP_BIT(0, 4)
166#define NX_CAP0_LRO NX_CAP_BIT(0, 5)
167#define NX_CAP0_LSO NX_CAP_BIT(0, 6)
171#define NX_CAP1_NIC NX_CAP_BIT(1, 0)
172#define NX_CAP1_PXE NX_CAP_BIT(1, 1)
173#define NX_CAP1_CHIMNEY NX_CAP_BIT(1, 2)
174#define NX_CAP1_LSA NX_CAP_BIT(1, 3)
175#define NX_CAP1_RDMA NX_CAP_BIT(1, 4)
176#define NX_CAP1_ISCSI NX_CAP_BIT(1, 5)
177#define NX_CAP1_FCOE NX_CAP_BIT(1, 6)
188#define NX_RX_RULETYPE_DEFAULT 0
189#define NX_RX_RULETYPE_MAC 1
190#define NX_RX_RULETYPE_MAC_VLAN 2
191#define NX_RX_RULETYPE_MAC_RSS 3
192#define NX_RX_RULETYPE_MAC_VLAN_RSS 4
193#define NX_RX_RULETYPE_MAX 5
197#define NX_RX_RULECMD_ADD 0
198#define NX_RX_RULECMD_REMOVE 1
199#define NX_RX_RULECMD_MAX 2
256#define NX_HOST_CTX_STATE_FREED 0
257#define NX_HOST_CTX_STATE_ALLOCATED 1
259#define NX_HOST_CTX_STATE_ACTIVE 2
260#define NX_HOST_CTX_STATE_DISABLED 3
261#define NX_HOST_CTX_STATE_QUIESCED 4
262#define NX_HOST_CTX_STATE_MAX 5
270#define NX_HOST_INT_CRB_MODE_UNIQUE 0
272#define NX_HOST_INT_CRB_MODE_SHARED 1
274#define NX_HOST_INT_CRB_MODE_NORX 2
276#define NX_HOST_INT_CRB_MODE_NOTX 3
278#define NX_HOST_INT_CRB_MODE_NORXTX 4
284#define NX_DESTROY_CTX_RESET 0
285#define NX_DESTROY_CTX_D3_RESET 1
286#define NX_DESTROY_CTX_MAX 2
333#define SIZEOF_HOSTRQ_TX(HOSTRQ_TX) \
336#define SIZEOF_CARDRSP_TX(CARDRSP_TX) \
337 ( sizeof(CARDRSP_TX))
348#define NX_HOST_RDS_CRB_MODE_UNIQUE 0
354#define NX_HOST_RDS_CRB_MODE_SHARED 1
359#define NX_HOST_RDS_CRB_MODE_CUSTOM 2
360#define NX_HOST_RDS_CRB_MODE_MAX 3
367#define NX_RDS_RING_TYPE_NORMAL 0
368#define NX_RDS_RING_TYPE_JUMBO 1
369#define NX_RDS_RING_TYPE_LRO 2
370#define NX_RDS_RING_TYPE_MAX 3
440#define SIZEOF_HOSTRQ_RX(HOSTRQ_RX, rds_rings, sds_rings) \
441 ( sizeof(HOSTRQ_RX) + \
442 (rds_rings)*(sizeof (nx_hostrq_rds_ring_t)) + \
443 (sds_rings)*(sizeof (nx_hostrq_sds_ring_t)) )
445#define SIZEOF_CARDRSP_RX(CARDRSP_RX, rds_rings, sds_rings) \
446 ( sizeof(CARDRSP_RX) + \
447 (rds_rings)*(sizeof (nx_cardrsp_rds_ring_t)) + \
448 (sds_rings)*(sizeof (nx_cardrsp_sds_ring_t)) )
459#define NX_STATISTICS_MODE_INVALID 0
463#define NX_STATISTICS_MODE_PULL 1
467#define NX_STATISTICS_MODE_PUSH 2
470#define NX_STATISTICS_MODE_SINGLE_SHOT 3
472#define NX_STATISTICS_MODE_MAX 4
477#define NX_STATISTICS_TYPE_INVALID 0
478#define NX_STATISTICS_TYPE_NIC_RX_CORE 1
479#define NX_STATISTICS_TYPE_NIC_TX_CORE 2
480#define NX_STATISTICS_TYPE_NIC_RX_ALL 3
481#define NX_STATISTICS_TYPE_NIC_TX_ALL 4
482#define NX_STATISTICS_TYPE_MAX 5
uint8_t mac[ETH_ALEN]
MAC address.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
struct nx_rx_rule_arg_s nx_rx_rule_arg_t
struct nx_hostrq_tx_ctx_s nx_hostrq_tx_ctx_t
struct nx_cardrsp_rds_ring_s nx_cardrsp_rds_ring_t
struct nx_hostrq_sds_ring_s nx_hostrq_sds_ring_t
struct nx_rx_rule_s nx_rx_rule_t
struct nx_hostrq_rds_ring_s nx_hostrq_rds_ring_t
struct nx_hostmsg_rx_rule_s nx_hostmsg_rx_rule_t
struct nx_cardmsg_rx_rule_s nx_cardmsg_rx_rule_t
struct nx_cardrsp_rx_ctx_s nx_cardrsp_rx_ctx_t
struct nx_hostrq_cds_ring_s nx_hostrq_cds_ring_t
struct nx_hostrq_stat_setup_s nx_hostrq_stat_setup_t
struct nx_cardrsp_sds_ring_s nx_cardrsp_sds_ring_t
struct nx_cardrsp_cds_ring_s nx_cardrsp_cds_ring_t
struct nx_hostrq_rx_ctx_s nx_hostrq_rx_ctx_t
struct nx_cardrsp_tx_ctx_s nx_cardrsp_tx_ctx_t
nx_cardrsp_cds_ring_t cds_ring
nx_hostrq_cds_ring_t cds_ring
struct nx_rx_rule_arg_s::@016361333065053037046046000142063034077301344013::@331305355203151123340341352337076213154037335231 mr
struct nx_rx_rule_arg_s::@016361333065053037046046000142063034077301344013::@242177042020005120072136140360236156136105017326 mv
struct nx_rx_rule_arg_s::@016361333065053037046046000142063034077301344013::@145232130317113367376042263030026134000233060145 m
struct nx_rx_rule_arg_s::@016361333065053037046046000142063034077301344013::@344264072221333223073300175203144104323351051066 mvr