openvswitch: 802.1AD Flow handling, actions, vlan parsing, netlink attributes
[cascardo/linux.git] / net / openvswitch / vport.c
index 6b21fd0..8f19843 100644 (file)
@@ -485,9 +485,14 @@ static unsigned int packet_length(const struct sk_buff *skb)
 {
        unsigned int length = skb->len - ETH_HLEN;
 
-       if (skb->protocol == htons(ETH_P_8021Q))
+       if (skb_vlan_tagged(skb))
                length -= VLAN_HLEN;
 
+       /* Don't subtract for multiple VLAN tags. Most (all?) drivers allow
+        * (ETH_LEN + VLAN_HLEN) in addition to the mtu value, but almost none
+        * account for 802.1ad. e.g. is_skb_forwardable().
+        */
+
        return length;
 }