From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id AEC399A87 for ; Tue, 14 Jun 2016 17:31:59 +0200 (CEST) Received: by mail-wm0-f46.google.com with SMTP id v199so126662818wmv.0 for ; Tue, 14 Jun 2016 08:31:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=Q4S/gM1XHmmeSNo2RCHbIXV/cqAImF+E0/6NBm/ibNo=; b=keP2WBIwuXQe40MAXQY1JDB9fgwlQp8lk9m7Y4+hZdRu8mD48C+G2MnIvOjKJc0/BC 0wHlqI8tECB+hAIOT6IroKHWve7B1NGBY0HFtqAjNMtGpHJX3AVxPqvoPu53ql8wlKR5 5Z5bk2TXbuVWV4Q2I2oqm9Dc89UX0dkHkOHIKJklQg+ec/OrtFoWizbg2+dLhcrVm+6K CYFJqlbQoK6s13/6MvXEVSp4zaD3/w4jQz8REa8WJOaSMCqdOP2xaPGcmqKpyGYPkWL1 p182wF3rh6XN96Slck1oiGWnKksY43L3PBomM2kLBKbkgLIxLoUq8se4oGuG97EyeEHm WuFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=Q4S/gM1XHmmeSNo2RCHbIXV/cqAImF+E0/6NBm/ibNo=; b=EPSkv6QGZOcOb2J0a8gBbMrsZ2B3NaBcVgmDr1PnnrYqa2PaY53UL5NjHDxm56PCSh fOs9TV2UJBiLAbmDy5Q32MIZhEYGMrtCiBtfT1IdPtlM+dva/x0u/V3ezqcMI5iFp/Pb poFO/dA0QYbyWV7MUKcjOEe+wCIqoJqeK+9JAJYb55APAZhg8EyWV1XRqKyLtaICNxLl ZgtDc7VR8SvDq0eRo/7+tuBnnSzeMvwVA5OOX0igzIQNXBQuIe1RkAPdB21DuLvKejvu ye1CqzCwStbc2AvVN8l0/D6hlQvo5tqEWotlVHywWo9J1s3e6xG3uuaVogRvm7lNnft/ Htug== X-Gm-Message-State: ALyK8tItuUQ8UU/tqjZu/ZiKy2wvIC7sFkxa9UOzVKUJIY+uotQe8LTuB7mg8OJF3q3dytIV X-Received: by 10.28.109.137 with SMTP id b9mr5344474wmi.68.1465918319351; Tue, 14 Jun 2016 08:31:59 -0700 (PDT) Received: from 6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id p9sm33585821wjv.21.2016.06.14.08.31.57 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 14 Jun 2016 08:31:58 -0700 (PDT) Date: Tue, 14 Jun 2016 17:31:55 +0200 From: Adrien Mazarguil To: Ferruh Yigit Cc: dev@dpdk.org Message-ID: <20160614153155.GB7621@6wind.com> Mail-Followup-To: Ferruh Yigit , dev@dpdk.org References: <20160614100352.GA14888@bricha3-MOBL3> <1465917730-10713-1-git-send-email-ferruh.yigit@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1465917730-10713-1-git-send-email-ferruh.yigit@intel.com> Subject: Re: [dpdk-dev] [PATCH v2] mlx: fix icc compilation error X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 15:31:59 -0000 On Tue, Jun 14, 2016 at 04:22:10PM +0100, Ferruh Yigit wrote: > Compilation errors: > mlx4: > CC mlx4.o > .../dpdk/drivers/net/mlx4/mlx4.c(5409): error #188: enumerated type > mixed with another type > priv->intr_handle.type = 0; > ^ > > mlx5: > CC em_rxtx.o > .../dpdk/drivers/net/mlx5/mlx5_rxq.c(282): > error #188: enumerated type mixed with another type > enum hash_rxq_type type = 0; > ^ > > .../dpdk/drivers/net/mlx5/mlx5_rxq.c(622): > error #188: enumerated type mixed with another type > if (!priv_allow_flow_type(priv, i)) { > ^ > more same type of error > > Signed-off-by: Ferruh Yigit > --- > drivers/net/mlx4/mlx4.c | 2 +- > drivers/net/mlx5/mlx5_ethdev.c | 2 +- > drivers/net/mlx5/mlx5_rxmode.c | 6 ++++-- > drivers/net/mlx5/mlx5_rxq.c | 7 ++++--- > 4 files changed, 10 insertions(+), 7 deletions(-) > > diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c > index 9ed1491..8c9e713 100644 > --- a/drivers/net/mlx4/mlx4.c > +++ b/drivers/net/mlx4/mlx4.c > @@ -5406,7 +5406,7 @@ priv_dev_interrupt_handler_uninstall(struct priv *priv, struct rte_eth_dev *dev) > rte_eal_alarm_cancel(mlx4_dev_link_status_handler, dev); > priv->pending_alarm = 0; > priv->intr_handle.fd = 0; > - priv->intr_handle.type = 0; > + priv->intr_handle.type = RTE_INTR_HANDLE_UNKNOWN; > } > > /** > diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c > index 36b369e..6f5ece9 100644 > --- a/drivers/net/mlx5/mlx5_ethdev.c > +++ b/drivers/net/mlx5/mlx5_ethdev.c > @@ -1012,7 +1012,7 @@ priv_dev_interrupt_handler_uninstall(struct priv *priv, struct rte_eth_dev *dev) > rte_eal_alarm_cancel(mlx5_dev_link_status_handler, dev); > priv->pending_alarm = 0; > priv->intr_handle.fd = 0; > - priv->intr_handle.type = 0; > + priv->intr_handle.type = RTE_INTR_HANDLE_UNKNOWN; > } > > /** > diff --git a/drivers/net/mlx5/mlx5_rxmode.c b/drivers/net/mlx5/mlx5_rxmode.c > index 3a55f63..5abfef6 100644 > --- a/drivers/net/mlx5/mlx5_rxmode.c > +++ b/drivers/net/mlx5/mlx5_rxmode.c > @@ -355,7 +355,8 @@ priv_special_flow_enable_all(struct priv *priv) > { > enum hash_rxq_flow_type flow_type; > > - for (flow_type = 0; flow_type != HASH_RXQ_FLOW_TYPE_MAC; ++flow_type) { > + for (flow_type = HASH_RXQ_FLOW_TYPE_PROMISC; > + flow_type != HASH_RXQ_FLOW_TYPE_MAC; ++flow_type) { > int ret; OK, only a small complaint about indentation, considering the width of that for statement I suggest one expression per line with all lines indented similarly for clarity: for (a; b; c) { ... } > > ret = priv_special_flow_enable(priv, flow_type); > @@ -380,7 +381,8 @@ priv_special_flow_disable_all(struct priv *priv) > { > enum hash_rxq_flow_type flow_type; > > - for (flow_type = 0; flow_type != HASH_RXQ_FLOW_TYPE_MAC; ++flow_type) > + for (flow_type = HASH_RXQ_FLOW_TYPE_PROMISC; > + flow_type != HASH_RXQ_FLOW_TYPE_MAC; ++flow_type) > priv_special_flow_disable(priv, flow_type); > } Same here. > diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c > index cbb017b..9928a26 100644 > --- a/drivers/net/mlx5/mlx5_rxq.c > +++ b/drivers/net/mlx5/mlx5_rxq.c > @@ -279,7 +279,7 @@ priv_flow_attr(struct priv *priv, struct ibv_exp_flow_attr *flow_attr, > static enum hash_rxq_type > hash_rxq_type_from_pos(const struct ind_table_init *table, unsigned int pos) > { > - enum hash_rxq_type type = 0; > + enum hash_rxq_type type = HASH_RXQ_TCPV4; > > assert(pos < table->hash_types_n); > do { > @@ -616,9 +616,10 @@ priv_allow_flow_type(struct priv *priv, enum hash_rxq_flow_type type) > int > priv_rehash_flows(struct priv *priv) > { > - unsigned int i; > + enum hash_rxq_flow_type i; > > - for (i = 0; (i != RTE_DIM((*priv->hash_rxqs)[0].special_flow)); ++i) > + for (i = HASH_RXQ_FLOW_TYPE_PROMISC; > + i != RTE_DIM((*priv->hash_rxqs)[0].special_flow); ++i) Here also. > if (!priv_allow_flow_type(priv, i)) { > priv_special_flow_disable(priv, i); > } else { > -- > 2.5.5 > Otherwise that fix looks fine, thanks. -- Adrien Mazarguil 6WIND