aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/qeth.h
diff options
context:
space:
mode:
authorFrank Pavlic <pavlic@de.ibm.com>2005-05-12 14:39:09 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-05-15 18:06:17 -0400
commit05e08a2a297371564020f76d1bf8b3a931d5e1ed (patch)
tree0aac8cafdec747a792c46dff1b934db642b0a054 /drivers/s390/net/qeth.h
parent9a4558193662e933588ee53e0202c103a68c9366 (diff)
[PATCH] s390: qeth bug fixes
[patch 10/10] s390: qeth bug fixes. From: Frank Pavlic <pavlic@de.ibm.com> qeth network driver related changes: - due to OSA hardware changes in TCP Segmentation Offload support we are able now to pack TSO packets too. This fits perfectly in design of qeth buffer handling and sending data respectively. - remove skb_realloc_headroom from the sending path since hard_header_len value provides enough headroom now. - device recovery behaviour improvement - bug fixed in Enhanced Device Driver Packing functionality Signed-off-by: Frank Pavlic <pavlic@de.ibm.com>
Diffstat (limited to 'drivers/s390/net/qeth.h')
-rw-r--r--drivers/s390/net/qeth.h41
1 files changed, 25 insertions, 16 deletions
diff --git a/drivers/s390/net/qeth.h b/drivers/s390/net/qeth.h
index d13c105f74e6..a755b57db46b 100644
--- a/drivers/s390/net/qeth.h
+++ b/drivers/s390/net/qeth.h
@@ -24,7 +24,7 @@
24 24
25#include "qeth_mpc.h" 25#include "qeth_mpc.h"
26 26
27#define VERSION_QETH_H "$Revision: 1.137 $" 27#define VERSION_QETH_H "$Revision: 1.139 $"
28 28
29#ifdef CONFIG_QETH_IPV6 29#ifdef CONFIG_QETH_IPV6
30#define QETH_VERSION_IPV6 ":IPv6" 30#define QETH_VERSION_IPV6 ":IPv6"
@@ -370,6 +370,25 @@ struct qeth_hdr {
370 } hdr; 370 } hdr;
371} __attribute__ ((packed)); 371} __attribute__ ((packed));
372 372
373/*TCP Segmentation Offload header*/
374struct qeth_hdr_ext_tso {
375 __u16 hdr_tot_len;
376 __u8 imb_hdr_no;
377 __u8 reserved;
378 __u8 hdr_type;
379 __u8 hdr_version;
380 __u16 hdr_len;
381 __u32 payload_len;
382 __u16 mss;
383 __u16 dg_hdr_len;
384 __u8 padding[16];
385} __attribute__ ((packed));
386
387struct qeth_hdr_tso {
388 struct qeth_hdr hdr; /*hdr->hdr.l3.xxx*/
389 struct qeth_hdr_ext_tso ext;
390} __attribute__ ((packed));
391
373 392
374/* flags for qeth_hdr.flags */ 393/* flags for qeth_hdr.flags */
375#define QETH_HDR_PASSTHRU 0x10 394#define QETH_HDR_PASSTHRU 0x10
@@ -867,16 +886,6 @@ qeth_push_skb(struct qeth_card *card, struct sk_buff **skb, int size)
867 return hdr; 886 return hdr;
868} 887}
869 888
870static inline int
871qeth_get_skb_data_len(struct sk_buff *skb)
872{
873 int len = skb->len;
874 int i;
875
876 for (i = 0; i < skb_shinfo(skb)->nr_frags; ++i)
877 len -= skb_shinfo(skb)->frags[i].size;
878 return len;
879}
880 889
881inline static int 890inline static int
882qeth_get_hlen(__u8 link_type) 891qeth_get_hlen(__u8 link_type)
@@ -885,19 +894,19 @@ qeth_get_hlen(__u8 link_type)
885 switch (link_type) { 894 switch (link_type) {
886 case QETH_LINK_TYPE_HSTR: 895 case QETH_LINK_TYPE_HSTR:
887 case QETH_LINK_TYPE_LANE_TR: 896 case QETH_LINK_TYPE_LANE_TR:
888 return sizeof(struct qeth_hdr) + TR_HLEN; 897 return sizeof(struct qeth_hdr_tso) + TR_HLEN;
889 default: 898 default:
890#ifdef CONFIG_QETH_VLAN 899#ifdef CONFIG_QETH_VLAN
891 return sizeof(struct qeth_hdr) + VLAN_ETH_HLEN; 900 return sizeof(struct qeth_hdr_tso) + VLAN_ETH_HLEN;
892#else 901#else
893 return sizeof(struct qeth_hdr) + ETH_HLEN; 902 return sizeof(struct qeth_hdr_tso) + ETH_HLEN;
894#endif 903#endif
895 } 904 }
896#else /* CONFIG_QETH_IPV6 */ 905#else /* CONFIG_QETH_IPV6 */
897#ifdef CONFIG_QETH_VLAN 906#ifdef CONFIG_QETH_VLAN
898 return sizeof(struct qeth_hdr) + VLAN_HLEN; 907 return sizeof(struct qeth_hdr_tso) + VLAN_HLEN;
899#else 908#else
900 return sizeof(struct qeth_hdr); 909 return sizeof(struct qeth_hdr_tso);
901#endif 910#endif
902#endif /* CONFIG_QETH_IPV6 */ 911#endif /* CONFIG_QETH_IPV6 */
903} 912}