xref: /dpdk/drivers/common/idpf/base/idpf_type.h (revision 9510c5f874f652fcaa3cc6e6d9bce2c0f834a1d2)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2001-2024 Intel Corporation
3  */
4 
5 #ifndef _IDPF_TYPE_H_
6 #define _IDPF_TYPE_H_
7 
8 #include "idpf_osdep.h"
9 
10 #define UNREFERENCED_XPARAMETER
11 #define UNREFERENCED_1PARAMETER(_p)
12 #define UNREFERENCED_2PARAMETER(_p, _q)
13 #define UNREFERENCED_3PARAMETER(_p, _q, _r)
14 #define UNREFERENCED_4PARAMETER(_p, _q, _r, _s)
15 #define UNREFERENCED_5PARAMETER(_p, _q, _r, _s, _t)
16 
17 struct idpf_eth_stats {
18 	u64 rx_bytes;			/* gorc */
19 	u64 rx_unicast;			/* uprc */
20 	u64 rx_multicast;		/* mprc */
21 	u64 rx_broadcast;		/* bprc */
22 	u64 rx_discards;		/* rdpc */
23 	u64 rx_unknown_protocol;	/* rupp */
24 	u64 tx_bytes;			/* gotc */
25 	u64 tx_unicast;			/* uptc */
26 	u64 tx_multicast;		/* mptc */
27 	u64 tx_broadcast;		/* bptc */
28 	u64 tx_discards;		/* tdpc */
29 	u64 tx_errors;			/* tepc */
30 };
31 
32 /* Statistics collected by the MAC */
33 struct idpf_hw_port_stats {
34 	/* eth stats collected by the port */
35 	struct idpf_eth_stats eth;
36 
37 	/* additional port specific stats */
38 	u64 tx_dropped_link_down;	/* tdold */
39 	u64 crc_errors;			/* crcerrs */
40 	u64 illegal_bytes;		/* illerrc */
41 	u64 error_bytes;		/* errbc */
42 	u64 mac_local_faults;		/* mlfc */
43 	u64 mac_remote_faults;		/* mrfc */
44 	u64 rx_length_errors;		/* rlec */
45 	u64 link_xon_rx;		/* lxonrxc */
46 	u64 link_xoff_rx;		/* lxoffrxc */
47 	u64 priority_xon_rx[8];		/* pxonrxc[8] */
48 	u64 priority_xoff_rx[8];	/* pxoffrxc[8] */
49 	u64 link_xon_tx;		/* lxontxc */
50 	u64 link_xoff_tx;		/* lxofftxc */
51 	u64 priority_xon_tx[8];		/* pxontxc[8] */
52 	u64 priority_xoff_tx[8];	/* pxofftxc[8] */
53 	u64 priority_xon_2_xoff[8];	/* pxon2offc[8] */
54 	u64 rx_size_64;			/* prc64 */
55 	u64 rx_size_127;		/* prc127 */
56 	u64 rx_size_255;		/* prc255 */
57 	u64 rx_size_511;		/* prc511 */
58 	u64 rx_size_1023;		/* prc1023 */
59 	u64 rx_size_1522;		/* prc1522 */
60 	u64 rx_size_big;		/* prc9522 */
61 	u64 rx_undersize;		/* ruc */
62 	u64 rx_fragments;		/* rfc */
63 	u64 rx_oversize;		/* roc */
64 	u64 rx_jabber;			/* rjc */
65 	u64 tx_size_64;			/* ptc64 */
66 	u64 tx_size_127;		/* ptc127 */
67 	u64 tx_size_255;		/* ptc255 */
68 	u64 tx_size_511;		/* ptc511 */
69 	u64 tx_size_1023;		/* ptc1023 */
70 	u64 tx_size_1522;		/* ptc1522 */
71 	u64 tx_size_big;		/* ptc9522 */
72 	u64 mac_short_packet_dropped;	/* mspdc */
73 	u64 checksum_error;		/* xec */
74 };
75 /* Static buffer size to initialize control queue */
76 struct idpf_ctlq_size {
77 	u16 asq_buf_size;
78 	u16 asq_ring_size;
79 	u16 arq_buf_size;
80 	u16 arq_ring_size;
81 };
82 
83 /* Temporary definition to compile - TBD if needed */
84 struct idpf_arq_event_info {
85 	struct idpf_ctlq_desc desc;
86 	u16 msg_len;
87 	u16 buf_len;
88 	u8 *msg_buf;
89 };
90 
91 struct idpf_get_set_rss_key_data {
92 	u8 standard_rss_key[0x28];
93 	u8 extended_hash_key[0xc];
94 };
95 
96 struct idpf_aq_get_phy_abilities_resp {
97 	__le32 phy_type;
98 };
99 
100 struct idpf_filter_program_desc {
101 	__le32 qid;
102 };
103 
104 #endif /* _IDPF_TYPE_H_ */
105