[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240130095353.2881-5-darinzon@amazon.com>
Date: Tue, 30 Jan 2024 09:53:46 +0000
From: <darinzon@...zon.com>
To: "Nelson, Shannon" <shannon.nelson@....com>, David Miller
<davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
<netdev@...r.kernel.org>
CC: David Arinzon <darinzon@...zon.com>, "Woodhouse, David" <dwmw@...zon.com>,
"Machulsky, Zorik" <zorik@...zon.com>, "Matushevsky, Alexander"
<matua@...zon.com>, Saeed Bshara <saeedb@...zon.com>, "Wilson, Matt"
<msw@...zon.com>, "Liguori, Anthony" <aliguori@...zon.com>, "Bshara, Nafea"
<nafea@...zon.com>, "Belgazal, Netanel" <netanel@...zon.com>, "Saidi, Ali"
<alisaidi@...zon.com>, "Herrenschmidt, Benjamin" <benh@...zon.com>,
"Kiyanovski, Arthur" <akiyano@...zon.com>, "Dagan, Noam" <ndagan@...zon.com>,
"Agroskin, Shay" <shayagr@...zon.com>, "Itzko, Shahar" <itzko@...zon.com>,
"Abboud, Osama" <osamaabb@...zon.com>, "Ostrovsky, Evgeny"
<evostrov@...zon.com>, "Tabachnik, Ofir" <ofirt@...zon.com>, "Koler, Nati"
<nkoler@...zon.com>
Subject: [PATCH v2 net-next 04/11] net: ena: Enable DIM by default
From: David Arinzon <darinzon@...zon.com>
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 <akiyano@...zon.com>
Signed-off-by: Osama Abboud <osamaabb@...zon.com>
Signed-off-by: David Arinzon <darinzon@...zon.com>
---
drivers/net/ethernet/amazon/ena/ena_netdev.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c
index d68d081..0b7f94f 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;
--
2.40.1
Powered by blists - more mailing lists