[v1,09/14] ixgbe: Use irq_update_affinity_hint

Message ID 20210617182242.8637-10-nitesh@redhat.com
State New
Headers show
  • genirq: Cleanup the usage of irq_set_affinity_hint
Related show

Commit Message

Nitesh Narayan Lal June 17, 2021, 6:22 p.m.
The driver uses irq_set_affinity_hint() to update the affinity_hint mask
that is consumed by the userspace to distribute the interrupts. However,
under the hood irq_set_affinity_hint() also applies the provided cpumask
(if not NULL) as the affinity for the given interrupt which is an
undocumented side effect.

To remove this side effect irq_set_affinity_hint() has been marked
as deprecated and new interfaces have been introduced. Hence, replace the
irq_set_affinity_hint() with the new interface irq_update_affinity_hint()
that only updates the affinity_hint pointer.

Signed-off-by: Nitesh Narayan Lal <nitesh@redhat.com>
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)


diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 2ac5b82676f3..b66040319bc6 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -3243,7 +3243,7 @@  static int ixgbe_request_msix_irqs(struct ixgbe_adapter *adapter)
 		/* If Flow Director is enabled, set interrupt affinity */
 		if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) {
 			/* assign the mask for this irq */
-			irq_set_affinity_hint(entry->vector,
+			irq_update_affinity_hint(entry->vector,
@@ -3260,7 +3260,7 @@  static int ixgbe_request_msix_irqs(struct ixgbe_adapter *adapter)
 	while (vector) {
-		irq_set_affinity_hint(adapter->msix_entries[vector].vector,
+		irq_update_affinity_hint(adapter->msix_entries[vector].vector,
@@ -3394,7 +3394,7 @@  static void ixgbe_free_irq(struct ixgbe_adapter *adapter)
 		/* clear the affinity_mask in the IRQ descriptor */
-		irq_set_affinity_hint(entry->vector, NULL);
+		irq_update_affinity_hint(entry->vector, NULL);
 		free_irq(entry->vector, q_vector);