1 /****************************************************************************
2 * Solarflare driver for Xen network acceleration
4 * Copyright 2006-2008: Solarflare Communications Inc,
5 * 9501 Jeronimo Road, Suite 250,
6 * Irvine, CA 92618, USA
8 * Maintained by Solarflare Communications <linux-xen-drivers@solarflare.com>
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License version 2 as published
12 * by the Free Software Foundation, incorporated herein by reference.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 ****************************************************************************
25 #ifndef NETBACK_ACCEL_SOLARFLARE_H
26 #define NETBACK_ACCEL_SOLARFLARE_H
29 #include "accel_msg_iface.h"
31 #include "driverlink_api.h"
37 extern int netback_accel_sf_init(void);
38 extern void netback_accel_sf_shutdown(void);
39 extern int netback_accel_sf_hwtype(struct netback_accel *bend);
41 extern int netback_accel_sf_char_init(void);
42 extern void netback_accel_sf_char_shutdown(void);
44 extern int netback_accel_setup_vnic_hw(struct netback_accel *bend);
45 extern void netback_accel_shutdown_vnic_hw(struct netback_accel *bend);
47 extern int netback_accel_add_buffers(struct netback_accel *bend, int pages,
48 int log2_pages, u32 *grants,
50 extern int netback_accel_remove_buffers(struct netback_accel *bend);
53 /* Add a filter for the specified IP/port to the backend */
55 netback_accel_filter_check_add(struct netback_accel *bend,
56 struct netback_accel_filter_spec *filt);
57 /* Remove a filter entry for the specific device and IP/port */
59 void netback_accel_filter_remove_index(struct netback_accel *bend,
62 void netback_accel_filter_remove_spec(struct netback_accel *bend,
63 struct netback_accel_filter_spec *filt);
65 /* This is designed to look a bit like a skb */
66 struct netback_pkt_buf {
78 /*! \brief Handle a received packet: insert fast path filters as necessary
79 * \param skb The packet buffer
81 extern void netback_accel_rx_packet(struct netback_pkt_buf *skb, void *fwd_priv);
83 /*! \brief Handle a transmitted packet: update fast path filters as necessary
84 * \param skb The packet buffer
86 extern void netback_accel_tx_packet(struct sk_buff *skb, void *fwd_priv);
88 #endif /* NETBACK_ACCEL_SOLARFLARE_H */