From patchwork Mon Oct 9 14:44:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?N=C3=A9lio_Laranjeiro?= X-Patchwork-Id: 29971 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6A8D81B255; Mon, 9 Oct 2017 16:45:53 +0200 (CEST) Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by dpdk.org (Postfix) with ESMTP id 443001B204 for ; Mon, 9 Oct 2017 16:45:39 +0200 (CEST) Received: by mail-wm0-f43.google.com with SMTP id 196so11865859wma.1 for ; Mon, 09 Oct 2017 07:45:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=0ywXZrsitl9i5ONRcMDibk5rE2VOFrZqKI5L0vxOT6I=; b=zpEZAhhzjKSF/LNiJG5vCyCTE9YdtUszRRKuwnOclFq3Y3kL+LBNEeH5reFIo4gQO1 GYVn/VqfVoRP1aGvnaCg4LuoBWTN/oI4BDL7L4UYHq8nBSfVC+7bm9QTr6fevHUCb0YJ HhZmVpaYgxEIXng5rRlgecXDsgZRQiNCiwB/NOTBfVi8PmPi1mJIZQkVXMEIGKuIIKq2 pCv59CThdbhmwRADpbOYhTeO5YSrLDlkdThy94kowx/b5WNrnam2mWbiHqubvzdNPZrE y2/j/PombivCoBJG/lCIZUOuSjDXbYTgKSDlkYkKVKmA+XG/2WjShJ+WzqEkaHiqRAR+ w5DA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=0ywXZrsitl9i5ONRcMDibk5rE2VOFrZqKI5L0vxOT6I=; b=cW4R+g1Ooomt/Y7eGXyvsxG90VesrSIH/wWXLVaey2HrEknuibyPKVGCwpautkA+eY m4215idzGoksCLQiM1j+aehcG0duDuqfDPtUpjjGUXwvgr2ayzMfmPyxU0C0ZAbnLfdp POEi/qKiSYe42ZLfp3eGm+Z8q0e3s4omgPVlk/4O76AUJyZi2o4mT1UIOufQH2G1OJJU w8ESh5Vzn0nLzM/ntm4WAnrXUOh2Dv1SJ7NEl9Wf+dTOZAfABEs5AuK7Lz8gf7+Hnsvb q57x54Xeo3ENn874V30OkuJmKyCQSS5XaW5oIWgJUU/bqhkAGrKHUOM7V8pR0cRleqNw TKHA== X-Gm-Message-State: AMCzsaWPfCU88zLAgICexTMFLahXwVHj3MXlhEvx7ZDTDcy/2QR/jmkt yyHx4JCtk/rBVlWBGXJjjSU2y6uW4w== X-Google-Smtp-Source: AOwi7QAOWPwWtHKfv8DmW/LiS+sCTFsjECf7Ph0dmvE9KEbLBecqD8aCU1vFMSD2WpxUznw9TF2b+Q== X-Received: by 10.28.158.13 with SMTP id h13mr7932041wme.47.1507560338834; Mon, 09 Oct 2017 07:45:38 -0700 (PDT) Received: from ping.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id x15sm6791495wma.32.2017.10.09.07.45.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 09 Oct 2017 07:45:38 -0700 (PDT) From: Nelio Laranjeiro To: dev@dpdk.org Cc: adrien.mazarguil@6wind.com, yskoh@mellanox.com, ferruh.yigit@intel.com, stable@dpdk.org Date: Mon, 9 Oct 2017 16:44:52 +0200 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v3 16/30] net/mlx5: fix clang compilation error 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" drivers/net/mlx5/mlx5_rxq.c:606:6: error: comparison of constant 4 with expression of type 'enum hash_rxq_flow_type' is always true [-Werror,-Wtautological-constant-out-of-range-compare] i != (int)RTE_DIM((*priv->hash_rxqs)[0].special_flow); ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Clang expects to have an index going upto special_flow size which is defined by MLX5_MAX_SPECIAL_FLOWS and value is 4. Comparing to an unrelated enum where index my be lower cause this compilation issue. Fixes: 36351ea34b92 ("net/mlx: fix build with icc") Cc: ferruh.yigit@intel.com Cc: stable@dpdk.org Signed-off-by: Nelio Laranjeiro Acked-by: Yongseok Koh --- drivers/net/mlx5/mlx5_rxq.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c index b240c16..81e9eb5 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c @@ -606,11 +606,9 @@ priv_allow_flow_type(struct priv *priv, enum hash_rxq_flow_type type) int priv_rehash_flows(struct priv *priv) { - enum hash_rxq_flow_type i; + size_t i; - for (i = HASH_RXQ_FLOW_TYPE_PROMISC; - i != RTE_DIM((*priv->hash_rxqs)[0].special_flow); - ++i) + for (i = 0; i != RTE_DIM((*priv->hash_rxqs)[0].special_flow); ++i) if (!priv_allow_flow_type(priv, i)) { priv_special_flow_disable(priv, i); } else {