Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1015733yba; Thu, 16 May 2019 12:44:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqw44PQnKr8Qh4Ap4YavXdkesy444ZbWfEdDvMaX6ktShP1I6srbQbPKQbRbHEh+v5TMry8R X-Received: by 2002:a17:902:5ac9:: with SMTP id g9mr52247801plm.134.1558035892917; Thu, 16 May 2019 12:44:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558035892; cv=none; d=google.com; s=arc-20160816; b=GU3k0zlnvN0LxmPiaBfGnAW+ZOJJ6/K9VuWl77gMT1hxsdRfUBLe31tvUifS5QYzzL PX1W//ORqr8Xw613GspN63AAEV5b6+A4hvZuWdRR+S/DHIlJ8L4RejvzL8CTDeXOAIHY HVk+WQ+dn/2oCuJ6SYAn3uxUK0y+IwDalzJXlp/SowOeF2hS/bSJ940+Jn8QE15jxkhi 7SpNgVPiQlbJUnsf3ep8jrNV7bbaMhlc6MGHAnFMOYcHyBiy5yvz9AkLwyVdFnReXj1U g3yEHkwLx1cOAaJFZrbcKex5f1kje5rjmEy/GNa70kN3MasO+DZd2rHiaDN2NpBRNY1F ds5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=fVgWvZJjJ7LZA6VDcloEmUFXOAPk1PT27/O6DPevuoo=; b=YVBMT9Dadxq6cLQd3O4nwV73r7x4KNpDPPkYM2RJFeXbPi92PI8RfxWmO+S/cq6maN 8yiVJScxDdwLciPA3TORio5DcSWvOWeixb++36iIgsXd7GGvBzQw1xAjc3kega7NBg7v gZpR/P59qd8uTekEVr3LUrVHjLIB9Prl3BDjAyYAoAc0Io0CjOZfDEl/1Cl069Wa9QK/ afhs6F6MCJS/tIaKNrJi31Ob7yyq4bGvsyP6AsxMMFcs0Et1i8tN9ww3aKFnPS/Zoh6M WhmLFAI0oZJeFKyYMhtMzygU0BIIQ8tj/SJlrH2Fj3p54Xqx8rRPgImKHZowr9VhUmML qIlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=A4cqwo2y; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u28si6561266pfl.138.2019.05.16.12.44.37; Thu, 16 May 2019 12:44:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=A4cqwo2y; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727091AbfEPRLI (ORCPT + 99 others); Thu, 16 May 2019 13:11:08 -0400 Received: from mail-it1-f193.google.com ([209.85.166.193]:34652 "EHLO mail-it1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726622AbfEPRLI (ORCPT ); Thu, 16 May 2019 13:11:08 -0400 Received: by mail-it1-f193.google.com with SMTP id p18so8761671itm.1; Thu, 16 May 2019 10:11:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fVgWvZJjJ7LZA6VDcloEmUFXOAPk1PT27/O6DPevuoo=; b=A4cqwo2yL1aggG4lM417VaU73zIpyeM1JjIhVvoca22iROz0Rlp4JkwF+l0tcZeRU+ 3+/RLh0apRqAa6TC+fZnZ/vzZQXIXvYc0uxWamp3t2JDBCPJqR4uZxXZoDrTEQt3V0h3 apC3rfKagNzxS8t9W7GpQVZUM14DEvJ6em2On5JgFIleMe6XaucvT2+gj6XD31lWSXFG tf9UzCkGKwohIZTJQn3wXJMIgufC3/YdqtvVM1ZkNBk0XVkt4V2JFg3wERawxT9QC7Q/ Y5vmhlJ51f8TBXO5/yelUaLZZ+CpUVZflfnBNj+Qm4Eabnr3iLcuAr5b4kRdnbl90MHZ s4bQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fVgWvZJjJ7LZA6VDcloEmUFXOAPk1PT27/O6DPevuoo=; b=C3p5PcxWPig68cbPR2ughJKZOexhcDiMw5NcW4eRMM/tCcoEvwp5Tqmk+vq3qoOoA3 shyhPfjyFnb6ih9PaXB1R0lGA46adGOgzYSRJOJBWKsHF4Ow4PeMIoCdLthUe6vRY9EM dFt0sEXmCAnsADseO7hpZrMeZ6vtC9YblUur04nWlR1Rmk/XRCCwEIlo7XoJM6AxniCH 1VRXPIEcwelobEkbBt8QHwlI3NZSu977kRYBnXNsIqsvvGGYr2WTNaz7Qt6fPWvt8UWR bHHxmxoyaoNpU0I+56RMyLwBKS7PLJkNrPfFFBVYU/FkM53RbOwijVI56sRz4jVRrtJk Jnpg== X-Gm-Message-State: APjAAAV2G+gF/mvdiVTrqmRKoWGPbwOkdagZ75ga/MuW+ea8qb5UCUNk 87lw96LZJmc0dxJUaOmwxEB0kpwgFS8OEHFqzVg3W/Z0uQHDbA== X-Received: by 2002:a02:7410:: with SMTP id o16mr32812026jac.87.1558026666868; Thu, 16 May 2019 10:11:06 -0700 (PDT) MIME-Version: 1.0 References: <20190502171636.3yquioe3gcwsxlus@csclub.uwaterloo.ca> <20190502175513.ei7kjug3az6fe753@csclub.uwaterloo.ca> <20190502185250.vlsainugtn6zjd6p@csclub.uwaterloo.ca> <20190503151421.akvmu77lghxcouni@csclub.uwaterloo.ca> <20190503205935.bg45rsso5jjj3gnx@csclub.uwaterloo.ca> <20190513165547.alkkgcsdelaznw6v@csclub.uwaterloo.ca> <20190514163443.glfjva3ofqcy7lbg@csclub.uwaterloo.ca> In-Reply-To: <20190514163443.glfjva3ofqcy7lbg@csclub.uwaterloo.ca> From: Alexander Duyck Date: Thu, 16 May 2019 10:10:55 -0700 Message-ID: Subject: Re: [Intel-wired-lan] i40e X722 RSS problem with NAT-Traversal IPsec packets To: Lennart Sorensen Cc: Jeff Kirsher , LKML , Netdev , intel-wired-lan Content-Type: multipart/mixed; boundary="00000000000007a1700589045a5b" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --00000000000007a1700589045a5b Content-Type: text/plain; charset="UTF-8" On Tue, May 14, 2019 at 9:34 AM Lennart Sorensen wrote: > > On Mon, May 13, 2019 at 12:04:00PM -0700, Alexander Duyck wrote: > > So I recreated the first packet you listed via text2pcap, replayed it > > on my test system via tcpreplay, updated my configuration to 12 > > queues, and used the 2 hash keys you listed. I ended up seeing the > > traffic bounce between queues 4 and 8 with an X710 I had to test with > > when I was changing the key value. > > > > Unfortunately I don't have an X722 to test with. I'm suspecting that > > there may be some difference in the RSS setup, specifically it seems > > like values in the PFQF_HENA register were changed for the X722 part > > that may be causing the issues we are seeing. > > > > I will see if I can get someone from the networking division to take a > > look at this since I don't have access to the part in question nor a > > datasheet for it so I am not sure if I can help much more. > > Great. I hope someone can figure this out because it is working very > badly so far. > > -- > Len Sorensen So I was sent a link to the datasheet for the part and I have a working theory that what we may be seeing is a problem in the firmware for the part. Can you try applying the attached patch and send the output from the dmesg? Specifically I would want anything with the name "i40e" in it. What I am looking for is something like the following: [ 294.383416] i40e 0000:81:00.1: fw 5.0.40043 api 1.5 nvm 5.04 0x800024cd 0.0.0 [ 294.675039] i40e 0000:81:00.1: MAC address: 68:05:ca:37:c7:99 [ 294.685941] i40e 0000:81:00.1: flow_type: 63 input_mask:0x0000000000004000 [ 294.686056] i40e 0000:81:00.1: flow_type: 46 input_mask:0x0007fff800000000 [ 294.686170] i40e 0000:81:00.1: flow_type: 45 input_mask:0x0007fff800000000 [ 294.686284] i40e 0000:81:00.1: flow_type: 44 input_mask:0x0007ffff80000000 [ 294.686399] i40e 0000:81:00.1: flow_type: 43 input_mask:0x0007fffe00000000 [ 294.686513] i40e 0000:81:00.1: flow_type: 41 input_mask:0x0007fffe00000000 [ 294.686628] i40e 0000:81:00.1: flow_type: 36 input_mask:0x0001801800000000 [ 294.686743] i40e 0000:81:00.1: flow_type: 35 input_mask:0x0001801800000000 [ 294.686858] i40e 0000:81:00.1: flow_type: 34 input_mask:0x0001801f80000000 [ 294.686973] i40e 0000:81:00.1: flow_type: 33 input_mask:0x0001801e00000000 [ 294.687087] i40e 0000:81:00.1: flow_type: 31 input_mask:0x0001801e00000000 [ 294.691906] i40e 0000:81:00.1 ens5f1: renamed from eth0 [ 294.711173] i40e 0000:81:00.1 ens5f1: NIC Link is Up, 10 Gbps Full Duplex, Flow Control: None [ 294.759061] i40e 0000:81:00.1: PCI-Express: Speed 8.0GT/s Width x8 [ 294.863363] i40e 0000:81:00.1: Features: PF-id[1] VFs: 32 VSIs: 34 QP: 32 RSS FD_ATR FD_SB NTUPLE VxLAN Geneve PTP VEPA With that we can tell what flow types are enabled, and what input fields are enabled for each flow type. My suspicion is that we may see the two new types added to X722 for UDP, 29 and 30, may not match type 31 which is the current flow type supported on the X710. I have included a copy inline below in case the patch is stripped, however I suspect it will not apply cleanly as the mail client I am using usually ends up causing white space mangling by replacing tabs with spaces. diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index 65c2b9d2652b..0c93859f8184 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -10998,6 +10998,15 @@ static int i40e_pf_config_rss(struct i40e_pf *pf) ((u64)i40e_read_rx_ctl(hw, I40E_PFQF_HENA(1)) << 32); hena |= i40e_pf_get_default_rss_hena(pf); + for (ret = 64; ret--;) { + if (!(hena & (1ull << ret))) + continue; + dev_info(&pf->pdev->dev, "flow_type: %d input_mask:0x%08x%08x\n", + ret, + i40e_read_rx_ctl(hw, I40E_GLQF_HASH_INSET(1, ret)), + i40e_read_rx_ctl(hw, I40E_GLQF_HASH_INSET(0, ret))); + } + i40e_write_rx_ctl(hw, I40E_PFQF_HENA(0), (u32)hena); i40e_write_rx_ctl(hw, I40E_PFQF_HENA(1), (u32)(hena >> 32)); --00000000000007a1700589045a5b Content-Type: text/x-patch; charset="US-ASCII"; name="i40e-debug-hash-inputs.patch" Content-Disposition: attachment; filename="i40e-debug-hash-inputs.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_jvqw89g40 aTQwZTogRGVidWcgaGFzaCBpbnB1dHMKCkZyb206IEFsZXhhbmRlciBEdXljayA8YWxleGFuZGVy LmguZHV5Y2tAbGludXguaW50ZWwuY29tPgoKCi0tLQogZHJpdmVycy9uZXQvZXRoZXJuZXQvaW50 ZWwvaTQwZS9pNDBlX21haW4uYyB8ICAgIDkgKysrKysrKysrCiAxIGZpbGUgY2hhbmdlZCwgOSBp bnNlcnRpb25zKCspCgpkaWZmIC0tZ2l0IGEvZHJpdmVycy9uZXQvZXRoZXJuZXQvaW50ZWwvaTQw ZS9pNDBlX21haW4uYyBiL2RyaXZlcnMvbmV0L2V0aGVybmV0L2ludGVsL2k0MGUvaTQwZV9tYWlu LmMKaW5kZXggNjVjMmI5ZDI2NTJiLi4wYzkzODU5ZjgxODQgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMv bmV0L2V0aGVybmV0L2ludGVsL2k0MGUvaTQwZV9tYWluLmMKKysrIGIvZHJpdmVycy9uZXQvZXRo ZXJuZXQvaW50ZWwvaTQwZS9pNDB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