Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'net-mana-big-tcp'

Shradha Gupta says:

====================
net: Enable Big TCP for MANA devices

Allow the max gso/gro aggregated pkt size to go up to GSO_MAX_SIZE for
MANA NIC. On Azure, this not possible without allowing the same for
netvsc NIC (as the NICs are bonded together).
Therefore, we use netif_set_tso_max_size() to set max aggregated pkt
size
to VF's tso_max_size for netvsc too, when the data path is switched over
to the VF

The first patch allows MANA to configure aggregated pkt size of up-to
GSO_MAX_SIZE

The second patch enables the same on the netvsc NIC, if the data path
for the bonded NIC is switched to the VF

---
Changes in v3
* Add ipv6_hopopt_jumbo_remove() while sending Big TCP packets
---
Changes in v2
* Instead of using 'tcp segment' throughout the patch used the words
'aggregated pkt size'
====================

Signed-off-by: David S. Miller <davem@davemloft.net>

+29 -6
+5
drivers/net/ethernet/microsoft/mana/mana_en.c
··· 256 256 if (skb_cow_head(skb, MANA_HEADROOM)) 257 257 goto tx_drop_count; 258 258 259 + if (unlikely(ipv6_hopopt_jumbo_remove(skb))) 260 + goto tx_drop_count; 261 + 259 262 txq = &apc->tx_qp[txq_idx].txq; 260 263 gdma_sq = txq->gdma_sq; 261 264 cq = &apc->tx_qp[txq_idx].tx_cq; ··· 2875 2872 ndev->needed_headroom = MANA_HEADROOM; 2876 2873 ndev->dev_port = port_idx; 2877 2874 SET_NETDEV_DEV(ndev, gc->dev); 2875 + 2876 + netif_set_tso_max_size(ndev, GSO_MAX_SIZE); 2878 2877 2879 2878 netif_carrier_off(ndev); 2880 2879
+2
drivers/net/hyperv/hyperv_net.h
··· 1166 1166 u32 max_chn; 1167 1167 u32 num_chn; 1168 1168 1169 + u32 netvsc_gso_max_size; 1170 + 1169 1171 atomic_t open_chn; 1170 1172 struct work_struct subchan_work; 1171 1173 wait_queue_head_t subchan_open;
+15
drivers/net/hyperv/netvsc_drv.c
··· 2461 2461 } else { 2462 2462 netdev_info(ndev, "Data path switched %s VF: %s\n", 2463 2463 vf_is_up ? "to" : "from", vf_netdev->name); 2464 + 2465 + /* In Azure, when accelerated networking in enabled, other NICs 2466 + * like MANA, MLX, are configured as a bonded nic with 2467 + * Netvsc(failover) NIC. For bonded NICs, the min of the max 2468 + * pkt aggregate size of the members is propagated in the stack. 2469 + * In order to allow these NICs (MANA/MLX) to use up to 2470 + * GSO_MAX_SIZE gso packet size, we need to allow Netvsc NIC to 2471 + * also support this in the guest. 2472 + * This value is only increased for netvsc NIC when datapath is 2473 + * switched over to the VF 2474 + */ 2475 + if (vf_is_up) 2476 + netif_set_tso_max_size(ndev, vf_netdev->tso_max_size); 2477 + else 2478 + netif_set_tso_max_size(ndev, netvsc_dev->netvsc_gso_max_size); 2464 2479 } 2465 2480 2466 2481 return NOTIFY_OK;
+7 -6
drivers/net/hyperv/rndis_filter.c
··· 1356 1356 struct net_device_context *net_device_ctx = netdev_priv(net); 1357 1357 struct ndis_offload hwcaps; 1358 1358 struct ndis_offload_params offloads; 1359 - unsigned int gso_max_size = GSO_LEGACY_MAX_SIZE; 1360 1359 int ret; 1360 + 1361 + nvdev->netvsc_gso_max_size = GSO_LEGACY_MAX_SIZE; 1361 1362 1362 1363 /* Find HW offload capabilities */ 1363 1364 ret = rndis_query_hwcaps(rndis_device, nvdev, &hwcaps); ··· 1391 1390 offloads.lso_v2_ipv4 = NDIS_OFFLOAD_PARAMETERS_LSOV2_ENABLED; 1392 1391 net->hw_features |= NETIF_F_TSO; 1393 1392 1394 - if (hwcaps.lsov2.ip4_maxsz < gso_max_size) 1395 - gso_max_size = hwcaps.lsov2.ip4_maxsz; 1393 + if (hwcaps.lsov2.ip4_maxsz < nvdev->netvsc_gso_max_size) 1394 + nvdev->netvsc_gso_max_size = hwcaps.lsov2.ip4_maxsz; 1396 1395 } 1397 1396 1398 1397 if (hwcaps.csum.ip4_txcsum & NDIS_TXCSUM_CAP_UDP4) { ··· 1412 1411 offloads.lso_v2_ipv6 = NDIS_OFFLOAD_PARAMETERS_LSOV2_ENABLED; 1413 1412 net->hw_features |= NETIF_F_TSO6; 1414 1413 1415 - if (hwcaps.lsov2.ip6_maxsz < gso_max_size) 1416 - gso_max_size = hwcaps.lsov2.ip6_maxsz; 1414 + if (hwcaps.lsov2.ip6_maxsz < nvdev->netvsc_gso_max_size) 1415 + nvdev->netvsc_gso_max_size = hwcaps.lsov2.ip6_maxsz; 1417 1416 } 1418 1417 1419 1418 if (hwcaps.csum.ip6_txcsum & NDIS_TXCSUM_CAP_UDP6) { ··· 1439 1438 */ 1440 1439 net->features &= ~NETVSC_SUPPORTED_HW_FEATURES | net->hw_features; 1441 1440 1442 - netif_set_tso_max_size(net, gso_max_size); 1441 + netif_set_tso_max_size(net, nvdev->netvsc_gso_max_size); 1443 1442 1444 1443 ret = rndis_filter_set_offload_params(net, nvdev, &offloads); 1445 1444