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 68A57A04C4; Thu, 14 Nov 2019 14:26:13 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 03FB72BBD; Thu, 14 Nov 2019 14:26:13 +0100 (CET) Received: from dispatchb-us1.ppe-hosted.com (dispatchb-us1.ppe-hosted.com [148.163.129.53]) by dpdk.org (Postfix) with ESMTP id 19A0B2BA8 for ; Thu, 14 Nov 2019 14:26:12 +0100 (CET) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 3A205100079; Thu, 14 Nov 2019 13:26:09 +0000 (UTC) Received: from [192.168.1.192] (188.242.181.57) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 14 Nov 2019 13:25:43 +0000 To: Jerin Jacob , Ferruh Yigit CC: Pavan Nikhilesh , Jerin Jacob , Thomas Monjalon , Ajit Khaparde , Somnath Kotur , Rahul Lakkireddy , Hemant Agrawal , Sachin Saxena , Wenzhuo Lu , John Daley , Hyong Youb Kim , Qi Zhang , Xiao Wang , Ziyang Xuan , Xiaoyun Wang , Guoyang Zhou , Beilei Xing , Jingjing Wu , Qiming Yang , Konstantin Ananyev , Shijith Thotton , Srisivasubramanian Srinivasan , Matan Azrad , Shahaf Shuler , "Viacheslav Ovsiienko" , Stephen Hemminger , "K. Y. Srinivasan" , "Haiyang Zhang" , Alejandro Lucero , Nithin Dabilpuram , Kiran Kumar K , "Rasesh Mody" , Shahed Shaikh , "Maciej Czekaj" , Yong Wang , dpdk-dev References: <20191106191803.15098-1-pbhagavatula@marvell.com> <20191111131914.16559-1-pbhagavatula@marvell.com> <20191111131914.16559-5-pbhagavatula@marvell.com> From: Andrew Rybchenko Message-ID: <449b645e-93f8-8919-af7a-887f36dc3093@solarflare.com> Date: Thu, 14 Nov 2019 16:24:58 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [188.242.181.57] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-25042.003 X-TM-AS-Result: No-7.819100-8.000000-10 X-TMASE-MatchedRID: X4bcv0S75Kkeimh1YYHcKKfOxh7hvX7169aS+7/zbj+qvcIF1TcLYDfP cruq5V8X7cooqHMEra1TvVffeIwvQyHhSBQfglfsA9lly13c/gGPOV9J7oRhr9EsTITobgNEhej 1/hQFafscnN7cQPnhW9RJF4A+wFXrtrzk2ZRuBsq20BbG4zmyXqyT49ZehEkZBCzD0Dc8iUsplD /bYdJZ1YiuAKERurZwTnlEd9aBwiAdpNb7ZdqI99OEZs/2oH3cukU+XBaeeMpuHv/Nrc3jz9noq uRwHY3BYGi9rJoEpc2b1XiLmMwJu0y6jREa0tRrT7O/YHJhINBnLk6tQLcY6Ql4w4lfxz2cS717 hL/58vZYVhkJnI38N7ao0Zou4ee+TX7PJ/OU3vKDGx/OQ1GV8rHlqZYrZqdI+gtHj7OwNO2FR9H au8GO7qIBjL0CQ2REPHeYSZO1gFK+2AIJ9s31Dyq9Jwo4oQt4BNrQR5SQvFdQImplXJt8+Y2tmx ix5GjX6SokAK7+XRKjIntx7YgIik3oBZkjZklkBsRAh8WmTAcG2WAWHb2qekrMHC7kmmSWWgpFd CbsUfc= X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--7.819100-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-25042.003 X-MDID: 1573737971-KJvpaeq6D1qv Subject: Re: [dpdk-dev] [PATCH v17 04/10] drivers/net: update Rx RSS hash offload capabilities 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 11/14/19 3:57 PM, Jerin Jacob wrote: > On Wed, Nov 13, 2019 at 11:32 PM Ferruh Yigit wrote: >> On 11/11/2019 1:19 PM, pbhagavatula@marvell.com wrote: >>> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c >>> index 30c0379d4..8c1caac18 100644 >>> --- a/drivers/net/ixgbe/ixgbe_ethdev.c >>> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c >>> @@ -2402,6 +2402,9 @@ ixgbe_dev_configure(struct rte_eth_dev *dev) >>> int ret; >>> >>> PMD_INIT_FUNC_TRACE(); >>> + >>> + dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH; >>> + >> Hi Pavan, Andrew, Jerin, >> >> This is causing trouble when device is re-configured with its existing data, >> because of the check in the ethdev [1]. >> >> This is for the case device configuration get, a few thing changed and >> re-configured case, this is what is done in bonding and it is failing now. >> >> Do you have any suggestion for the solution? >> >> We can set this offload in PMDs only if 'ETH_MQ_RX_RSS_FLAG' set but same thing >> still can caught us, if the initial configuration was with 'ETH_MQ_RX_RSS_FLAG' >> but reconfigure is not. >> >> Or we can relax the check in 'rte_eth_dev_configure()' to log but not return error? > IMO, We can relax the check as it is NOT at all critical for this flag. Other option is to set RSS_HASH above if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG). Should I care about it? >> [1] >> >> @@ -1305,6 +1306,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 disabled but RSS hash is enabled. */ >> + 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 invalid Rx mq_mode without RSS but %s offload is >> requested", >> + port_id, >> + rte_eth_dev_rx_offload_name(DEV_RX_OFFLOAD_RSS_HASH)); >> + ret = -EINVAL; >> + goto rollback; >> + }