Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 27585
b: refs/heads/master
c: 2c6cc0d
h: refs/heads/master
i:
  27583: 2a31ae4
v: v3
  • Loading branch information
Herbert Xu authored and David S. Miller committed Jun 18, 2006
1 parent f0dfee3 commit a7c9247
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8648b3053bff39a7ee4c711d74268079c928a657
refs/heads/master: 2c6cc0d8539f121c3c75aa3641c19b67e8723379
6 changes: 3 additions & 3 deletions trunk/net/bridge/br_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ static int br_set_tx_csum(struct net_device *dev, u32 data)
struct net_bridge *br = netdev_priv(dev);

if (data)
br->feature_mask |= NETIF_F_IP_CSUM;
br->feature_mask |= NETIF_F_NO_CSUM;
else
br->feature_mask &= ~NETIF_F_IP_CSUM;
br->feature_mask &= ~NETIF_F_ALL_CSUM;

br_features_recompute(br);
return 0;
Expand Down Expand Up @@ -185,5 +185,5 @@ void br_dev_setup(struct net_device *dev)
dev->priv_flags = IFF_EBRIDGE;

dev->features = NETIF_F_SG | NETIF_F_FRAGLIST
| NETIF_F_HIGHDMA | NETIF_F_TSO | NETIF_F_IP_CSUM;
| NETIF_F_HIGHDMA | NETIF_F_TSO | NETIF_F_NO_CSUM;
}
12 changes: 9 additions & 3 deletions trunk/net/bridge/br_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,11 +372,17 @@ void br_features_recompute(struct net_bridge *br)
struct net_bridge_port *p;
unsigned long features, checksum;

features = br->feature_mask &~ NETIF_F_IP_CSUM;
checksum = br->feature_mask & NETIF_F_IP_CSUM;
checksum = br->feature_mask & NETIF_F_ALL_CSUM ? NETIF_F_NO_CSUM : 0;
features = br->feature_mask & ~NETIF_F_ALL_CSUM;

list_for_each_entry(p, &br->port_list, list) {
if (!(p->dev->features & NETIF_F_ALL_CSUM))
if (checksum & NETIF_F_NO_CSUM &&
!(p->dev->features & NETIF_F_NO_CSUM))
checksum ^= NETIF_F_NO_CSUM | NETIF_F_HW_CSUM;
if (checksum & NETIF_F_HW_CSUM &&
!(p->dev->features & NETIF_F_HW_CSUM))
checksum ^= NETIF_F_HW_CSUM | NETIF_F_IP_CSUM;
if (!(p->dev->features & NETIF_F_IP_CSUM))
checksum = 0;
features &= p->dev->features;
}
Expand Down

0 comments on commit a7c9247

Please sign in to comment.