aboutsummaryrefslogtreecommitdiff
path: root/drivers/s390/net/qeth_core_offl.h
diff options
context:
space:
mode:
authorFrank Blaschka <frank.blaschka@de.ibm.com>2008-02-15 09:19:42 +0100
committerJeff Garzik <jeff@garzik.org>2008-03-17 07:49:26 -0400
commit4a71df50047f0db65ea09b1be155852e81a45eba (patch)
treec1dee8950578440685da91d2553c78f0ff1fd370 /drivers/s390/net/qeth_core_offl.h
parent04885948b101c44cbec9dacfb49b28290a899012 (diff)
qeth: new qeth device driver
List of major changes and improvements: no manipulation of the global ARP constructor clean code split into core, layer 2 and layer 3 functionality better exploitation of the ethtool interface better representation of the various hardware capabilities fix packet socket support (tcpdump), no fake_ll required osasnmpd notification via udev events coding style and beautification Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/s390/net/qeth_core_offl.h')
-rw-r--r--drivers/s390/net/qeth_core_offl.h76
1 files changed, 76 insertions, 0 deletions
diff --git a/drivers/s390/net/qeth_core_offl.h b/drivers/s390/net/qeth_core_offl.h
new file mode 100644
index 00000000000..86bf7df8cf1
--- /dev/null
+++ b/drivers/s390/net/qeth_core_offl.h
@@ -0,0 +1,76 @@
+/*
+ * drivers/s390/net/qeth_core_offl.h
+ *
+ * Copyright IBM Corp. 2007
+ * Author(s): Thomas Spatzier <tspat@de.ibm.com>,
+ * Frank Blaschka <frank.blaschka@de.ibm.com>
+ */
+
+#ifndef __QETH_CORE_OFFL_H__
+#define __QETH_CORE_OFFL_H__
+
+struct qeth_eddp_element {
+ u32 flags;
+ u32 length;
+ void *addr;
+};
+
+struct qeth_eddp_context {
+ atomic_t refcnt;
+ enum qeth_large_send_types type;
+ int num_pages; /* # of allocated pages */
+ u8 **pages; /* pointers to pages */
+ int offset; /* offset in ctx during creation */
+ int num_elements; /* # of required 'SBALEs' */
+ struct qeth_eddp_element *elements; /* array of 'SBALEs' */
+ int elements_per_skb; /* # of 'SBALEs' per skb **/
+};
+
+struct qeth_eddp_context_reference {
+ struct list_head list;
+ struct qeth_eddp_context *ctx;
+};
+
+struct qeth_eddp_data {
+ struct qeth_hdr qh;
+ struct ethhdr mac;
+ __be16 vlan[2];
+ union {
+ struct {
+ struct iphdr h;
+ u8 options[40];
+ } ip4;
+ struct {
+ struct ipv6hdr h;
+ } ip6;
+ } nh;
+ u8 nhl;
+ void *nh_in_ctx; /* address of nh within the ctx */
+ union {
+ struct {
+ struct tcphdr h;
+ u8 options[40];
+ } tcp;
+ } th;
+ u8 thl;
+ void *th_in_ctx; /* address of th within the ctx */
+ struct sk_buff *skb;
+ int skb_offset;
+ int frag;
+ int frag_offset;
+} __attribute__ ((packed));
+
+extern struct qeth_eddp_context *qeth_eddp_create_context(struct qeth_card *,
+ struct sk_buff *, struct qeth_hdr *, unsigned char);
+extern void qeth_eddp_put_context(struct qeth_eddp_context *);
+extern int qeth_eddp_fill_buffer(struct qeth_qdio_out_q *,
+ struct qeth_eddp_context *, int);
+extern void qeth_eddp_buf_release_contexts(struct qeth_qdio_out_buffer *);
+extern int qeth_eddp_check_buffers_for_context(struct qeth_qdio_out_q *,
+ struct qeth_eddp_context *);
+
+void qeth_tso_fill_header(struct qeth_card *, struct qeth_hdr *,
+ struct sk_buff *);
+void qeth_tx_csum(struct sk_buff *skb);
+
+#endif /* __QETH_CORE_EDDP_H__ */