]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
net/mlx5e: Fix kbuild warnings for uninitialized parameters
[linux.git] / drivers / net / ethernet / mellanox / mlx5 / core / en_tc.c
index 9cfddd9fc0974a54ebd9dd6aee3f54e2883a15be..5dbc81de34ee8c3ce6172454f20705441edf719f 100644 (file)
@@ -389,6 +389,10 @@ static int __parse_cls_flower(struct mlx5e_priv *priv,
                        MLX5_SET(fte_match_set_lyr_2_4, headers_c, frag, 1);
                        MLX5_SET(fte_match_set_lyr_2_4, headers_v, frag,
                                 key->flags & FLOW_DIS_IS_FRAGMENT);
+
+                       /* the HW doesn't need L3 inline to match on frag=no */
+                       if (key->flags & FLOW_DIS_IS_FRAGMENT)
+                               *min_inline = MLX5_INLINE_MODE_IP;
                }
        }
 
@@ -733,8 +737,8 @@ static int mlx5e_create_encap_header_ipv4(struct mlx5e_priv *priv,
        struct flowi4 fl4 = {};
        char *encap_header;
        int encap_size;
-       __be32 saddr;
-       int ttl;
+       __be32 saddr = 0;
+       int ttl = 0;
        int err;
 
        encap_header = kzalloc(max_encap_size, GFP_KERNEL);