|
@@ -2570,11 +2570,14 @@ netdev_features_t netif_skb_features(struct sk_buff *skb)
|
|
|
if (gso_segs > dev->gso_max_segs || gso_segs < dev->gso_min_segs)
|
|
|
features &= ~NETIF_F_GSO_MASK;
|
|
|
|
|
|
- if (protocol == htons(ETH_P_8021Q) || protocol == htons(ETH_P_8021AD)) {
|
|
|
- struct vlan_ethhdr *veh = (struct vlan_ethhdr *)skb->data;
|
|
|
- protocol = veh->h_vlan_encapsulated_proto;
|
|
|
- } else if (!vlan_tx_tag_present(skb)) {
|
|
|
- return harmonize_features(skb, features);
|
|
|
+ if (!vlan_tx_tag_present(skb)) {
|
|
|
+ if (unlikely(protocol == htons(ETH_P_8021Q) ||
|
|
|
+ protocol == htons(ETH_P_8021AD))) {
|
|
|
+ struct vlan_ethhdr *veh = (struct vlan_ethhdr *)skb->data;
|
|
|
+ protocol = veh->h_vlan_encapsulated_proto;
|
|
|
+ } else {
|
|
|
+ return harmonize_features(skb, features);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
features = netdev_intersect_features(features,
|