From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mail.toke.dk (Postfix) with ESMTPS id 94F939E9678 for ; Tue, 14 Feb 2023 16:17:13 +0100 (CET) Authentication-Results: mail.toke.dk; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=FQ8dAK0O DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676387833; x=1707923833; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=WLfviKR68tfNRa81W18kyBJsekbZaWgoc8ZQplWeoQ8=; b=FQ8dAK0O04Q0Z5/mLEd3vEaDdgZ1qaPHuiUsZ+8oJ3knchKPsyZdwpJd wxFHZbj/k0Hyg3xnhlEkwHR0ygOg47ZZQ8iUr59d90462HwAxOcgY4mno ikO+pQmSvSSx6Yxn5BjFZ2RlsY5FPKX3VhrT2Se/vw1vlXejwEn/4fY0K lw8Q2m44s89TJBwP2W/2Yjs+l5nXRJUMDwVwugobtcnImGbiedGWmV/ih dYHohwnFtzZMrFM+V31DmxizqJzc+54o+tYiLmFJTWHfblPJG40Epx084 t11cNoh3CUwEjtLz/fgdGw+2lRmS2/x0C2/zNY1kkQFv51pZQ333MSXKW g==; X-IronPort-AV: E=McAfee;i="6500,9779,10621"; a="311541066" X-IronPort-AV: E=Sophos;i="5.97,296,1669104000"; d="scan'208";a="311541066" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Feb 2023 07:14:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10621"; a="843198667" X-IronPort-AV: E=Sophos;i="5.97,296,1669104000"; d="scan'208";a="843198667" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga005.jf.intel.com with ESMTP; 14 Feb 2023 07:14:18 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Tue, 14 Feb 2023 07:14:17 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Tue, 14 Feb 2023 07:14:17 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.47) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Tue, 14 Feb 2023 07:14:17 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D4usCTQWHumigP8/DuZZAPJFlhOeae41GxSlDqIhG/DEX48EiVB+2XuAs5pBzf/O9Ork8owjEr6UIujJG+IPLKV6F0UPSgzMDM59Ta/CB3F6JQSTfqvh0JByAzkWDlNjrJc1hUB3LFthGeD8ySNl/pmNn/SHs4O2vrxDrojY2wpcsZ2yYeSvlIahrxEsplVNMHhmMb6/OLyGMmIa1XOqVKjsD/AXh0NS0APgpuCVGD25vodiNojWqGTgTy6smtcfQLyEdunqLWHatJsPrIscxn5spdk9jPEQnTPA2ZzLkqdRdxQCPKwtmuDuWKu/XIcabgv9WFxXLW7DiEZXc/I29w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8zbgWaAvcta/qNWonQbK9hcWzzcnFarEaW+bHCyIwjM=; b=YjcObUTINByaIJ1QsifnLp0JDsQ6fbXVxf31gcGgbNTcCwcYO+27RfQmq1oC6IdeVFJE+gF1QMiRf7Fxx8BpcBAh/ERTXA8CJ4cmXLU08fhyBa0lkcasqziWlXf0qqjJYhA2X+HkVyrzg0n2UKRBTnyae5kHSDhPMYVMqBjam+ticFf7mnyoc3NoRb5ZfrUtXSk2n6+w3ImfozLk+sy5+AVJGCjN+eoMI2YawSLOuxszR294hfR5P1f96e1wdQwEUu48NoFccPSH5HZ9HPNxRwd4dZec9p6qE5c0cyGIoBDdyIgVHvknrHIpuf1KwYQNGDLikodUxRGUYHfhOtLcwg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DM6PR11MB3625.namprd11.prod.outlook.com (2603:10b6:5:13a::21) by DM4PR11MB6068.namprd11.prod.outlook.com (2603:10b6:8:64::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.24; Tue, 14 Feb 2023 15:14:15 +0000 Received: from DM6PR11MB3625.namprd11.prod.outlook.com ([fe80::3ff6:ca60:f9fe:6934]) by DM6PR11MB3625.namprd11.prod.outlook.com ([fe80::3ff6:ca60:f9fe:6934%4]) with mapi id 15.20.6086.024; Tue, 14 Feb 2023 15:14:15 +0000 Message-ID: Date: Tue, 14 Feb 2023 16:13:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Content-Language: en-US To: Paul Menzel References: <167604167956.1726972.7266620647404438534.stgit@firesoul> <6a5ded96-2425-ff9b-c1b1-eca1c103164c@molgen.mpg.de> From: Alexander Lobakin In-Reply-To: <6a5ded96-2425-ff9b-c1b1-eca1c103164c@molgen.mpg.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR3P281CA0187.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a4::15) To DM6PR11MB3625.namprd11.prod.outlook.com (2603:10b6:5:13a::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR11MB3625:EE_|DM4PR11MB6068:EE_ X-MS-Office365-Filtering-Correlation-Id: ae6f766b-d7a6-43b4-bad5-08db0e9e22db X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7uLw9jzyWBmuPiItFsZgrgxxsCOXvd4SPgUxDM1EzAFKO8BSRpCq6YqvSDi2BnNrh2uTfWMfXjqFKeEjji5xSwvOkCX3CQfrbhzx00kITsOiUqqD29dNV6Nbc749UOE252/im8bD6YZCnsvSEPE/HJOicfcsiLISJ1i1Jt5odzoAcI6E4TZ/TQmas5WwJ+eP/8JDUOk/t7iT+0dTb9YUX7NGHxVXCCChpXeenAoe2QwOeOq1v/6mDVTOn73uWm+mgX8wCXUhphx5gUiRM0XxpieaskRN3qdduD53At6f/zuIrKPxdDPM0HiseoebRNp80RkNsS9juVfnQpsZzuN9+iduth0ANLb/fqQoZR1nPpvZCijPAWlIWJlLsEAca9BnX6DzbsBxmM4RtkRyp/7ZEjhrvla2aF8jNYDqiFJAl/s1Au9vivmxvZHv4SWM2TF2ahS7IwlArLZPmaxL+1NJNzgZC+tjG3Pmae6t1lPCR+PIGSt9dqTfEERpUQK8W1z6u0b7PIsGDietsdKNklLg4B221JsWABZMhbJNYMCsorp483oZmsLHTz9df1Ti91c+9DbBkq2k9qmoxj/Uu57g40FFJAS8Gn8qSX9AxT6o9hk6HsRRjo1SiodMl3rd6VF0SMzMN6Bi9J9PF/3SgbysB2CrXRHgVaz4SCp7k9X/zAfrWw2VbZOjsKnnv6+n6I4DFHF/UXAB+HmYaXlmkTZJSw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB3625.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(346002)(136003)(396003)(376002)(366004)(39860400002)(451199018)(4326008)(6916009)(8676002)(38100700002)(31686004)(316002)(54906003)(36756003)(41300700001)(83380400001)(66574015)(82960400001)(2616005)(66946007)(66556008)(66476007)(5660300002)(2906002)(7416002)(8936002)(6506007)(31696002)(6666004)(186003)(26005)(6512007)(478600001)(966005)(6486002)(86362001)(45980500001)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?amh5cUxqN0xqMUlrZGtza1JUZXlMdWFBVGRReDB2Sy9Yakw4cUVHQ2tqQlgy?= =?utf-8?B?NFZoY2R4ZERZSy9HbitPMVpQV0hlakFuYVpPVWxEZWZPRkxpUlhFMzBLMWZu?= =?utf-8?B?Y0tOQ0tjd00xMWZ5QWpPV0VsTE1KUS81VnVWRVhKZkJFOHZvRnF4ZUdPcmYy?= =?utf-8?B?ZCtKSCtJNkxZNzZDbFA2cFV1QUlGOEhDc3JXUjFuVHowdEVMUG11RzVvMUxE?= =?utf-8?B?VDR1Z3BlN2tCajlsRnFqbjRjNk95cnVZTEEzLzhxbnA1STdUaVRrblRrT2dp?= =?utf-8?B?a1RrcEtyaGVUU2JaSXdIbHNraDRhUmhCV3ZEeDg3dG5abE53OG1BbHlLeisz?= =?utf-8?B?dnJnY2pPZWpGQXk1VDUzU2s0Rmt4RnZ4bnI1U0l0RTUwM1VOK1FzL2hTOGFv?= =?utf-8?B?bkxHVEx5OFgxYVBQU1Y4UVNWdkd6UVQxL2p6Y2VsQVluQlhlOHRnL1I2Z2Ew?= =?utf-8?B?Smk2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thSource: DM6PR11MB3625.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Feb 2023 15:14:15.7066 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 3QuDoeRPI5gfjRX5Fnx73FIKY+V0KwcEuvmQbp/PiOIrE8hrgXViHNIaER9aZqRkAaHv82+vH5Tp+67hp24yF+QISz1OmuUCGsoymjou/jY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB6068 X-OriginatorOrg: intel.com Message-ID-Hash: XX4M5VIDXHIGWUZTCPIKGDT3CF4TVFYU X-Message-ID-Hash: XX4M5VIDXHIGWUZTCPIKGDT3CF4TVFYU X-MailFrom: alexandr.lobakin@intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Jesper Dangaard Brouer , bpf@vger.kernel.org, xdp-hints@xdp-project.net, martin.lau@kernel.org, daniel@iogearbox.net, netdev@vger.kernel.org, ast@kernel.org, Stanislav Fomichev , yoong.siang.song@intel.com, anthony.l.nguyen@intel.com, intel-wired-lan@lists.osuosl.org X-Mailman-Version: 3.3.8 Precedence: list Subject: [xdp-hints] Re: [Intel-wired-lan] [PATCH bpf-next V1] igc: enable and fix RX hash usage by netstack List-Id: XDP hardware hints design discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Paul Menzel Date: Tue, 14 Feb 2023 16:00:52 +0100 > Dear Jesper, > > > Thank you very much for your patch. > > Am 10.02.23 um 16:07 schrieb Jesper Dangaard Brouer: >> When function igc_rx_hash() was introduced in v4.20 via commit >> 0507ef8a0372 >> ("igc: Add transmit and receive fastpath and interrupt handlers"), the >> hardware wasn't configured to provide RSS hash, thus it made sense to not >> enable net_device NETIF_F_RXHASH feature bit. >> >> The NIC hardware was configured to enable RSS hash info in v5.2 via >> commit >> 2121c2712f82 ("igc: Add multiple receive queues control supporting"), but >> forgot to set the NETIF_F_RXHASH feature bit. >> >> The original implementation of igc_rx_hash() didn't extract the >> associated >> pkt_hash_type, but statically set PKT_HASH_TYPE_L3. The largest >> portions of >> this patch are about extracting the RSS Type from the hardware and >> mapping >> this to enum pkt_hash_types. This were based on Foxville i225 software >> user > > s/This were/This was/ > >> manual rev-1.3.1 and tested on Intel Ethernet Controller I225-LM (rev >> 03). >> >> For UDP it's worth noting that RSS (type) hashing have been disabled >> both for >> IPv4 and IPv6 (see IGC_MRQC_RSS_FIELD_IPV4_UDP + >> IGC_MRQC_RSS_FIELD_IPV6_UDP) >> because hardware RSS doesn't handle fragmented pkts well when enabled >> (can >> cause out-of-order). This result in PKT_HASH_TYPE_L3 for UDP packets, and > > result*s* > >> hash value doesn't include UDP port numbers. Not being >> PKT_HASH_TYPE_L4, have >> the effect that netstack will do a software based hash calc calling into >> flow_dissect, but only when code calls skb_get_hash(), which doesn't >> necessary happen for local delivery. > > Excuse my ignorance, but is that bug visible in practice by users > (performance?) or is that fix needed for future work? Hash calculation always happens when RPS or RFS is enabled. So having no hash in skb before hitting the netstack slows down their performance. Also, no hash in skb passed from the driver results in worse NAPI bucket distribution when there are more traffic flows than Rx queues / CPUs. + Netfilter needs hashes on some configurations. On default configurations and workloads like browsing the Internet this usually is not the case, but only then I'd say. > >> Fixes: 2121c2712f82 ("igc: Add multiple receive queues control >> supporting") >> Signed-off-by: Jesper Dangaard Brouer [...] Nice to see that you also care about (not) using short types on the stack :) > Kind regards, > > Paul > > > [1]: https://notabs.org/coding/smallIntsBigPenalty.htm Thanks, Olek