From: Rabie Loulou <rab...@mellanox.com>

This is needed in order to enlarge it with more members that will get
value of 0 when not set.

Signed-off-by: Rabie Loulou <rab...@mellanox.com>
Reviewed-by: Roi Dayan <r...@mellanox.com>
Signed-off-by: Saeed Mahameed <sae...@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c          | 10 +++++-----
 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c            |  8 ++++----
 drivers/net/ethernet/mellanox/mlx5/core/eswitch.c          |  2 +-
 drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c |  6 +++---
 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c          |  4 ++--
 5 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c 
b/drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c
index 12d3ced61114..610d485c4b03 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c
@@ -92,7 +92,7 @@ static enum mlx5e_traffic_types arfs_get_tt(enum arfs_type 
type)
 
 static int arfs_disable(struct mlx5e_priv *priv)
 {
-       struct mlx5_flow_destination dest;
+       struct mlx5_flow_destination dest = {};
        struct mlx5e_tir *tir = priv->indir_tir;
        int err = 0;
        int tt;
@@ -126,7 +126,7 @@ int mlx5e_arfs_disable(struct mlx5e_priv *priv)
 
 int mlx5e_arfs_enable(struct mlx5e_priv *priv)
 {
-       struct mlx5_flow_destination dest;
+       struct mlx5_flow_destination dest = {};
        int err = 0;
        int tt;
        int i;
@@ -175,7 +175,7 @@ static int arfs_add_default_rule(struct mlx5e_priv *priv,
 {
        struct arfs_table *arfs_t = &priv->fs.arfs.arfs_tables[type];
        struct mlx5e_tir *tir = priv->indir_tir;
-       struct mlx5_flow_destination dest;
+       struct mlx5_flow_destination dest = {};
        MLX5_DECLARE_FLOW_ACT(flow_act);
        struct mlx5_flow_spec *spec;
        enum mlx5e_traffic_types tt;
@@ -466,7 +466,7 @@ static struct mlx5_flow_handle *arfs_add_rule(struct 
mlx5e_priv *priv,
        struct mlx5e_arfs_tables *arfs = &priv->fs.arfs;
        struct arfs_tuple *tuple = &arfs_rule->tuple;
        struct mlx5_flow_handle *rule = NULL;
-       struct mlx5_flow_destination dest;
+       struct mlx5_flow_destination dest = {};
        MLX5_DECLARE_FLOW_ACT(flow_act);
        struct arfs_table *arfs_table;
        struct mlx5_flow_spec *spec;
@@ -557,7 +557,7 @@ static struct mlx5_flow_handle *arfs_add_rule(struct 
mlx5e_priv *priv,
 static void arfs_modify_rule_rq(struct mlx5e_priv *priv,
                                struct mlx5_flow_handle *rule, u16 rxq)
 {
-       struct mlx5_flow_destination dst;
+       struct mlx5_flow_destination dst = {};
        int err = 0;
 
        dst.type = MLX5_FLOW_DESTINATION_TYPE_TIR;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_fs.c 
b/drivers/net/ethernet/mellanox/mlx5/core/en_fs.c
index 850cdc980ab5..8016c8aa946d 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_fs.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_fs.c
@@ -162,7 +162,7 @@ static int __mlx5e_add_vlan_rule(struct mlx5e_priv *priv,
                                 u16 vid, struct mlx5_flow_spec *spec)
 {
        struct mlx5_flow_table *ft = priv->fs.vlan.ft.t;
-       struct mlx5_flow_destination dest;
+       struct mlx5_flow_destination dest = {};
        struct mlx5_flow_handle **rule_p;
        MLX5_DECLARE_FLOW_ACT(flow_act);
        int err = 0;
@@ -738,7 +738,7 @@ mlx5e_generate_ttc_rule(struct mlx5e_priv *priv,
 
 static int mlx5e_generate_ttc_table_rules(struct mlx5e_priv *priv)
 {
-       struct mlx5_flow_destination dest;
+       struct mlx5_flow_destination dest = {};
        struct mlx5e_ttc_table *ttc;
        struct mlx5_flow_handle **rules;
        struct mlx5_flow_table *ft;
@@ -909,7 +909,7 @@ mlx5e_generate_inner_ttc_rule(struct mlx5e_priv *priv,
 
 static int mlx5e_generate_inner_ttc_table_rules(struct mlx5e_priv *priv)
 {
-       struct mlx5_flow_destination dest;
+       struct mlx5_flow_destination dest = {};
        struct mlx5_flow_handle **rules;
        struct mlx5e_ttc_table *ttc;
        struct mlx5_flow_table *ft;
@@ -1106,7 +1106,7 @@ static int mlx5e_add_l2_flow_rule(struct mlx5e_priv *priv,
                                  struct mlx5e_l2_rule *ai, int type)
 {
        struct mlx5_flow_table *ft = priv->fs.l2.ft.t;
-       struct mlx5_flow_destination dest;
+       struct mlx5_flow_destination dest = {};
        MLX5_DECLARE_FLOW_ACT(flow_act);
        struct mlx5_flow_spec *spec;
        int err = 0;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c 
b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
index c77f4c0c7769..bbb140f517c4 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
@@ -157,7 +157,7 @@ __esw_fdb_set_vport_rule(struct mlx5_eswitch *esw, u32 
vport, bool rx_rule,
                            MLX5_MATCH_OUTER_HEADERS);
        struct mlx5_flow_handle *flow_rule = NULL;
        struct mlx5_flow_act flow_act = {0};
-       struct mlx5_flow_destination dest;
+       struct mlx5_flow_destination dest = {};
        struct mlx5_flow_spec *spec;
        void *mv_misc = NULL;
        void *mc_misc = NULL;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c 
b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
index d9fd8570b07c..1143d80119bd 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
@@ -306,7 +306,7 @@ static struct mlx5_flow_handle *
 mlx5_eswitch_add_send_to_vport_rule(struct mlx5_eswitch *esw, int vport, u32 
sqn)
 {
        struct mlx5_flow_act flow_act = {0};
-       struct mlx5_flow_destination dest;
+       struct mlx5_flow_destination dest = {};
        struct mlx5_flow_handle *flow_rule;
        struct mlx5_flow_spec *spec;
        void *misc;
@@ -395,7 +395,7 @@ int mlx5_eswitch_sqs2vport_start(struct mlx5_eswitch *esw,
 static int esw_add_fdb_miss_rule(struct mlx5_eswitch *esw)
 {
        struct mlx5_flow_act flow_act = {0};
-       struct mlx5_flow_destination dest;
+       struct mlx5_flow_destination dest = {};
        struct mlx5_flow_handle *flow_rule = NULL;
        struct mlx5_flow_spec *spec;
        int err = 0;
@@ -670,7 +670,7 @@ struct mlx5_flow_handle *
 mlx5_eswitch_create_vport_rx_rule(struct mlx5_eswitch *esw, int vport, u32 
tirn)
 {
        struct mlx5_flow_act flow_act = {0};
-       struct mlx5_flow_destination dest;
+       struct mlx5_flow_destination dest = {};
        struct mlx5_flow_handle *flow_rule;
        struct mlx5_flow_spec *spec;
        void *misc;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 
b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
index c7fa1389bace..c70fd663a633 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
@@ -912,7 +912,7 @@ static int connect_fwd_rules(struct mlx5_core_dev *dev,
                             struct mlx5_flow_table *new_next_ft,
                             struct mlx5_flow_table *old_next_ft)
 {
-       struct mlx5_flow_destination dest;
+       struct mlx5_flow_destination dest = {};
        struct mlx5_flow_rule *iter;
        int err = 0;
 
@@ -1820,7 +1820,7 @@ mlx5_add_flow_rules(struct mlx5_flow_table *ft,
                    int dest_num)
 {
        struct mlx5_flow_root_namespace *root = find_root(&ft->node);
-       struct mlx5_flow_destination gen_dest;
+       struct mlx5_flow_destination gen_dest = {};
        struct mlx5_flow_table *next_ft = NULL;
        struct mlx5_flow_handle *handle = NULL;
        u32 sw_action = flow_act->action;
-- 
2.14.2

Reply via email to