diff options
author | Jakub Kicinski <kuba@kernel.org> | 2022-05-06 05:51:33 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-05-06 14:07:56 +0300 |
commit | ee8b7a1156f357613646d6c69d07ac5a087a1071 (patch) | |
tree | 407ecbc4558b07373978ef5a57a2b08d18d23206 /net | |
parent | 14d7b8122fd591693a2388b98563707ba72c6780 (diff) | |
download | linux-ee8b7a1156f357613646d6c69d07ac5a087a1071.tar.xz |
net: make drivers set the TSO limit not the GSO limit
Drivers should call the TSO setting helper, GSO is controllable
by user space.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/bridge/br_if.c | 12 | ||||
-rw-r--r-- | net/core/dev.c | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index 55f47cadb114..47fcbade7389 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c @@ -517,16 +517,16 @@ void br_mtu_auto_adjust(struct net_bridge *br) static void br_set_gso_limits(struct net_bridge *br) { - unsigned int gso_max_size = GSO_MAX_SIZE; - u16 gso_max_segs = GSO_MAX_SEGS; + unsigned int tso_max_size = TSO_MAX_SIZE; const struct net_bridge_port *p; + u16 tso_max_segs = TSO_MAX_SEGS; list_for_each_entry(p, &br->port_list, list) { - gso_max_size = min(gso_max_size, p->dev->gso_max_size); - gso_max_segs = min(gso_max_segs, p->dev->gso_max_segs); + tso_max_size = min(tso_max_size, p->dev->tso_max_size); + tso_max_segs = min(tso_max_segs, p->dev->tso_max_segs); } - netif_set_gso_max_size(br->dev, gso_max_size); - netif_set_gso_max_segs(br->dev, gso_max_segs); + netif_set_tso_max_size(br->dev, tso_max_size); + netif_set_tso_max_segs(br->dev, tso_max_segs); } /* diff --git a/net/core/dev.c b/net/core/dev.c index 6ae085b11373..f036ccb61da4 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -3032,8 +3032,8 @@ EXPORT_SYMBOL(netif_set_tso_max_segs); */ void netif_inherit_tso_max(struct net_device *to, const struct net_device *from) { - netif_set_gso_max_size(to, from->gso_max_size); - netif_set_gso_max_segs(to, from->gso_max_segs); + netif_set_tso_max_size(to, from->tso_max_size); + netif_set_tso_max_segs(to, from->tso_max_segs); } EXPORT_SYMBOL(netif_inherit_tso_max); |