net/mlx5e: Move mlx5e_init_l2_addr to en_main
Move the function declaration of mlx5e_init_l2_addr to en/fs.h, rename to mlx5e_fs_init_l2_addr to align with the fs API functions naming convention and let it take mlx5e_flow_steering as arguments while keeping implementation at en_fs.c file. This helps maintain a clean driver code and avoids unnecessary dependencies. Signed-off-by: Lama Kayal <lkayal@nvidia.com> Reviewed-by: Tariq Toukan <tariqt@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
parent
a02c07ea5d
commit
069448b2fd
@ -1024,7 +1024,6 @@ void mlx5e_shampo_dealloc_hd(struct mlx5e_rq *rq, u16 len, u16 start, bool close
|
||||
void mlx5e_get_stats(struct net_device *dev, struct rtnl_link_stats64 *stats);
|
||||
void mlx5e_fold_sw_stats64(struct mlx5e_priv *priv, struct rtnl_link_stats64 *s);
|
||||
|
||||
void mlx5e_init_l2_addr(struct mlx5e_priv *priv);
|
||||
int mlx5e_self_test_num(struct mlx5e_priv *priv);
|
||||
int mlx5e_self_test_fill_strings(struct mlx5e_priv *priv, u8 *data);
|
||||
void mlx5e_self_test(struct net_device *ndev, struct ethtool_test *etest,
|
||||
|
@ -197,5 +197,6 @@ int mlx5e_fs_vlan_rx_add_vid(struct mlx5e_flow_steering *fs,
|
||||
int mlx5e_fs_vlan_rx_kill_vid(struct mlx5e_flow_steering *fs,
|
||||
struct net_device *netdev,
|
||||
__be16 proto, u16 vid);
|
||||
void mlx5e_fs_init_l2_addr(struct mlx5e_flow_steering *fs, struct net_device *netdev);
|
||||
#endif /* __MLX5E_FLOW_STEER_H__ */
|
||||
|
||||
|
@ -843,9 +843,9 @@ static void mlx5e_destroy_groups(struct mlx5e_flow_table *ft)
|
||||
ft->num_groups = 0;
|
||||
}
|
||||
|
||||
void mlx5e_init_l2_addr(struct mlx5e_priv *priv)
|
||||
void mlx5e_fs_init_l2_addr(struct mlx5e_flow_steering *fs, struct net_device *netdev)
|
||||
{
|
||||
ether_addr_copy(priv->fs->l2.broadcast.addr, priv->netdev->broadcast);
|
||||
ether_addr_copy(fs->l2.broadcast.addr, netdev->broadcast);
|
||||
}
|
||||
|
||||
void mlx5e_destroy_flow_table(struct mlx5e_flow_table *ft)
|
||||
|
@ -5186,7 +5186,7 @@ static void mlx5e_nic_enable(struct mlx5e_priv *priv)
|
||||
struct net_device *netdev = priv->netdev;
|
||||
struct mlx5_core_dev *mdev = priv->mdev;
|
||||
|
||||
mlx5e_init_l2_addr(priv);
|
||||
mlx5e_fs_init_l2_addr(priv->fs, netdev);
|
||||
|
||||
/* Marking the link as currently not needed by the Driver */
|
||||
if (!netif_running(netdev))
|
||||
|
@ -849,7 +849,7 @@ static int mlx5e_init_rep_rx(struct mlx5e_priv *priv)
|
||||
goto err_free_fs;
|
||||
}
|
||||
|
||||
mlx5e_init_l2_addr(priv);
|
||||
mlx5e_fs_init_l2_addr(priv->fs, priv->netdev);
|
||||
|
||||
err = mlx5e_open_drop_rq(priv, &priv->drop_rq);
|
||||
if (err) {
|
||||
|
Loading…
Reference in New Issue
Block a user