Skip to content

Commit ff8e3a4

Browse files
egrumbachjmberg-intel
authored andcommitted
wifi: iwlwifi: mvm: simplify the reorder buffer
The firmware / hardware of devices supporting RSS is able to report duplicates and packets that time out inside the reoder buffer. We can now remove all the complex logic that was implemented to keep all the Rx queues more the less synchronized: we used to send a message to all the queues through the firmware to teach the different queues about what is the current SSN every 2048 packets. Now that we rely on the firmware / hardware to detect duplicates, we can completely remove the code that did that in the driver and it has been reported that this code was spuriously dropping legit packets. Suggested-by: Sultan Alsawaf <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Gregory Greenman <[email protected]> Link: https://lore.kernel.org/r/20231017115047.54cf4d3d5956.Ic06a08c9fb1e1ec315a4b49d632b78b8474dab79@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent 29fa9a9 commit ff8e3a4

File tree

4 files changed

+24
-342
lines changed

4 files changed

+24
-342
lines changed

drivers/net/wireless/intel/iwlwifi/mvm/mvm.h

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -647,18 +647,9 @@ struct iwl_mvm_tcm {
647647
* @queue: queue of this reorder buffer
648648
* @last_amsdu: track last ASMDU SN for duplication detection
649649
* @last_sub_index: track ASMDU sub frame index for duplication detection
650-
* @reorder_timer: timer for frames are in the reorder buffer. For AMSDU
651-
* it is the time of last received sub-frame
652-
* @removed: prevent timer re-arming
653650
* @valid: reordering is valid for this queue
654651
* @lock: protect reorder buffer internal state
655652
* @mvm: mvm pointer, needed for frame timer context
656-
* @consec_oldsn_drops: consecutive drops due to old SN
657-
* @consec_oldsn_ampdu_gp2: A-MPDU GP2 timestamp to track
658-
* when to apply old SN consecutive drop workaround
659-
* @consec_oldsn_prev_drop: track whether or not an MPDU
660-
* that was single/part of the previous A-MPDU was
661-
* dropped due to old SN
662653
*/
663654
struct iwl_mvm_reorder_buffer {
664655
u16 head_sn;
@@ -667,33 +658,21 @@ struct iwl_mvm_reorder_buffer {
667658
int queue;
668659
u16 last_amsdu;
669660
u8 last_sub_index;
670-
struct timer_list reorder_timer;
671-
bool removed;
672661
bool valid;
673662
spinlock_t lock;
674663
struct iwl_mvm *mvm;
675-
unsigned int consec_oldsn_drops;
676-
u32 consec_oldsn_ampdu_gp2;
677-
unsigned int consec_oldsn_prev_drop:1;
678664
} ____cacheline_aligned_in_smp;
679665

680666
/**
681-
* struct _iwl_mvm_reorder_buf_entry - reorder buffer entry per-queue/per-seqno
667+
* struct iwl_mvm_reorder_buf_entry - reorder buffer entry per-queue/per-seqno
682668
* @frames: list of skbs stored
683-
* @reorder_time: time the packet was stored in the reorder buffer
684669
*/
685-
struct _iwl_mvm_reorder_buf_entry {
686-
struct sk_buff_head frames;
687-
unsigned long reorder_time;
688-
};
689-
690-
/* make this indirection to get the aligned thing */
691670
struct iwl_mvm_reorder_buf_entry {
692-
struct _iwl_mvm_reorder_buf_entry e;
671+
struct sk_buff_head frames;
693672
}
694673
#ifndef __CHECKER__
695674
/* sparse doesn't like this construct: "bad integer constant expression" */
696-
__aligned(roundup_pow_of_two(sizeof(struct _iwl_mvm_reorder_buf_entry)))
675+
__aligned(roundup_pow_of_two(sizeof(struct sk_buff_head)))
697676
#endif
698677
;
699678

@@ -2335,7 +2314,6 @@ void iwl_mvm_sync_rx_queues_internal(struct iwl_mvm *mvm,
23352314
enum iwl_mvm_rxq_notif_type type,
23362315
bool sync,
23372316
const void *data, u32 size);
2338-
void iwl_mvm_reorder_timer_expired(struct timer_list *t);
23392317
struct ieee80211_vif *iwl_mvm_get_bss_vif(struct iwl_mvm *mvm);
23402318
struct ieee80211_vif *iwl_mvm_get_vif_by_macid(struct iwl_mvm *mvm, u32 macid);
23412319
bool iwl_mvm_is_vif_assoc(struct iwl_mvm *mvm);

0 commit comments

Comments
 (0)