aboutsummaryrefslogtreecommitdiff
path: root/datapath/vport-netdev.c
diff options
context:
space:
mode:
authorJesse Gross <jesse@nicira.com>2010-07-29 19:01:02 -0700
committerJesse Gross <jesse@nicira.com>2010-07-30 13:35:20 -0700
commit67c74f7515867fb8b3a4d23af98dacd3d547ebdd (patch)
tree758154546a913e86d8683100211492d0390ee375 /datapath/vport-netdev.c
parent882c2399908b0f33f73651ccfc3aaf76a7858ce4 (diff)
datapath: Remove redundant checks on SKBs.
On vport ingress we already check for shared SKBs but then later warn in several other places. In a similar vein, we check every packet to see if it is LRO but only certain vports can produce these packets. Remove and consolidate checks to the places where they are needed.
Diffstat (limited to 'datapath/vport-netdev.c')
-rw-r--r--datapath/vport-netdev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/datapath/vport-netdev.c b/datapath/vport-netdev.c
index f172ac4e..1773a09b 100644
--- a/datapath/vport-netdev.c
+++ b/datapath/vport-netdev.c
@@ -251,9 +251,11 @@ static void netdev_port_receive(struct net_bridge_port *p, struct sk_buff *skb)
* (No one comes after us, since we tell handle_bridge() that we took
* the packet.) */
skb = skb_share_check(skb, GFP_ATOMIC);
- if (!skb)
+ if (unlikely(!skb))
return;
+ skb_warn_if_lro(skb);
+
/* Push the Ethernet header back on. */
skb_push(skb, ETH_HLEN);
skb_reset_mac_header(skb);