Patch "net/mlx5: Fix get vector affinity helper function" has been added to the 4.14-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
net/mlx5: Fix get vector affinity helper function
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
net-mlx5-fix-get-vector-affinity-helper-function.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Sun Jan 28 17:35:08 CET 2018
From: Saeed Mahameed <[email protected]>
Date: Thu, 4 Jan 2018 04:35:51 +0200
Subject: net/mlx5: Fix get vector affinity helper function
From: Saeed Mahameed <[email protected]>
[ Upstream commit 05e0cc84e00c54fb152d1f4b86bc211823a83d0c ]
mlx5_get_vector_affinity used to call pci_irq_get_affinity and after reverting the patch that sets the device affinity via PCI_IRQ_AFFINITY API, calling pci_irq_get_affinity becomes useless and it breaks RDMA mlx5 users. To fix this, this patch provides an alternative way to retrieve IRQ vector affinity using legacy IRQ API, following smp_affinity read procfs implementation.
--- include/linux/mlx5/driver.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-)
include/linux/mlx5/driver.h +18 -1
@@ -36,6 +36,7 @@#include <linux/kernel.h> #include <linux/completion.h> #include <linux/pci.h> +#include <linux/irq.h> #include <linux/spinlock_types.h> #include <linux/semaphore.h> #include <linux/slab.h>
@@ -1194,7 +1195,23 @@ enum {static inline const struct cpumask *mlx5_get_vector_affinity (struct mlx5_core_dev *dev,int vector) { -return pci_irq_get_affinity (dev->pdev,MLX5_EQ_VEC_COMP_BASE + vector); +const struct cpumask *mask; +struct irq_desc *desc; +unsigned int irq; +int eqn; +int err; + + err =mlx5_vector2eqn (dev, vector, &eqn, &irq); +if (err) +return NULL ; + + desc =irq_to_desc (irq); +#ifdef CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK + mask =irq_data_get_effective_affinity_mask (&desc->irq_data); +#else + mask = desc->irq_common_data.affinity; +#endif +return mask; }#endif /* MLX5_DRIVER_H */
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/net-mlx5-fix-get-vector-affinity-helper-function.patch queue-4.14/net-ib-mlx5-don-t-disable-local-loopback-multicast-traffic-when-needed.patch queue-4.14/net-mlx5e-fix-fixpoint-divide-exception-in-mlx5e_am_stats_compare.patch