Skip to content

Commit 50d7a26

Browse files
davidarinzonPaolo Abeni
authored andcommitted
net: ena: Enable DIM by default
Dynamic Interrupt Moderation (DIM) is a technique designed to balance the need for timely data processing with the desire to minimize CPU overhead. Instead of generating an interrupt for every received packet, the system can dynamically adjust the rate at which interrupts are generated based on the incoming traffic patterns. Enabling DIM by default to improve the user experience. DIM can be turned on/off through ethtool: `ethtool -C <interface> adaptive-rx <on/off>` Signed-off-by: Arthur Kiyanovski <[email protected]> Signed-off-by: Osama Abboud <[email protected]> Signed-off-by: David Arinzon <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
1 parent 243f36e commit 50d7a26

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/net/ethernet/amazon/ena/ena_netdev.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2134,6 +2134,12 @@ int ena_up(struct ena_adapter *adapter)
21342134
*/
21352135
ena_init_napi_in_range(adapter, 0, io_queue_count);
21362136

2137+
/* Enabling DIM needs to happen before enabling IRQs since DIM
2138+
* is run from napi routine
2139+
*/
2140+
if (ena_com_interrupt_moderation_supported(adapter->ena_dev))
2141+
ena_com_enable_adaptive_moderation(adapter->ena_dev);
2142+
21372143
rc = ena_request_io_irq(adapter);
21382144
if (rc)
21392145
goto err_req_irq;

0 commit comments

Comments
 (0)