qeth: new qeth device driver
[deliverable/linux.git] / drivers / s390 / net / qeth_eddp.h
CommitLineData
1da177e4 1/*
e018ba1f 2 * linux/drivers/s390/net/qeth_eddp.h
1da177e4 3 *
e018ba1f 4 * Header file for qeth enhanced device driver packing.
1da177e4
LT
5 *
6 * Copyright 2004 IBM Corporation
7 *
8 * Author(s): Thomas Spatzier <tspat@de.ibm.com>
9 *
1da177e4
LT
10 */
11#ifndef __QETH_EDDP_H__
12#define __QETH_EDDP_H__
13
14struct qeth_eddp_element {
15 u32 flags;
16 u32 length;
17 void *addr;
18};
19
20struct qeth_eddp_context {
21 atomic_t refcnt;
22 enum qeth_large_send_types type;
23 int num_pages; /* # of allocated pages */
24 u8 **pages; /* pointers to pages */
25 int offset; /* offset in ctx during creation */
26 int num_elements; /* # of required 'SBALEs' */
27 struct qeth_eddp_element *elements; /* array of 'SBALEs' */
28 int elements_per_skb; /* # of 'SBALEs' per skb **/
29};
30
31struct qeth_eddp_context_reference {
32 struct list_head list;
33 struct qeth_eddp_context *ctx;
34};
35
36extern struct qeth_eddp_context *
a4c48a26
UB
37qeth_eddp_create_context(struct qeth_card *,struct sk_buff *,
38 struct qeth_hdr *, unsigned char);
1da177e4
LT
39
40extern void
41qeth_eddp_put_context(struct qeth_eddp_context *);
42
43extern int
44qeth_eddp_fill_buffer(struct qeth_qdio_out_q *,struct qeth_eddp_context *,int);
45
46extern void
47qeth_eddp_buf_release_contexts(struct qeth_qdio_out_buffer *);
48
49extern int
50qeth_eddp_check_buffers_for_context(struct qeth_qdio_out_q *,
51 struct qeth_eddp_context *);
52/*
53 * Data used for fragmenting a IP packet.
54 */
55struct qeth_eddp_data {
56 struct qeth_hdr qh;
57 struct ethhdr mac;
5a5a852e 58 __be16 vlan[2];
1da177e4
LT
59 union {
60 struct {
61 struct iphdr h;
62 u8 options[40];
63 } ip4;
64 struct {
65 struct ipv6hdr h;
66 } ip6;
67 } nh;
68 u8 nhl;
69 void *nh_in_ctx; /* address of nh within the ctx */
70 union {
71 struct {
72 struct tcphdr h;
73 u8 options[40];
74 } tcp;
75 } th;
76 u8 thl;
77 void *th_in_ctx; /* address of th within the ctx */
78 struct sk_buff *skb;
79 int skb_offset;
80 int frag;
81 int frag_offset;
82} __attribute__ ((packed));
83
84#endif /* __QETH_EDDP_H__ */
This page took 0.331107 seconds and 5 git commands to generate.