diff options
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 52 |
1 files changed, 48 insertions, 4 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 49a903784566..01884256f4c9 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -2841,11 +2841,55 @@ static inline bool ixgbe_cache_ring_dcb(struct ixgbe_adapter *adapter) | |||
2841 | } | 2841 | } |
2842 | ret = true; | 2842 | ret = true; |
2843 | } else if (adapter->hw.mac.type == ixgbe_mac_82599EB) { | 2843 | } else if (adapter->hw.mac.type == ixgbe_mac_82599EB) { |
2844 | for (i = 0; i < dcb_i; i++) { | 2844 | if (dcb_i == 8) { |
2845 | adapter->rx_ring[i].reg_idx = i << 4; | 2845 | /* |
2846 | adapter->tx_ring[i].reg_idx = i << 4; | 2846 | * Tx TC0 starts at: descriptor queue 0 |
2847 | * Tx TC1 starts at: descriptor queue 32 | ||
2848 | * Tx TC2 starts at: descriptor queue 64 | ||
2849 | * Tx TC3 starts at: descriptor queue 80 | ||
2850 | * Tx TC4 starts at: descriptor queue 96 | ||
2851 | * Tx TC5 starts at: descriptor queue 104 | ||
2852 | * Tx TC6 starts at: descriptor queue 112 | ||
2853 | * Tx TC7 starts at: descriptor queue 120 | ||
2854 | * | ||
2855 | * Rx TC0-TC7 are offset by 16 queues each | ||
2856 | */ | ||
2857 | for (i = 0; i < 3; i++) { | ||
2858 | adapter->tx_ring[i].reg_idx = i << 5; | ||
2859 | adapter->rx_ring[i].reg_idx = i << 4; | ||
2860 | } | ||
2861 | for ( ; i < 5; i++) { | ||
2862 | adapter->tx_ring[i].reg_idx = | ||
2863 | ((i + 2) << 4); | ||
2864 | adapter->rx_ring[i].reg_idx = i << 4; | ||
2865 | } | ||
2866 | for ( ; i < dcb_i; i++) { | ||
2867 | adapter->tx_ring[i].reg_idx = | ||
2868 | ((i + 8) << 3); | ||
2869 | adapter->rx_ring[i].reg_idx = i << 4; | ||
2870 | } | ||
2871 | |||
2872 | ret = true; | ||
2873 | } else if (dcb_i == 4) { | ||
2874 | /* | ||
2875 | * Tx TC0 starts at: descriptor queue 0 | ||
2876 | * Tx TC1 starts at: descriptor queue 64 | ||
2877 | * Tx TC2 starts at: descriptor queue 96 | ||
2878 | * Tx TC3 starts at: descriptor queue 112 | ||
2879 | * | ||
2880 | * Rx TC0-TC3 are offset by 32 queues each | ||
2881 | */ | ||
2882 | adapter->tx_ring[0].reg_idx = 0; | ||
2883 | adapter->tx_ring[1].reg_idx = 64; | ||
2884 | adapter->tx_ring[2].reg_idx = 96; | ||
2885 | adapter->tx_ring[3].reg_idx = 112; | ||
2886 | for (i = 0 ; i < dcb_i; i++) | ||
2887 | adapter->rx_ring[i].reg_idx = i << 5; | ||
2888 | |||
2889 | ret = true; | ||
2890 | } else { | ||
2891 | ret = false; | ||
2847 | } | 2892 | } |
2848 | ret = true; | ||
2849 | } else { | 2893 | } else { |
2850 | ret = false; | 2894 | ret = false; |
2851 | } | 2895 | } |