xref: /linux/drivers/net/ethernet/cisco/enic/vnic_rss.h (revision ca55b2fef3a9373fcfc30f82fd26bc7fccbda732)
1 /*
2  * Copyright 2008-2010 Cisco Systems, Inc.  All rights reserved.
3  * Copyright 2007 Nuova Systems, Inc.  All rights reserved.
4  *
5  * This program is free software; you may redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; version 2 of the License.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
10  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
11  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
12  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
13  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
14  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
15  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16  * SOFTWARE.
17  */
18 
19 #ifndef _VNIC_RSS_H_
20 #define _VNIC_RSS_H_
21 
22 /* RSS key array */
23 
24 #define ENIC_RSS_BYTES_PER_KEY	10
25 #define ENIC_RSS_KEYS		4
26 #define ENIC_RSS_LEN		(ENIC_RSS_BYTES_PER_KEY * ENIC_RSS_KEYS)
27 
28 union vnic_rss_key {
29 	struct {
30 		u8 b[ENIC_RSS_BYTES_PER_KEY];
31 		u8 b_pad[6];
32 	} key[ENIC_RSS_KEYS];
33 	u64 raw[8];
34 };
35 
36 /* RSS cpu array */
37 union vnic_rss_cpu {
38 	struct {
39 		u8 b[4] ;
40 		u8 b_pad[4];
41 	} cpu[32];
42 	u64 raw[32];
43 };
44 
45 #endif /* _VNIC_RSS_H_ */
46