Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 214965
b: refs/heads/master
c: b25ebfd
h: refs/heads/master
i:
  214963: f91a31c
v: v3
  • Loading branch information
Peter Waskiewicz authored and David S. Miller committed Oct 7, 2010
1 parent c0c20d1 commit 17e47f0
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9deec17f9fe260f1b6467748fe5e16feea8e98f0
refs/heads/master: b25ebfd21b03b3b59c1c7a7e0c597fd28286bb10
2 changes: 2 additions & 0 deletions trunk/drivers/net/ixgbe/ixgbe.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <linux/types.h>
#include <linux/pci.h>
#include <linux/netdevice.h>
#include <linux/cpumask.h>
#include <linux/aer.h>

#include "ixgbe_type.h"
Expand Down Expand Up @@ -241,6 +242,7 @@ struct ixgbe_q_vector {
u8 tx_itr;
u8 rx_itr;
u32 eitr;
cpumask_var_t affinity_mask;
};

/* Helper macros to switch between ints/sec and what the register uses.
Expand Down
25 changes: 25 additions & 0 deletions trunk/drivers/net/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1433,6 +1433,21 @@ static void ixgbe_configure_msix(struct ixgbe_adapter *adapter)
q_vector->eitr = adapter->rx_eitr_param;

ixgbe_write_eitr(q_vector);
/* If Flow Director is enabled, set interrupt affinity */
if ((adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) ||
(adapter->flags & IXGBE_FLAG_FDIR_PERFECT_CAPABLE)) {
/*
* Allocate the affinity_hint cpumask, assign the mask
* for this vector, and set our affinity_hint for
* this irq.
*/
if (!alloc_cpumask_var(&q_vector->affinity_mask,
GFP_KERNEL))
return;
cpumask_set_cpu(v_idx, q_vector->affinity_mask);
irq_set_affinity_hint(adapter->msix_entries[v_idx].vector,
q_vector->affinity_mask);
}
}

if (adapter->hw.mac.type == ixgbe_mac_82598EB)
Expand Down Expand Up @@ -3816,6 +3831,7 @@ void ixgbe_down(struct ixgbe_adapter *adapter)
u32 rxctrl;
u32 txdctl;
int i, j;
int num_q_vectors = adapter->num_msix_vectors - NON_Q_VECTORS;

/* signal that we are down to the interrupt handler */
set_bit(__IXGBE_DOWN, &adapter->state);
Expand Down Expand Up @@ -3854,6 +3870,15 @@ void ixgbe_down(struct ixgbe_adapter *adapter)

ixgbe_napi_disable_all(adapter);

/* Cleanup the affinity_hint CPU mask memory and callback */
for (i = 0; i < num_q_vectors; i++) {
struct ixgbe_q_vector *q_vector = adapter->q_vector[i];
/* clear the affinity_mask in the IRQ descriptor */
irq_set_affinity_hint(adapter->msix_entries[i]. vector, NULL);
/* release the CPU mask memory */
free_cpumask_var(q_vector->affinity_mask);
}

if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE ||
adapter->flags & IXGBE_FLAG_FDIR_PERFECT_CAPABLE)
cancel_work_sync(&adapter->fdir_reinit_task);
Expand Down

0 comments on commit 17e47f0

Please sign in to comment.