OSDN Git Service

net/mlx5: E-Switch, rename bond update function to be reused
authorRoi Dayan <roid@nvidia.com>
Tue, 29 Nov 2022 14:02:55 +0000 (16:02 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 14 Feb 2023 22:08:24 +0000 (14:08 -0800)
The vport bond update function is really updating the vport metadata
and there is no direct relation to bond. Rename the function
to vport metadata update to be used a followup commit.
This commit doesn't change any functionality.

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/en/rep/bond.c
drivers/net/ethernet/mellanox/mlx5/core/esw/acl/ingress_ofld.c
drivers/net/ethernet/mellanox/mlx5/core/esw/acl/ofld.h

index b6f5c1b..016a61c 100644 (file)
@@ -120,8 +120,8 @@ int mlx5e_rep_bond_enslave(struct mlx5_eswitch *esw, struct net_device *netdev,
        priv = netdev_priv(netdev);
        rpriv = priv->ppriv;
 
-       err = mlx5_esw_acl_ingress_vport_bond_update(esw, rpriv->rep->vport,
-                                                    mdata->metadata_reg_c_0);
+       err = mlx5_esw_acl_ingress_vport_metadata_update(esw, rpriv->rep->vport,
+                                                        mdata->metadata_reg_c_0);
        if (err)
                goto ingress_err;
 
@@ -167,7 +167,7 @@ void mlx5e_rep_bond_unslave(struct mlx5_eswitch *esw,
        /* Reset bond_metadata to zero first then reset all ingress/egress
         * acls and rx rules of unslave representor's vport
         */
-       mlx5_esw_acl_ingress_vport_bond_update(esw, rpriv->rep->vport, 0);
+       mlx5_esw_acl_ingress_vport_metadata_update(esw, rpriv->rep->vport, 0);
        mlx5_esw_acl_egress_vport_unbond(esw, rpriv->rep->vport);
        mlx5e_rep_bond_update(priv, false);
 
index a994e71..d557756 100644 (file)
@@ -356,8 +356,8 @@ void esw_acl_ingress_ofld_cleanup(struct mlx5_eswitch *esw,
 }
 
 /* Caller must hold rtnl_lock */
-int mlx5_esw_acl_ingress_vport_bond_update(struct mlx5_eswitch *esw, u16 vport_num,
-                                          u32 metadata)
+int mlx5_esw_acl_ingress_vport_metadata_update(struct mlx5_eswitch *esw, u16 vport_num,
+                                              u32 metadata)
 {
        struct mlx5_vport *vport = mlx5_eswitch_get_vport(esw, vport_num);
        int err;
index 11d3d39..c9f8469 100644 (file)
@@ -24,8 +24,8 @@ static inline bool mlx5_esw_acl_egress_fwd2vport_supported(struct mlx5_eswitch *
 /* Eswitch acl ingress external APIs */
 int esw_acl_ingress_ofld_setup(struct mlx5_eswitch *esw, struct mlx5_vport *vport);
 void esw_acl_ingress_ofld_cleanup(struct mlx5_eswitch *esw, struct mlx5_vport *vport);
-int mlx5_esw_acl_ingress_vport_bond_update(struct mlx5_eswitch *esw, u16 vport_num,
-                                          u32 metadata);
+int mlx5_esw_acl_ingress_vport_metadata_update(struct mlx5_eswitch *esw, u16 vport_num,
+                                              u32 metadata);
 void mlx5_esw_acl_ingress_vport_drop_rule_destroy(struct mlx5_eswitch *esw, u16 vport_num);
 int mlx5_esw_acl_ingress_vport_drop_rule_create(struct mlx5_eswitch *esw, u16 vport_num);