From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leon Romanovsky Subject: [PATCH rdma-next 20/27] RDMA/mlx5: Enable reformat on NIC RX if supported Date: Sun, 29 Jul 2018 15:58:58 +0300 Message-ID: <20180729125905.31989-21-leon@kernel.org> References: <20180729125905.31989-1-leon@kernel.org> Cc: Leon Romanovsky , RDMA mailing list , Guy Levi , Mark Bloch , Or Gerlitz , Saeed Mahameed , linux-netdev To: Doug Ledford , Jason Gunthorpe Return-path: Received: from mail.kernel.org ([198.145.29.99]:35222 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726464AbeG2Oan (ORCPT ); Sun, 29 Jul 2018 10:30:43 -0400 In-Reply-To: <20180729125905.31989-1-leon@kernel.org> Sender: netdev-owner@vger.kernel.org List-ID: From: Mark Bloch A L3_TUNNEL_TO_L2 decap flow action requires to enable the encap bit on the Flow table, enable it if supported. This will allow to attach those flow actions to NIC RX steering. We don't enable if running on a representor. Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index 9c42a1059590..b1c7cf26e206 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -3087,6 +3087,10 @@ static struct mlx5_ib_flow_prio *get_flow_table(struct mlx5_ib_dev *dev, if (!dev->rep && MLX5_CAP_FLOWTABLE_NIC_RX(dev->mdev, decap)) flags |= MLX5_FLOW_TABLE_TUNNEL_EN_DECAP; + if (!dev->rep && + MLX5_CAP_FLOWTABLE_NIC_RX(dev->mdev, + reformat_l3_tunnel_to_l2)) + flags |= MLX5_FLOW_TABLE_TUNNEL_EN_REFORMAT; } else { max_table_size = BIT(MLX5_CAP_FLOWTABLE_NIC_TX(dev->mdev, log_max_ft_size)); -- 2.14.4