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 824B5A04B5; Tue, 22 Sep 2020 18:21:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E32981D162; Tue, 22 Sep 2020 18:21:46 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 900281D14F for ; Tue, 22 Sep 2020 18:21:45 +0200 (CEST) IronPort-SDR: OYD5oxxhL/pa4b54EffXqdNzkt3UDBUMJC+JJ0/dpwpxx6L1WV3GyyEol2PMJwMBlI86GS9W45 krNbFMeUIxiQ== X-IronPort-AV: E=McAfee;i="6000,8403,9752"; a="245482298" X-IronPort-AV: E=Sophos;i="5.77,291,1596524400"; d="scan'208";a="245482298" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2020 09:21:44 -0700 IronPort-SDR: fCeCMXVhbRhz40DsiSuKfHw4PET5NRqcLoO1JZyC4q0sC+2qzRvN1ceTvIIWzdFVPjKvhPGySY T4Ms44IWSZiw== X-IronPort-AV: E=Sophos;i="5.77,291,1596524400"; d="scan'208";a="454546952" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.227.201]) ([10.213.227.201]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2020 09:21:42 -0700 To: "Wei Hu (Xavier)" , dev@dpdk.org, Wenzhuo Lu , Beilei Xing , Bernard Iremonger Cc: 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: Ferruh Yigit Message-ID: Date: Tue, 22 Sep 2020 17:21:38 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.2.2 MIME-Version: 1.0 In-Reply-To: <20200908021603.44862-2-huwei013@chinasoftinc.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit 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" 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. > > 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; > } > >