|
@@ -5362,12 +5362,6 @@ static netdev_features_t netdev_fix_features(struct net_device *dev,
|
|
features &= ~(NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM);
|
|
features &= ~(NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM);
|
|
}
|
|
}
|
|
|
|
|
|
- if ((features & NETIF_F_NO_CSUM) &&
|
|
|
|
- (features & (NETIF_F_HW_CSUM|NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) {
|
|
|
|
- netdev_warn(dev, "mixed no checksumming and other settings.\n");
|
|
|
|
- features &= ~(NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM|NETIF_F_HW_CSUM);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
/* Fix illegal SG+CSUM combinations. */
|
|
/* Fix illegal SG+CSUM combinations. */
|
|
if ((features & NETIF_F_SG) &&
|
|
if ((features & NETIF_F_SG) &&
|
|
!(features & NETIF_F_ALL_CSUM)) {
|
|
!(features & NETIF_F_ALL_CSUM)) {
|
|
@@ -5624,11 +5618,12 @@ int register_netdevice(struct net_device *dev)
|
|
dev->wanted_features = dev->features & dev->hw_features;
|
|
dev->wanted_features = dev->features & dev->hw_features;
|
|
|
|
|
|
/* Turn on no cache copy if HW is doing checksum */
|
|
/* Turn on no cache copy if HW is doing checksum */
|
|
- dev->hw_features |= NETIF_F_NOCACHE_COPY;
|
|
|
|
- if ((dev->features & NETIF_F_ALL_CSUM) &&
|
|
|
|
- !(dev->features & NETIF_F_NO_CSUM)) {
|
|
|
|
- dev->wanted_features |= NETIF_F_NOCACHE_COPY;
|
|
|
|
- dev->features |= NETIF_F_NOCACHE_COPY;
|
|
|
|
|
|
+ if (!(dev->flags & IFF_LOOPBACK)) {
|
|
|
|
+ dev->hw_features |= NETIF_F_NOCACHE_COPY;
|
|
|
|
+ if (dev->features & NETIF_F_ALL_CSUM) {
|
|
|
|
+ dev->wanted_features |= NETIF_F_NOCACHE_COPY;
|
|
|
|
+ dev->features |= NETIF_F_NOCACHE_COPY;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
/* Make NETIF_F_HIGHDMA inheritable to VLAN devices.
|
|
/* Make NETIF_F_HIGHDMA inheritable to VLAN devices.
|
|
@@ -6374,10 +6369,6 @@ netdev_features_t netdev_increment_features(netdev_features_t all,
|
|
all |= one & (NETIF_F_ONE_FOR_ALL|NETIF_F_ALL_CSUM) & mask;
|
|
all |= one & (NETIF_F_ONE_FOR_ALL|NETIF_F_ALL_CSUM) & mask;
|
|
all &= one | ~NETIF_F_ALL_FOR_ALL;
|
|
all &= one | ~NETIF_F_ALL_FOR_ALL;
|
|
|
|
|
|
- /* If device needs checksumming, downgrade to it. */
|
|
|
|
- if (all & (NETIF_F_ALL_CSUM & ~NETIF_F_NO_CSUM))
|
|
|
|
- all &= ~NETIF_F_NO_CSUM;
|
|
|
|
-
|
|
|
|
/* If one device supports hw checksumming, set for all. */
|
|
/* If one device supports hw checksumming, set for all. */
|
|
if (all & NETIF_F_GEN_CSUM)
|
|
if (all & NETIF_F_GEN_CSUM)
|
|
all &= ~(NETIF_F_ALL_CSUM & ~NETIF_F_GEN_CSUM);
|
|
all &= ~(NETIF_F_ALL_CSUM & ~NETIF_F_GEN_CSUM);
|