diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-04-21 01:47:35 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:25:10 -0400 |
commit | eddc9ec53be2ecdbf4efe0efd4a83052594f0ac0 (patch) | |
tree | 4a38ab4dbd9d61fdf5a5ea6ed61463e0b9e33ba7 /drivers/s390 | |
parent | e023dd643798c4f06c16466af90b4d250e4b8bd7 (diff) |
[SK_BUFF]: Introduce ip_hdr(), remove skb->nh.iph
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/net/qeth_main.c | 15 | ||||
-rw-r--r-- | drivers/s390/net/qeth_tso.h | 12 |
2 files changed, 13 insertions, 14 deletions
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c index 0ff29e0628b5..8a07d548a05a 100644 --- a/drivers/s390/net/qeth_main.c +++ b/drivers/s390/net/qeth_main.c | |||
@@ -3820,18 +3820,20 @@ qeth_get_priority_queue(struct qeth_card *card, struct sk_buff *skb, | |||
3820 | return card->info.is_multicast_different & | 3820 | return card->info.is_multicast_different & |
3821 | (card->qdio.no_out_queues - 1); | 3821 | (card->qdio.no_out_queues - 1); |
3822 | if (card->qdio.do_prio_queueing && (ipv == 4)) { | 3822 | if (card->qdio.do_prio_queueing && (ipv == 4)) { |
3823 | const u8 tos = ip_hdr(skb)->tos; | ||
3824 | |||
3823 | if (card->qdio.do_prio_queueing==QETH_PRIO_Q_ING_TOS){ | 3825 | if (card->qdio.do_prio_queueing==QETH_PRIO_Q_ING_TOS){ |
3824 | if (skb->nh.iph->tos & IP_TOS_NOTIMPORTANT) | 3826 | if (tos & IP_TOS_NOTIMPORTANT) |
3825 | return 3; | 3827 | return 3; |
3826 | if (skb->nh.iph->tos & IP_TOS_HIGHRELIABILITY) | 3828 | if (tos & IP_TOS_HIGHRELIABILITY) |
3827 | return 2; | 3829 | return 2; |
3828 | if (skb->nh.iph->tos & IP_TOS_HIGHTHROUGHPUT) | 3830 | if (tos & IP_TOS_HIGHTHROUGHPUT) |
3829 | return 1; | 3831 | return 1; |
3830 | if (skb->nh.iph->tos & IP_TOS_LOWDELAY) | 3832 | if (tos & IP_TOS_LOWDELAY) |
3831 | return 0; | 3833 | return 0; |
3832 | } | 3834 | } |
3833 | if (card->qdio.do_prio_queueing==QETH_PRIO_Q_ING_PREC) | 3835 | if (card->qdio.do_prio_queueing==QETH_PRIO_Q_ING_PREC) |
3834 | return 3 - (skb->nh.iph->tos >> 6); | 3836 | return 3 - (tos >> 6); |
3835 | } else if (card->qdio.do_prio_queueing && (ipv == 6)) { | 3837 | } else if (card->qdio.do_prio_queueing && (ipv == 6)) { |
3836 | /* TODO: IPv6!!! */ | 3838 | /* TODO: IPv6!!! */ |
3837 | } | 3839 | } |
@@ -4041,7 +4043,8 @@ qeth_fill_header(struct qeth_card *card, struct qeth_hdr *hdr, | |||
4041 | *((u32 *) skb->dst->neighbour->primary_key); | 4043 | *((u32 *) skb->dst->neighbour->primary_key); |
4042 | } else { | 4044 | } else { |
4043 | /* fill in destination address used in ip header */ | 4045 | /* fill in destination address used in ip header */ |
4044 | *((u32 *) (&hdr->hdr.l3.dest_addr[12])) = skb->nh.iph->daddr; | 4046 | *((u32 *)(&hdr->hdr.l3.dest_addr[12])) = |
4047 | ip_hdr(skb)->daddr; | ||
4045 | } | 4048 | } |
4046 | } else if (ipv == 6) { /* IPv6 or passthru */ | 4049 | } else if (ipv == 6) { /* IPv6 or passthru */ |
4047 | hdr->hdr.l3.flags = qeth_get_qeth_hdr_flags6(cast_type); | 4050 | hdr->hdr.l3.flags = qeth_get_qeth_hdr_flags6(cast_type); |
diff --git a/drivers/s390/net/qeth_tso.h b/drivers/s390/net/qeth_tso.h index 14504afb044e..255cb2e9c796 100644 --- a/drivers/s390/net/qeth_tso.h +++ b/drivers/s390/net/qeth_tso.h | |||
@@ -40,7 +40,7 @@ qeth_tso_fill_header(struct qeth_card *card, struct sk_buff *skb) | |||
40 | QETH_DBF_TEXT(trace, 5, "tsofhdr"); | 40 | QETH_DBF_TEXT(trace, 5, "tsofhdr"); |
41 | 41 | ||
42 | hdr = (struct qeth_hdr_tso *) skb->data; | 42 | hdr = (struct qeth_hdr_tso *) skb->data; |
43 | iph = skb->nh.iph; | 43 | iph = ip_hdr(skb); |
44 | tcph = skb->h.th; | 44 | tcph = skb->h.th; |
45 | /*fix header to TSO values ...*/ | 45 | /*fix header to TSO values ...*/ |
46 | hdr->hdr.hdr.l3.id = QETH_HEADER_TYPE_TSO; | 46 | hdr->hdr.hdr.l3.id = QETH_HEADER_TYPE_TSO; |
@@ -63,13 +63,9 @@ qeth_tso_fill_header(struct qeth_card *card, struct sk_buff *skb) | |||
63 | static inline void | 63 | static inline void |
64 | qeth_tso_set_tcpip_header(struct qeth_card *card, struct sk_buff *skb) | 64 | qeth_tso_set_tcpip_header(struct qeth_card *card, struct sk_buff *skb) |
65 | { | 65 | { |
66 | struct iphdr *iph; | 66 | struct iphdr *iph = ip_hdr(skb); |
67 | struct ipv6hdr *ip6h; | 67 | struct ipv6hdr *ip6h = skb->nh.ipv6h; |
68 | struct tcphdr *tcph; | 68 | struct tcphdr *tcph = skb->h.th; |
69 | |||
70 | iph = skb->nh.iph; | ||
71 | ip6h = skb->nh.ipv6h; | ||
72 | tcph = skb->h.th; | ||
73 | 69 | ||
74 | tcph->check = 0; | 70 | tcph->check = 0; |
75 | if (skb->protocol == ETH_P_IPV6) { | 71 | if (skb->protocol == ETH_P_IPV6) { |