600-net-disable-GRO-by-default.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  1. From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]>
  2. Date: Mon, 20 Jun 2022 10:01:18 +0200
  3. Subject: [PATCH] net: disable GRO by default
  4. MIME-Version: 1.0
  5. Content-Type: text/plain; charset=UTF-8
  6. Content-Transfer-Encoding: 8bit
  7. In many cases GRO improves network performance however it comes at a
  8. cost of chacksums calculations. In case of slow CPU and missing hardware
  9. csum calculation support GRO can actually decrease network speed.
  10. On BCM4708 *disabling* GRO results in following NAT masquarade speed
  11. changes:
  12. 1. 364 Mb/s → 396 Mb/s (packet steering disabled)
  13. 2. 341 Mb/s → 566 Mb/s (packet steering enabled)
  14. Signed-off-by: Rafał Miłecki <[email protected]>
  15. ---
  16. include/linux/netdev_features.h | 4 ++--
  17. 1 file changed, 2 insertions(+), 2 deletions(-)
  18. --- a/include/linux/netdev_features.h
  19. +++ b/include/linux/netdev_features.h
  20. @@ -242,10 +242,10 @@ static inline int find_next_netdev_featu
  21. #define NETIF_F_UPPER_DISABLES NETIF_F_LRO
  22. /* changeable features with no special hardware requirements */
  23. -#define NETIF_F_SOFT_FEATURES (NETIF_F_GSO | NETIF_F_GRO)
  24. +#define NETIF_F_SOFT_FEATURES (NETIF_F_GSO)
  25. /* Changeable features with no special hardware requirements that defaults to off. */
  26. -#define NETIF_F_SOFT_FEATURES_OFF (NETIF_F_GRO_FRAGLIST | NETIF_F_GRO_UDP_FWD)
  27. +#define NETIF_F_SOFT_FEATURES_OFF (NETIF_F_GRO_FRAGLIST | NETIF_F_GRO_UDP_FWD | NETIF_F_GRO)
  28. #define NETIF_F_VLAN_FEATURES (NETIF_F_HW_VLAN_CTAG_FILTER | \
  29. NETIF_F_HW_VLAN_CTAG_RX | \