qeth_eddp.h 1.8 KB

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