From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id 156351B203 for ; Mon, 9 Oct 2017 16:45:39 +0200 (CEST) Received: by mail-wm0-f49.google.com with SMTP id q124so23291388wmb.0 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=YmK6f44ZHM6qCUtUH33qQ9FnResUeBgSIIe05+UcuT7QT4KqZ3UP+eQNnBxZjF/mwP zIfQWHW0n8qAy06DIKFRIb9tfzHaZXXPLafynzgKW/vrQ8fHzQecQWCGijxvF7fDZSLV uObgEBoReRkeFNWMm3ERF5l/RqR/imQIpKbOHn5wYsfYt/AMsD0rDrfmpBXjuRUo7a54 /I+LIlQq84DvKdsXXJvttrAtNxhzhVnbFr9kxEfRIf7qLKlLO7OWW+/YCv8Y2n6FXbnE DT2cnX3PJTid3a6Yqbi9H7t2YY49vfCCdf7FI3qZqo/KCXmiEQu91K6H8IZ9fgrDwdGe O6Qg== X-Gm-Message-State: AMCzsaULXweuP+Fj8gLBViaxCYrvK98lu80VwE9kxlmpuZ2IrcXjKjyn tLC3kMc7faTV3o0ErGkrhuz+ 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-stable] [PATCH v3 16/30] net/mlx5: fix clang compilation error X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Oct 2017 14:45:39 -0000 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 { -- 2.1.4