summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/igc/igc_main.c
diff options
context:
space:
mode:
authorSasha Neftin <sasha.neftin@intel.com>2020-02-10 09:04:15 +0200
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2020-04-17 10:19:23 -0700
commit34428dff3679f0c4c9b185ff8eccefd12a7f55f8 (patch)
tree0d80ded91681a4744a1cfe7d4a746efc8271ac50 /drivers/net/ethernet/intel/igc/igc_main.c
parent2fcd80144b93ff90836a44f2054b4d82133d3a85 (diff)
igc: Add GSO partial support
Partial generic segmentation offload is a hybrid between TSO and GSO. What is effectively does is take advantage of certain traits of TCP and tunnels so that instead of having to rewrite the packet headers for each segment only in the inner-most transport header and possible the outer-most network header need to be updated. This allows devices that do not support tunnel offload or tunnels offloads with checksum to still make use of segmentation. Signed-off-by: Sasha Neftin <sasha.neftin@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/igc/igc_main.c')
-rw-r--r--drivers/net/ethernet/intel/igc/igc_main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index 69fa1ce1f927..46ab035c2032 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -4727,6 +4727,16 @@ static int igc_probe(struct pci_dev *pdev,
netdev->features |= NETIF_F_HW_CSUM;
netdev->features |= NETIF_F_SCTP_CRC;
+#define IGC_GSO_PARTIAL_FEATURES (NETIF_F_GSO_GRE | \
+ NETIF_F_GSO_GRE_CSUM | \
+ NETIF_F_GSO_IPXIP4 | \
+ NETIF_F_GSO_IPXIP6 | \
+ NETIF_F_GSO_UDP_TUNNEL | \
+ NETIF_F_GSO_UDP_TUNNEL_CSUM)
+
+ netdev->gso_partial_features = IGC_GSO_PARTIAL_FEATURES;
+ netdev->features |= NETIF_F_GSO_PARTIAL | IGC_GSO_PARTIAL_FEATURES;
+
/* setup the private structure */
err = igc_sw_init(adapter);
if (err)