提交 155f15ad 编写于 作者: S Shannon Nelson 提交者: David S. Miller

ionic: use fewer firmware doorbells on rx fill

We really don't need to hit the Rx queue doorbell so many times,
we can wait to the end and cause a little less thrash.
Signed-off-by: NShannon Nelson <snelson@pensando.io>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 622e32b7
...@@ -331,9 +331,6 @@ static void ionic_rx_page_free(struct ionic_queue *q, struct page *page, ...@@ -331,9 +331,6 @@ static void ionic_rx_page_free(struct ionic_queue *q, struct page *page,
__free_page(page); __free_page(page);
} }
#define IONIC_RX_RING_DOORBELL_STRIDE ((1 << 5) - 1)
#define IONIC_RX_RING_HEAD_BUF_SZ 2048
void ionic_rx_fill(struct ionic_queue *q) void ionic_rx_fill(struct ionic_queue *q)
{ {
struct net_device *netdev = q->lif->netdev; struct net_device *netdev = q->lif->netdev;
...@@ -345,7 +342,6 @@ void ionic_rx_fill(struct ionic_queue *q) ...@@ -345,7 +342,6 @@ void ionic_rx_fill(struct ionic_queue *q)
unsigned int remain_len; unsigned int remain_len;
unsigned int seg_len; unsigned int seg_len;
unsigned int nfrags; unsigned int nfrags;
bool ring_doorbell;
unsigned int i, j; unsigned int i, j;
unsigned int len; unsigned int len;
...@@ -360,9 +356,7 @@ void ionic_rx_fill(struct ionic_queue *q) ...@@ -360,9 +356,7 @@ void ionic_rx_fill(struct ionic_queue *q)
page_info = &desc_info->pages[0]; page_info = &desc_info->pages[0];
if (page_info->page) { /* recycle the buffer */ if (page_info->page) { /* recycle the buffer */
ring_doorbell = ((q->head->index + 1) & ionic_rxq_post(q, false, ionic_rx_clean, NULL);
IONIC_RX_RING_DOORBELL_STRIDE) == 0;
ionic_rxq_post(q, ring_doorbell, ionic_rx_clean, NULL);
continue; continue;
} }
...@@ -401,10 +395,11 @@ void ionic_rx_fill(struct ionic_queue *q) ...@@ -401,10 +395,11 @@ void ionic_rx_fill(struct ionic_queue *q)
page_info++; page_info++;
} }
ring_doorbell = ((q->head->index + 1) & ionic_rxq_post(q, false, ionic_rx_clean, NULL);
IONIC_RX_RING_DOORBELL_STRIDE) == 0;
ionic_rxq_post(q, ring_doorbell, ionic_rx_clean, NULL);
} }
ionic_dbell_ring(q->lif->kern_dbpage, q->hw_type,
q->dbval | q->head->index);
} }
static void ionic_rx_fill_cb(void *arg) static void ionic_rx_fill_cb(void *arg)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册