mirror of https://gitee.com/openkylin/linux.git
infiniband: nes: Use skb_peek_next() and skb_queue_walk().
Instead of direct SKB list accesses. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
596977300a
commit
0c69198d81
|
@ -198,9 +198,9 @@ static struct sk_buff *nes_get_next_skb(struct nes_device *nesdev, struct nes_qp
|
||||||
|
|
||||||
if (skb) {
|
if (skb) {
|
||||||
/* Continue processing fpdu */
|
/* Continue processing fpdu */
|
||||||
if (skb->next == (struct sk_buff *)&nesqp->pau_list)
|
skb = skb_peek_next(skb, &nesqp->pau_list);
|
||||||
|
if (!skb)
|
||||||
goto out;
|
goto out;
|
||||||
skb = skb->next;
|
|
||||||
processacks = false;
|
processacks = false;
|
||||||
} else {
|
} else {
|
||||||
/* Starting a new one */
|
/* Starting a new one */
|
||||||
|
@ -553,12 +553,10 @@ static void queue_fpdus(struct sk_buff *skb, struct nes_vnic *nesvnic, struct ne
|
||||||
if (skb_queue_len(&nesqp->pau_list) == 0) {
|
if (skb_queue_len(&nesqp->pau_list) == 0) {
|
||||||
skb_queue_head(&nesqp->pau_list, skb);
|
skb_queue_head(&nesqp->pau_list, skb);
|
||||||
} else {
|
} else {
|
||||||
tmpskb = nesqp->pau_list.next;
|
skb_queue_walk(&nesqp->pau_list, tmpskb) {
|
||||||
while (tmpskb != (struct sk_buff *)&nesqp->pau_list) {
|
|
||||||
cb = (struct nes_rskb_cb *)&tmpskb->cb[0];
|
cb = (struct nes_rskb_cb *)&tmpskb->cb[0];
|
||||||
if (before(seqnum, cb->seqnum))
|
if (before(seqnum, cb->seqnum))
|
||||||
break;
|
break;
|
||||||
tmpskb = tmpskb->next;
|
|
||||||
}
|
}
|
||||||
skb_insert(tmpskb, skb, &nesqp->pau_list);
|
skb_insert(tmpskb, skb, &nesqp->pau_list);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue