mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
dma: optimize icache footprint of rx path, batch frames before passing them to mac80211
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -358,6 +358,7 @@ mt76_dma_rx_poll(struct napi_struct *napi, int budget)
|
||||
napi_complete(napi);
|
||||
dev->drv->rx_poll_complete(dev, qid);
|
||||
}
|
||||
mt76_rx_complete(dev, qid);
|
||||
|
||||
return done;
|
||||
}
|
||||
@@ -372,6 +373,7 @@ mt76_dma_init(struct mt76_dev *dev)
|
||||
for (i = 0; i < ARRAY_SIZE(dev->q_rx); i++) {
|
||||
netif_napi_add(&dev->napi_dev, &dev->napi[i], mt76_dma_rx_poll, 64);
|
||||
mt76_dma_rx_fill(dev, &dev->q_rx[i], false);
|
||||
skb_queue_head_init(&dev->rx_skb[i]);
|
||||
napi_enable(&dev->napi[i]);
|
||||
}
|
||||
|
||||
|
||||
+9
-1
@@ -231,6 +231,14 @@ void mt76_rx(struct mt76_dev *dev, enum mt76_rxq_id q, struct sk_buff *skb)
|
||||
return;
|
||||
}
|
||||
|
||||
ieee80211_rx_napi(dev->hw, skb, &dev->napi[q]);
|
||||
__skb_queue_tail(&dev->rx_skb[q], skb);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_rx);
|
||||
|
||||
void mt76_rx_complete(struct mt76_dev *dev, enum mt76_rxq_id q)
|
||||
{
|
||||
struct sk_buff *skb;
|
||||
|
||||
while ((skb = __skb_dequeue(&dev->rx_skb[q])) != NULL)
|
||||
ieee80211_rx_napi(dev->hw, skb, &dev->napi[q]);
|
||||
}
|
||||
|
||||
@@ -177,6 +177,7 @@ struct mt76_dev {
|
||||
|
||||
struct net_device napi_dev;
|
||||
struct napi_struct napi[__MT_RXQ_MAX];
|
||||
struct sk_buff_head rx_skb[__MT_RXQ_MAX];
|
||||
|
||||
struct list_head txwi_cache;
|
||||
struct mt76_queue q_tx[__MT_TXQ_MAX];
|
||||
@@ -282,5 +283,6 @@ void mt76_release_buffered_frames(struct ieee80211_hw *hw,
|
||||
/* internal */
|
||||
void mt76_tx_free(struct mt76_dev *dev);
|
||||
void mt76_put_txwi(struct mt76_dev *dev, struct mt76_txwi_cache *t);
|
||||
void mt76_rx_complete(struct mt76_dev *dev, enum mt76_rxq_id q);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user