ena.c (4fa9e02d9b354e83f03a4409f6b0daab5137ec31) | ena.c (82f5a7921c7ff4edb1aea86eb2813e720f23310e) |
---|---|
1/*- 2 * BSD LICENSE 3 * 4 * Copyright (c) 2015-2017 Amazon.com, Inc. or its affiliates. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 1767 unchanged lines hidden (view full) --- 1776 counter_u64_add_protected(rx_ring->rx_stats.cnt, 1); 1777 counter_u64_add_protected(adapter->hw_stats.rx_packets, 1); 1778 counter_exit(); 1779 } while (--budget); 1780 1781 rx_ring->next_to_clean = next_to_clean; 1782 1783 refill_required = ena_com_free_desc(io_sq); | 1/*- 2 * BSD LICENSE 3 * 4 * Copyright (c) 2015-2017 Amazon.com, Inc. or its affiliates. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 1767 unchanged lines hidden (view full) --- 1776 counter_u64_add_protected(rx_ring->rx_stats.cnt, 1); 1777 counter_u64_add_protected(adapter->hw_stats.rx_packets, 1); 1778 counter_exit(); 1779 } while (--budget); 1780 1781 rx_ring->next_to_clean = next_to_clean; 1782 1783 refill_required = ena_com_free_desc(io_sq); |
1784 refill_threshold = rx_ring->ring_size / ENA_RX_REFILL_THRESH_DIVIDER; | 1784 refill_threshold = min_t(int, 1785 rx_ring->ring_size / ENA_RX_REFILL_THRESH_DIVIDER, 1786 ENA_RX_REFILL_THRESH_PACKET); |
1785 1786 if (refill_required > refill_threshold) { 1787 ena_com_update_dev_comp_head(rx_ring->ena_com_io_cq); 1788 ena_refill_rx_bufs(rx_ring, refill_required); 1789 } 1790 1791 tcp_lro_flush_all(&rx_ring->lro); 1792 --- 2749 unchanged lines hidden --- | 1787 1788 if (refill_required > refill_threshold) { 1789 ena_com_update_dev_comp_head(rx_ring->ena_com_io_cq); 1790 ena_refill_rx_bufs(rx_ring, refill_required); 1791 } 1792 1793 tcp_lro_flush_all(&rx_ring->lro); 1794 --- 2749 unchanged lines hidden --- |