forked from openwrt/openwrt
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bcm53xx: disable GRO by default at kernel level
This improves NAT masquarade network performance. An alternative to kernel change would be runtime setup but that requires ethtool and identifying relevant network interface and all related switch ports interfaces. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
- Loading branch information
Rafał Miłecki
committed
Jun 24, 2022
1 parent
d6eebaf
commit 82d0dd8
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
target/linux/bcm53xx/patches-5.10/600-net-disable-GRO-by-default.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl> | ||
Date: Mon, 20 Jun 2022 10:01:18 +0200 | ||
Subject: [PATCH] net: disable GRO by default | ||
MIME-Version: 1.0 | ||
Content-Type: text/plain; charset=UTF-8 | ||
Content-Transfer-Encoding: 8bit | ||
|
||
In many cases GRO improves network performance however it comes at a | ||
cost of chacksums calculations. In case of slow CPU and missing hardware | ||
csum calculation support GRO can actually decrease network speed. | ||
|
||
On BCM4708 *disabling* GRO results in following NAT masquarade speed | ||
changes: | ||
1. 364 Mb/s → 396 Mb/s (packet steering disabled) | ||
2. 341 Mb/s → 566 Mb/s (packet steering enabled) | ||
|
||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl> | ||
--- | ||
include/linux/netdev_features.h | 4 ++-- | ||
1 file changed, 2 insertions(+), 2 deletions(-) | ||
|
||
--- a/include/linux/netdev_features.h | ||
+++ b/include/linux/netdev_features.h | ||
@@ -231,10 +231,10 @@ static inline int find_next_netdev_feature(u64 feature, unsigned long start) | ||
#define NETIF_F_UPPER_DISABLES NETIF_F_LRO | ||
|
||
/* changeable features with no special hardware requirements */ | ||
-#define NETIF_F_SOFT_FEATURES (NETIF_F_GSO | NETIF_F_GRO) | ||
+#define NETIF_F_SOFT_FEATURES (NETIF_F_GSO) | ||
|
||
/* Changeable features with no special hardware requirements that defaults to off. */ | ||
-#define NETIF_F_SOFT_FEATURES_OFF NETIF_F_GRO_FRAGLIST | ||
+#define NETIF_F_SOFT_FEATURES_OFF (NETIF_F_GRO_FRAGLIST | NETIF_F_GRO) | ||
|
||
#define NETIF_F_VLAN_FEATURES (NETIF_F_HW_VLAN_CTAG_FILTER | \ | ||
NETIF_F_HW_VLAN_CTAG_RX | \ |