From: Shahaf Shuler Date: Sun, 13 May 2018 08:07:46 +0000 (+0300) Subject: net/mlx5: fix build without tunnel RSS support X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=34511c25d5fdc03ca972bc7fed50e2dd43e8c956;p=dpdk.git net/mlx5: fix build without tunnel RSS support 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") Signed-off-by: Shahaf Shuler --- diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 3af95249bb..0c0d6f99ad 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -2335,7 +2335,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++) { @@ -2352,9 +2357,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,