net: ena: Set default value for RX interrupt moderation
authorDavid Arinzon <darinzon@amazon.com>
Thu, 29 Dec 2022 07:30:10 +0000 (07:30 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 30 Dec 2022 07:43:44 +0000 (07:43 +0000)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amazon/ena/ena_netdev.c

index 80a726932e8103bad5c607f0ce816987e7e2be71..99f80c2d560a5d8a57eb64f04918405ceee36917 100644 (file)
@@ -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.
         */