diff options
author | Eric Dumazet <edumazet@google.com> | 2015-01-26 02:27:14 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-01-26 02:34:23 -0500 |
commit | 24f87d4ce1c548ed702820060c237787b3efae33 (patch) | |
tree | aa6d6e655acc5d88fbce2ab2d2549552047f723b /drivers/net/bonding | |
parent | 1b846f9282c0781f8ecf90e355008d94a0b973dd (diff) |
bonding: handle more gso types
In commit 5a7baa78851b ("bonding: Advertize vxlan offload features when
supported"), Or Gerlitz added support conditional vxlan offload.
In this patch I also add support for all kind of tunnels,
but we allow a bonding device to not require segmentation,
as it is always better to make this segmentation at the very last stage,
if a particular slave device requires it.
Tested:
Setup a GRE tunnel,
on a physical NIC not having tx-gre-segmentation.
Results on bnx2x are even better, as we no longer have to segment
in software.
ethtool -K bond0 tx-gre-segmentation off
super_netperf 50 --google-pacing-rate 30000000 -H 10.7.8.152 -l 15
7538.32
ethtool -K bond0 tx-gre-segmentation on
super_netperf 50 --google-pacing-rate 30000000 -H 10.7.8.152 -l 15
10200.5
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 0dceba1a2ba1..f47bc433407a 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -998,7 +998,7 @@ static netdev_features_t bond_fix_features(struct net_device *dev, | |||
998 | NETIF_F_HIGHDMA | NETIF_F_LRO) | 998 | NETIF_F_HIGHDMA | NETIF_F_LRO) |
999 | 999 | ||
1000 | #define BOND_ENC_FEATURES (NETIF_F_ALL_CSUM | NETIF_F_SG | NETIF_F_RXCSUM |\ | 1000 | #define BOND_ENC_FEATURES (NETIF_F_ALL_CSUM | NETIF_F_SG | NETIF_F_RXCSUM |\ |
1001 | NETIF_F_TSO | NETIF_F_GSO_UDP_TUNNEL) | 1001 | NETIF_F_TSO) |
1002 | 1002 | ||
1003 | static void bond_compute_features(struct bonding *bond) | 1003 | static void bond_compute_features(struct bonding *bond) |
1004 | { | 1004 | { |
@@ -1034,7 +1034,7 @@ static void bond_compute_features(struct bonding *bond) | |||
1034 | 1034 | ||
1035 | done: | 1035 | done: |
1036 | bond_dev->vlan_features = vlan_features; | 1036 | bond_dev->vlan_features = vlan_features; |
1037 | bond_dev->hw_enc_features = enc_features; | 1037 | bond_dev->hw_enc_features = enc_features | NETIF_F_GSO_ENCAP_ALL; |
1038 | bond_dev->hard_header_len = max_hard_header_len; | 1038 | bond_dev->hard_header_len = max_hard_header_len; |
1039 | bond_dev->gso_max_segs = gso_max_segs; | 1039 | bond_dev->gso_max_segs = gso_max_segs; |
1040 | netif_set_gso_max_size(bond_dev, gso_max_size); | 1040 | netif_set_gso_max_size(bond_dev, gso_max_size); |
@@ -4010,7 +4010,7 @@ void bond_setup(struct net_device *bond_dev) | |||
4010 | NETIF_F_HW_VLAN_CTAG_FILTER; | 4010 | NETIF_F_HW_VLAN_CTAG_FILTER; |
4011 | 4011 | ||
4012 | bond_dev->hw_features &= ~(NETIF_F_ALL_CSUM & ~NETIF_F_HW_CSUM); | 4012 | bond_dev->hw_features &= ~(NETIF_F_ALL_CSUM & ~NETIF_F_HW_CSUM); |
4013 | bond_dev->hw_features |= NETIF_F_GSO_UDP_TUNNEL; | 4013 | bond_dev->hw_features |= NETIF_F_GSO_ENCAP_ALL; |
4014 | bond_dev->features |= bond_dev->hw_features; | 4014 | bond_dev->features |= bond_dev->hw_features; |
4015 | } | 4015 | } |
4016 | 4016 | ||