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 5FC1842814; Wed, 29 Mar 2023 03:58:46 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DBE71410F2; Wed, 29 Mar 2023 03:58:45 +0200 (CEST) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id C19B840EE7; Wed, 29 Mar 2023 03:58:44 +0200 (CEST) Received: from kwepemm600004.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4PmV4C0djxzSn1N; Wed, 29 Mar 2023 09:55:07 +0800 (CST) Received: from [10.67.103.231] (10.67.103.231) by kwepemm600004.china.huawei.com (7.193.23.242) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Wed, 29 Mar 2023 09:58:41 +0800 Message-ID: <3fc85100-20ef-d0ea-cd49-53be897fe868@huawei.com> Date: Wed, 29 Mar 2023 09:58:41 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH 06/16] net/hns3: separate the setting of hash algorithm To: Ferruh Yigit , Dongdong Liu , , , CC: , , Ori Kam References: <20230310093518.5198-1-liudongdong3@huawei.com> <20230310093518.5198-7-liudongdong3@huawei.com> From: "lihuisong (C)" In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.103.231] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemm600004.china.huawei.com (7.193.23.242) X-CFilter-Loop: Reflected 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 在 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. >> 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 > <...> > > .