@@ -1539,17 +1539,20 @@ static netdev_features_t bond_fix_features(struct net_device *dev,
1539
1539
NETIF_F_HIGHDMA | NETIF_F_LRO)
1540
1540
1541
1541
#define BOND_ENC_FEATURES (NETIF_F_HW_CSUM | NETIF_F_SG | \
1542
- NETIF_F_RXCSUM | NETIF_F_GSO_SOFTWARE)
1542
+ NETIF_F_RXCSUM | NETIF_F_GSO_SOFTWARE | \
1543
+ NETIF_F_GSO_PARTIAL)
1543
1544
1544
1545
#define BOND_MPLS_FEATURES (NETIF_F_HW_CSUM | NETIF_F_SG | \
1545
1546
NETIF_F_GSO_SOFTWARE)
1546
1547
1548
+ #define BOND_GSO_PARTIAL_FEATURES (NETIF_F_GSO_ESP)
1549
+
1547
1550
1548
1551
static void bond_compute_features (struct bonding * bond )
1549
1552
{
1553
+ netdev_features_t gso_partial_features = BOND_GSO_PARTIAL_FEATURES ;
1550
1554
unsigned int dst_release_flag = IFF_XMIT_DST_RELEASE |
1551
1555
IFF_XMIT_DST_RELEASE_PERM ;
1552
- netdev_features_t gso_partial_features = NETIF_F_GSO_ESP ;
1553
1556
netdev_features_t vlan_features = BOND_VLAN_FEATURES ;
1554
1557
netdev_features_t enc_features = BOND_ENC_FEATURES ;
1555
1558
#ifdef CONFIG_XFRM_OFFLOAD
@@ -1583,8 +1586,9 @@ static void bond_compute_features(struct bonding *bond)
1583
1586
BOND_XFRM_FEATURES );
1584
1587
#endif /* CONFIG_XFRM_OFFLOAD */
1585
1588
1586
- if (slave -> dev -> hw_enc_features & NETIF_F_GSO_PARTIAL )
1587
- gso_partial_features &= slave -> dev -> gso_partial_features ;
1589
+ gso_partial_features = netdev_increment_features (gso_partial_features ,
1590
+ slave -> dev -> gso_partial_features ,
1591
+ BOND_GSO_PARTIAL_FEATURES );
1588
1592
1589
1593
mpls_features = netdev_increment_features (mpls_features ,
1590
1594
slave -> dev -> mpls_features ,
@@ -1599,12 +1603,8 @@ static void bond_compute_features(struct bonding *bond)
1599
1603
}
1600
1604
bond_dev -> hard_header_len = max_hard_header_len ;
1601
1605
1602
- if (gso_partial_features & NETIF_F_GSO_ESP )
1603
- bond_dev -> gso_partial_features |= NETIF_F_GSO_ESP ;
1604
- else
1605
- bond_dev -> gso_partial_features &= ~NETIF_F_GSO_ESP ;
1606
-
1607
1606
done :
1607
+ bond_dev -> gso_partial_features = gso_partial_features ;
1608
1608
bond_dev -> vlan_features = vlan_features ;
1609
1609
bond_dev -> hw_enc_features = enc_features | NETIF_F_GSO_ENCAP_ALL |
1610
1610
NETIF_F_HW_VLAN_CTAG_TX |
@@ -6037,6 +6037,7 @@ void bond_setup(struct net_device *bond_dev)
6037
6037
bond_dev -> hw_features |= NETIF_F_GSO_ENCAP_ALL ;
6038
6038
bond_dev -> features |= bond_dev -> hw_features ;
6039
6039
bond_dev -> features |= NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_STAG_TX ;
6040
+ bond_dev -> features |= NETIF_F_GSO_PARTIAL ;
6040
6041
#ifdef CONFIG_XFRM_OFFLOAD
6041
6042
bond_dev -> hw_features |= BOND_XFRM_FEATURES ;
6042
6043
/* Only enable XFRM features if this is an active-backup config */
0 commit comments