Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EA5D913FEE; Tue, 31 Oct 2023 14:40:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="LUx9zlxA" Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A0BAED; Tue, 31 Oct 2023 07:40:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698763241; x=1730299241; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=p1L/nnVscxXgvNMn3MJ44t0e5nShHdlmqkNbCb6uvBM=; b=LUx9zlxAWWtUHYbzwwSlzu8ZRScNR9nUg3FwD+lahNn/mp4dx8jF4C92 7ygDHzXUOH2WA5Mx6Zd1+2uaq981DQC2SF/C6iWQ9wg3zmnVJqzBrxC+E ESqTskDSq+CuOs9dXoFnqH5+ysEV15Zh+V1tz9NozFAUZXMmMcMmYIPeT CbsUD93g/xiy60rWBvv1txcq+mskyas7Q7ONN482n2GUdkn6Dcg7vD5hb rcAz2eyA1dsCuNma752T7gbK/wEoZx74byLe+vUfMe5r6KCYfs213X/BV pYq8MLn8ZKrx1tef8Gd8vw4KI/oxQy5cGP26kfdC+aPA+Z1tCSDwfokiE Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10880"; a="387188039" X-IronPort-AV: E=Sophos;i="6.03,265,1694761200"; d="scan'208";a="387188039" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2023 07:40:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10880"; a="934133326" X-IronPort-AV: E=Sophos;i="6.03,265,1694761200"; d="scan'208";a="934133326" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 31 Oct 2023 07:40:18 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Tue, 31 Oct 2023 07:40:17 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) 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.34 via Frontend Transport; Tue, 31 Oct 2023 07:40:17 -0700 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.40) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.34; Tue, 31 Oct 2023 07:40:17 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SVKZ2xfebmDI9xI3Odigi+PBg67sn72fHUAlqwhDnvh4k5gRqPQJMlavsnkn+c+fm0jhF80JfS6W+kz5gNVKQUH/xGU29A1ZmEuugeAzbAFczqgQAlhbQEw0Jc55O5lssNnS3BJZns8DF9luP6P5lt7rEDHGZdCj1NAMJQg31pgmid2m4Y3WONVAnW8pvMVPM6Oet0J7jGL3H+GhctpA+VFPgpULx+DBmPQ7j3cVaNbIw8UufbYLTH57o69QhFIeVvkSD/eFgTciseyG15Ad+zWi39/NEPGAtRmXKuee7RzBmhL9BO6aUEFy5LHB0qkYOfICxj6I5nvSBaxQHtkh5Q== 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=OJklk9aokwrkqRpccHhQEssilVpk3X9fFyUEKuQ6bno=; b=C0+SFH+0+OG1BKzKxEngMD8edfVAsovaUtQfsrOFQcI8ImPsCFNqb0EpcO1st+OlkpRqAiv0JiB2yw6/gDUCGO3XGJtsa2hHRTvQgyXZ5FjIEjZUlGp/hWexuvNZt2Rv3LrEItF8wNY2628AZ+lSqv1ZdnrDGAP13mg/g1EMNKeTy2iA5TUkA0TrxBmnrdIpcg8uNx7NJ3i2wHTdvSWL7EAyZa0CAUjBfLEM23jH7vfjMftnGOhxWeWTJWdSGSVG8b98uWgejNOTGHMMnoZBLsi0Pt31JNBBrxEU1hKKnipz6Alg5MjoNOtTy7yoaVdPwJWOdTTgu+zJgQYJrDvU0w== 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 SN7PR11MB7420.namprd11.prod.outlook.com (2603:10b6:806:328::20) by DM6PR11MB4707.namprd11.prod.outlook.com (2603:10b6:5:2a6::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.19; Tue, 31 Oct 2023 14:40:15 +0000 Received: from SN7PR11MB7420.namprd11.prod.outlook.com ([fe80::2329:7c5f:350:9f8]) by SN7PR11MB7420.namprd11.prod.outlook.com ([fe80::2329:7c5f:350:9f8%7]) with mapi id 15.20.6933.024; Tue, 31 Oct 2023 14:40:15 +0000 Message-ID: Date: Tue, 31 Oct 2023 08:40:06 -0600 User-Agent: Mozilla Thunderbird Subject: Re: [Intel-wired-lan] [PATCH net-next v4 1/6] net: ethtool: allow symmetric-xor RSS hash for any flow type To: Gal Pressman , Jakub Kicinski , "Alexander H Duyck" CC: , , , Wojciech Drewek , , , , , , , , , Jacob Keller , , , References: <20231016154937.41224-1-ahmed.zaki@intel.com> <20231016163059.23799429@kernel.org> <20231017131727.78e96449@kernel.org> <20231017173448.3f1c35aa@kernel.org> <20231018165020.55cc4a79@kernel.org> <45c6ab9f-50f6-4e9e-a035-060a4491bded@intel.com> <20231020153316.1c152c80@kernel.org> <20231020164917.69d5cd44@kernel.org> <89e63967-46c4-49fe-87bc-331c7c2f6aab@nvidia.com> Content-Language: en-US From: Ahmed Zaki In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR4P281CA0065.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:ce::8) To SN7PR11MB7420.namprd11.prod.outlook.com (2603:10b6:806:328::20) Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN7PR11MB7420:EE_|DM6PR11MB4707:EE_ X-MS-Office365-Filtering-Correlation-Id: 24852447-9376-4346-65c2-08dbda1f4b71 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SPUKLf117h7+t1GwkZ+2fMyxPIdC6YaghSQyiEhUHAmHHWgIQ2qbP9V5UivZ2xYF4vf55gqXJrk5wYQKIfUYvMUhDHs5IBZ0zSvQA8Xco0ZEoF8kxfM+eq04L0SPfTTmhKYa9ZLTrdn7LFW2OmnXphqA+/vSM9dmJZWu/ob5qhPhGWK8V+k06TX428e697Ck+2E58LtgKysHHqg4mhHKFp0i/20CbgKBNyxcdV2P9EH70KKldiEcD94D1GNYPvstwvmn8MvSbyIzfsjfFG2YoA4C61Vur4bbBDxZgncfLSrsq1k60E7dOKBmnIt1VjIBfORczU1mnU2IRdcDiIW56eT2Mg/nMSUP8Opk5PvDkAE+2JIqCHxhfXxT966Tv99VfG6w0QRauUhfuwyz9ZNq509NpfknFUoxapQ2QBjaxvrJucL7M92ymcQYOclckGADL5RXQ2uhGsWDJOnE+Ow9Mxc39+YJsyfvmkchw1E254L1miexRkO9I2IojqI5rz+5bhKElVxvSB9KoCOBU5Lzj06yWin4LlLstV5RMyqFhylP6NLIyunxYFRJHfZAyV1GWScPZW5FMYbq9o0P3/ucvKwdbDVriNvTo/KRp/n/tt7OjVwl4jF1edn9p+MpnqThnuibzrqSsscjfiOP5YVG/w== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN7PR11MB7420.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(136003)(346002)(376002)(39860400002)(396003)(230922051799003)(451199024)(186009)(1800799009)(64100799003)(83380400001)(53546011)(6666004)(6512007)(6506007)(2616005)(26005)(38100700002)(82960400001)(86362001)(36756003)(31696002)(2906002)(4001150100001)(41300700001)(5660300002)(7416002)(6486002)(966005)(478600001)(4326008)(8936002)(44832011)(8676002)(110136005)(316002)(66946007)(66476007)(54906003)(66556008)(31686004)(45980500001)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cThOZDlNam8rWGFSQmtmbzU4aEtWaVdzS1dycFlkaUEzYVZib1UwaGpwbU9z?= =?utf-8?B?czVPR2k1QzUwMU1MaTFmSkd0S0NtSjlWUXhXWlVMRHlmYm9PanVMMld6Witz?= =?utf-8?B?eWFRMWZldFZHalc2dFhOMWRFZitJclE1MHpOQnBiazJobi9mKzRQNlhEMCtN?= =?utf-8?B?ZEJiU2ZNckd5Q1cwZE14MEFNUlBEbHFPWXl5ZmpmOU5IWGxCdGxhYkFGbUZU?= =?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ZituUHZwNHdJWjhyc1dDMk1rU1U0VE1GcHVZalhR?= =?utf-8?B?dzdOaUtPZTJNbDVOUTBROS9FZGQ3cHJQU2lzZHpjcjRqOG5hWFREM3M0TldH?= =?utf-8?Q?DiHwodrpXODs/c9gLoONIgo4h?= X-MS-Exchange-CrossTenant-Network-Message-Id: 24852447-9376-4346-65c2-08dbda1f4b71 X-MS-Exchange-CrossTenant-AuthSource: SN7PR11MB7420.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2023 14:40:14.9916 (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: C1tN7rr6PKt2mhF5LMW9PA+BX+4oQVcnDwX50TiONO2xJiFva+l8Rx8yzYgA01rYaR2sPDc1UUjnkyFDf1lqgg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4707 X-OriginatorOrg: intel.com On 2023-10-31 06:00, Gal Pressman wrote: > On 29/10/2023 18:59, Ahmed Zaki wrote: >> >> >> On 2023-10-29 06:48, Gal Pressman wrote: >>> On 29/10/2023 14:42, Ahmed Zaki wrote: >>>> >>>> >>>> On 2023-10-29 06:25, Gal Pressman wrote: >>>>> On 21/10/2023 3:00, Ahmed Zaki wrote: >>>>>> >>>>>> >>>>>> On 2023-10-20 17:49, Jakub Kicinski wrote: >>>>>>> On Fri, 20 Oct 2023 17:14:11 -0600 Ahmed Zaki wrote: >>>>>>>> I replied to that here: >>>>>>>> >>>>>>>> https://lore.kernel.org/all/afb4a06f-cfba-47ba-adb3-09bea7cb5f00@intel.com/ >>>>>>>> >>>>>>>> I am kind of confused now so please bear with me. ethtool either >>>>>>>> sends >>>>>>>> "ethtool_rxfh" or "ethtool_rxnfc". AFAIK "ethtool_rxfh" is the >>>>>>>> interface >>>>>>>> for "ethtool -X" which is used to set the RSS algorithm. But we >>>>>>>> kind of >>>>>>>> agreed to go with "ethtool -U|-N" for symmetric-xor, and that uses >>>>>>>> "ethtool_rxnfc" (as implemented in this series). >>>>>>> >>>>>>> I have no strong preference. Sounds like Alex prefers to keep it >>>>>>> closer >>>>>>> to algo, which is "ethtool_rxfh". >>>>>>> >>>>>>>> Do you mean use "ethtool_rxfh" instead of "ethtool_rxnfc"? how would >>>>>>>> that work on the ethtool user interface? >>>>>>> >>>>>>> I don't know what you're asking of us. If you find the code to >>>>>>> confusing >>>>>>> maybe someone at Intel can help you :| >>>>>> >>>>>> The code is straightforward. I am confused by the requirements: don't >>>>>> add a new algorithm but use "ethtool_rxfh". >>>>>> >>>>>> I'll see if I can get more help, may be I am missing something. >>>>>> >>>>> >>>>> What was the decision here? >>>>> Is this going to be exposed through ethtool -N or -X? >>>> >>>> I am working on a new version that uses "ethtool_rxfh" to set the >>>> symmetric-xor. The user will set per-device via: >>>> >>>> ethtool -X eth0 hfunc toeplitz symmetric-xor >>>> >>>> then specify the per-flow type RSS fields as usual: >>>> >>>> ethtool -N|-U eth0 rx-flow-hash s|d|f|n >>>> >>>> The downside is that all flow-types will have to be either symmetric or >>>> asymmetric. >>> >>> Why are we making the interface less flexible than it can be with -N? >> >> Alexander Duyck prefers to implement the "symmetric-xor" interface as an >> algorithm or extension (please refer to previous messages), but ethtool >> does not provide flowtype/RSS fields setting via "-X". The above was the >> best solution that we (at Intel) could think of. > > OK, it's a weird we're deliberately limiting our interface, given > there's already hardware that supports controlling symmetric hashing per > flow type. > > I saw you mentioned the way ice hardware implements symmetric-xor > somewhere, it definitely needs to be added somewhere in our > documentation to prevent confusion. > mlx5 hardware also does symmetric hashing with xor, but not exactly as > you described, we need the algorithm to be clear. Sure. I will add more ice-specific doc in: Documentation/networking/device_drivers/ethernet/intel/ice.rst