History

iavf: Disallow changing rx/tx-frames and rx/tx-frames-irq

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.

Przemyslaw Patynowski committed 4 years ago

Commit 4635fd31 parent 968996c4 files · +1 −13Browse files

Unified · Split

4 files
  1. drivers/net/ethernet/intel/iavf/iavf.h +0 −1
  2. drivers/net/ethernet/intel/iavf/iavf_ethtool.c +0 −10
  3. drivers/net/ethernet/intel/iavf/iavf_main.c +0 −1
  4. drivers/net/ethernet/intel/iavf/iavf_txrx.c +1 −1
drivers/net/ethernet/intel/iavf/iavf.h+0−1
@@ -64,7 +64,6 @@ struct iavf_vsi { · 63 unmodified lines
6464 u16 id;
6565 DECLARE_BITMAP(state, __IAVF_VSI_STATE_SIZE__);
6666 int base_vector;
67− u16 work_limit;
6867 u16 qs_handle;
6968 void *priv; /* client driver data reference. */
7069 };
drivers/net/ethernet/intel/iavf/iavf_ethtool.c+0−10
@@ -692,12 +692,8 @@ static int __iavf_get_coalesce(struct net_device *netdev, · 691 unmodified lines
692692 struct ethtool_coalesce *ec, int queue)
693693 {
694694 struct iavf_adapter *adapter = netdev_priv(netdev);
695− struct iavf_vsi *vsi = &adapter->vsi;
696695 struct iavf_ring *rx_ring, *tx_ring;
697696
698− ec->tx_max_coalesced_frames = vsi->work_limit;
699− ec->rx_max_coalesced_frames = vsi->work_limit;
700−
701697 /* Rx and Tx usecs per queue value. If user doesn't specify the
702698 * queue, return queue 0's value to represent.
703699 */
@@ -825,12 +821,8 @@ static int __iavf_set_coalesce(struct net_device *netdev, · 121 unmodified lines
825821 struct ethtool_coalesce *ec, int queue)
826822 {
827823 struct iavf_adapter *adapter = netdev_priv(netdev);
828− struct iavf_vsi *vsi = &adapter->vsi;
829824 int i;
830825
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−
834826 if (ec->rx_coalesce_usecs == 0) {
835827 if (ec->use_adaptive_rx_coalesce)
836828 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
19691961
19701962 static const struct ethtool_ops iavf_ethtool_ops = {
19711963 .supported_coalesce_params = ETHTOOL_COALESCE_USECS |
1972− ETHTOOL_COALESCE_MAX_FRAMES |
1973− ETHTOOL_COALESCE_MAX_FRAMES_IRQ |
19741964 ETHTOOL_COALESCE_USE_ADAPTIVE,
19751965 .get_drvinfo = iavf_get_drvinfo,
19761966 .get_link = ethtool_op_get_link,
drivers/net/ethernet/intel/iavf/iavf_main.c+0−1
@@ -2240,7 +2240,6 @@ int iavf_parse_vf_resource_msg(struct iavf_adapter *adapter) · 2239 unmodified lines
22402240
22412241 adapter->vsi.back = adapter;
22422242 adapter->vsi.base_vector = 1;
2243− adapter->vsi.work_limit = IAVF_DEFAULT_IRQ_WORK;
22442243 vsi->netdev = adapter->netdev;
22452244 vsi->qs_handle = adapter->vsi_res->qset_handle;
22462245 if (adapter->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RSS_PF) {
drivers/net/ethernet/intel/iavf/iavf_txrx.c+1−1
@@ -194,7 +194,7 @@ static bool iavf_clean_tx_irq(struct iavf_vsi *vsi, · 193 unmodified lines
194194 struct iavf_tx_buffer *tx_buf;
195195 struct iavf_tx_desc *tx_desc;
196196 unsigned int total_bytes = 0, total_packets = 0;
197− unsigned int budget = vsi->work_limit;
197+ unsigned int budget = IAVF_DEFAULT_IRQ_WORK;
198198
199199 tx_buf = &tx_ring->tx_bi[i];
200200 tx_desc = IAVF_TX_DESC(tx_ring, i);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t