45ed3d2aa9fe301dd93507011d560d64b555f9fb
[dpdk.git] / lib / librte_pmd_enic / vnic / vnic_rss.h
1 /*
2  * Copyright 2008-2010 Cisco Systems, Inc.  All rights reserved.
3  * Copyright 2007 Nuova Systems, Inc.  All rights reserved.
4  *
5  * Copyright (c) 2014, Cisco Systems, Inc.
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * 1. Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  *
15  * 2. Redistributions in binary form must reproduce the above copyright
16  * notice, this list of conditions and the following disclaimer in
17  * the documentation and/or other materials provided with the
18  * distribution.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
24  * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31  * POSSIBILITY OF SUCH DAMAGE.
32  */
33 #ident "$Id: vnic_rss.h 64224 2010-11-09 19:43:13Z vkolluri $"
34
35 #ifndef _VNIC_RSS_H_
36 #define _VNIC_RSS_H_
37
38 /* RSS key array */
39 union vnic_rss_key {
40         struct {
41                 u8 b[10];
42                 u8 b_pad[6];
43         } key[4];
44         u64 raw[8];
45 };
46
47 /* RSS cpu array */
48 union vnic_rss_cpu {
49         struct {
50                 u8 b[4];
51                 u8 b_pad[4];
52         } cpu[32];
53         u64 raw[32];
54 };
55
56 void vnic_set_rss_key(union vnic_rss_key *rss_key, u8 *key);
57 void vnic_set_rss_cpu(union vnic_rss_cpu *rss_cpu, u8 *cpu);
58 void vnic_get_rss_key(union vnic_rss_key *rss_key, u8 *key);
59 void vnic_get_rss_cpu(union vnic_rss_cpu *rss_cpu, u8 *cpu);
60
61 #endif /* _VNIC_RSS_H_ */