From patchwork Thu Oct 5 12:49:48 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: 29707 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 A023B1B247; Thu, 5 Oct 2017 14:50:50 +0200 (CEST) Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id 79A851B202 for ; Thu, 5 Oct 2017 14:50:39 +0200 (CEST) Received: by mail-wm0-f49.google.com with SMTP id t69so1922158wmt.2 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=lSSEcgJggU3ATGxAqQQH4woUUV7dD2E8RFFsLVmOrFf0PPeWEth8SiTLwx+13XdphK yMPacwxpISCMarOeZ6/MblC+uJ4NfLVXHnb9PZMojpoYIt3rVTgs3Q1Y23v5T8c1zQz7 S3G+CxLwRUyWjBMVSQVvhzH7vZbwmi5mDNq7J6S3FOPcOiaYvYTbYFpXQYizZjXJWUsJ ILL0BiR+HPdAWYb6zsH8RsDHNbCMt0uvomAmqr+sQqpavjMGY3i72z9YgM+sr7iHcf/L n1KRod/ewFv3bv6eSUWiE9+TE3A/FCMxkSCm3KgZ+yszdIydKwvFJ0162Omfl3s5XTtr GYtQ== X-Gm-Message-State: AHPjjUh7iPDovYiaKixVCvB+430KMTHP+IkozXbvI36vuPIUt2chSYMN XAGoqCT+q/fyCPo87gL/3joWn3d2YQ== 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-dev] [PATCH v2 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 {