]> git.itanic.dy.fi Git - linux-stable/commitdiff
net/mlx5e: E-Switch: move debug print of adding mac to correct place
authorRoi Dayan <roid@nvidia.com>
Sun, 23 Apr 2023 12:24:00 +0000 (15:24 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Fri, 19 May 2023 17:50:30 +0000 (10:50 -0700)
Move the debug print inside the if clause that actually does the change.

Signed-off-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Maor Dickman <maord@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c

index 692cea3a6383245a779ec12bfd5a34cecb86e4f1..3e3963424285b3f2ddf9a10621bced9b4e9a5e94 100644 (file)
@@ -310,11 +310,12 @@ static int esw_add_uc_addr(struct mlx5_eswitch *esw, struct vport_addr *vaddr)
 
 fdb_add:
        /* SRIOV is enabled: Forward UC MAC to vport */
-       if (esw->fdb_table.legacy.fdb && esw->mode == MLX5_ESWITCH_LEGACY)
+       if (esw->fdb_table.legacy.fdb && esw->mode == MLX5_ESWITCH_LEGACY) {
                vaddr->flow_rule = esw_fdb_set_vport_rule(esw, mac, vport);
 
-       esw_debug(esw->dev, "\tADDED UC MAC: vport[%d] %pM fr(%p)\n",
-                 vport, mac, vaddr->flow_rule);
+               esw_debug(esw->dev, "\tADDED UC MAC: vport[%d] %pM fr(%p)\n",
+                         vport, mac, vaddr->flow_rule);
+       }
 
        return 0;
 }