Skip to contentSkip to conversation

net: eliminate warning from NETIF_F_UFO on bridge

PATCH New Stephen Hemminger 1 participant 1 message Dec 12, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: eliminate warning from NETIF_F_UFO on bridge

The bridge device always causes a warning because when it is first created it has the no checksum flag set along with all the segmentation/fragmentation offload bits. The code in register_netdevice incorrectly checks for only hardware checksum bit and ignores no checksum bit.

Similar code is already in 2.6.28:
commit b63365a2d60268a3988285d6c3c6003d7066f93a
net: Fix disjunct computation of netdev features

---
Patch against 2.6.27.y

net/core/dev.c +1 -1
@@ -3990,7 +3990,7 @@ int register_netdevice(struct net_device
 		dev->features &= ~NETIF_F_TSO;
 	}
 	if (dev->features & NETIF_F_UFO) {
-		if (!(dev->features & NETIF_F_HW_CSUM)) {
+		if (!(dev->features & NETIF_F_GEN_CSUM)) {
 			printk(KERN_ERR "%s: Dropping NETIF_F_UFO since no "
 					"NETIF_F_HW_CSUM feature.\n",
 							dev->name);