All of lore.kernel.org
 help / color / mirror / Atom feed
From: <darinzon@amazon.com>
To: David Miller <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, <netdev@vger.kernel.org>
Cc: David Arinzon <darinzon@amazon.com>,
	"Machulsky, Zorik" <zorik@amazon.com>,
	"Matushevsky, Alexander" <matua@amazon.com>,
	Saeed Bshara <saeedb@amazon.com>,
	"Bshara, Nafea" <nafea@amazon.com>,
	"Saidi, Ali" <alisaidi@amazon.com>,
	"Kiyanovski, Arthur" <akiyano@amazon.com>,
	"Dagan, Noam" <ndagan@amazon.com>,
	"Agroskin, Shay" <shayagr@amazon.com>,
	"Itzko, Shahar" <itzko@amazon.com>,
	"Abboud, Osama" <osamaabb@amazon.com>
Subject: [PATCH V1 net 6/7] net: ena: Set default value for RX interrupt moderation
Date: Thu, 29 Dec 2022 07:30:10 +0000	[thread overview]
Message-ID: <20221229073011.19687-7-darinzon@amazon.com> (raw)
In-Reply-To: <20221229073011.19687-1-darinzon@amazon.com>

From: David Arinzon <darinzon@amazon.com>

RX ring can be NULL in XDP use cases where only TX queues
are configured. In this scenario, the RX interrupt moderation
value sent to the device remains in its default value of 0.

In this change, setting the default value of the RX interrupt
moderation to be the same as of the TX.

Fixes: 548c4940b9f1 ("net: ena: Implement XDP_TX action")
Signed-off-by: David Arinzon <darinzon@amazon.com>
---
 drivers/net/ethernet/amazon/ena/ena_netdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c
index 80a726932e81..99f80c2d560a 100644
--- a/drivers/net/ethernet/amazon/ena/ena_netdev.c
+++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c
@@ -1823,8 +1823,9 @@ static void ena_adjust_adaptive_rx_intr_moderation(struct ena_napi *ena_napi)
 static void ena_unmask_interrupt(struct ena_ring *tx_ring,
 					struct ena_ring *rx_ring)
 {
+	u32 rx_interval = tx_ring->smoothed_interval;
 	struct ena_eth_io_intr_reg intr_reg;
-	u32 rx_interval = 0;
+
 	/* Rx ring can be NULL when for XDP tx queues which don't have an
 	 * accompanying rx_ring pair.
 	 */
-- 
2.38.1


  parent reply	other threads:[~2022-12-29  7:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-29  7:30 [PATCH V1 net 0/7] ENA driver bug fixes darinzon
2022-12-29  7:30 ` [PATCH V1 net 1/7] net: ena: Fix toeplitz initial hash value darinzon
2022-12-29  7:30 ` [PATCH V1 net 2/7] net: ena: Don't register memory info on XDP exchange darinzon
2022-12-29  7:30 ` [PATCH V1 net 3/7] net: ena: Account for the number of processed bytes in XDP darinzon
2022-12-29  7:30 ` [PATCH V1 net 4/7] net: ena: Use bitmask to indicate packet redirection darinzon
2022-12-29  7:30 ` [PATCH V1 net 5/7] net: ena: Fix rx_copybreak value update darinzon
2022-12-29  7:30 ` darinzon [this message]
2022-12-29  7:30 ` [PATCH V1 net 7/7] net: ena: Update NUMA TPH hint register upon NUMA node update darinzon
2022-12-30  7:50 ` [PATCH V1 net 0/7] ENA driver bug fixes patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221229073011.19687-7-darinzon@amazon.com \
    --to=darinzon@amazon.com \
    --cc=akiyano@amazon.com \
    --cc=alisaidi@amazon.com \
    --cc=davem@davemloft.net \
    --cc=itzko@amazon.com \
    --cc=kuba@kernel.org \
    --cc=matua@amazon.com \
    --cc=nafea@amazon.com \
    --cc=ndagan@amazon.com \
    --cc=netdev@vger.kernel.org \
    --cc=osamaabb@amazon.com \
    --cc=saeedb@amazon.com \
    --cc=shayagr@amazon.com \
    --cc=zorik@amazon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.