staging: octeon-ethernet: eliminate USE_10MBPS_PREAMBLE_WORKAROUND define
[deliverable/linux.git] / drivers / staging / octeon / ethernet-defines.h
CommitLineData
80ff0fd3
DD
1/**********************************************************************
2 * Author: Cavium Networks
3 *
4 * Contact: support@caviumnetworks.com
5 * This file is part of the OCTEON SDK
6 *
7 * Copyright (c) 2003-2007 Cavium Networks
8 *
9 * This file is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License, Version 2, as
11 * published by the Free Software Foundation.
12 *
13 * This file is distributed in the hope that it will be useful, but
14 * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
15 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
16 * NONINFRINGEMENT. See the GNU General Public License for more
17 * details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this file; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 * or visit http://www.gnu.org/licenses/.
23 *
24 * This file may also be available under a different license from Cavium.
25 * Contact Cavium Networks for more information
26**********************************************************************/
27
28/*
29 * A few defines are used to control the operation of this driver:
80ff0fd3
DD
30 * USE_SKBUFFS_IN_HW
31 * Tells the driver to populate the packet buffers with kernel skbuffs.
32 * This allows the driver to receive packets without copying them. It also
33 * means that 32bit userspace can't access the packet buffers.
80ff0fd3
DD
34 * USE_HW_TCPUDP_CHECKSUM
35 * Controls if the Octeon TCP/UDP checksum engine is used for packet
36 * output. If this is zero, the kernel will perform the checksum in
37 * software.
80ff0fd3
DD
38 * USE_ASYNC_IOBDMA
39 * Use asynchronous IO access to hardware. This uses Octeon's asynchronous
40 * IOBDMAs to issue IO accesses without stalling. Set this to zero
41 * to disable this. Note that IOBDMAs require CVMSEG.
42 * REUSE_SKBUFFS_WITHOUT_FREE
43 * Allows the TX path to free an skbuff into the FPA hardware pool. This
44 * can significantly improve performance for forwarding and bridging, but
45 * may be somewhat dangerous. Checks are made, but if any buffer is reused
46 * without the proper Linux cleanup, the networking stack may have very
47 * bizarre bugs.
48 */
49#ifndef __ETHERNET_DEFINES_H__
50#define __ETHERNET_DEFINES_H__
51
af866496 52#include <asm/octeon/cvmx-config.h>
80ff0fd3
DD
53
54
55#define OCTEON_ETHERNET_VERSION "1.9"
56
80ff0fd3
DD
57#define USE_SKBUFFS_IN_HW 1
58#ifdef CONFIG_NETFILTER
59#define REUSE_SKBUFFS_WITHOUT_FREE 0
60#else
61#define REUSE_SKBUFFS_WITHOUT_FREE 1
62#endif
80ff0fd3 63
80ff0fd3
DD
64#define USE_HW_TCPUDP_CHECKSUM 1
65
80ff0fd3
DD
66/* Enable Random Early Dropping under load */
67#define USE_RED 1
68#define USE_ASYNC_IOBDMA (CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE > 0)
69
80ff0fd3
DD
70/*
71 * Use this to have all FPA frees also tell the L2 not to write data
72 * to memory.
73 */
74#define DONT_WRITEBACK(x) (x)
75/* Use this to not have FPA frees control L2 */
76/*#define DONT_WRITEBACK(x) 0 */
77
a620c163 78/* Maximum number of SKBs to try to free per xmit packet. */
80ff0fd3
DD
79#define MAX_OUT_QUEUE_DEPTH 1000
80
4898c560
DD
81#define FAU_TOTAL_TX_TO_CLEAN (CVMX_FAU_REG_END - sizeof(uint32_t))
82#define FAU_NUM_PACKET_BUFFERS_TO_FREE (FAU_TOTAL_TX_TO_CLEAN - sizeof(uint32_t))
83
80ff0fd3
DD
84#define TOTAL_NUMBER_OF_PORTS (CVMX_PIP_NUM_INPUT_PORTS+1)
85
86
87#endif /* __ETHERNET_DEFINES_H__ */
This page took 0.432441 seconds and 5 git commands to generate.