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 A7B13A00BE; Wed, 29 Apr 2020 08:31:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5020A1D8CA; Wed, 29 Apr 2020 08:31:14 +0200 (CEST) Received: from huawei.com (szxga04-in.huawei.com [45.249.212.190]) by dpdk.org (Postfix) with ESMTP id 0F11E1D734 for ; Wed, 29 Apr 2020 08:31:12 +0200 (CEST) Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 2180D821385BBDBF5527; Wed, 29 Apr 2020 14:31:10 +0800 (CST) Received: from [127.0.0.1] (10.67.102.30) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.487.0; Wed, 29 Apr 2020 14:31:03 +0800 To: Andrew Rybchenko , , CC: , References: <1587990889-56408-1-git-send-email-oulijun@huawei.com> From: oulijun Message-ID: Date: Wed, 29 Apr 2020 14:31:03 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.102.30] X-CFilter-Loop: Reflected Subject: Re: [dpdk-dev] [PATCH] ethdev: check for Rx RSS distribution and RSS hash 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" 在 2020/4/27 20:49, Andrew Rybchenko 写道: > On 4/27/20 3:34 PM, Lijun Ou wrote: >> When rte api checks the Rx RSS distribution is enable but the RSS >> hash is disabled, it will return an error. >> >> Signed-off-by: Lijun Ou >> --- >> lib/librte_ethdev/rte_ethdev.c | 11 +++++++++++ >> 1 file changed, 11 insertions(+) >> >> diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c >> index 0854ef8..07734c4 100644 >> --- a/lib/librte_ethdev/rte_ethdev.c >> +++ b/lib/librte_ethdev/rte_ethdev.c >> @@ -1411,6 +1411,17 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, >> goto rollback; >> } >> >> + /* Check if Rx RSS distribution is enable but RSS hash is disabled. */ >> + if (((dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) != 0) && >> + !(dev_conf->rxmode.offloads & DEV_RX_OFFLOAD_RSS_HASH)) { >> + RTE_ETHDEV_LOG(ERR, >> + "Ethdev port_id=%u config valid Rx mq_mode with RSS but %s offload is no-requested\n", >> + port_id, >> + rte_eth_dev_rx_offload_name(DEV_RX_OFFLOAD_RSS_HASH)); >> + ret = -EINVAL; >> + goto rollback; >> + } >> + >> /* >> * Setup new number of RX/TX queues and reconfigure device. >> */ > > NACK. It is perfectly fine to do distribution, but do not need RSS hash > information. > - ETH_MQ_RX_RSS_FLAG controls RSS hash calculation and distribution > - DEV_RX_OFFLOAD_RSS_HASH controls delivery of the hash value > itself from HW to SW > Thanks for your detail explanation. I still have a question, what is the use of setting DEV_RX_OFFLOAD_HASH, what is the difference between user configuration DEV_RX_OFFLOAD_HASH and no configuration? > . >