From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id C75715323 for ; Thu, 31 May 2018 15:23:09 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 May 2018 06:23:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,463,1520924400"; d="scan'208";a="44241475" Received: from silpixa00399777.ir.intel.com (HELO silpixa00399777.ger.corp.intel.com) ([10.237.222.236]) by fmsmga008.fm.intel.com with ESMTP; 31 May 2018 06:23:06 -0700 From: Ferruh Yigit To: Thomas Monjalon Cc: dev@dpdk.org, Ferruh Yigit , Xueming Li , Shahaf Shuler , Wei Dai , Qi Zhang , Andrew Rybchenko Date: Thu, 31 May 2018 14:22:45 +0100 Message-Id: <20180531132245.19424-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.14.3 Subject: [dpdk-dev] [PATCH] ethdev: force RSS offload rules again 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: , X-List-Received-Date: Thu, 31 May 2018 13:23:10 -0000 PMDs should provide supported RSS hash functions via dev_info.flow_type_rss_offloads variable. There is a check in ethdev if requested RSS hash function is supported by PMD or not. This check has been relaxed in previous release to not return an error when a non supported has function requested [1], this has been done to not break the applications. Adding the error return back. PMDs need to provide correct list of supported hash functions and applications need to take care this information before configuring the RSS otherwise they will get an error from APIs: rte_eth_dev_rss_hash_update() rte_eth_dev_configure() [1] af7551e2bfce ("ethdev: remove error return on RSS hash check") Signed-off-by: Ferruh Yigit --- Cc: Xueming Li Cc: Shahaf Shuler Cc: Wei Dai Cc: Qi Zhang Cc: Andrew Rybchenko --- lib/librte_ethdev/rte_ethdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index 66e311676..a9977df97 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -1194,6 +1194,7 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, port_id, dev_conf->rx_adv_conf.rss_conf.rss_hf, dev_info.flow_type_rss_offloads); + return -EINVAL; } /* @@ -2928,6 +2929,7 @@ rte_eth_dev_rss_hash_update(uint16_t port_id, port_id, rss_conf->rss_hf, dev_info.flow_type_rss_offloads); + return -EINVAL; } RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rss_hash_update, -ENOTSUP); return eth_err(port_id, (*dev->dev_ops->rss_hash_update)(dev, -- 2.14.3