From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A6B8DC04A68 for ; Wed, 27 Jul 2022 09:21:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 463B74028D; Wed, 27 Jul 2022 09:21:01 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 463B74028D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1658913661; bh=BYOWCVKw8KcT9KHcSDtrkFas1r605W2hj2G1z3G18Fo=; h=From:To:Date:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:Cc:From; b=kktsk0BAb7gWCAD+o/Lk56m2I0QNN+GyvpMKzrErv56mXQOmrDkLmaCqm+fzwCz9Q iqDz89anTpWL+arLMIbl8s26kS1UCWxUvu4C1EWMFgflEKHnZQGaTvKefBIp1Pjmeo VzGrvEr7ZwFsK6ZbHgf3SkD68S6SRWQBkh3oynf2nUdtu/6KsOr1HZOy9nxUsZg7Ur KVmIfG0hcNcWFPxr+H/uOjN/ffgSCwDLzEPdOOuWirs+q8BQEMlc59ofmjwuxWkSJd 3H9FS4horDjTSV7vsfN8zFilUxu9PjiSu+RexBba4lxJ0tbD8d8DbVYPAmHVqasXJf cx2pxQXJB77eg== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lDGesoc88TNh; Wed, 27 Jul 2022 09:21:00 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id 52928404A8; Wed, 27 Jul 2022 09:21:00 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 52928404A8 Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 5B2421BF57F for ; Wed, 27 Jul 2022 09:20:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 332D0408CF for ; Wed, 27 Jul 2022 09:20:58 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 332D0408CF X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id maP2z6Y3hd_B for ; Wed, 27 Jul 2022 09:20:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 2842C408CC Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by smtp4.osuosl.org (Postfix) with ESMTPS id 2842C408CC for ; Wed, 27 Jul 2022 09:20:56 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6400,9594,10420"; a="268571907" X-IronPort-AV: E=Sophos;i="5.93,195,1654585200"; d="scan'208";a="268571907" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jul 2022 02:20:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,195,1654585200"; d="scan'208";a="597358998" Received: from amlin-018-068.igk.intel.com (HELO localhost.igk.intel.com) ([10.102.18.68]) by orsmga007.jf.intel.com with ESMTP; 27 Jul 2022 02:20:22 -0700 From: Mateusz Palczewski To: intel-wired-lan@lists.osuosl.org Date: Wed, 27 Jul 2022 11:19:40 +0200 Message-Id: <20220727091940.10902-1-mateusz.palczewski@intel.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658913657; x=1690449657; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=oOzwDV9ZLY8HIrJw5I2RcPVMz9BDIIit14tnyEgMRug=; b=ShYTtQYXWzLKktVJKiF803gzpTOnirAV3NsOwx+davIRuXAs54R3ZCuo 9L075L47kTZCeEDRaecy/vZi1dy7KkfCBRvn7pbpNyR9QTqk9dGGSZ/FL kNHrAnp/vOlZUimIyoge9mGFj+Jy3kmrCPzT3+xh62WI5XIv+M1rs/3SE VLh6mVR5WnHeQ1sn8s+Nse4pImtbCdWPFLgd2elrUZmMZo8WRuB/1uQMr 9gu8BVEXZNtko2MrFZwokI088s/FEEb/F3WQ5x7HzGzif7Ec+vYGY4VdA W/8OsyUrZ5l/zBJMOFGQD53oN2aWX9LqenZDVIjgJTSrJTkJ3Rfbq+d7L Q==; X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=ShYTtQYX Subject: [Intel-wired-lan] [PATCH net v1] i40e: Fix tunnel checksum offload with fragmented traffic X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Przemyslaw Patynowski Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" From: Przemyslaw Patynowski Fix checksum offload on VXLAN tunnels. In case, when mpls protocol is not used, set l4 header to transport header of skb. This fixes case, when user tries to offload checksums of VXLAN tunneled traffic. Steps for reproduction (requires link partner with tunnels): ip l s enp130s0f0 up ip a f enp130s0f0 ip a a 10.10.110.2/24 dev enp130s0f0 ip l s enp130s0f0 mtu 1600 ip link add vxlan12_sut type vxlan id 12 group 238.168.100.100 dev \ enp130s0f0 dstport 4789 ip l s vxlan12_sut up ip a a 20.10.110.2/24 dev vxlan12_sut iperf3 -c 20.10.110.1 #should connect Without this patch, TX descriptor was using wrong data, due to l4 header pointing wrong address. NIC would then drop those packets internally, due to incorrect TX descriptor data, which increased GLV_TEPC register. Fixes: b4fb2d33514a ("i40e: Add support for MPLS + TSO") Signed-off-by: Przemyslaw Patynowski Signed-off-by: Mateusz Palczewski --- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c index 7bc1174edf6b..af69ccc6e8d2 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c +++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c @@ -3204,11 +3204,13 @@ static int i40e_tx_enable_csum(struct sk_buff *skb, u32 *tx_flags, protocol = vlan_get_protocol(skb); - if (eth_p_mpls(protocol)) + if (eth_p_mpls(protocol)) { ip.hdr = skb_inner_network_header(skb); - else + l4.hdr = skb_checksum_start(skb); + } else { ip.hdr = skb_network_header(skb); - l4.hdr = skb_checksum_start(skb); + l4.hdr = skb_transport_header(skb); + } /* set the tx_flags to indicate the IP protocol type. this is * required so that checksum header computation below is accurate. -- 2.27.0 _______________________________________________ Intel-wired-lan mailing list Intel-wired-lan@osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan