common/mlx5: move some getter functions from net driver