Remove from supported_coalesce_params ETHTOOL_COALESCE_MAX_FRAMES and ETHTOOL_COALESCE_MAX_FRAMES_IRQ. As tx-frames-irq allowed user to change budget for iavf_clean_tx_irq, remove work_limit and use define for budget. Without this patch there would be possibility to change rx/tx-frames and rx/tx-frames-irq, which for rx/tx-frames did nothing, while for rx/tx-frames-irq it changed rx/tx-frames and only changed budget for cleaning NAPI poll.
Unified · Split
| @@ -64,7 +64,6 @@ struct iavf_vsi { · 63 unmodified lines | ||
| 64 | 64 | u16 id; |
| 65 | 65 | DECLARE_BITMAP(state, __IAVF_VSI_STATE_SIZE__); |
| 66 | 66 | int base_vector; |
| 67 | − u16 work_limit; | |
| 68 | 67 | u16 qs_handle; |
| 69 | 68 | void *priv; /* client driver data reference. */ |
| 70 | 69 | }; |
| @@ -692,12 +692,8 @@ static int __iavf_get_coalesce(struct net_device *netdev, · 691 unmodified lines | ||
| 692 | 692 | struct ethtool_coalesce *ec, int queue) |
| 693 | 693 | { |
| 694 | 694 | struct iavf_adapter *adapter = netdev_priv(netdev); |
| 695 | − struct iavf_vsi *vsi = &adapter->vsi; | |
| 696 | 695 | struct iavf_ring *rx_ring, *tx_ring; |
| 697 | 696 | |
| 698 | − ec->tx_max_coalesced_frames = vsi->work_limit; | |
| 699 | − ec->rx_max_coalesced_frames = vsi->work_limit; | |
| 700 | − | |
| 701 | 697 | /* Rx and Tx usecs per queue value. If user doesn't specify the |
| 702 | 698 | * queue, return queue 0's value to represent. |
| 703 | 699 | */ |
| @@ -825,12 +821,8 @@ static int __iavf_set_coalesce(struct net_device *netdev, · 121 unmodified lines | ||
| 825 | 821 | struct ethtool_coalesce *ec, int queue) |
| 826 | 822 | { |
| 827 | 823 | struct iavf_adapter *adapter = netdev_priv(netdev); |
| 828 | − struct iavf_vsi *vsi = &adapter->vsi; | |
| 829 | 824 | int i; |
| 830 | 825 | |
| 831 | − if (ec->tx_max_coalesced_frames_irq || ec->rx_max_coalesced_frames_irq) | |
| 832 | − vsi->work_limit = ec->tx_max_coalesced_frames_irq; | |
| 833 | − | |
| 834 | 826 | if (ec->rx_coalesce_usecs == 0) { |
| 835 | 827 | if (ec->use_adaptive_rx_coalesce) |
| 836 | 828 | netif_info(adapter, drv, netdev, "rx-usecs=0, need to disable adaptive-rx for a complete disable\n"); |
| @@ -1969,8 +1961,6 @@ static int iavf_set_rxfh(struct net_device *netdev, const u32 *indir, · 1132 unmodified lines | ||
| 1969 | 1961 | |
| 1970 | 1962 | static const struct ethtool_ops iavf_ethtool_ops = { |
| 1971 | 1963 | .supported_coalesce_params = ETHTOOL_COALESCE_USECS | |
| 1972 | − ETHTOOL_COALESCE_MAX_FRAMES | | |
| 1973 | − ETHTOOL_COALESCE_MAX_FRAMES_IRQ | | |
| 1974 | 1964 | ETHTOOL_COALESCE_USE_ADAPTIVE, |
| 1975 | 1965 | .get_drvinfo = iavf_get_drvinfo, |
| 1976 | 1966 | .get_link = ethtool_op_get_link, |
| @@ -2240,7 +2240,6 @@ int iavf_parse_vf_resource_msg(struct iavf_adapter *adapter) · 2239 unmodified lines | ||
| 2240 | 2240 | |
| 2241 | 2241 | adapter->vsi.back = adapter; |
| 2242 | 2242 | adapter->vsi.base_vector = 1; |
| 2243 | − adapter->vsi.work_limit = IAVF_DEFAULT_IRQ_WORK; | |
| 2244 | 2243 | vsi->netdev = adapter->netdev; |
| 2245 | 2244 | vsi->qs_handle = adapter->vsi_res->qset_handle; |
| 2246 | 2245 | if (adapter->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RSS_PF) { |
| @@ -194,7 +194,7 @@ static bool iavf_clean_tx_irq(struct iavf_vsi *vsi, · 193 unmodified lines | ||
| 194 | 194 | struct iavf_tx_buffer *tx_buf; |
| 195 | 195 | struct iavf_tx_desc *tx_desc; |
| 196 | 196 | unsigned int total_bytes = 0, total_packets = 0; |
| 197 | − unsigned int budget = vsi->work_limit; | |
| 197 | + unsigned int budget = IAVF_DEFAULT_IRQ_WORK; | |
| 198 | 198 | |
| 199 | 199 | tx_buf = &tx_ring->tx_bi[i]; |
| 200 | 200 | tx_desc = IAVF_TX_DESC(tx_ring, i); |