aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe.h1
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c14
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_main.c10
3 files changed, 20 insertions, 5 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
index 4a2831c45231..5213563e4cf8 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
@@ -201,6 +201,7 @@ struct ixgbe_rx_queue_stats {
201 201
202enum ixgbe_ring_state_t { 202enum ixgbe_ring_state_t {
203 __IXGBE_TX_FDIR_INIT_DONE, 203 __IXGBE_TX_FDIR_INIT_DONE,
204 __IXGBE_TX_XPS_INIT_DONE,
204 __IXGBE_TX_DETECT_HANG, 205 __IXGBE_TX_DETECT_HANG,
205 __IXGBE_HANG_CHECK_ARMED, 206 __IXGBE_HANG_CHECK_ARMED,
206 __IXGBE_RX_RSC_ENABLED, 207 __IXGBE_RX_RSC_ENABLED,
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
index 9fafa38009f9..ef5f7a678ce1 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
@@ -771,19 +771,23 @@ static int ixgbe_alloc_q_vector(struct ixgbe_adapter *adapter,
771{ 771{
772 struct ixgbe_q_vector *q_vector; 772 struct ixgbe_q_vector *q_vector;
773 struct ixgbe_ring *ring; 773 struct ixgbe_ring *ring;
774 int node = -1; 774 int node = NUMA_NO_NODE;
775 int cpu = -1; 775 int cpu = -1;
776 int ring_count, size; 776 int ring_count, size;
777 u8 tcs = netdev_get_num_tc(adapter->netdev);
777 778
778 ring_count = txr_count + rxr_count; 779 ring_count = txr_count + rxr_count;
779 size = sizeof(struct ixgbe_q_vector) + 780 size = sizeof(struct ixgbe_q_vector) +
780 (sizeof(struct ixgbe_ring) * ring_count); 781 (sizeof(struct ixgbe_ring) * ring_count);
781 782
782 /* customize cpu for Flow Director mapping */ 783 /* customize cpu for Flow Director mapping */
783 if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) { 784 if ((tcs <= 1) && !(adapter->flags & IXGBE_FLAG_SRIOV_ENABLED)) {
784 if (cpu_online(v_idx)) { 785 u16 rss_i = adapter->ring_feature[RING_F_RSS].indices;
785 cpu = v_idx; 786 if (rss_i > 1 && adapter->atr_sample_rate) {
786 node = cpu_to_node(cpu); 787 if (cpu_online(v_idx)) {
788 cpu = v_idx;
789 node = cpu_to_node(cpu);
790 }
787 } 791 }
788 } 792 }
789 793
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 5fd16670482e..16c9858f7dcf 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -2813,6 +2813,16 @@ void ixgbe_configure_tx_ring(struct ixgbe_adapter *adapter,
2813 ring->atr_sample_rate = 0; 2813 ring->atr_sample_rate = 0;
2814 } 2814 }
2815 2815
2816 /* initialize XPS */
2817 if (!test_and_set_bit(__IXGBE_TX_XPS_INIT_DONE, &ring->state)) {
2818 struct ixgbe_q_vector *q_vector = ring->q_vector;
2819
2820 if (q_vector)
2821 netif_set_xps_queue(adapter->netdev,
2822 &q_vector->affinity_mask,
2823 ring->queue_index);
2824 }
2825
2816 clear_bit(__IXGBE_HANG_CHECK_ARMED, &ring->state); 2826 clear_bit(__IXGBE_HANG_CHECK_ARMED, &ring->state);
2817 2827
2818 /* enable queue */ 2828 /* enable queue */