Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1550625ybm; Tue, 21 May 2019 16:23:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqySi2ogHeQ4IaR0vAfFTQ3aTvZ5z8BqWrEn6ViV4VPtyhwmONt96wA5qcZaq15ktmoOZEw/ X-Received: by 2002:a63:fd4a:: with SMTP id m10mr84818303pgj.302.1558481031751; Tue, 21 May 2019 16:23:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558481031; cv=none; d=google.com; s=arc-20160816; b=i5aefIhCdALSAljxH+PZDDgFX2cdirlGbIB/b1OthyC4vspVsJSBhmLzbXHVpXa5Mi eZ6dVO39blpyMexpJ27egdSVZwTsj4FDYr/9MoShzYy2lGKsJ5g9RK8uNi8espRdNNgh ErMxBdgHneN8GhO99jQbKCF3pR8ltAPv30FXUd1a4ApXvVVS2E0xIDZN7ZN1alponRBI eqzWsBTVgMHCSsSgROV/i5xdyRod6vJXpdxJmcg9HwqmWAtV+503hCT1cx39Phw+hh+l 9c6G0NFHlxR5S42TiKX7e103P7D4UtMsI68aUVc2cEC7NuSFoO6ca9h+ZUI9XnS14XUE donw== 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=Q+TOxNvlX4OyviLA1RMMAnEUapjGz0Q82sfanM+skJc=; b=NcRc2X6BDHSKv7SF8Uf0ut+iAHS817FWD2k8gWOUgFfPzMwroxttJLoV9JEeR85JLj fsJ2BDLRBHJDmAQq8dTZLo4bltKjsRa5OUBy8BomL2yQUXhQ6SI3tf0j/exuZoSvDv+s CkrI12TpaNRo5FK1Jw8JOm2ifCm1NhetjSY9jto9VKbZ62jNe6keBZiWZ2597H43iJiM gBKWalx8z1gPaTi9lh/pUXCZo4xqvsHGE9olxmMb2zuPX5yaZLKaInso8EfDlqW4bRhe 5QK3MWm95MLuxo/5h++Q5fyzsVLLWwruGYfFYVsdEx1EUk3Jptb0skWqlUH4GEItT2oO JBpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qFPZr7y8; 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 a11si22451455pgv.157.2019.05.21.16.23.35; Tue, 21 May 2019 16:23:51 -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=qFPZr7y8; 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 S1727385AbfEUXWa (ORCPT + 99 others); Tue, 21 May 2019 19:22:30 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:43331 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725797AbfEUXWa (ORCPT ); Tue, 21 May 2019 19:22:30 -0400 Received: by mail-io1-f68.google.com with SMTP id v7so320936iob.10; Tue, 21 May 2019 16:22:29 -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=Q+TOxNvlX4OyviLA1RMMAnEUapjGz0Q82sfanM+skJc=; b=qFPZr7y8GrOhJHCOmJ3nl//kksO7Ebe0V5SvKXhxrHvLgqsYt0/PoHOll73otofgsW V7L5WBRmxFahltaw21GCDLJQH2mI++72GFrCmcGEIS8jIDmN5UHxxQyUZzfgggL/qr6M HJeVzUElcvBQcWkeaOlyrvh+sg8rsshA0vwOf4jpCEZRJ2UDLrl5WkKsHgSTxGrDdxAL KUKVAyRx+fg9QnE174rHa2USw6MWmBpZs0SfCx6r0oOExOHYuKT13z74YE6giP1h/00S TjmdwxYrmQGbQLwAbKee9Ic9LaPzlF3AKLKYItgRcXPiMvbD+l4z6pxETYvYkrUvIjHt N5kg== 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=Q+TOxNvlX4OyviLA1RMMAnEUapjGz0Q82sfanM+skJc=; b=qLT7z8EGK/+RZOXMY0phQKRhg2q0Ubco6sInkcygzGnnYj69IuIDCFLoMz9ti8p1UA SpCbh68OW4flpn7ZIzvUvZKhnksG1TzEHbSBosFhI8XinHcZ+66yJCECZh8kvmt9UDAn TSNoK7z5D/CsDQZ+TFwQFULSYKL5Lj/OPBYhkJjGgqhb0P+vh/YqyaGYOM5dkMEZVShM UlsxlVdtjqa+LqgJp46oz34+5SWNKmhXPISLbmzwrnCnXWvc7FsvXyHAW3d0WZHgyClp UMf13XC7g3mI6RR5z2Vl934/lDAbYDZMAAXyVjc6uSUdw47wXbPTWGOn69yj9CV0C8mq Ef3g== X-Gm-Message-State: APjAAAXHRaKhSj7xZGnTDet4tspsh1CBOYlw3xbW6Q4UEeSJ7QXPSQVG 342WDfdg8hYqNkErNWeep6NEDNI1iuitkCorg5o= X-Received: by 2002:a5e:db08:: with SMTP id q8mr29298563iop.64.1558480948862; Tue, 21 May 2019 16:22:28 -0700 (PDT) MIME-Version: 1.0 References: <20190514163443.glfjva3ofqcy7lbg@csclub.uwaterloo.ca> <20190516183407.qswotwyjwtjqfdqm@csclub.uwaterloo.ca> <20190516183705.e4zflbli7oujlbek@csclub.uwaterloo.ca> <20190517172317.amopafirjfizlgej@csclub.uwaterloo.ca> <20190521151537.xga4aiq3gjtiif4j@csclub.uwaterloo.ca> <20190521175456.zlkiiov5hry2l4q2@csclub.uwaterloo.ca> In-Reply-To: <20190521175456.zlkiiov5hry2l4q2@csclub.uwaterloo.ca> From: Alexander Duyck Date: Tue, 21 May 2019 16:22:17 -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 , e1000-devel@lists.sourceforge.net Content-Type: multipart/mixed; boundary="00000000000059aa6005896e1fad" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --00000000000059aa6005896e1fad Content-Type: text/plain; charset="UTF-8" On Tue, May 21, 2019 at 10:55 AM Lennart Sorensen wrote: > > On Tue, May 21, 2019 at 09:51:33AM -0700, Alexander Duyck wrote: > > I think we need to narrow this down a bit more. Let's try forcing the > > lookup table all to one value and see if traffic is still going to > > queue 0. > > > > Specifically what we need to is run the following command to try and > > force all RSS traffic to queue 8, you can verify the result with > > "ethtool -x": > > ethtool -X weight 0 0 0 0 0 0 0 0 1 > > > > If that works and the IPSec traffic goes to queue 8 then we are likely > > looking at some sort of input issue, either in the parsing or the > > population of things like the input mask that we can then debug > > further. > > > > If traffic still goes to queue 0 then that tells us the output of the > > RSS hash and lookup table are being ignored, this would imply either > > some other filter is rerouting the traffic or is directing us to limit > > the queue index to 0 bits. > > # ethtool -x eth2 > RX flow hash indirection table for eth2 with 12 RX ring(s): > 0: 7 7 7 7 7 7 7 7 > 8: 7 7 7 7 7 7 7 7 > 16: 7 7 7 7 7 7 7 7 > 24: 7 7 7 7 7 7 7 7 > 32: 7 7 7 7 7 7 7 7 > ... > 472: 7 7 7 7 7 7 7 7 > 480: 7 7 7 7 7 7 7 7 > 488: 7 7 7 7 7 7 7 7 > 496: 7 7 7 7 7 7 7 7 > 504: 7 7 7 7 7 7 7 7 > RSS hash key: > 0b:1f:ae:ed:60:04:7d:e5:8a:2b:43:3f:1d:ee:6c:99:89:29:94:b0:25:db:c7:4b:fa:da:4d:3f:e8:cc:bc:00:ad:32:01:d6:1c:30:3f:f8:79:3e:f4:48:04:1f:51:d2:5a:39:f0:90 > root@ECA:~# ethtool --show-priv-flags eth2 > Private flags for eth2: > MFP : off > LinkPolling : off > flow-director-atr: off > veb-stats : off > hw-atr-eviction : on > legacy-rx : off > > All ipsec packets are still hitting queue 0. > > Seems it is completely ignoring RSS for these packets. That is > impressively weird. > > -- > Len Sorensen So we are either using 0 bits of the LUT or we are just not performing hashing because this is somehow being parsed into a type that doesn't support it. I have attached 2 more patches we can test. The first enables hashing on what are called "OAM" packets, The thing is we shouldn't be identifying these packets as "OAM", Operations Administration & Management, as normally it would have to be recognized as a tunnel first and then have a specific flag set in either the GENEVE or VXLAN-GPE header. The second patch will dump the contents of the HREGION registers. They should all be 0, however I thought it best to dump the contents and verify that since I know that these registers can be used to change the traffic class of a given packet type and if we are encountering that it might be moving it to an uninitialized TC which would be using queue offset 0 with 0 bits of the LUT. These last 2 patches would pretty much eliminate the entire RSS subsystem. If we don't see HREGION values set and the OAM flags have no effect I can only assume there is something going on with the parser in the NIC since it isn't recognizing the packet type. Thanks. - Alex --00000000000059aa6005896e1fad Content-Type: text/x-patch; charset="US-ASCII"; name="i40e-enable-oam-flag-tunnel.patch" Content-Disposition: attachment; filename="i40e-enable-oam-flag-tunnel.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_jvydbsln1 aTQwZTogRW5hYmxlIE9BTSBmbGFnIHR1bm5lbCBoYXNoaW5nCgpGcm9tOiBBbGV4YW5kZXIgRHV5 Y2sgPGFsZXhhbmRlci5oLmR1eWNrQGxpbnV4LmludGVsLmNvbT4KCkFkZCBzdXBwb3J0IGZvciBo YXNoaW5nIHBhY2tldCB0eXBlcyAyNiBhbmQgMjcgb24gWDcyMiBhZGFwdGVycy4gV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fTVVMVElDQVNUX0lQVjZfVURQKSkK KwlCSVRfVUxMKEk0MEVfRklMVEVSX1BDVFlQRV9OT05GX01VTFRJQ0FTVF9JUFY2X1VEUCkgfCBc CisJQklUX1VMTCgyNikgfCBCSVRfVUxMKDI3KSkgLyogQWRkZWQgYml0cyBmb3IgdHVubmVsIE9B TSAqLwogCiAjZGVmaW5lIGk0MGVfcGZfZ2V0X2RlZmF1bHRfcnNzX2hlbmEocGYpIFwKIAkoKChw ZiktPmh3X2ZlYXR1cmVzICYgSTQwRV9IV19NVUxUSVBMRV9UQ1BfVURQX1JTU19QQ1RZUEUpID8g XAo= --00000000000059aa6005896e1fad Content-Type: text/x-patch; charset="US-ASCII"; name="i40e-dump-extra-hregion.patch" Content-Disposition: attachment; filename="i40e-dump-extra-hregion.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_jvydbslb0 aTQwZTogRHVtcCBIUkVHSU9OIGVudHJpZXMKCkZyb206IEFsZXhhbmRlciBEdXljayA8YWxleGFu ZGVyLmguZHV5Y2tAbGludXguaW50ZWwuY29tPgoKCi0tLQogZHJpdmVycy9uZXQvZXRoZXJuZXQv aW50ZWwvaTQwZS9pNDBlX21haW4uYyB8ICAgIDggKysrKysrKysKIDEgZmlsZSBjaGFuZ2VkLCA4 IGluc2VydGlvbnMoKykKCmRpZmYgLS1naXQgYS9kcml2ZXJzL25ldC9ldGhlcm5ldC9pbnRlbC9p NDBlL2k0MGVfbWFpbi5jIGIvZHJpdmVycy9uZXQvZXRoZXJuZXQvaW50ZWwvaTQwZS9pNDBlX21h aW4uYwppbmRleCAzMjA1NjJiMzk2ODYuLjM3MGY2NmRmNGU0ZiAxMDA2NDQKLS0tIGEvZHJpdmVy cy9uZXQvZXRoZXJuZXQvaW50ZWwvaTQwZS9pNDBlX21haW4uYworKysgYi9kcml2ZXJzL25ldC9l dGhlcm5ldC9pbnRlbC9pNDBlL2k0MGVfbWFpbi5jCkBAIC0xMTA5NCw2ICsxMTA5NCwx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