ia64/linux-2.6.18-xen.hg

view drivers/xen/sfc_netback/ci/efhw/common.h @ 847:ad4d307bf9ce

net sfc: Update sfc and sfc_resource driver to latest release

...and update sfc_netfront, sfc_netback, sfc_netutil for any API changes

sfc_netback: Fix asymmetric use of SFC buffer table alloc and free
sfc_netback: Clean up if no SFC accel device found
sfc_netback: Gracefully handle case where page grant fails
sfc_netback: Disable net acceleration if the physical link goes down
sfc_netfront: Less verbose error messages, more verbose counters for
rx discard errors
sfc_netfront: Gracefully handle case where SFC netfront fails during
initialisation

Signed-off-by: Kieran Mansley <kmansley@solarflare.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Mar 31 11:59:10 2009 +0100 (2009-03-31)
parents af0d925ba938
children
line source
1 /****************************************************************************
2 * Driver for Solarflare network controllers -
3 * resource management for Xen backend, OpenOnload, etc
4 * (including support for SFE4001 10GBT NIC)
5 *
6 * This file provides API of the efhw library which may be used both from
7 * the kernel and from the user-space code.
8 *
9 * Copyright 2005-2007: Solarflare Communications Inc,
10 * 9501 Jeronimo Road, Suite 250,
11 * Irvine, CA 92618, USA
12 *
13 * Developed and maintained by Solarflare Communications:
14 * <linux-xen-drivers@solarflare.com>
15 * <onload-dev@solarflare.com>
16 *
17 * Certain parts of the driver were implemented by
18 * Alexandra Kossovsky <Alexandra.Kossovsky@oktetlabs.ru>
19 * OKTET Labs Ltd, Russia,
20 * http://oktetlabs.ru, <info@oktetlabs.ru>
21 * by request of Solarflare Communications
22 *
23 *
24 * This program is free software; you can redistribute it and/or modify it
25 * under the terms of the GNU General Public License version 2 as published
26 * by the Free Software Foundation, incorporated herein by reference.
27 *
28 * This program is distributed in the hope that it will be useful,
29 * but WITHOUT ANY WARRANTY; without even the implied warranty of
30 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 * GNU General Public License for more details.
32 *
33 * You should have received a copy of the GNU General Public License
34 * along with this program; if not, write to the Free Software
35 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
36 ****************************************************************************
37 */
39 #ifndef __CI_EFHW_COMMON_H__
40 #define __CI_EFHW_COMMON_H__
42 #include <ci/efhw/common_sysdep.h>
44 enum efhw_arch {
45 EFHW_ARCH_FALCON,
46 EFHW_ARCH_SIENA,
47 };
49 typedef uint32_t efhw_buffer_addr_t;
50 #define EFHW_BUFFER_ADDR_FMT "[ba:%"PRIx32"]"
52 /*! Comment? */
53 typedef union {
54 uint64_t u64;
55 struct {
56 uint32_t a;
57 uint32_t b;
58 } opaque;
59 } efhw_event_t;
61 /* Flags for TX/RX queues */
62 #define EFHW_VI_JUMBO_EN 0x01 /*! scatter RX over multiple desc */
63 #define EFHW_VI_ISCSI_RX_HDIG_EN 0x02 /*! iscsi rx header digest */
64 #define EFHW_VI_ISCSI_TX_HDIG_EN 0x04 /*! iscsi tx header digest */
65 #define EFHW_VI_ISCSI_RX_DDIG_EN 0x08 /*! iscsi rx data digest */
66 #define EFHW_VI_ISCSI_TX_DDIG_EN 0x10 /*! iscsi tx data digest */
67 #define EFHW_VI_TX_PHYS_ADDR_EN 0x20 /*! TX physical address mode */
68 #define EFHW_VI_RX_PHYS_ADDR_EN 0x40 /*! RX physical address mode */
69 #define EFHW_VI_RM_WITH_INTERRUPT 0x80 /*! VI with an interrupt */
70 #define EFHW_VI_TX_IP_CSUM_DIS 0x100 /*! enable ip checksum generation */
71 #define EFHW_VI_TX_TCPUDP_CSUM_DIS 0x200 /*! enable tcp/udp checksum
72 generation */
73 #define EFHW_VI_TX_TCPUDP_ONLY 0x400 /*! drop non-tcp/udp packets */
75 /* Types of hardware filter */
76 /* Each of these values implicitly selects scatter filters on B0 - or in
77 EFHW_IP_FILTER_TYPE_NOSCAT_B0_MASK if a non-scatter filter is required */
78 #define EFHW_IP_FILTER_TYPE_UDP_WILDCARD (0) /* dest host only */
79 #define EFHW_IP_FILTER_TYPE_UDP_FULL (1) /* dest host and port */
80 #define EFHW_IP_FILTER_TYPE_TCP_WILDCARD (2) /* dest based filter */
81 #define EFHW_IP_FILTER_TYPE_TCP_FULL (3) /* src filter */
82 /* Same again, but with RSS (for B0 only) */
83 #define EFHW_IP_FILTER_TYPE_UDP_WILDCARD_RSS_B0 (4)
84 #define EFHW_IP_FILTER_TYPE_UDP_FULL_RSS_B0 (5)
85 #define EFHW_IP_FILTER_TYPE_TCP_WILDCARD_RSS_B0 (6)
86 #define EFHW_IP_FILTER_TYPE_TCP_FULL_RSS_B0 (7)
88 #define EFHW_IP_FILTER_TYPE_FULL_MASK (0x1) /* Mask for full / wildcard */
89 #define EFHW_IP_FILTER_TYPE_TCP_MASK (0x2) /* Mask for TCP type */
90 #define EFHW_IP_FILTER_TYPE_RSS_B0_MASK (0x4) /* Mask for B0 RSS enable */
91 #define EFHW_IP_FILTER_TYPE_NOSCAT_B0_MASK (0x8) /* Mask for B0 SCATTER dsbl */
93 #define EFHW_IP_FILTER_TYPE_MASK (0xffff) /* Mask of types above */
95 #define EFHW_IP_FILTER_BROADCAST (0x10000) /* driverlink filter
96 support */
98 #endif /* __CI_EFHW_COMMON_H__ */