diff options
author | David Arinzon <[email protected]> | 2024-01-30 09:53:46 +0000 |
---|---|---|
committer | Paolo Abeni <[email protected]> | 2024-02-01 13:22:12 +0100 |
commit | 50d7a2660579889fba28b7e4543d4ce85aa2311b (patch) | |
tree | 7ceeb50d4392ced0413863c89676dbc11d58264b | |
parent | 243f36eef5c72f69d67a0474402bb77a56beff4f (diff) |
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]>
-rw-r--r-- | drivers/net/ethernet/amazon/ena/ena_netdev.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c index d68d08147f03..0b7f94f6c631 100644 --- a/drivers/net/ethernet/amazon/ena/ena_netdev.c +++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c @@ -2134,6 +2134,12 @@ int ena_up(struct ena_adapter *adapter) */ ena_init_napi_in_range(adapter, 0, io_queue_count); + /* Enabling DIM needs to happen before enabling IRQs since DIM + * is run from napi routine + */ + if (ena_com_interrupt_moderation_supported(adapter->ena_dev)) + ena_com_enable_adaptive_moderation(adapter->ena_dev); + rc = ena_request_io_irq(adapter); if (rc) goto err_req_irq; |