From: Valentine Fatiev <valentinef@nvidia.com>
Subject: [PATCH] BACKPORT: drivers/infiniband/hw/mlx5/fs.c

Change-Id: I31890ed46c8467a8e2a7d4cc66007209a507c673
---
 drivers/infiniband/hw/mlx5/fs.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

--- a/drivers/infiniband/hw/mlx5/fs.c
+++ b/drivers/infiniband/hw/mlx5/fs.c
@@ -17,6 +17,9 @@
 #include <linux/mlx5/fs_helpers.h>
 #include <linux/mlx5/eswitch.h>
 #include <net/inet_ecn.h>
+#ifdef HAVE_BASECODE_EXTRAS
+#include <linux/etherdevice.h>
+#endif
 #include "mlx5_ib.h"
 #include "counters.h"
 #include "devx.h"
@@ -720,7 +723,7 @@ static struct mlx5_ib_flow_prio *get_flo
 	int max_table_size;
 	int num_entries;
 	int num_groups;
-	bool esw_encap;
+	bool esw_encap = false;
 	u32 flags = 0;
 	int priority;
 
@@ -1421,7 +1424,7 @@ _get_flow_table(struct mlx5_ib_dev *dev,
 	struct mlx5_flow_namespace *ns = NULL;
 	struct mlx5_ib_flow_prio *prio = NULL;
 	int max_table_size = 0;
-	bool esw_encap;
+	bool esw_encap = false;
 	u32 flags = 0;
 	int priority;
 
@@ -1905,7 +1908,7 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD
 	struct mlx5_flow_context flow_context = {.flow_tag =
 		MLX5_FS_DEFAULT_FLOW_TAG};
 	u32 *offset_attr, offset = 0, counter_id = 0;
-	int dest_id, dest_type = -1, inlen, len, ret, i;
+	int dest_id = -1, dest_type = -1, inlen, len, ret, i;
 	struct mlx5_ib_flow_handler *flow_handler;
 	struct mlx5_ib_flow_matcher *fs_matcher;
 	struct ib_uobject **arr_flow_actions;
