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 0AE91A04C3; Mon, 28 Sep 2020 14:27:41 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 94F931D92E; Mon, 28 Sep 2020 14:27:40 +0200 (CEST) Received: from incedge.chinasoftinc.com (unknown [114.113.233.8]) by dpdk.org (Postfix) with ESMTP id 586BD1D92D for ; Mon, 28 Sep 2020 14:27:37 +0200 (CEST) X-ASG-Debug-ID: 1601296054-149d11049a21ce60001-TfluYd Received: from mail.chinasoftinc.com (inccas001.ito.icss [10.168.0.51]) by incedge.chinasoftinc.com with ESMTP id Ny6XcD7qdsuGXjy3 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 28 Sep 2020 20:27:34 +0800 (CST) X-Barracuda-Envelope-From: huwei013@chinasoftinc.com X-Barracuda-RBL-Trusted-Forwarder: 10.168.0.51 X-ASG-Whitelist: Client Received: from [192.168.1.199] (139.159.243.11) by INCCAS001.ito.icss (10.168.0.60) with Microsoft SMTP Server id 14.3.487.0; Mon, 28 Sep 2020 20:27:34 +0800 X-Barracuda-RBL-Trusted-Forwarder: 192.168.1.199 To: Ferruh Yigit X-ASG-Orig-Subj: Re: [dpdk-dev] [PATCH 1/2] app/testpmd: update Rx RSS HASH offload when setting MQ RSS CC: , Wenzhuo Lu , Beilei Xing , Bernard Iremonger , , , Pavan Nikhilesh , Andrew Rybchenko , "jerinj@marvell.com" References: <20200908021603.44862-1-huwei013@chinasoftinc.com> <20200908021603.44862-2-huwei013@chinasoftinc.com> <689cd203-fa42-bf2a-6821-6065cb760b0b@163.com> <02fd6a3c-3810-fbb6-f51d-7c29fc26bfed@intel.com> From: "Wei Hu (Xavier)" Message-ID: Date: Mon, 28 Sep 2020 20:27:32 +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: <02fd6a3c-3810-fbb6-f51d-7c29fc26bfed@intel.com> Content-Language: en-US X-Originating-IP: [139.159.243.11] X-Barracuda-Connect: inccas001.ito.icss[10.168.0.51] X-Barracuda-Start-Time: 1601296054 X-Barracuda-Encrypted: ECDHE-RSA-AES256-SHA X-Barracuda-URL: https://incspam.chinasofti.com:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at chinasoftinc.com X-Barracuda-Scan-Msg-Size: 8847 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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 17:35, Ferruh Yigit wrote: > On 9/23/2020 8:04 AM, Wei Hu (Xavier) wrote: >> 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; >>             } >> > > Hi Xavier, > > The capability check is correct thing to do, but even in that case I > am not sure if we should set the config by default. > > The reason to extract the 'DEV_RX_OFFLOAD_RSS_HASH' offload is to gain > performance for some NICs, enabling it by default defeats the purpose. > > The offload should be enabled when application needs the provided hash > value. > > I can see you are trying to remove the divergence between PMD and > application config, this can be fixed when all PMDs take this user > offload request into account instead of overwriting, but for some PMDs > it is cheaper to provide the hash value instead of checks, so this > divergence is not easy to address. > OK, please ignore this patch and the V2 patch. http://patches.dpdk.org/patch/78502/ Thanks. Regards Xavier