+ bool pmtud = mutable->flags & TNL_F_PMTUD;
+ __be16 frag_off = 0;
+ int mtu = 0;
+ unsigned int packet_length = skb->len - ETH_HLEN;
+
+ /* Allow for one level of tagging in the packet length. */
+ if (!vlan_tx_tag_present(skb) &&
+ eth_hdr(skb)->h_proto == htons(ETH_P_8021Q))
+ packet_length -= VLAN_HLEN;
+
+ if (pmtud) {
+ int vlan_header = 0;
+
+ frag_off = htons(IP_DF);
+
+ /* The tag needs to go in packet regardless of where it
+ * currently is, so subtract it from the MTU.
+ */
+ if (vlan_tx_tag_present(skb) ||
+ eth_hdr(skb)->h_proto == htons(ETH_P_8021Q))
+ vlan_header = VLAN_HLEN;