mirror of https://gitee.com/openkylin/linux.git
net: ena: remove old adaptive interrupt moderation code from ena_netdev
1. Out of the fields {per_napi_bytes, per_napi_packets} in struct ena_ring, only rx_ring->per_napi_packets are used to determine if napi did work for dim. This commit removes all other uses of these fields. 2. Remove ena_ring->moder_tbl_idx, which is not used by dim. 3. Remove all calls to ena_com_destroy_interrupt_moderation(), since all it did was to destroy the interrupt moderation table, which is removed as part of removing old interrupt moderation code. Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
57e3a5f24b
commit
242d81fd3d
|
@ -158,7 +158,6 @@ static void ena_init_io_rings_common(struct ena_adapter *adapter,
|
||||||
ring->adapter = adapter;
|
ring->adapter = adapter;
|
||||||
ring->ena_dev = adapter->ena_dev;
|
ring->ena_dev = adapter->ena_dev;
|
||||||
ring->per_napi_packets = 0;
|
ring->per_napi_packets = 0;
|
||||||
ring->per_napi_bytes = 0;
|
|
||||||
ring->cpu = 0;
|
ring->cpu = 0;
|
||||||
ring->first_interrupt = false;
|
ring->first_interrupt = false;
|
||||||
ring->no_interrupt_event_cnt = 0;
|
ring->no_interrupt_event_cnt = 0;
|
||||||
|
@ -834,9 +833,6 @@ static int ena_clean_tx_irq(struct ena_ring *tx_ring, u32 budget)
|
||||||
__netif_tx_unlock(txq);
|
__netif_tx_unlock(txq);
|
||||||
}
|
}
|
||||||
|
|
||||||
tx_ring->per_napi_bytes += tx_bytes;
|
|
||||||
tx_ring->per_napi_packets += tx_pkts;
|
|
||||||
|
|
||||||
return tx_pkts;
|
return tx_pkts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1120,7 +1116,6 @@ static int ena_clean_rx_irq(struct ena_ring *rx_ring, struct napi_struct *napi,
|
||||||
} while (likely(res_budget));
|
} while (likely(res_budget));
|
||||||
|
|
||||||
work_done = budget - res_budget;
|
work_done = budget - res_budget;
|
||||||
rx_ring->per_napi_bytes += total_len;
|
|
||||||
rx_ring->per_napi_packets += work_done;
|
rx_ring->per_napi_packets += work_done;
|
||||||
u64_stats_update_begin(&rx_ring->syncp);
|
u64_stats_update_begin(&rx_ring->syncp);
|
||||||
rx_ring->rx_stats.bytes += total_len;
|
rx_ring->rx_stats.bytes += total_len;
|
||||||
|
@ -3641,7 +3636,6 @@ static int ena_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||||
ena_free_mgmnt_irq(adapter);
|
ena_free_mgmnt_irq(adapter);
|
||||||
ena_disable_msix(adapter);
|
ena_disable_msix(adapter);
|
||||||
err_worker_destroy:
|
err_worker_destroy:
|
||||||
ena_com_destroy_interrupt_moderation(ena_dev);
|
|
||||||
del_timer(&adapter->timer_service);
|
del_timer(&adapter->timer_service);
|
||||||
err_netdev_destroy:
|
err_netdev_destroy:
|
||||||
free_netdev(netdev);
|
free_netdev(netdev);
|
||||||
|
@ -3702,8 +3696,6 @@ static void ena_remove(struct pci_dev *pdev)
|
||||||
|
|
||||||
pci_disable_device(pdev);
|
pci_disable_device(pdev);
|
||||||
|
|
||||||
ena_com_destroy_interrupt_moderation(ena_dev);
|
|
||||||
|
|
||||||
vfree(ena_dev);
|
vfree(ena_dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -280,8 +280,6 @@ struct ena_ring {
|
||||||
struct ena_com_rx_buf_info ena_bufs[ENA_PKT_MAX_BUFS];
|
struct ena_com_rx_buf_info ena_bufs[ENA_PKT_MAX_BUFS];
|
||||||
u32 smoothed_interval;
|
u32 smoothed_interval;
|
||||||
u32 per_napi_packets;
|
u32 per_napi_packets;
|
||||||
u32 per_napi_bytes;
|
|
||||||
enum ena_intr_moder_level moder_tbl_idx;
|
|
||||||
u16 non_empty_napi_events;
|
u16 non_empty_napi_events;
|
||||||
struct u64_stats_sync syncp;
|
struct u64_stats_sync syncp;
|
||||||
union {
|
union {
|
||||||
|
|
Loading…
Reference in New Issue