• Arthur Kiyanovski's avatar
    net: ena: fix incorrect update of intr_delay_resolution · 79226cea
    Arthur Kiyanovski authored
    ena_dev->intr_moder_rx/tx_interval save the intervals received from the
    user after dividing them by ena_dev->intr_delay_resolution. Therefore
    when intr_delay_resolution changes, the code needs to first mutiply
    intr_moder_rx/tx_interval by the previous intr_delay_resolution to get
    the value originally given by the user, and only then divide it by the
    new intr_delay_resolution.
    
    Current code does not first multiply intr_moder_rx/tx_interval by the old
    intr_delay_resolution. This commit fixes it.
    
    Also initialize ena_dev->intr_delay_resolution to be 1.
    Signed-off-by: default avatarArthur Kiyanovski <akiyano@amazon.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    79226cea
ena_com.c 79.6 KB