[TG3]: Set minimal hw interrupt mitigation.
[linux-2.6/verdex.git] / drivers / s390 / net / qeth_eddp.h
blobe1b51860bc57b803258e8c3627b7af371b93d849
1 /*
2 * linux/drivers/s390/net/qeth_eddp.c ($Revision: 1.5 $)
4 * Header file for qeth enhanced device driver pakcing.
6 * Copyright 2004 IBM Corporation
8 * Author(s): Thomas Spatzier <tspat@de.ibm.com>
10 * $Revision: 1.5 $ $Date: 2005/03/24 09:04:18 $
13 #ifndef __QETH_EDDP_H__
14 #define __QETH_EDDP_H__
16 struct qeth_eddp_element {
17 u32 flags;
18 u32 length;
19 void *addr;
22 struct qeth_eddp_context {
23 atomic_t refcnt;
24 enum qeth_large_send_types type;
25 int num_pages; /* # of allocated pages */
26 u8 **pages; /* pointers to pages */
27 int offset; /* offset in ctx during creation */
28 int num_elements; /* # of required 'SBALEs' */
29 struct qeth_eddp_element *elements; /* array of 'SBALEs' */
30 int elements_per_skb; /* # of 'SBALEs' per skb **/
33 struct qeth_eddp_context_reference {
34 struct list_head list;
35 struct qeth_eddp_context *ctx;
38 extern struct qeth_eddp_context *
39 qeth_eddp_create_context(struct qeth_card *,struct sk_buff *,struct qeth_hdr *);
41 extern void
42 qeth_eddp_put_context(struct qeth_eddp_context *);
44 extern int
45 qeth_eddp_fill_buffer(struct qeth_qdio_out_q *,struct qeth_eddp_context *,int);
47 extern void
48 qeth_eddp_buf_release_contexts(struct qeth_qdio_out_buffer *);
50 extern int
51 qeth_eddp_check_buffers_for_context(struct qeth_qdio_out_q *,
52 struct qeth_eddp_context *);
54 * Data used for fragmenting a IP packet.
56 struct qeth_eddp_data {
57 struct qeth_hdr qh;
58 struct ethhdr mac;
59 u16 vlan[2];
60 union {
61 struct {
62 struct iphdr h;
63 u8 options[40];
64 } ip4;
65 struct {
66 struct ipv6hdr h;
67 } ip6;
68 } nh;
69 u8 nhl;
70 void *nh_in_ctx; /* address of nh within the ctx */
71 union {
72 struct {
73 struct tcphdr h;
74 u8 options[40];
75 } tcp;
76 } th;
77 u8 thl;
78 void *th_in_ctx; /* address of th within the ctx */
79 struct sk_buff *skb;
80 int skb_offset;
81 int frag;
82 int frag_offset;
83 } __attribute__ ((packed));
85 #endif /* __QETH_EDDP_H__ */