Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a85e5474 authored by Sagi Grimberg's avatar Sagi Grimberg Committed by Doug Ledford
Browse files

mlx5e: don't assume anything on the irq affinity mappings of the device



mlx5e currently assumes that irq affinity is really spread first
irq vectors across device home node cpus, with the new generic affinity
mappings this is no longer the case, hence mlxe should not rely on
this anymore.

Signed-off-by: default avatarSagi Grimberg <sagi@grimberg.me>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 78249c42
Loading
Loading
Loading
Loading
+0 −10
Original line number Original line Diff line number Diff line
@@ -3793,18 +3793,8 @@ void mlx5e_build_default_indir_rqt(struct mlx5_core_dev *mdev,
				   u32 *indirection_rqt, int len,
				   u32 *indirection_rqt, int len,
				   int num_channels)
				   int num_channels)
{
{
	int node = mdev->priv.numa_node;
	int node_num_of_cores;
	int i;
	int i;


	if (node == -1)
		node = first_online_node;

	node_num_of_cores = cpumask_weight(cpumask_of_node(node));

	if (node_num_of_cores)
		num_channels = min_t(int, num_channels, node_num_of_cores);

	for (i = 0; i < len; i++)
	for (i = 0; i < len; i++)
		indirection_rqt[i] = i % num_channels;
		indirection_rqt[i] = i % num_channels;
}
}