1 /*********************************************************
2 * Copyright (C) 2007 VMware, Inc. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
14 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 *********************************************************/
30 * Definitions for UPTv1
32 * Some of the defs are duplicated in vmkapi_net_upt.h, because
33 * vmkapi_net_upt.h cannot distribute with OSS yet and vmkapi headers can
34 * only include vmkapi headers. Make sure they are kept in sync!
40 #define UPT1_MAX_TX_QUEUES 64
41 #define UPT1_MAX_RX_QUEUES 64
43 #define UPT1_MAX_INTRS (UPT1_MAX_TX_QUEUES + UPT1_MAX_RX_QUEUES)
46 #include "vmware_pack_begin.h"
48 uint64 TSOPktsTxOK; /* TSO pkts post-segmentation */
51 uint64 ucastBytesTxOK;
53 uint64 mcastBytesTxOK;
55 uint64 bcastBytesTxOK;
59 #include "vmware_pack_end.h"
63 #include "vmware_pack_begin.h"
65 uint64 LROPktsRxOK; /* LRO pkts */
66 uint64 LROBytesRxOK; /* bytes from LRO pkts */
67 /* the following counters are for pkts from the wire, i.e., pre-LRO */
69 uint64 ucastBytesRxOK;
71 uint64 mcastBytesRxOK;
73 uint64 bcastBytesRxOK;
74 uint64 pktsRxOutOfBuf;
77 #include "vmware_pack_end.h"
80 /* interrupt moderation level */
81 #define UPT1_IML_NONE 0 /* no interrupt moderation */
82 #define UPT1_IML_HIGHEST 7 /* least intr generated */
83 #define UPT1_IML_ADAPTIVE 8 /* adpative intr moderation */
85 /* values for UPT1_RSSConf.hashFunc */
86 #define UPT1_RSS_HASH_TYPE_NONE 0x0
87 #define UPT1_RSS_HASH_TYPE_IPV4 0x01
88 #define UPT1_RSS_HASH_TYPE_TCP_IPV4 0x02
89 #define UPT1_RSS_HASH_TYPE_IPV6 0x04
90 #define UPT1_RSS_HASH_TYPE_TCP_IPV6 0x08
92 #define UPT1_RSS_HASH_FUNC_NONE 0x0
93 #define UPT1_RSS_HASH_FUNC_TOEPLITZ 0x01
95 #define UPT1_RSS_MAX_KEY_SIZE 40
96 #define UPT1_RSS_MAX_IND_TABLE_SIZE 128
99 #include "vmware_pack_begin.h"
100 struct UPT1_RSSConf {
105 uint8 hashKey[UPT1_RSS_MAX_KEY_SIZE];
106 uint8 indTable[UPT1_RSS_MAX_IND_TABLE_SIZE];
108 #include "vmware_pack_end.h"
112 #define UPT1_F_RXCSUM 0x0001 /* rx csum verification */
113 #define UPT1_F_RSS 0x0002
114 #define UPT1_F_RXVLAN 0x0004 /* VLAN tag stripping */
115 #define UPT1_F_LRO 0x0008