Skip to content

Commit

Permalink
net: vlan: goto another_round instead of calling __netif_receive_skb
Browse files Browse the repository at this point in the history
Now, when vlan tag on untagged in non-accelerated path is stripped from
skb, headers are reset right away. Benefit from that and avoid calling
__netif_receive_skb recursivelly and just use another_round.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Aug 22, 2011
1 parent c8d755b commit 0dfe178
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -3236,10 +3236,9 @@ static int __netif_receive_skb(struct sk_buff *skb)
ret = deliver_skb(skb, pt_prev, orig_dev);
pt_prev = NULL;
}
if (vlan_do_receive(&skb)) {
ret = __netif_receive_skb(skb);
goto out;
} else if (unlikely(!skb))
if (vlan_do_receive(&skb))
goto another_round;
else if (unlikely(!skb))
goto out;
}

Expand Down

0 comments on commit 0dfe178

Please sign in to comment.