From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2C36B42860; Wed, 29 Mar 2023 10:13:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B22CB40F18; Wed, 29 Mar 2023 10:13:49 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2077.outbound.protection.outlook.com [40.107.92.77]) by mails.dpdk.org (Postfix) with ESMTP id C7E1440EE7; Wed, 29 Mar 2023 10:13:47 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SP8UGb3H9bXrwu7lDvIoMlG7pEtw8UQcoxub3iX9pYhy0v3ibo79P8FAuaNVxAw8mCVax0WDWRz1UXiFhjH+M8e5TGVMbgAj85wGJe2jGiFoqK32Tt3qcJzoyQAQWvV0f9qkfKvi8+yBAuhyQ1JLwykEHGkMz90PB37qxXBS38rNeGA3ptUA0x0pp45CYSA3zdz/IVuobS9/3rixOPe/O8m+yYqbBqIH8Bl7EL0U+bak17gnXx3N6ILmvs+2P0i8XKtsLKJVIiC3ox8FT7QC6EwLpQ1fx9LBHI193ZbXSLhP9S0rMGyhZk8GwOAVjhA6BF/7uhi770WJq2LF0QrHLQ== 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=a+XJGcK8kqhFVZgDtxGvagHngd2rW68jzsAmb3U0rHw=; b=dCu/VwnIlAwIMWogbZwjJfNwXvjMCWczl6WTEhblL24Jw5b8yJ/trM7737ZHtPjlKCJv8Po/GkMgGKMkXU1n2emcX3lAB/CqasAUTu09ybUt/oQxo9YZ0Nil1oCy6HJX/sLlkW5wWzUqaHODDCfBPLpBGRbvddVN0DbVRjRpfVGvo2HxAXRCTMg5ehV9wC5J1155gkmdwCIPtdn2Vz1YWUJVs3sBZzFxGgQL4y/N5/uAEqL6hbEvKWAdWZ+xk2VCTvzelyjltc3LkRNvusgc6aVVElseuNzRBaIvcLH6iScR8ECjBQY/yN61zfXvJaZhEfR0lt83k4ft3lvXWGYVvA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=a+XJGcK8kqhFVZgDtxGvagHngd2rW68jzsAmb3U0rHw=; b=q4KgocR/DtIdLM7ji6KA5nMG741O3kDpXYNWBGHJFief1fx/2+a1L1Z5cAq4gHwU7FdlKkk0ST4nQ9mi/tFIVjg/UCoVVbzq+Akuz4y+/9o0h3JbNufMGkbh+9sQTw/J3KiZvVwl4cHaS8xyQdDxNrfs6sU6cTx141YnvrjcKfo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by DM4PR12MB5390.namprd12.prod.outlook.com (2603:10b6:5:389::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.35; Wed, 29 Mar 2023 08:13:46 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::dd5a:8a5c:f493:9640]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::dd5a:8a5c:f493:9640%4]) with mapi id 15.20.6222.035; Wed, 29 Mar 2023 08:13:46 +0000 Message-ID: Date: Wed, 29 Mar 2023 09:13:40 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH 06/16] net/hns3: separate the setting of hash algorithm Content-Language: en-US To: "lihuisong (C)" , Dongdong Liu , dev@dpdk.org, thomas@monjalon.net, andrew.rybchenko@oktetlabs.ru Cc: stable@dpdk.org, yisen.zhuang@huawei.com, Ori Kam References: <20230310093518.5198-1-liudongdong3@huawei.com> <20230310093518.5198-7-liudongdong3@huawei.com> <3fc85100-20ef-d0ea-cd49-53be897fe868@huawei.com> From: Ferruh Yigit In-Reply-To: <3fc85100-20ef-d0ea-cd49-53be897fe868@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P123CA0249.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a7::20) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|DM4PR12MB5390:EE_ X-MS-Office365-Filtering-Correlation-Id: c094908f-4d66-4a7a-ebae-08db302d849a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pSwHxhyZX9hUg/yOAqyk6g9eqt7JJo1Mc/2lSbHZaz0LSOcfU5VhxIKCUCGbyz1vA8WC+3uetF86M1E/xzGmi+LolkjK5GkXUrrYqx27KV9bxCGXREuORwnExHya94NAZ1KNemlzoJaz+SvUkqh3WSHP1xElkibShKaUjP2oCkr15iUgSY3wGp1ruLPK3GF56a399YApcUr1KIu7mZU83VANTaZLQtAxtgx+vSDyLkkK+gD9RSmNnVO8KQjo22h99c+HW3lh7CzUdoqUM5jNRl5oCS184VltMJZzFF5Yb1EEdZO9bKrmeESjHyoffkuGO4KDDayatbCfvNvNifg/R4MgSANwfteUcpgFtiXabI9kkCoTTqLF/kxeZbl9AdJ6jk15FIBs2bDG6+Xf+MaQOjW55Pn6Ek3oG7tnX1cSoj4K4BlLlYVtfxU5Q+H9w9taHphRyIymwcG15xRoRq7Ai6nTE0GuwiaLZpmeZdzFGh0BVMvMQbgGEpFAyEHbXqyTlIiEjf1E3cp8UZipptH1Ziw8ax16Ds8sPihwVEEtzpsypGf96ZsELgEQOhCDfAhIIkJGYdtwNKPaKiOtTzj4I7l6EkON1zRc5mpPyFg4EdQE/nCCEaSTxaLcywTlB9nffCJJJGLwZtss6lkd5U0gUA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(136003)(366004)(376002)(346002)(39860400002)(396003)(451199021)(66899021)(31686004)(110136005)(8676002)(41300700001)(36756003)(38100700002)(4326008)(66476007)(8936002)(6486002)(6666004)(83380400001)(66946007)(316002)(2906002)(186003)(478600001)(31696002)(5660300002)(86362001)(44832011)(6506007)(66556008)(6512007)(2616005)(26005)(53546011)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TDJOUkZpWHpNaEs5Ri9KNEoyaW1sbHBSWWJTcmp4NlUyeW5BVUYwUFM4Wk5G?= =?utf-8?B?SWJnY0cxbjU3SjhjdDhnSDdFVDdLODR2bFYrTDdhZDJKWWJmbXFETXdjTld6?= =?utf-8?B?Ym9WVnNrNHR2MVkwUDJ4Y2U5WVFiTEtZVzg3bFJNbGl0V01lakZHZ29MMTRh?= =?utf-8?B?NTdiZXZiWDFvSTNwWmFxeFpuWDAydjRRTGRxaUQreW1lclhnUnluNXVxZDBK?= =?utf-8?B?am9mRjU3RUhxZ1NaZ3g2ZjE4Z25OQnJXK05FZmhlaGZ0SXRXRGc4YXY5YnZ5?= =?utf-8?B?ZDRPdFpxYVJ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VNVTJIWUxISS8wVXYxUnpwOW1vR29qWUxLSUJPanBq?= =?utf-8?Q?uWZuzcBeP7wy02D7bCuTKGRza?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: c094908f-4d66-4a7a-ebae-08db302d849a X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Mar 2023 08:13:46.1896 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: U1u6cpdTQTvONIjAETzfdhruKuGCXYeunsi5TPvOcoW6Eeyk1r/4im1c97vrtR+x X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5390 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 3/29/2023 2:58 AM, lihuisong (C) wrote: > > 在 2023/3/11 3:36, Ferruh Yigit 写道: >> On 3/10/2023 9:35 AM, Dongdong Liu wrote: >>> From: Huisong Li >>> >>> Currently, the setting of hash algorithm comes from the >>> default configuration in driver and the rte_flow interface. >>> The hash algorithm that is set to hardware in both ways is >>> saved in hw->rss_info.conf.func. >>> >>> But the 'func' in struct rte_flow_action_rss is usually used >>> in rte flow interface. And the ethdev ops interface may also >>> set hash algorithm in the future. It is not appropriate and >>> is a little messy for ethdev ops interface and driver default >>> configuration to use struct rte_flow_action_rss. So we have >>> to separate the RSS configuration from ethdev ops and rte >>> flow interface to make codes more easier to maintain. >>> >> Agree that it is not ideal to have two different ways for same/similar >> control path functionality in ethdev. >> >> +Ori to discuss if this is a common problem and can be resolved in >> ethdev layer. > This patchset is aimed to decouple the configuration API and the > structure used by > ethdev ops and rte flow API in driver. I think this can be ignored. >> >> I can see some of remaining patches are related to this ethdev / flow >> API RSS separation. I will continue with this set, but I believe it is >> better if this issue addressed in higher level. > As far as I know, the priority of rte flow hash rule is higher than > ethdev ops by default, > and there are many other rules. > But the implementation guide documentation about it is not clear. > It may be better if we can clarify the documentation to guide driver > coding. I am not aware of any priority between flow API hash rule and ethdev APIs, Ori & Andrew may comment better. And +1 to document this. >>> This patch separates hash algorithm by following ways: >>> 1) 'hash_algo' in struct hns3_rss_conf is used for ethdev ops >>>     interface or default configuration in driver. >>> 2) Add a 'rte_flow_hash_algo' field in struct hns3_rss_conf >>>     to save algorithm from rte flow interface. The main reasons >>>     are as follows: >>>     Currently, only the last rule is used to restore the rte >>>     flow rule. If 'func' in RSS action is 'DEFAULT', it means >>>     that this rule doesn't modify algorithm and driver need to >>>     save current algorithm for restoring algorithm during reset >>>     phase. >>> >>> Fixes: c37ca66f2b27 ("net/hns3: support RSS") >>> Cc: stable@dpdk.org >>> >>> Signed-off-by: Huisong Li >>> Signed-off-by: Dongdong Liu >> <...> >> >> .