From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH v5 1/2] ethdev: add supported hash function check Date: Mon, 23 Apr 2018 17:06:42 +0100 Message-ID: <6f9cfb31-850d-b52a-c1d6-abd9d1406b41@intel.com> References: <20180409121035.148813-1-xuemingl@mellanox.com> <20180420143023.117071-1-xuemingl@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Xueming Li , Shahaf Shuler , Nelio Laranjeiro , Wenzhuo Lu , Jingjing Wu , Thomas Monjalon , Adrien Mazarguil Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 76BB92BDB for ; Mon, 23 Apr 2018 18:06:47 +0200 (CEST) In-Reply-To: <20180420143023.117071-1-xuemingl@mellanox.com> Content-Language: en-US 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 4/20/2018 3:30 PM, Xueming Li wrote: > Add supported RSS hash function check in device configuration to > have better error verbosity for application developers. > > Signed-off-by: Xueming Li > Acked-by: Adrien Mazarguil > --- > lib/librte_ether/rte_ethdev.c | 23 +++++++++++++++++++++++ > 1 file changed, 23 insertions(+) > > diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c > index 3c049ef43..7b1dda926 100644 > --- a/lib/librte_ether/rte_ethdev.c > +++ b/lib/librte_ether/rte_ethdev.c > @@ -1179,6 +1179,18 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, > ETHER_MAX_LEN; > } > > + /* Check that device supports requested rss hash functions. */ > + if ((dev_info.flow_type_rss_offloads | > + dev_conf->rx_adv_conf.rss_conf.rss_hf) != > + dev_info.flow_type_rss_offloads) { > + RTE_PMD_DEBUG_TRACE("ethdev port_id=%d invalid rss_hf: " > + "0x%"PRIx64", valid value: 0x%"PRIx64"\n", > + port_id, > + dev_conf->rx_adv_conf.rss_conf.rss_hf, > + dev_info.flow_type_rss_offloads); > + return -EINVAL; > + } > + Hi Thomas, This can break the PMDs that are not setting flow_type_rss_offloads properly. How can we highlight this so that PMD owners can double check?