1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Copyright 2008-2010 Cisco Systems, Inc.  All rights reserved.
4  * Copyright 2007 Nuova Systems, Inc.  All rights reserved.
5  */
6 
7 #ifndef _VNIC_ENIC_H_
8 #define _VNIC_ENIC_H_
9 
10 /* Device-specific region: enet configuration */
11 struct vnic_enet_config {
12 	u32 flags;
13 	u32 wq_desc_count;
14 	u32 rq_desc_count;
15 	u16 mtu;
16 	u16 intr_timer_deprecated;
17 	u8 intr_timer_type;
18 	u8 intr_mode;
19 	char devname[16];
20 	u32 intr_timer_usec;
21 	u16 loop_tag;
22 	u16 vf_rq_count;
23 	u16 num_arfs;
24 };
25 
26 #define VENETF_TSO		0x1	/* TSO enabled */
27 #define VENETF_LRO		0x2	/* LRO enabled */
28 #define VENETF_RXCSUM		0x4	/* RX csum enabled */
29 #define VENETF_TXCSUM		0x8	/* TX csum enabled */
30 #define VENETF_RSS		0x10	/* RSS enabled */
31 #define VENETF_RSSHASH_IPV4	0x20	/* Hash on IPv4 fields */
32 #define VENETF_RSSHASH_TCPIPV4	0x40	/* Hash on TCP + IPv4 fields */
33 #define VENETF_RSSHASH_IPV6	0x80	/* Hash on IPv6 fields */
34 #define VENETF_RSSHASH_TCPIPV6	0x100	/* Hash on TCP + IPv6 fields */
35 #define VENETF_RSSHASH_IPV6_EX	0x200	/* Hash on IPv6 extended fields */
36 #define VENETF_RSSHASH_TCPIPV6_EX 0x400	/* Hash on TCP + IPv6 ext. fields */
37 #define VENETF_LOOP		0x800	/* Loopback enabled */
38 #define VENETF_VXLAN		0x10000	/* VxLAN offload */
39 
40 #define VENET_INTR_TYPE_MIN	0	/* Timer specs min interrupt spacing */
41 #define VENET_INTR_TYPE_IDLE	1	/* Timer specs idle time before irq */
42 
43 #define VENET_INTR_MODE_ANY	0	/* Try MSI-X, then MSI, then INTx */
44 #define VENET_INTR_MODE_MSI	1	/* Try MSI then INTx */
45 #define VENET_INTR_MODE_INTX	2	/* Try INTx only */
46 
47 #endif /* _VNIC_ENIC_H_ */
48