qeth_eddp.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*
  2. * linux/drivers/s390/net/qeth_eddp.c ($Revision: 1.5 $)
  3. *
  4. * Header file for qeth enhanced device driver pakcing.
  5. *
  6. * Copyright 2004 IBM Corporation
  7. *
  8. * Author(s): Thomas Spatzier <tspat@de.ibm.com>
  9. *
  10. * $Revision: 1.5 $ $Date: 2005/03/24 09:04:18 $
  11. *
  12. */
  13. #ifndef __QETH_EDDP_H__
  14. #define __QETH_EDDP_H__
  15. struct qeth_eddp_element {
  16. u32 flags;
  17. u32 length;
  18. void *addr;
  19. };
  20. struct 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. struct qeth_eddp_context_reference {
  31. struct list_head list;
  32. struct qeth_eddp_context *ctx;
  33. };
  34. extern struct qeth_eddp_context *
  35. qeth_eddp_create_context(struct qeth_card *,struct sk_buff *,struct qeth_hdr *);
  36. extern void
  37. qeth_eddp_put_context(struct qeth_eddp_context *);
  38. extern int
  39. qeth_eddp_fill_buffer(struct qeth_qdio_out_q *,struct qeth_eddp_context *,int);
  40. extern void
  41. qeth_eddp_buf_release_contexts(struct qeth_qdio_out_buffer *);
  42. extern int
  43. qeth_eddp_check_buffers_for_context(struct qeth_qdio_out_q *,
  44. struct qeth_eddp_context *);
  45. /*
  46. * Data used for fragmenting a IP packet.
  47. */
  48. struct qeth_eddp_data {
  49. struct qeth_hdr qh;
  50. struct ethhdr mac;
  51. u16 vlan[2];
  52. union {
  53. struct {
  54. struct iphdr h;
  55. u8 options[40];
  56. } ip4;
  57. struct {
  58. struct ipv6hdr h;
  59. } ip6;
  60. } nh;
  61. u8 nhl;
  62. void *nh_in_ctx; /* address of nh within the ctx */
  63. union {
  64. struct {
  65. struct tcphdr h;
  66. u8 options[40];
  67. } tcp;
  68. } th;
  69. u8 thl;
  70. void *th_in_ctx; /* address of th within the ctx */
  71. struct sk_buff *skb;
  72. int skb_offset;
  73. int frag;
  74. int frag_offset;
  75. } __attribute__ ((packed));
  76. #endif /* __QETH_EDDP_H__ */