|
@@ -2134,6 +2134,9 @@ netdev_features_t netif_skb_features(struct sk_buff *skb)
|
|
__be16 protocol = skb->protocol;
|
|
__be16 protocol = skb->protocol;
|
|
netdev_features_t features = skb->dev->features;
|
|
netdev_features_t features = skb->dev->features;
|
|
|
|
|
|
|
|
+ if (skb_shinfo(skb)->gso_segs > skb->dev->gso_max_segs)
|
|
|
|
+ features &= ~NETIF_F_GSO_MASK;
|
|
|
|
+
|
|
if (protocol == htons(ETH_P_8021Q)) {
|
|
if (protocol == htons(ETH_P_8021Q)) {
|
|
struct vlan_ethhdr *veh = (struct vlan_ethhdr *)skb->data;
|
|
struct vlan_ethhdr *veh = (struct vlan_ethhdr *)skb->data;
|
|
protocol = veh->h_vlan_encapsulated_proto;
|
|
protocol = veh->h_vlan_encapsulated_proto;
|
|
@@ -5986,6 +5989,7 @@ struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name,
|
|
dev_net_set(dev, &init_net);
|
|
dev_net_set(dev, &init_net);
|
|
|
|
|
|
dev->gso_max_size = GSO_MAX_SIZE;
|
|
dev->gso_max_size = GSO_MAX_SIZE;
|
|
|
|
+ dev->gso_max_segs = GSO_MAX_SEGS;
|
|
|
|
|
|
INIT_LIST_HEAD(&dev->napi_list);
|
|
INIT_LIST_HEAD(&dev->napi_list);
|
|
INIT_LIST_HEAD(&dev->unreg_list);
|
|
INIT_LIST_HEAD(&dev->unreg_list);
|