Merge remote-tracking branch 'lightnvm/for-next'
[deliverable/linux.git] / net / openvswitch / vport.c
index 6b21fd068d874f35c731e6424a1c7560c0038541..8f198437c724839e61a84cc71fd1f4090912a9fc 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;
 }
 
This page took 0.0275 seconds and 5 git commands to generate.