From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 01CCB1CBC7 for ; Sun, 13 May 2018 10:07:55 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from shahafs@mellanox.com) with ESMTPS (AES256-SHA encrypted); 13 May 2018 11:09:39 +0300 Received: from unicorn01.mtl.labs.mlnx. (unicorn01.mtl.labs.mlnx [10.7.12.62]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id w4D87qYp018400; Sun, 13 May 2018 11:07:52 +0300 From: Shahaf Shuler To: nelio.laranjeiro@6wind.com, adrien.mazarguil@6wind.com, yskoh@mellanox.com Cc: dev@dpdk.org, xuemingl@mellanox.com Date: Sun, 13 May 2018 11:07:46 +0300 Message-Id: <20180513080746.91199-1-shahafs@mellanox.com> X-Mailer: git-send-email 2.12.0 Subject: [dpdk-dev] [PATCH] net/mlx5: fix compilation without tunnel RSS support 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: , X-List-Received-Date: Sun, 13 May 2018 08:07:56 -0000 IBV_RX_HASH_INNER should be referenced only when having tunnel support in the Verbs headers. Fixes: 80f2d0ed7ff9 ("net/mlx5: add hardware flow debug dump") Cc: xuemingl@mellanox.com Signed-off-by: Shahaf Shuler --- drivers/net/mlx5/mlx5_flow.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index ec6d00f21b..04ace3ee79 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -2188,7 +2188,12 @@ mlx5_flow_dump(struct rte_eth_dev *dev __rte_unused, uint16_t j; char buf[256]; uint8_t off; + uint64_t extra_hash_fields = 0; +#ifdef HAVE_IBV_DEVICE_TUNNEL_SUPPORT + if (flow->tunnel && flow->rss_conf.level > 1) + extra_hash_fields = (uint32_t)IBV_RX_HASH_INNER; +#endif spec_ptr = (uintptr_t)(flow->frxq[hrxq_idx].ibv_attr + 1); for (j = 0, off = 0; j < flow->frxq[hrxq_idx].ibv_attr->num_of_specs; j++) { @@ -2205,9 +2210,7 @@ mlx5_flow_dump(struct rte_eth_dev *dev __rte_unused, (void *)flow->frxq[hrxq_idx].hrxq, (void *)flow->frxq[hrxq_idx].hrxq->qp, (void *)flow->frxq[hrxq_idx].hrxq->ind_table, - flow->frxq[hrxq_idx].hash_fields | - (flow->tunnel && - flow->rss_conf.level > 1 ? (uint32_t)IBV_RX_HASH_INNER : 0), + (flow->frxq[hrxq_idx].hash_fields | extra_hash_fields), flow->rss_conf.queue_num, flow->frxq[hrxq_idx].ibv_attr->num_of_specs, flow->frxq[hrxq_idx].ibv_attr->size, -- 2.12.0