[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>
This commit is contained in:

committed by
David S. Miller

parent
e023dd6437
commit
eddc9ec53b
@@ -3820,18 +3820,20 @@ qeth_get_priority_queue(struct qeth_card *card, struct sk_buff *skb,
|
||||
return card->info.is_multicast_different &
|
||||
(card->qdio.no_out_queues - 1);
|
||||
if (card->qdio.do_prio_queueing && (ipv == 4)) {
|
||||
const u8 tos = ip_hdr(skb)->tos;
|
||||
|
||||
if (card->qdio.do_prio_queueing==QETH_PRIO_Q_ING_TOS){
|
||||
if (skb->nh.iph->tos & IP_TOS_NOTIMPORTANT)
|
||||
if (tos & IP_TOS_NOTIMPORTANT)
|
||||
return 3;
|
||||
if (skb->nh.iph->tos & IP_TOS_HIGHRELIABILITY)
|
||||
if (tos & IP_TOS_HIGHRELIABILITY)
|
||||
return 2;
|
||||
if (skb->nh.iph->tos & IP_TOS_HIGHTHROUGHPUT)
|
||||
if (tos & IP_TOS_HIGHTHROUGHPUT)
|
||||
return 1;
|
||||
if (skb->nh.iph->tos & IP_TOS_LOWDELAY)
|
||||
if (tos & IP_TOS_LOWDELAY)
|
||||
return 0;
|
||||
}
|
||||
if (card->qdio.do_prio_queueing==QETH_PRIO_Q_ING_PREC)
|
||||
return 3 - (skb->nh.iph->tos >> 6);
|
||||
return 3 - (tos >> 6);
|
||||
} else if (card->qdio.do_prio_queueing && (ipv == 6)) {
|
||||
/* TODO: IPv6!!! */
|
||||
}
|
||||
@@ -4041,7 +4043,8 @@ qeth_fill_header(struct qeth_card *card, struct qeth_hdr *hdr,
|
||||
*((u32 *) skb->dst->neighbour->primary_key);
|
||||
} else {
|
||||
/* fill in destination address used in ip header */
|
||||
*((u32 *) (&hdr->hdr.l3.dest_addr[12])) = skb->nh.iph->daddr;
|
||||
*((u32 *)(&hdr->hdr.l3.dest_addr[12])) =
|
||||
ip_hdr(skb)->daddr;
|
||||
}
|
||||
} else if (ipv == 6) { /* IPv6 or passthru */
|
||||
hdr->hdr.l3.flags = qeth_get_qeth_hdr_flags6(cast_type);
|
||||
|
Reference in New Issue
Block a user