From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 246172A66 for ; Sun, 18 Mar 2018 08:37:33 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from xuemingl@mellanox.com) with ESMTPS (AES256-SHA encrypted); 18 Mar 2018 09:38:11 +0200 Received: from dev-r630-06.mtbc.labs.mlnx (dev-r630-06.mtbc.labs.mlnx [10.12.205.180]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id w2I7bSbj005880; Sun, 18 Mar 2018 09:37:28 +0200 Received: from dev-r630-06.mtbc.labs.mlnx (localhost [127.0.0.1]) by dev-r630-06.mtbc.labs.mlnx (8.14.7/8.14.7) with ESMTP id w2I7bRMI084221; Sun, 18 Mar 2018 15:37:27 +0800 Received: (from xuemingl@localhost) by dev-r630-06.mtbc.labs.mlnx (8.14.7/8.14.7/Submit) id w2I7bOxN084220; Sun, 18 Mar 2018 15:37:24 +0800 From: Xueming Li To: Nelio Laranjeiro , Adrien Mazarguil , Shahaf Shuler Cc: Xueming Li , dev@dpdk.org Date: Sun, 18 Mar 2018 15:37:20 +0800 Message-Id: <20180318073720.84176-1-xuemingl@mellanox.com> X-Mailer: git-send-email 2.13.3 Subject: [dpdk-dev] [PATCH] net/mlx5: add supported hash function check 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: Sun, 18 Mar 2018 07:37:33 -0000 Add supported RSS hash function check in device configuration to have better error verbosity for application developers. Signed-off-by: Xueming Li --- drivers/net/mlx5/mlx5_ethdev.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c index b73cb53..175a1ff 100644 --- a/drivers/net/mlx5/mlx5_ethdev.c +++ b/drivers/net/mlx5/mlx5_ethdev.c @@ -346,6 +346,14 @@ struct ethtool_link_settings { rx_offloads, supp_rx_offloads); return ENOTSUP; } + if (dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf & + MLX5_RSS_HF_MASK) { + ERROR("Some RSS hash function not supported " + "requested 0x%" PRIx64 " supported 0x%" PRIx64, + dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf, + (uint64_t)(~MLX5_RSS_HF_MASK)); + return ENOTSUP; + } if (use_app_rss_key && (dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key_len != rss_hash_default_key_len)) { -- 1.8.3.1