net/mlx5e: Add offloading of E-Switch TC pedit (header re-write) actions
[linux-2.6-microblaze.git] / drivers / net / ethernet / mellanox / mlx5 / core / eswitch_offloads.c
index 415a501..fff962d 100644 (file)
@@ -88,7 +88,10 @@ mlx5_eswitch_add_offloaded_rule(struct mlx5_eswitch *esw,
        if (flow_act.action & MLX5_FLOW_CONTEXT_ACTION_DECAP)
                spec->match_criteria_enable |= MLX5_MATCH_INNER_HEADERS;
 
-       if (attr->encap)
+       if (attr->action & MLX5_FLOW_CONTEXT_ACTION_MOD_HDR)
+               flow_act.modify_id = attr->mod_hdr_id;
+
+       if (attr->action & MLX5_FLOW_CONTEXT_ACTION_ENCAP)
                flow_act.encap_id = attr->encap->encap_id;
 
        rule = mlx5_add_flow_rules((struct mlx5_flow_table *)esw->fdb_table.fdb,