Skip to content

Commit

Permalink
rtlwifi: Reduce IO in RX interrupt to boost throughput
Browse files Browse the repository at this point in the history
Check remaining count of RX packets cost a lot of CPU time, so only update
when the counter decreases to zero. In old flow, the counter was updated
once a RX packet is received.

Signed-off-by: Steven Ting <steventing@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  • Loading branch information
Ping-Ke Shih authored and Kalle Valo committed Dec 7, 2017
1 parent 78aa601 commit fb9829e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/net/wireless/realtek/rtlwifi/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
u8 tmp_one;
bool unicast = false;
u8 hw_queue = 0;
unsigned int rx_remained_cnt;
unsigned int rx_remained_cnt = 0;
struct rtl_stats stats = {
.signal = 0,
.rate = 0,
Expand All @@ -768,7 +768,8 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
struct sk_buff *new_skb;

if (rtlpriv->use_new_trx_flow) {
rx_remained_cnt =
if (rx_remained_cnt == 0)
rx_remained_cnt =
rtlpriv->cfg->ops->rx_desc_buff_remained_cnt(hw,
hw_queue);
if (rx_remained_cnt == 0)
Expand Down

0 comments on commit fb9829e

Please sign in to comment.