Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp649252yba; Fri, 3 May 2019 08:16:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqwbb7ccGNncCcnXN6itBjCbtsvGJJ8JoD7Psrk4DuRpmVEjpBvgvK3KlEX1MGNav2QdcGku X-Received: by 2002:a63:2325:: with SMTP id j37mr10931271pgj.137.1556896584384; Fri, 03 May 2019 08:16:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556896584; cv=none; d=google.com; s=arc-20160816; b=WanrxrkfEj0z9cVLA9hzcldsRRu4o3Q2Z4Pq/oN8mj8GlgH0ggERlW6Ye/RnjHEddc iJEZW8SMz+domFxxEJJnkvHH3mJw36tNl844kTUXs3PcAKRR/I8OMgnyJIO5jxxh0Jm5 8MrB66ZryRGZyiObnOOMAfFWTHl1uolRzlYHVc/NfqlZduCOO5XU581dWh45LEuQrndd kpe5zsUl7HNSwZpmAeQ/lrgSdOJvVLFdk3QbrXg0EAK2cNeuc7hXR71I2s69FBTePdGM QuHPZfA+jLLRmVFteEMfldqnC2+vV1oYn15J0JEcTF+90DcRPE94T+fmVInLugY+lpiF LmJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:from:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:date; bh=E94SJVIlC9Z31RnEpG1+Jj/xgdVO2slbb3U1ZFBA+BM=; b=lmkY9Nwz1t6eFH7rXKKpGrr7qm7awqqidpwutBwQzVEOpJ5/bbBTw/EwgYAhBDld7W ljWASSLdqCZ38IEc+FV7CtXiy2qXpVjw8o0fZYNu8ZWDvsKI8TXO0PNrnHSPrF4jex3T mFHuaMtvnHn4Y0NaV6ZLrpX3p6ZwnxVLm80LYAF6jnCdfQ4dikX6RQFaCNIIGUYEsTc7 Q59altXih3RHK1EGAt5gWo4FjwzWWN9BtZcvLQf9b65YfthjMR0RUXQeK/6XraWQy5e7 IMPycgtiYldBCIidp6gcWPWRPehVQihVTmoaa5CZtEqeKrcq2R7RQOt8AZNqD/xN//AZ /dnw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=csclub.uwaterloo.ca Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h73si2686251pfj.220.2019.05.03.08.16.07; Fri, 03 May 2019 08:16:24 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=csclub.uwaterloo.ca Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728247AbfECPOY (ORCPT + 99 others); Fri, 3 May 2019 11:14:24 -0400 Received: from caffeine.csclub.uwaterloo.ca ([129.97.134.17]:55861 "EHLO caffeine.csclub.uwaterloo.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726468AbfECPOY (ORCPT ); Fri, 3 May 2019 11:14:24 -0400 Received: by caffeine.csclub.uwaterloo.ca (Postfix, from userid 20367) id 60E64461D3A; Fri, 3 May 2019 11:14:21 -0400 (EDT) Date: Fri, 3 May 2019 11:14:21 -0400 To: Alexander Duyck Cc: LKML , Netdev , intel-wired-lan Subject: Re: [Intel-wired-lan] i40e X722 RSS problem with NAT-Traversal IPsec packets Message-ID: <20190503151421.akvmu77lghxcouni@csclub.uwaterloo.ca> References: <20190501205215.ptoi2czhklte5jbm@csclub.uwaterloo.ca> <20190502151140.gf5ugodqamtdd5tz@csclub.uwaterloo.ca> <20190502171636.3yquioe3gcwsxlus@csclub.uwaterloo.ca> <20190502175513.ei7kjug3az6fe753@csclub.uwaterloo.ca> <20190502185250.vlsainugtn6zjd6p@csclub.uwaterloo.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) From: lsorense@csclub.uwaterloo.ca (Lennart Sorensen) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 02, 2019 at 01:59:46PM -0700, Alexander Duyck wrote: > If I recall correctly RSS is only using something like the lower 9 > bits (indirection table size of 512) of the resultant hash on the > X722, even fewer if you have fewer queues that are a power of 2 and > happen to program the indirection table in a round robin fashion. So > for example on my system setup with 32 queues it is technically only > using the lower 5 bits of the hash. > > One issue as a result of that is that you can end up with swaths of > bits that don't really seem to impact the hash all that much since it > will never actually change those bits of the resultant hash. In order > to guarantee that every bit in the input impacts the hash you have to > make certain you have to gaps in the key wider than the bits you > examine in the final hash. > > A quick and dirty way to verify that the hash key is part of the issue > would be to use something like a simple repeating value such as AA:55 > as your hash key. With something like that every bit you change in the > UDP port number should result in a change in the final RSS hash for > queue counts of 3 or greater. The downside is the upper 16 bits of the > hash are identical to the lower 16 so the actual hash value itself > isn't as useful. OK I set the hkey to aa:55:aa:55:aa:55:aa:55:aa:55:aa:55:aa:55:aa:55:aa:55:aa:55:aa:55:aa:55:aa:55:aa:55:aa:55:aa:55:aa:55:aa:55:aa:55:aa:55:aa:55:aa:55:aa:55:aa:55:aa:55:aa:55 and still only see queue 0 and 2 getting hit with a couple of dozen different UDP port numbers I picked. Changing the hash with ethtool to that didn't even move where the tcp packets for my ssh connection are going (they are always on queue 2 it seems). Does it just not hash UDP packets correctly? Is it even doing RSS? (the register I checked claimed it is). This system has 40 queues assigned by default since that is how many CPUs there are. Changing it to a lower number didn't make a difference (I tried 32 and 8). -- Len Sorensen