xref: /linux/drivers/net/ethernet/alibaba/eea/eea_ethtool.h (revision 5f4f7bc0ed1180a1bff423c39e05256172805b5d)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * Driver for Alibaba Elastic Ethernet Adapter.
4  *
5  * Copyright (C) 2025 Alibaba Inc.
6  */
7 
8 #ifndef __EEA_ETHTOOL_H__
9 #define __EEA_ETHTOOL_H__
10 
11 struct eea_tx_stats {
12 	struct u64_stats_sync syncp;
13 	u64_stats_t descs;
14 	u64_stats_t packets;
15 	u64_stats_t bytes;
16 	u64_stats_t drops;
17 	u64_stats_t kicks;
18 };
19 
20 struct eea_rx_ctx_stats {
21 	u64 descs;
22 	u64 packets;
23 	u64 bytes;
24 	u64 drops;
25 	u64 split_hdr_bytes;
26 	u64 split_hdr_packets;
27 	u64 kicks;
28 	u64 length_errors;
29 };
30 
31 struct eea_rx_stats {
32 	struct u64_stats_sync syncp;
33 	u64_stats_t descs;
34 	u64_stats_t packets;
35 	u64_stats_t bytes;
36 	u64_stats_t drops;
37 	u64_stats_t kicks;
38 	u64_stats_t split_hdr_bytes;
39 	u64_stats_t split_hdr_packets;
40 
41 	u64_stats_t length_errors;
42 };
43 
44 void eea_update_rx_stats(struct eea_rx_stats *rx_stats,
45 			 struct eea_rx_ctx_stats *stats);
46 
47 extern const struct ethtool_ops eea_ethtool_ops;
48 #endif
49