Commit 95730d65 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'tso-gso-limit-split'



Jakub Kicinski says:

====================
net: disambiguate the TSO and GSO limits

This series separates the device-reported TSO limitations
from the user space-controlled GSO limits. It used to be that
we only had the former (HW limits) but they were named GSO.
This probably lead to confusion and letting user override them.

The problem came up in the BIG TCP discussion between Eric and
Alex, and seems like something we should address.

Targeting net-next because (a) nobody is reporting problems;
and (b) there is a tiny but non-zero chance that some actually
wants to lift the HW limitations.
====================

Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents beb21e3e 744d49da
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -1419,8 +1419,8 @@ static void bond_compute_features(struct bonding *bond)
	struct list_head *iter;
	struct slave *slave;
	unsigned short max_hard_header_len = ETH_HLEN;
	unsigned int gso_max_size = GSO_MAX_SIZE;
	u16 gso_max_segs = GSO_MAX_SEGS;
	unsigned int tso_max_size = TSO_MAX_SIZE;
	u16 tso_max_segs = TSO_MAX_SEGS;

	if (!bond_has_slaves(bond))
		goto done;
@@ -1449,8 +1449,8 @@ static void bond_compute_features(struct bonding *bond)
		if (slave->dev->hard_header_len > max_hard_header_len)
			max_hard_header_len = slave->dev->hard_header_len;

		gso_max_size = min(gso_max_size, slave->dev->gso_max_size);
		gso_max_segs = min(gso_max_segs, slave->dev->gso_max_segs);
		tso_max_size = min(tso_max_size, slave->dev->tso_max_size);
		tso_max_segs = min(tso_max_segs, slave->dev->tso_max_segs);
	}
	bond_dev->hard_header_len = max_hard_header_len;

@@ -1463,8 +1463,8 @@ static void bond_compute_features(struct bonding *bond)
	bond_dev->hw_enc_features |= xfrm_features;
#endif /* CONFIG_XFRM_OFFLOAD */
	bond_dev->mpls_features = mpls_features;
	netif_set_gso_max_segs(bond_dev, gso_max_segs);
	netif_set_gso_max_size(bond_dev, gso_max_size);
	netif_set_tso_max_segs(bond_dev, tso_max_segs);
	netif_set_tso_max_size(bond_dev, tso_max_size);

	bond_dev->priv_flags &= ~IFF_XMIT_DST_RELEASE;
	if ((bond_dev->priv_flags & IFF_XMIT_DST_RELEASE_PERM) &&
+1 −1
Original line number Diff line number Diff line
@@ -2395,7 +2395,7 @@ static int atl1e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)

	INIT_WORK(&adapter->reset_task, atl1e_reset_task);
	INIT_WORK(&adapter->link_chg_task, atl1e_link_chg_task);
	netif_set_gso_max_size(netdev, MAX_TSO_SEG_SIZE);
	netif_set_tso_max_size(netdev, MAX_TSO_SEG_SIZE);
	err = register_netdev(netdev);
	if (err) {
		netdev_err(netdev, "register netdevice failed\n");
+1 −1
Original line number Diff line number Diff line
@@ -3563,7 +3563,7 @@ static int setup_nic_devices(struct octeon_device *octeon_dev)
					      | NETIF_F_TSO | NETIF_F_TSO6
					      | NETIF_F_LRO;
		}
		netif_set_gso_max_size(netdev, OCTNIC_GSO_MAX_SIZE);
		netif_set_tso_max_size(netdev, OCTNIC_GSO_MAX_SIZE);

		/*  Copy of transmit encapsulation capabilities:
		 *  TSO, TSO6, Checksums for this device
+1 −1
Original line number Diff line number Diff line
@@ -2094,7 +2094,7 @@ static int setup_nic_devices(struct octeon_device *octeon_dev)
				      | NETIF_F_TSO | NETIF_F_TSO6
				      | NETIF_F_GRO
				      | NETIF_F_LRO;
		netif_set_gso_max_size(netdev, OCTNIC_GSO_MAX_SIZE);
		netif_set_tso_max_size(netdev, OCTNIC_GSO_MAX_SIZE);

		/* Copy of transmit encapsulation capabilities:
		 * TSO, TSO6, Checksums for this device
+1 −1
Original line number Diff line number Diff line
@@ -5204,7 +5204,7 @@ static void be_netdev_init(struct net_device *netdev)

	netdev->flags |= IFF_MULTICAST;

	netif_set_gso_max_size(netdev, BE_MAX_GSO_SIZE - ETH_HLEN);
	netif_set_tso_max_size(netdev, BE_MAX_GSO_SIZE - ETH_HLEN);

	netdev->netdev_ops = &be_netdev_ops;

Loading