net/mlx5: DR, Remove redundant vport number from action
authorAlex Vesker <valex@mellanox.com>
Thu, 12 Sep 2019 08:38:20 +0000 (11:38 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Tue, 24 Sep 2019 09:38:07 +0000 (12:38 +0300)
The vport number is part of the vport_cap, there is no reason
to store in a separate variable on the vport.

Fixes: 9db810ed2d37 ("net/mlx5: DR, Expose steering action functionality")
Signed-off-by: Alex Vesker <valex@mellanox.com>
Reviewed-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h

index 7d81a7735de51a9d235ed59f4c4265d346c212b1..b74b7d0f659052e7148a20ccef762b9de06a4523 100644 (file)
@@ -615,7 +615,7 @@ static int dr_action_handle_cs_recalc(struct mlx5dr_domain *dmn,
                 * that recalculates the CS and forwards to the vport.
                 */
                ret = mlx5dr_domain_cache_get_recalc_cs_ft_addr(dest_action->vport.dmn,
-                                                               dest_action->vport.num,
+                                                               dest_action->vport.caps->num,
                                                                final_icm_addr);
                if (ret) {
                        mlx5dr_err(dmn, "Failed to get FW cs recalc flow table\n");
@@ -744,7 +744,7 @@ int mlx5dr_actions_build_ste_arr(struct mlx5dr_matcher *matcher,
                        dest_action = action;
                        if (rx_rule) {
                                /* Loopback on WIRE vport is not supported */
-                               if (action->vport.num == WIRE_PORT)
+                               if (action->vport.caps->num == WIRE_PORT)
                                        goto out_invalid_arg;
 
                                attr.final_icm_addr = action->vport.caps->icm_address_rx;
index a37ee6359be2909da75e44a413e69a707156c0f4..78f899fb3305dc680afb5d09318964ed506709e6 100644 (file)
@@ -745,7 +745,6 @@ struct mlx5dr_action {
                struct {
                        struct mlx5dr_domain *dmn;
                        struct mlx5dr_cmd_vport_cap *caps;
-                       u32 num;
                } vport;
                struct {
                        u32 vlan_hdr; /* tpid_pcp_dei_vid */