Skip to content

Commit 27a89b8

Browse files
author
Frantisek Hrbata
committed
Merge: tcp: BIG TCP implementation
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/1560 Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2139501 Depends: https://bugzilla.redhat.com/show_bug.cgi?id=2128180 Tested: Using netperf and veth driver. Results meet the assumptions. See https://bugzilla.redhat.com/show_bug.cgi?id=2139501#c1 The series introduces support for BIG TCP. - Patch 1-2: Preliminary dependencies - Patch 3-14: Commits from upstream series 7fa2e48 ("Merge branch 'big-tcp'", 2022-05-16) - Patch 15-19: Follow-ups Signed-off-by: Ivan Vecera <ivecera@redhat.com> Approved-by: Antoine Tenart <atenart@redhat.com> Approved-by: Florian Westphal <fwestpha@redhat.com> Signed-off-by: Frantisek Hrbata <fhrbata@redhat.com>
2 parents 5140a73 + cf77d84 commit 27a89b8

File tree

34 files changed

+291
-95
lines changed

34 files changed

+291
-95
lines changed

drivers/net/ethernet/amd/xgbe/xgbe.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,8 @@
151151
#define XGBE_TX_MAX_BUF_SIZE (0x3fff & ~(64 - 1))
152152

153153
/* Descriptors required for maximum contiguous TSO/GSO packet */
154-
#define XGBE_TX_MAX_SPLIT ((GSO_MAX_SIZE / XGBE_TX_MAX_BUF_SIZE) + 1)
154+
#define XGBE_TX_MAX_SPLIT \
155+
((GSO_LEGACY_MAX_SIZE / XGBE_TX_MAX_BUF_SIZE) + 1)
155156

156157
/* Maximum possible descriptors needed for an SKB:
157158
* - Maximum number of SKB frags

drivers/net/ethernet/mellanox/mlx5/core/en_rx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1976,7 +1976,7 @@ mlx5e_hw_gro_skb_has_enough_space(struct sk_buff *skb, u16 data_bcnt)
19761976
{
19771977
int nr_frags = skb_shinfo(skb)->nr_frags;
19781978

1979-
return PAGE_SIZE * nr_frags + data_bcnt <= GSO_MAX_SIZE;
1979+
return PAGE_SIZE * nr_frags + data_bcnt <= GRO_LEGACY_MAX_SIZE;
19801980
}
19811981

19821982
static void

drivers/net/ethernet/sfc/ef100_nic.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1004,7 +1004,8 @@ static int ef100_process_design_param(struct efx_nic *efx,
10041004
}
10051005
return 0;
10061006
case ESE_EF100_DP_GZ_TSO_MAX_PAYLOAD_LEN:
1007-
nic_data->tso_max_payload_len = min_t(u64, reader->value, GSO_MAX_SIZE);
1007+
nic_data->tso_max_payload_len = min_t(u64, reader->value,
1008+
GSO_LEGACY_MAX_SIZE);
10081009
netif_set_tso_max_size(efx->net_dev,
10091010
nic_data->tso_max_payload_len);
10101011
return 0;

drivers/net/ethernet/sfc/falcon/tx.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ unsigned int ef4_tx_max_skb_descs(struct ef4_nic *efx)
9898
/* Possibly more for PCIe page boundaries within input fragments */
9999
if (PAGE_SIZE > EF4_PAGE_SIZE)
100100
max_descs += max_t(unsigned int, MAX_SKB_FRAGS,
101-
DIV_ROUND_UP(GSO_MAX_SIZE, EF4_PAGE_SIZE));
101+
DIV_ROUND_UP(GSO_LEGACY_MAX_SIZE,
102+
EF4_PAGE_SIZE));
102103

103104
return max_descs;
104105
}

drivers/net/ethernet/sfc/tx_common.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,8 @@ unsigned int efx_tx_max_skb_descs(struct efx_nic *efx)
416416
/* Possibly more for PCIe page boundaries within input fragments */
417417
if (PAGE_SIZE > EFX_PAGE_SIZE)
418418
max_descs += max_t(unsigned int, MAX_SKB_FRAGS,
419-
DIV_ROUND_UP(GSO_MAX_SIZE, EFX_PAGE_SIZE));
419+
DIV_ROUND_UP(GSO_LEGACY_MAX_SIZE,
420+
EFX_PAGE_SIZE));
420421

421422
return max_descs;
422423
}

drivers/net/ethernet/synopsys/dwc-xlgmac.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
#define XLGMAC_RX_DESC_MAX_DIRTY (XLGMAC_RX_DESC_CNT >> 3)
3939

4040
/* Descriptors required for maximum contiguous TSO/GSO packet */
41-
#define XLGMAC_TX_MAX_SPLIT ((GSO_MAX_SIZE / XLGMAC_TX_MAX_BUF_SIZE) + 1)
41+
#define XLGMAC_TX_MAX_SPLIT \
42+
((GSO_LEGACY_MAX_SIZE / XLGMAC_TX_MAX_BUF_SIZE) + 1)
4243

4344
/* Maximum possible descriptors needed for a SKB */
4445
#define XLGMAC_TX_MAX_DESC_NR (MAX_SKB_FRAGS + XLGMAC_TX_MAX_SPLIT + 2)

drivers/net/hyperv/rndis_filter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1349,7 +1349,7 @@ static int rndis_netdev_set_hwcaps(struct rndis_device *rndis_device,
13491349
struct net_device_context *net_device_ctx = netdev_priv(net);
13501350
struct ndis_offload hwcaps;
13511351
struct ndis_offload_params offloads;
1352-
unsigned int gso_max_size = GSO_MAX_SIZE;
1352+
unsigned int gso_max_size = GSO_LEGACY_MAX_SIZE;
13531353
int ret;
13541354

13551355
/* Find HW offload capabilities */

drivers/net/loopback.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,8 @@ static void gen_lo_setup(struct net_device *dev,
191191
dev->netdev_ops = dev_ops;
192192
dev->needs_free_netdev = true;
193193
dev->priv_destructor = dev_destructor;
194+
195+
netif_set_tso_max_size(dev, GSO_MAX_SIZE);
194196
}
195197

196198
/* The loopback device is special. There is only one instance

drivers/net/veth.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1588,6 +1588,7 @@ static void veth_setup(struct net_device *dev)
15881588
dev->hw_features = VETH_FEATURES;
15891589
dev->hw_enc_features = VETH_FEATURES;
15901590
dev->mpls_features = NETIF_F_HW_CSUM | NETIF_F_GSO_SOFTWARE;
1591+
netif_set_tso_max_size(dev, GSO_MAX_SIZE);
15911592
}
15921593

15931594
/*

drivers/scsi/fcoe/fcoe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ static void fcoe_netdev_features_change(struct fc_lport *lport,
666666

667667
if (netdev->features & NETIF_F_FSO) {
668668
lport->seq_offload = 1;
669-
lport->lso_max = netdev->gso_max_size;
669+
lport->lso_max = min(netdev->gso_max_size, GSO_LEGACY_MAX_SIZE);
670670
FCOE_NETDEV_DBG(netdev, "Supports LSO for max len 0x%x\n",
671671
lport->lso_max);
672672
} else {

0 commit comments

Comments
 (0)