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
64 u16 id;64 u16 id;
65 DECLARE_BITMAP(state, __IAVF_VSI_STATE_SIZE__);65 DECLARE_BITMAP(state, __IAVF_VSI_STATE_SIZE__);
66 int base_vector;66 int base_vector;
67 u16 work_limit;
68 u16 qs_handle;67 u16 qs_handle;
69 void *priv; /* client driver data reference. */68 void *priv; /* client driver data reference. */
70};69};
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
692 struct ethtool_coalesce *ec, int queue)692 struct ethtool_coalesce *ec, int queue)
693{693{
694 struct iavf_adapter *adapter = netdev_priv(netdev);694 struct iavf_adapter *adapter = netdev_priv(netdev);
695 struct iavf_vsi *vsi = &adapter->vsi;
696 struct iavf_ring *rx_ring, *tx_ring;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 /* Rx and Tx usecs per queue value. If user doesn't specify the697 /* Rx and Tx usecs per queue value. If user doesn't specify the
702 * queue, return queue 0's value to represent.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 struct ethtool_coalesce *ec, int queue)821 struct ethtool_coalesce *ec, int queue)
826{822{
827 struct iavf_adapter *adapter = netdev_priv(netdev);823 struct iavf_adapter *adapter = netdev_priv(netdev);
828 struct iavf_vsi *vsi = &adapter->vsi;
829 int i;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 if (ec->rx_coalesce_usecs == 0) {826 if (ec->rx_coalesce_usecs == 0) {
835 if (ec->use_adaptive_rx_coalesce)827 if (ec->use_adaptive_rx_coalesce)
836 netif_info(adapter, drv, netdev, "rx-usecs=0, need to disable adaptive-rx for a complete disable\n");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
1970static const struct ethtool_ops iavf_ethtool_ops = {1962static const struct ethtool_ops iavf_ethtool_ops = {
1971 .supported_coalesce_params = ETHTOOL_COALESCE_USECS |1963 .supported_coalesce_params = ETHTOOL_COALESCE_USECS |
1972 ETHTOOL_COALESCE_MAX_FRAMES |
1973 ETHTOOL_COALESCE_MAX_FRAMES_IRQ |
1974 ETHTOOL_COALESCE_USE_ADAPTIVE,1964 ETHTOOL_COALESCE_USE_ADAPTIVE,
1975 .get_drvinfo = iavf_get_drvinfo,1965 .get_drvinfo = iavf_get_drvinfo,
1976 .get_link = ethtool_op_get_link,1966 .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
2240 2240
2241 adapter->vsi.back = adapter;2241 adapter->vsi.back = adapter;
2242 adapter->vsi.base_vector = 1;2242 adapter->vsi.base_vector = 1;
2243 adapter->vsi.work_limit = IAVF_DEFAULT_IRQ_WORK;
2244 vsi->netdev = adapter->netdev;2243 vsi->netdev = adapter->netdev;
2245 vsi->qs_handle = adapter->vsi_res->qset_handle;2244 vsi->qs_handle = adapter->vsi_res->qset_handle;
2246 if (adapter->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RSS_PF) {2245 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
194 struct iavf_tx_buffer *tx_buf;194 struct iavf_tx_buffer *tx_buf;
195 struct iavf_tx_desc *tx_desc;195 struct iavf_tx_desc *tx_desc;
196 unsigned int total_bytes = 0, total_packets = 0;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 tx_buf = &tx_ring->tx_bi[i];199 tx_buf = &tx_ring->tx_bi[i];
200 tx_desc = IAVF_TX_DESC(tx_ring, i);200 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