net/mlx5: move Linux-specific functions