From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 24BD9A04B1; Wed, 23 Sep 2020 09:04:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 70BA71DB99; Wed, 23 Sep 2020 09:04:38 +0200 (CEST) Received: from m12-18.163.com (m12-18.163.com [220.181.12.18]) by dpdk.org (Postfix) with ESMTP id 2ADC41DB99 for ; Wed, 23 Sep 2020 09:04:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Subject:From:Message-ID:Date:MIME-Version; bh=cEyqI 4n0hQ22zGm8kz3qqexV0lHWQdp/sk6dIVfSUvc=; b=RWnUWgJv028OPbcD0UV7R dKa8c/993QArsoSlRQbN5kY/kQtTjf+9oEuNpX2UylCoVtJU0yryDOEvmM8h867O dBMKrkLF3mUt5haV6gPzb982Y8OEKZPPxEbCSDt6HGdb44R+8ILXxueaitkoErE1 fFODqoD1hh9UwXVt5Lbl8w= Received: from [192.168.1.199] (unknown [139.159.243.11]) by smtp14 (Coremail) with SMTP id EsCowABHp7t382pf_r_yPg--.29547S2; Wed, 23 Sep 2020 15:04:24 +0800 (CST) To: Ferruh Yigit Cc: dev@dpdk.org, Wenzhuo Lu , Beilei Xing , Bernard Iremonger , xavier.huwei@huawei.com, lihuisong@huawei.com, Pavan Nikhilesh , Andrew Rybchenko References: <20200908021603.44862-1-huwei013@chinasoftinc.com> <20200908021603.44862-2-huwei013@chinasoftinc.com> From: "Wei Hu (Xavier)" Message-ID: <689cd203-fa42-bf2a-6821-6065cb760b0b@163.com> Date: Wed, 23 Sep 2020 15:04:23 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-CM-TRANSID: EsCowABHp7t382pf_r_yPg--.29547S2 X-Coremail-Antispam: 1Uf129KBjvJXoWxAF4kuF1UCr43JFykAw43Wrg_yoW5Ww17pF WrJFWvkrykXrZ8AF18AayYgr1Skrs7GFsrZFy5Aa45CFn0kFyIgr42kw13ZFW7Jr1rWa1I v3yfXFy0yFyDA3DanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jAMa8UUUUU= X-Originating-IP: [139.159.243.11] X-CM-SenderInfo: 50dyxv5ubk34lhl6il2tof0z/xtbBzxioo1aD8jF4BAAAs2 Subject: Re: [dpdk-dev] [PATCH 1/2] app/testpmd: update Rx RSS HASH offload when setting MQ RSS X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, Ferruh Yigit On 2020/9/23 0:21, Ferruh Yigit wrote: > On 9/8/2020 3:16 AM, Wei Hu (Xavier) wrote: >> From: Huisong Li >> >> Currently, when starting testpmd application without '--disable-rss' and >> the number of Rx queue configured is greater than 1, ETH_MQ_RX_RSS flag >> is set in port->dev_conf.rxmode.mq_mode in testpmd application, and >> DEV_RX_OFFLOAD_RSS_HASH flag is set in rx_offloads >> (dev->data->dev_conf.rxmode.offloads) according to the ETH_MQ_RX_RSS >> flag of rxmode.mq_mode in PMD drivers. >> >> However, DEV_RX_OFFLOAD_RSS_HASH is not set to rx_offloads maintained >> in testpmd application, this will cause the inconsistent problem that >> rx_offloads is different for testpmd and PMD drivers. > > Yes for DEV_RX_OFFLOAD_RSS_HASH, application rx_offload config and PMD > one diverges, for *some* PMDs. > > This is done to have the backward compatibility of the PMD behavior. > > The PMDs that would like to write the provide the calculated hash value > back, overwrites the offload config to enable 'DEV_RX_OFFLOAD_RSS_HASH'. > And does more work than user requested, this shouldn't have any side > affect. > Some doesn't provide the hash unless user explicitly requests it. > > Applications shouldn't set it blindly, at least first check if PMD > supports it but even that case, unless it is needed I think HASH offload > shouldn't be requested by default. OK, we are going to do modification to add check if PMD support DEV_RX_OFFLOAD_RSS_HASH before setting it as below: @@ -3356,11 +3356,13 @@ init_port_config(void) } if (port->dcb_flag == 0) { if (port->dev_conf.rx_adv_conf.rss_conf.rss_hf != 0) { port->dev_conf.rxmode.mq_mode = (enum rte_eth_rx_mq_mode) (rx_mq_mode & ETH_MQ_RX_RSS); if (port->dev_info.rx_offload_capa & DEV_RX_OFFLOAD_RSS_HASH) port->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH; } else port->dev_conf.rxmode.mq_mode = ETH_MQ_RX_NONE; } Thanks, Xavier > >> >> Signed-off-by: Huisong Li >> Signed-off-by: Wei Hu (Xavier) >> --- >>   app/test-pmd/testpmd.c | 6 ++++-- >>   1 file changed, 4 insertions(+), 2 deletions(-) >> >> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c >> index 7842c3b..73543bb 100644 >> --- a/app/test-pmd/testpmd.c >> +++ b/app/test-pmd/testpmd.c >> @@ -3356,11 +3356,13 @@ init_port_config(void) >>           } >>           if (port->dcb_flag == 0) { >> -            if( port->dev_conf.rx_adv_conf.rss_conf.rss_hf != 0) >> +            if (port->dev_conf.rx_adv_conf.rss_conf.rss_hf != 0) { >>                   port->dev_conf.rxmode.mq_mode = >>                       (enum rte_eth_rx_mq_mode) >>                           (rx_mq_mode & ETH_MQ_RX_RSS); >> -            else >> +                port->dev_conf.rxmode.offloads |= >> +                            DEV_RX_OFFLOAD_RSS_HASH; >> +            } else >>                   port->dev_conf.rxmode.mq_mode = ETH_MQ_RX_NONE; >>           } >>