Commit 62f2a3a48bdc99822a24356e667e52c30df287c9

Authored by Michał Mirosław
Committed by David S. Miller
1 parent b73c43f884

net: remove NETIF_F_ALL_TX_OFFLOADS

There is no software fallback implemented for SCTP or FCoE checksumming,
and so it should not be passed on by software devices like bridge or bonding.

For VLAN devices, this is different. First, the driver for underlying device
should be prepared to get offloaded packets even when the feature is disabled
(especially if it advertises it in vlan_features). Second, devices under
VLANs do not get replaced without tearing down the VLAN first.

This fixes a mess I accidentally introduced while converting bonding to
ndo_fix_features.

NETIF_F_SOFT_FEATURES are removed from BOND_VLAN_FEATURES because they
are unused as of commit 712ae51afd.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 3 changed files with 8 additions and 10 deletions Side-by-side Diff

drivers/net/bonding/bond_main.c
... ... @@ -1428,9 +1428,9 @@
1428 1428 return features;
1429 1429 }
1430 1430  
1431   -#define BOND_VLAN_FEATURES (NETIF_F_ALL_TX_OFFLOADS | \
1432   - NETIF_F_SOFT_FEATURES | \
1433   - NETIF_F_LRO)
  1431 +#define BOND_VLAN_FEATURES (NETIF_F_ALL_CSUM | NETIF_F_SG | \
  1432 + NETIF_F_FRAGLIST | NETIF_F_ALL_TSO | \
  1433 + NETIF_F_HIGHDMA | NETIF_F_LRO)
1434 1434  
1435 1435 static void bond_compute_features(struct bonding *bond)
1436 1436 {
include/linux/netdevice.h
... ... @@ -1097,12 +1097,6 @@
1097 1097 #define NETIF_F_ALL_FCOE (NETIF_F_FCOE_CRC | NETIF_F_FCOE_MTU | \
1098 1098 NETIF_F_FSO)
1099 1099  
1100   -#define NETIF_F_ALL_TX_OFFLOADS (NETIF_F_ALL_CSUM | NETIF_F_SG | \
1101   - NETIF_F_FRAGLIST | NETIF_F_ALL_TSO | \
1102   - NETIF_F_HIGHDMA | \
1103   - NETIF_F_SCTP_CSUM | \
1104   - NETIF_F_ALL_FCOE)
1105   -
1106 1100 /*
1107 1101 * If one device supports one of these features, then enable them
1108 1102 * for all in netdev_increment_features.
net/8021q/vlan_dev.c
... ... @@ -528,7 +528,11 @@
528 528 (1<<__LINK_STATE_DORMANT))) |
529 529 (1<<__LINK_STATE_PRESENT);
530 530  
531   - dev->hw_features = NETIF_F_ALL_TX_OFFLOADS;
  531 + dev->hw_features = NETIF_F_ALL_CSUM | NETIF_F_SG |
  532 + NETIF_F_FRAGLIST | NETIF_F_ALL_TSO |
  533 + NETIF_F_HIGHDMA | NETIF_F_SCTP_CSUM |
  534 + NETIF_F_ALL_FCOE;
  535 +
532 536 dev->features |= real_dev->vlan_features | NETIF_F_LLTX;
533 537 dev->gso_max_size = real_dev->gso_max_size;
534 538