qeth_core_offl.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. * drivers/s390/net/qeth_core_offl.h
  3. *
  4. * Copyright IBM Corp. 2007
  5. * Author(s): Thomas Spatzier <tspat@de.ibm.com>,
  6. * Frank Blaschka <frank.blaschka@de.ibm.com>
  7. */
  8. #ifndef __QETH_CORE_OFFL_H__
  9. #define __QETH_CORE_OFFL_H__
  10. struct qeth_eddp_element {
  11. u32 flags;
  12. u32 length;
  13. void *addr;
  14. };
  15. struct qeth_eddp_context {
  16. atomic_t refcnt;
  17. enum qeth_large_send_types type;
  18. int num_pages; /* # of allocated pages */
  19. u8 **pages; /* pointers to pages */
  20. int offset; /* offset in ctx during creation */
  21. int num_elements; /* # of required 'SBALEs' */
  22. struct qeth_eddp_element *elements; /* array of 'SBALEs' */
  23. int elements_per_skb; /* # of 'SBALEs' per skb **/
  24. };
  25. struct qeth_eddp_context_reference {
  26. struct list_head list;
  27. struct qeth_eddp_context *ctx;
  28. };
  29. struct qeth_eddp_data {
  30. struct qeth_hdr qh;
  31. struct ethhdr mac;
  32. __be16 vlan[2];
  33. union {
  34. struct {
  35. struct iphdr h;
  36. u8 options[40];
  37. } ip4;
  38. struct {
  39. struct ipv6hdr h;
  40. } ip6;
  41. } nh;
  42. u8 nhl;
  43. void *nh_in_ctx; /* address of nh within the ctx */
  44. union {
  45. struct {
  46. struct tcphdr h;
  47. u8 options[40];
  48. } tcp;
  49. } th;
  50. u8 thl;
  51. void *th_in_ctx; /* address of th within the ctx */
  52. struct sk_buff *skb;
  53. int skb_offset;
  54. int frag;
  55. int frag_offset;
  56. } __attribute__ ((packed));
  57. extern struct qeth_eddp_context *qeth_eddp_create_context(struct qeth_card *,
  58. struct sk_buff *, struct qeth_hdr *, unsigned char);
  59. extern void qeth_eddp_put_context(struct qeth_eddp_context *);
  60. extern int qeth_eddp_fill_buffer(struct qeth_qdio_out_q *,
  61. struct qeth_eddp_context *, int);
  62. extern void qeth_eddp_buf_release_contexts(struct qeth_qdio_out_buffer *);
  63. extern int qeth_eddp_check_buffers_for_context(struct qeth_qdio_out_q *,
  64. struct qeth_eddp_context *);
  65. void qeth_tso_fill_header(struct qeth_card *, struct qeth_hdr *,
  66. struct sk_buff *);
  67. void qeth_tx_csum(struct sk_buff *skb);
  68. #endif /* __QETH_CORE_EDDP_H__ */