Skip to content

Commit

Permalink
net: ena: Set default value for RX interrupt moderation
Browse files Browse the repository at this point in the history
[ Upstream commit e712f3e ]

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: 548c494 ("net: ena: Implement XDP_TX action")
Signed-off-by: David Arinzon <darinzon@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
davidarinzon authored and gregkh committed Jan 12, 2023
1 parent 2474a8e commit eff3be5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/amazon/ena/ena_netdev.c
Expand Up @@ -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.
*/
Expand Down

0 comments on commit eff3be5

Please sign in to comment.