Skip to content

Commit 155f15a

Browse files
emuslndavem330
authored andcommitted
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: Shannon Nelson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 622e32b commit 155f15a

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

drivers/net/ethernet/pensando/ionic/ionic_txrx.c

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -331,9 +331,6 @@ static void ionic_rx_page_free(struct ionic_queue *q, struct page *page,
331331
__free_page(page);
332332
}
333333

334-
#define IONIC_RX_RING_DOORBELL_STRIDE ((1 << 5) - 1)
335-
#define IONIC_RX_RING_HEAD_BUF_SZ 2048
336-
337334
void ionic_rx_fill(struct ionic_queue *q)
338335
{
339336
struct net_device *netdev = q->lif->netdev;
@@ -345,7 +342,6 @@ void ionic_rx_fill(struct ionic_queue *q)
345342
unsigned int remain_len;
346343
unsigned int seg_len;
347344
unsigned int nfrags;
348-
bool ring_doorbell;
349345
unsigned int i, j;
350346
unsigned int len;
351347

@@ -360,9 +356,7 @@ void ionic_rx_fill(struct ionic_queue *q)
360356
page_info = &desc_info->pages[0];
361357

362358
if (page_info->page) { /* recycle the buffer */
363-
ring_doorbell = ((q->head->index + 1) &
364-
IONIC_RX_RING_DOORBELL_STRIDE) == 0;
365-
ionic_rxq_post(q, ring_doorbell, ionic_rx_clean, NULL);
359+
ionic_rxq_post(q, false, ionic_rx_clean, NULL);
366360
continue;
367361
}
368362

@@ -401,10 +395,11 @@ void ionic_rx_fill(struct ionic_queue *q)
401395
page_info++;
402396
}
403397

404-
ring_doorbell = ((q->head->index + 1) &
405-
IONIC_RX_RING_DOORBELL_STRIDE) == 0;
406-
ionic_rxq_post(q, ring_doorbell, ionic_rx_clean, NULL);
398+
ionic_rxq_post(q, false, ionic_rx_clean, NULL);
407399
}
400+
401+
ionic_dbell_ring(q->lif->kern_dbpage, q->hw_type,
402+
q->dbval | q->head->index);
408403
}
409404

410405
static void ionic_rx_fill_cb(void *arg)

0 commit comments

Comments
 (0)