162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * Copyright 2008-2010 Cisco Systems, Inc.  All rights reserved.
462306a36Sopenharmony_ci * Copyright 2007 Nuova Systems, Inc.  All rights reserved.
562306a36Sopenharmony_ci */
662306a36Sopenharmony_ci
762306a36Sopenharmony_ci#ifndef _VNIC_ENIC_H_
862306a36Sopenharmony_ci#define _VNIC_ENIC_H_
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci/* Device-specific region: enet configuration */
1162306a36Sopenharmony_cistruct vnic_enet_config {
1262306a36Sopenharmony_ci	u32 flags;
1362306a36Sopenharmony_ci	u32 wq_desc_count;
1462306a36Sopenharmony_ci	u32 rq_desc_count;
1562306a36Sopenharmony_ci	u16 mtu;
1662306a36Sopenharmony_ci	u16 intr_timer_deprecated;
1762306a36Sopenharmony_ci	u8 intr_timer_type;
1862306a36Sopenharmony_ci	u8 intr_mode;
1962306a36Sopenharmony_ci	char devname[16];
2062306a36Sopenharmony_ci	u32 intr_timer_usec;
2162306a36Sopenharmony_ci	u16 loop_tag;
2262306a36Sopenharmony_ci	u16 vf_rq_count;
2362306a36Sopenharmony_ci	u16 num_arfs;
2462306a36Sopenharmony_ci};
2562306a36Sopenharmony_ci
2662306a36Sopenharmony_ci#define VENETF_TSO		0x1	/* TSO enabled */
2762306a36Sopenharmony_ci#define VENETF_LRO		0x2	/* LRO enabled */
2862306a36Sopenharmony_ci#define VENETF_RXCSUM		0x4	/* RX csum enabled */
2962306a36Sopenharmony_ci#define VENETF_TXCSUM		0x8	/* TX csum enabled */
3062306a36Sopenharmony_ci#define VENETF_RSS		0x10	/* RSS enabled */
3162306a36Sopenharmony_ci#define VENETF_RSSHASH_IPV4	0x20	/* Hash on IPv4 fields */
3262306a36Sopenharmony_ci#define VENETF_RSSHASH_TCPIPV4	0x40	/* Hash on TCP + IPv4 fields */
3362306a36Sopenharmony_ci#define VENETF_RSSHASH_IPV6	0x80	/* Hash on IPv6 fields */
3462306a36Sopenharmony_ci#define VENETF_RSSHASH_TCPIPV6	0x100	/* Hash on TCP + IPv6 fields */
3562306a36Sopenharmony_ci#define VENETF_RSSHASH_IPV6_EX	0x200	/* Hash on IPv6 extended fields */
3662306a36Sopenharmony_ci#define VENETF_RSSHASH_TCPIPV6_EX 0x400	/* Hash on TCP + IPv6 ext. fields */
3762306a36Sopenharmony_ci#define VENETF_LOOP		0x800	/* Loopback enabled */
3862306a36Sopenharmony_ci#define VENETF_VXLAN		0x10000	/* VxLAN offload */
3962306a36Sopenharmony_ci
4062306a36Sopenharmony_ci#define VENET_INTR_TYPE_MIN	0	/* Timer specs min interrupt spacing */
4162306a36Sopenharmony_ci#define VENET_INTR_TYPE_IDLE	1	/* Timer specs idle time before irq */
4262306a36Sopenharmony_ci
4362306a36Sopenharmony_ci#define VENET_INTR_MODE_ANY	0	/* Try MSI-X, then MSI, then INTx */
4462306a36Sopenharmony_ci#define VENET_INTR_MODE_MSI	1	/* Try MSI then INTx */
4562306a36Sopenharmony_ci#define VENET_INTR_MODE_INTX	2	/* Try INTx only */
4662306a36Sopenharmony_ci
4762306a36Sopenharmony_ci#endif /* _VNIC_ENIC_H_ */
48