]> git.proxmox.com Git - ceph.git/blob - ceph/src/seastar/dpdk/drivers/net/vmxnet3/base/upt1_defs.h
import 15.2.0 Octopus source
[ceph.git] / ceph / src / seastar / dpdk / drivers / net / vmxnet3 / base / upt1_defs.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright (C) 2007 VMware, Inc. All rights reserved.
3 */
4
5 /* upt1_defs.h
6 *
7 * Definitions for UPTv1
8 *
9 * Some of the defs are duplicated in vmkapi_net_upt.h, because
10 * vmkapi_net_upt.h cannot distribute with OSS yet and vmkapi headers can
11 * only include vmkapi headers. Make sure they are kept in sync!
12 */
13
14 #ifndef _UPT1_DEFS_H
15 #define _UPT1_DEFS_H
16
17 #define UPT1_MAX_TX_QUEUES 64
18 #define UPT1_MAX_RX_QUEUES 64
19
20 #define UPT1_MAX_INTRS (UPT1_MAX_TX_QUEUES + UPT1_MAX_RX_QUEUES)
21
22 typedef
23 #include "vmware_pack_begin.h"
24 struct UPT1_TxStats {
25 uint64 TSOPktsTxOK; /* TSO pkts post-segmentation */
26 uint64 TSOBytesTxOK;
27 uint64 ucastPktsTxOK;
28 uint64 ucastBytesTxOK;
29 uint64 mcastPktsTxOK;
30 uint64 mcastBytesTxOK;
31 uint64 bcastPktsTxOK;
32 uint64 bcastBytesTxOK;
33 uint64 pktsTxError;
34 uint64 pktsTxDiscard;
35 }
36 #include "vmware_pack_end.h"
37 UPT1_TxStats;
38
39 typedef
40 #include "vmware_pack_begin.h"
41 struct UPT1_RxStats {
42 uint64 LROPktsRxOK; /* LRO pkts */
43 uint64 LROBytesRxOK; /* bytes from LRO pkts */
44 /* the following counters are for pkts from the wire, i.e., pre-LRO */
45 uint64 ucastPktsRxOK;
46 uint64 ucastBytesRxOK;
47 uint64 mcastPktsRxOK;
48 uint64 mcastBytesRxOK;
49 uint64 bcastPktsRxOK;
50 uint64 bcastBytesRxOK;
51 uint64 pktsRxOutOfBuf;
52 uint64 pktsRxError;
53 }
54 #include "vmware_pack_end.h"
55 UPT1_RxStats;
56
57 /* interrupt moderation level */
58 #define UPT1_IML_NONE 0 /* no interrupt moderation */
59 #define UPT1_IML_HIGHEST 7 /* least intr generated */
60 #define UPT1_IML_ADAPTIVE 8 /* adpative intr moderation */
61
62 /* values for UPT1_RSSConf.hashFunc */
63 #define UPT1_RSS_HASH_TYPE_NONE 0x0
64 #define UPT1_RSS_HASH_TYPE_IPV4 0x01
65 #define UPT1_RSS_HASH_TYPE_TCP_IPV4 0x02
66 #define UPT1_RSS_HASH_TYPE_IPV6 0x04
67 #define UPT1_RSS_HASH_TYPE_TCP_IPV6 0x08
68
69 #define UPT1_RSS_HASH_FUNC_NONE 0x0
70 #define UPT1_RSS_HASH_FUNC_TOEPLITZ 0x01
71
72 #define UPT1_RSS_MAX_KEY_SIZE 40
73 #define UPT1_RSS_MAX_IND_TABLE_SIZE 128
74
75 typedef
76 #include "vmware_pack_begin.h"
77 struct UPT1_RSSConf {
78 uint16 hashType;
79 uint16 hashFunc;
80 uint16 hashKeySize;
81 uint16 indTableSize;
82 uint8 hashKey[UPT1_RSS_MAX_KEY_SIZE];
83 uint8 indTable[UPT1_RSS_MAX_IND_TABLE_SIZE];
84 }
85 #include "vmware_pack_end.h"
86 UPT1_RSSConf;
87
88 /* features */
89 #define UPT1_F_RXCSUM 0x0001 /* rx csum verification */
90 #define UPT1_F_RSS 0x0002
91 #define UPT1_F_RXVLAN 0x0004 /* VLAN tag stripping */
92 #define UPT1_F_LRO 0x0008
93
94 #endif