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 NETFRONT_ACCEL_TSO_H
26 #define NETFRONT_ACCEL_TSO_H
28 #include "accel_bufs.h"
30 /* Track the buffers used in each output packet */
31 struct netfront_accel_tso_buffer {
32 struct netfront_accel_tso_buffer *next;
33 struct netfront_accel_pkt_desc *buf;
37 /* Track the output packets formed from each input packet */
38 struct netfront_accel_tso_output_packet {
39 struct netfront_accel_tso_output_packet *next;
40 struct netfront_accel_tso_buffer *tso_bufs;
41 unsigned tso_bufs_len;
46 * Max available space in a buffer for data once meta-data has taken
49 #define NETFRONT_ACCEL_TSO_BUF_LENGTH \
50 ((PAGE_SIZE / NETFRONT_ACCEL_BUFS_PER_PAGE) \
51 - sizeof(struct netfront_accel_tso_buffer) \
52 - sizeof(struct netfront_accel_tso_output_packet))
54 int netfront_accel_enqueue_skb_tso(netfront_accel_vnic *vnic,
57 #endif /* NETFRONT_ACCEL_TSO_H */