Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2353085pxb; Mon, 20 Sep 2021 19:50:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyyD57Wxs2AG8CL3RbYElNVtvFHEos4tAp4ts9kE8/mmgUuFWC+sA8dFfJOR3vE0p7EMyqz X-Received: by 2002:aa7:d619:: with SMTP id c25mr32670442edr.365.1632192656066; Mon, 20 Sep 2021 19:50:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632192656; cv=none; d=google.com; s=arc-20160816; b=JMqNxxcPJ5MupevJk7abb5YO+mHtoiY52fxXLN1nVV1u4r1sFYP94biRhV7RCXG6sg 5+zffh0ABPjojDYyrSRXZFLR3889MlSBDthq44op/jX1/cUDjFaRRcLHSGBgr3FSCmZC ESVOGJWj82kjhkN+zbLcFYWzmRzhSP89/S+g5o/vWWoBwRioTtZyeRIOdMv3nuQWl3ZB NU4TrkXt3v5IAwf3LqxEJjwkzsuHhYSpXgktLbxK4IuYrhhwq2UG20rNXnCAM7wIl/7I fl84nIfzS2obnNqIAj5jFD48m+gPNOYKEB6b2vcGACshKHK0mabmfdN8oOIGAUAimwwN ZfBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=nX0qNujRHAXs8cIogzLP3ENf2DtQr3ObPqP5uj3VFDo=; b=OlJclYmeM0RGrY4G7IM6Zm20Ab7gQqL+CaMbRgweYB1eLnlRxtx2+xeuaEVJSKgUU2 tlJK/r4BGaZbpYSVy9BKA59/Ugfv/My9EgnGzGiWyeT9wETt8hU4uIYLVkmJ/eJXsTxg 7q3++S0B500IAWNKG7rtKwCyvUnoNhUZu9JEzxKf9hquIKOeEN/E5f+YnKiyBZWuARjr 9XKXkAp1XO3o14AJTJD12TBLbwwERVvsrbzQBqM3GzPVG7EGbJ0eycteh55agXO/3Quj qxWQw6/Psd5LX1GGG5sANJOnbf392JQ5IQTRSyJk8gPihOpguv3z4bIwjHX5DThuemNg uubw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=T7upJLzG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nd30si12564992ejc.717.2021.09.20.19.50.32; Mon, 20 Sep 2021 19:50:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=T7upJLzG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1383355AbhITSo1 (ORCPT + 99 others); Mon, 20 Sep 2021 14:44:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:56264 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1382175AbhITSkK (ORCPT ); Mon, 20 Sep 2021 14:40:10 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A4BBD6332D; Mon, 20 Sep 2021 17:30:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632159053; bh=dUAhWhvBrY8Ve4UTgALF8A2Ppz5Lnq+iQzVXBME9oCU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T7upJLzGe7VpAtXceO5P7luqBbYjJMg4idQZZW1Kk9l9bVWEMUiVWC9jApVoLL6Ii N0zwLovEDteK5Ccj94/u4PUU/V8a4fQ1EGGMYUtScupkp63H2+KsZgg09amQJKzMXT Ooi5H53U+pgP0vV67IQsJU/XaLS4KbAaYr/F2/+A= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paolo Abeni , Corinna Vinschen , Sasha Neftin , Nechama Kraus , Tony Nguyen , "David S. Miller" Subject: [PATCH 5.14 054/168] igc: fix tunnel offloading Date: Mon, 20 Sep 2021 18:43:12 +0200 Message-Id: <20210920163923.406720703@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163921.633181900@linuxfoundation.org> References: <20210920163921.633181900@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Paolo Abeni commit 40ee363c844fcb6ae0f1f5cfea68aed7e268c2f4 upstream. Checking tunnel offloading, it turns out that offloading doesn't work as expected. The following script allows to reproduce the issue. Call it as `testscript DEVICE LOCALIP REMOTEIP NETMASK' === SNIP === if [ $# -ne 4 ] then echo "Usage $0 DEVICE LOCALIP REMOTEIP NETMASK" exit 1 fi DEVICE="$1" LOCAL_ADDRESS="$2" REMOTE_ADDRESS="$3" NWMASK="$4" echo "Driver: $(ethtool -i ${DEVICE} | awk '/^driver:/{print $2}') " ethtool -k "${DEVICE}" | grep tx-udp echo echo "Set up NIC and tunnel..." ip addr add "${LOCAL_ADDRESS}/${NWMASK}" dev "${DEVICE}" ip link set "${DEVICE}" up sleep 2 ip link add vxlan1 type vxlan id 42 \ remote "${REMOTE_ADDRESS}" \ local "${LOCAL_ADDRESS}" \ dstport 0 \ dev "${DEVICE}" ip addr add fc00::1/64 dev vxlan1 ip link set vxlan1 up sleep 2 rm -f vxlan.pcap echo "Running tcpdump and iperf3..." ( nohup tcpdump -i any -w vxlan.pcap >/dev/null 2>&1 ) & sleep 2 iperf3 -c fc00::2 >/dev/null pkill tcpdump echo echo -n "Max. Paket Size: " tcpdump -r vxlan.pcap -nnle 2>/dev/null \ | grep "${LOCAL_ADDRESS}.*> ${REMOTE_ADDRESS}.*OTV" \ | awk '{print $8}' | awk -F ':' '{print $1}' \ | sort -n | tail -1 echo ip link del vxlan1 ip addr del ${LOCAL_ADDRESS}/${NWMASK} dev "${DEVICE}" === SNAP === The expected outcome is Max. Paket Size: 64904 This is what you see on igb, the code igc has been taken from. However, on igc the output is Max. Paket Size: 1516 so the GSO aggregate packets are segmented by the kernel before calling igc_xmit_frame. Inside the subsequent call to igc_tso, the check for skb_is_gso(skb) fails and the function returns prematurely. It turns out that this occurs because the feature flags aren't set entirely correctly in igc_probe. In contrast to the original code from igb_probe, igc_probe neglects to set the flags required to allow tunnel offloading. Setting the same flags as igb fixes the issue on igc. Fixes: 34428dff3679 ("igc: Add GSO partial support") Signed-off-by: Paolo Abeni Tested-by: Corinna Vinschen Acked-by: Sasha Neftin Tested-by: Nechama Kraus Signed-off-by: Tony Nguyen Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/intel/igc/igc_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/net/ethernet/intel/igc/igc_main.c +++ b/drivers/net/ethernet/intel/igc/igc_main.c @@ -5962,7 +5962,9 @@ static int igc_probe(struct pci_dev *pde if (pci_using_dac) netdev->features |= NETIF_F_HIGHDMA; - netdev->vlan_features |= netdev->features; + netdev->vlan_features |= netdev->features | NETIF_F_TSO_MANGLEID; + netdev->mpls_features |= NETIF_F_HW_CSUM; + netdev->hw_enc_features |= netdev->vlan_features; /* MTU range: 68 - 9216 */ netdev->min_mtu = ETH_MIN_MTU;