Skip to content

Commit 29fa9a9

Browse files
egrumbachjmberg-intel
authored andcommitted
wifi: iwlwifi: disable multi rx queue for 9000
Multi rx queue allows to spread the load of the Rx streams on different CPUs. 9000 series required complex synchronization mechanisms from the driver side since the hardware / firmware is not able to provide information about duplicate packets and timeouts inside the reordering buffer. Users have complained that for newer devices, all those synchronization mechanisms have caused spurious packet drops. Those packet drops disappeared if we simplify the code, but unfortunately, we can't have RSS enabled on 9000 series without this complex code. Remove support for RSS on 9000 so that we can make the code much simpler for newer devices and fix the bugs for them. The down side of this patch is a that all the Rx path will be routed to a single CPU, but this has never been an issue, the modern CPUs are just fast enough to cope with all the traffic. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Gregory Greenman <[email protected]> Link: https://lore.kernel.org/r/20231017115047.2917eb8b7af9.Iddd7dcf335387ba46fcbbb6067ef4ff9cd3755a7@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent ac139aa commit 29fa9a9

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

drivers/net/wireless/intel/iwlwifi/iwl-trans.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ static inline void iwl_free_rxb(struct iwl_rx_cmd_buffer *r)
279279
#define IWL_MGMT_TID 15
280280
#define IWL_FRAME_LIMIT 64
281281
#define IWL_MAX_RX_HW_QUEUES 16
282-
#define IWL_9000_MAX_RX_HW_QUEUES 6
282+
#define IWL_9000_MAX_RX_HW_QUEUES 1
283283

284284
/**
285285
* enum iwl_wowlan_status - WoWLAN image/device status

drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,9 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
376376
ieee80211_hw_set(hw, HAS_RATE_CONTROL);
377377
}
378378

379-
if (iwl_mvm_has_new_rx_api(mvm))
379+
/* We want to use the mac80211's reorder buffer for 9000 */
380+
if (iwl_mvm_has_new_rx_api(mvm) &&
381+
mvm->trans->trans_cfg->device_family > IWL_DEVICE_FAMILY_9000)
380382
ieee80211_hw_set(hw, SUPPORTS_REORDERING_BUFFER);
381383

382384
if (fw_has_capa(&mvm->fw->ucode_capa,

drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -957,6 +957,9 @@ static bool iwl_mvm_reorder(struct iwl_mvm *mvm,
957957
baid = (reorder & IWL_RX_MPDU_REORDER_BAID_MASK) >>
958958
IWL_RX_MPDU_REORDER_BAID_SHIFT;
959959

960+
if (mvm->trans->trans_cfg->device_family == IWL_DEVICE_FAMILY_9000)
961+
return false;
962+
960963
/*
961964
* This also covers the case of receiving a Block Ack Request
962965
* outside a BA session; we'll pass it to mac80211 and that
@@ -2617,9 +2620,15 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi,
26172620

26182621
if (!iwl_mvm_reorder(mvm, napi, queue, sta, skb, desc) &&
26192622
likely(!iwl_mvm_time_sync_frame(mvm, skb, hdr->addr2)) &&
2620-
likely(!iwl_mvm_mei_filter_scan(mvm, skb)))
2623+
likely(!iwl_mvm_mei_filter_scan(mvm, skb))) {
2624+
if (mvm->trans->trans_cfg->device_family == IWL_DEVICE_FAMILY_9000 &&
2625+
(desc->mac_flags2 & IWL_RX_MPDU_MFLG2_AMSDU) &&
2626+
!(desc->amsdu_info & IWL_RX_MPDU_AMSDU_LAST_SUBFRAME))
2627+
rx_status->flag |= RX_FLAG_AMSDU_MORE;
2628+
26212629
iwl_mvm_pass_packet_to_mac80211(mvm, napi, skb, queue, sta,
26222630
link_sta);
2631+
}
26232632
out:
26242633
rcu_read_unlock();
26252634
}

0 commit comments

Comments
 (0)