From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id 45D3A1B200 for ; Thu, 5 Oct 2017 14:50:39 +0200 (CEST) Received: by mail-wm0-f50.google.com with SMTP id i124so1913797wmf.3 for ; Thu, 05 Oct 2017 05:50: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=/SS6NGs+f1Uckv3iCUg9rUzRLbwmz0FxJt1oz6mBmcs=; b=moME2VPAaffyjeoMdwQ0C5xrh9/lGCm6qOBdgzF1nw8ql4LTWOevi2nAk7viAke3VK 1FgjaVRYkwHY/mSV4KChJdiynIre7nnXU8QOlceGBWnOaLKkJVGp4Or/sq1Rnith0BFY h92n/5vtxB8EQB4Nyxi8yq2JTCzAHgyU7ufohFSQp1in7bHD14Pqt3nMd7cJB90dTfj9 qSNDW5lxnADgXLB8d9Bhe0XfRfuwHjWMfTier9GgDBiGJRREp6kWltK4fyTYgVnsVjbY VMEVzuu2U+zPQ5IYFCFpYOI+V9+hveXe93fXhhH47uLJZ2NAE5k0mINr5xiHP+9FpOih ucfQ== 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=/SS6NGs+f1Uckv3iCUg9rUzRLbwmz0FxJt1oz6mBmcs=; b=MTmXs+4yn/Tr7OwHUVvS7vfz0uOoqaT3lk9YgskhzpPZ3nMqvjDVjdGk15eDwGZksn 0WWBf8cIPPQHIQDxLCP3uMl+UdMGTgU1Suel1MYx4Wyk2qE4rTQOgZeN/REm6SsIP9Zp tTXpR8Dsd0NaYbeFKUAWOh1nopLyTupBDpzcdF/HGoT2rozckZnScOZNaIHn89M8g7Bx uhNkfPiczgoo+CQvyHzaBGudtFLmolbv76K9Qn9Setl2rtvOtwlS4A1eSu4m1NJaFxxy D3APrjFL4JlZROin9WbjnCXjI70eWPp79gvGcaqGANi1IMMim+CwnpLLWNEzvmu2dUyB CHVg== X-Gm-Message-State: AHPjjUiqClRjaW5pjPip0wmH6Y+mMlJBo82A3K3JIj5xZPCom/DxSDtx wSanxFLUdSnZKLWd7m5PlgsF X-Google-Smtp-Source: AOwi7QCinoIyzR8vlxLu7VJpjH+pEkSqJvDDV3yMTrVNMuqh6KSWKA1PvAKLt5Wn4jZUERaFjNy4JA== X-Received: by 10.28.71.211 with SMTP id m80mr21191874wmi.158.1507207838756; Thu, 05 Oct 2017 05:50: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 k9sm26405823wrk.27.2017.10.05.05.50.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 05 Oct 2017 05:50:37 -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: Thu, 5 Oct 2017 14:49:48 +0200 Message-Id: <9603c091a45da3cec77a3122498777960b83b06a.1507207731.git.nelio.laranjeiro@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-stable] [PATCH v2 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: Thu, 05 Oct 2017 12:50: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 --- 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