From mboxrd@z Thu Jan 1 00:00:00 1970 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 93967107A4; Tue, 31 Oct 2023 15:19:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="X1Rz6VMn" Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09E35D52; Tue, 31 Oct 2023 08:18:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698765492; x=1730301492; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=sAuzb4e2KIEKHN5BAFJWJHoBO79tMx1HQ4juFph27t4=; b=X1Rz6VMnN8Dk/QzJ6cTV3wKlQ2ToKwTyZfS4pyBhGJraUKZUuNUWkBZ6 QzkMgY77CJeRRJAnLcZp3/xzjbCjyyNrq47mQ6fKVhSvFd5Y68GiHeAIg 3DyE/p4eRQ+FrV8cMPxPXogXg9HBmAMNn94Q0Z8xlXOd4+WqvSUVkyXQX k4k1cASbFzLF1cHaLBnlQPO5FZu/S9NqmUrT+uqJyGYQPsq4msms2rvC2 NjXJhYwtZAeBdciNcFt4Cm0uYTjyQvAQf0BhLZxXQeM6sFasHfUZKE2Vm YYMTb8JrhvuwvaRR9cpwPlIWWeN7Mw/ka2BE43MBdJZqxN9+iXNtn4Xu0 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10880"; a="378698905" X-IronPort-AV: E=Sophos;i="6.03,265,1694761200"; d="scan'208";a="378698905" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2023 08:15:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10880"; a="934143066" X-IronPort-AV: E=Sophos;i="6.03,265,1694761200"; d="scan'208";a="934143066" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 31 Oct 2023 08:15:09 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx603.amr.corp.intel.com (10.18.126.83) 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 08:15:09 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx603.amr.corp.intel.com (10.18.126.83) 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 08:15:09 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.100) 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.34; Tue, 31 Oct 2023 08:15:09 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fin1DYt8jlwv+BcWs+H38i2dDBKfPARmFx5DnRGrxiOC8jHJl4wuGV+em8Q6PjcynZMzIMGDyzJCuv4HNjnH6vWj2CGobv/O2FmMtKUrFrlLx02LhJoRa3BLakr311fCTnknnxBAHBhGCm65Vxqg8NCunPn9sULoxTHBWYgZ4mlb2XJSff13IWSaAZtAcGCUF2gV0FmiaNcStWwUtpcXhtV1/O+bjvtShCXgPWxKYPl/fPZ0gkqfEkiUy7A8+MA9I0Bm7Ag7HIZI05en8EWCJFnzQAAnxxcwuKm04CAoxmcomDAZS2Z/cgPaxsoXpTN+w7D096+q208U4F99suM0sw== 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=28EIKFYMxgAFdUm4njcxVqFYoMcPx3qXYI1/g11nIvo=; b=Cs6HH2gU9MhpOvXWDvoN3KqAhcLEta6x0tlp+K8/gjOPg58RmY/1Zp6QBPLqmGGgAjUazmszwPnCtdy+ycqYTAWFLfH34zH/4ebpm49gJeEkPz9i4DPIzYxiBcJQeNqXAmolA2OmUHrgm34SILrazRGARiJgShOCh1sJT3nND4k/gCJmUHUrYkvdDa2vD7KCsHMb3tVWQ9IXhN1fRbg3iENwxzBztsV6QTFb/3+m90zHB0O1NZFICJE2kTj2iRZWlvo2HixszOdtpjncib6ds0PO5Yd+dXI2WVu0vb575wGO07VyvCO62yIeUD7/59Lb2GoJm7ArKC9P8StPchioPA== 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 SA2PR11MB4956.namprd11.prod.outlook.com (2603:10b6:806:112::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.30; Tue, 31 Oct 2023 15:15:07 +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 15:15:07 +0000 Message-ID: Date: Tue, 31 Oct 2023 09:14:58 -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 Content-Language: en-US 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> <70132b6f-542f-4fe6-971f-ab9ea80acbe4@nvidia.com> From: Ahmed Zaki In-Reply-To: <70132b6f-542f-4fe6-971f-ab9ea80acbe4@nvidia.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DB3PR06CA0002.eurprd06.prod.outlook.com (2603:10a6:8:1::15) To SN7PR11MB7420.namprd11.prod.outlook.com (2603:10b6:806:328::20) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN7PR11MB7420:EE_|SA2PR11MB4956:EE_ X-MS-Office365-Filtering-Correlation-Id: 6ea60263-664c-402a-bf2a-08dbda242a6f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: T0dVLgWBmDYKE7sS04JH2kNF91/HAFymjq0ouuHJAXqpT9O/ibt6Ek2CHD0NgyV9LCG3kKif/rU6F7XDCINRT/uzx53vLhxHAOac6v1EmCC2nWhBy7DppllViQS1+2bOX1FiHxHUuoBeaa10XrQQbwk8CnnXBfaXClssyTRK/SONIJhRrON6AjGTt/CSSbkzR7BLq2nJcfzDtE/IAsn9kVkNcn3/19owqfIoyyOwTRVNeRll53shJzzXCLfspmBcg2mzcpr2SEKtpN//WJvlU3UfBDLlQkDPoBYfVLRP1onxLZf+ZoO9ZAM9HckRwgznsWD2nKPMOKDhD4Y2q079SMaInYfRkJzC9clL46nseHY3S8wgsKQXBLXdAOX8mlaSjyq6NtjtzZ/DaAiXG363+SRJ+3Z5QdhzqDk4Blh40yneXAVdOSIWUWA1HUiBHlwcnCm+NegVgqCKfYIEPsPU/25UI71tQMBeDkjG1Q9S0hHFRhm/3owEn93QjcGL7y4rdIADe2Pkb7pXy4L1wYoxHDLjDtitp0R4oLnmTelEQj4tYeFJyIcd2yahsEbc985wIRYBn+x0N+qzwKXXhIYFaw4mteXB5cHo+Ei9ryZ+Y4fn/+yLWnUQUdLW5u1jQRsaHE/70fZsCllQkLqOmCTc6g== 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)(376002)(346002)(39860400002)(136003)(396003)(230922051799003)(451199024)(186009)(1800799009)(64100799003)(316002)(38100700002)(2906002)(6666004)(6512007)(7416002)(6506007)(41300700001)(4001150100001)(53546011)(36756003)(966005)(6486002)(478600001)(54906003)(66476007)(66556008)(110136005)(66946007)(8936002)(8676002)(4326008)(44832011)(5660300002)(83380400001)(86362001)(2616005)(26005)(31696002)(82960400001)(31686004)(43740500002)(45980500001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?aEY0VkRoUllPbUplUGg3UmJ6Vkc4Ulo1dmhWV0lWL2pJaUhycVgwNTZCTmdF?= =?utf-8?B?MFBJOWZleHNwblU5OHYwUC9hZjFUVTJsVUwvMnlLWDNrVWViT0Z2RG1pNUNO?= =?utf-8?B?enJUVHkyakhUQWZFbHFkOWF3ZWVNSkN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N1VWWnBuRUNJa0lCNllPczF0cHpxTnptc0l3VDNJbEMyWVJPSTRO?= =?utf-8?B?Qk1McnNjMFByNlQ2M3ZuaU1mOFVJNlBKYzhJRTRlYU8wYjJTUVJNMDhlTy8v?= =?utf-8?B?UDBhb0k0elRtMlJoYnVQWWMzRzZoVFdPSS9ya1JMN1F5MlB0WVY5SjNnUmRk?= =?utf-8?Q?6lDLbP0vGjceLMcbGuwsnmayX?= X-MS-Exchange-CrossTenant-Network-Message-Id: 6ea60263-664c-402a-bf2a-08dbda242a6f X-MS-Exchange-CrossTenant-AuthSource: SN7PR11MB7420.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2023 15:15:07.0730 (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: cqxrUm6tg9mv4z4rhMwXPdPUtNokbwaIyV3hhtmzVggk5odJ0PVRt1N7qLKb+E8dWz+yS6rQFdL6olaFx5xgNA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB4956 X-OriginatorOrg: intel.com On 2023-10-31 08:45, Gal Pressman wrote: > On 31/10/2023 16:40, Ahmed Zaki wrote: >> >> >> 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 > > I was thinking of somewhere more generic, where ethtool users (not > necessarily ice users) can refer to. > > Perhaps Documentation/networking/ethtool-netlink.rst? Or ethtool man page? Do you mean add vendor-specific implementation details to common docs? Not sure if I have seen this before. Any examples? Or, we can add a note in ethtool doc that each vendor's implementation is different and "Refer to your vendor's specifications for more info".