iavf: Disallow changing rx/tx-frames and rx/tx-frames-irq
Subsystems (2)
PATCH 1/1 iavf: Disallow changing rx/tx-frames and rx/tx-frames-irq
Remove support for rx/tx-frames and rx/tx-frames-irq as it is introducing counterintuitive settings and is not stated in any requirement.
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 possiblity 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.
--- drivers/net/ethernet/intel/iavf/iavf.h | 1 - drivers/net/ethernet/intel/iavf/iavf_ethtool.c | 10 ---------- drivers/net/ethernet/intel/iavf/iavf_main.c | 1 - drivers/net/ethernet/intel/iavf/iavf_txrx.c | 2 +- 4 files changed, 1 insertion(+), 13 deletions(-)
drivers/net/ethernet/intel/iavf/iavf.h +0 -1
@@ -64,7 +64,6 @@ struct iavf_vsi {u16 id;DECLARE_BITMAP (state, __IAVF_VSI_STATE_SIZE__);int base_vector; -u16 work_limit;u16 qs_handle;void *priv;/* client driver data reference. */ };
drivers/net/ethernet/intel/iavf/iavf_ethtool.c +0 -10
@@ -692,12 +692,8 @@ static int __iavf_get_coalesce(struct net_device *netdev, struct ethtool_coalesce *ec, int queue) {struct iavf_adapter *adapter =netdev_priv (netdev); -struct iavf_vsi *vsi = &adapter->vsi;struct iavf_ring *rx_ring, *tx_ring; - ec->tx_max_coalesced_frames = vsi->work_limit; - ec->rx_max_coalesced_frames = vsi->work_limit; -/* Rx and Tx usecs per queue value. If user doesn't specify the * queue, return queue 0's value to represent. */
@@ -825,12 +821,8 @@ static int __iavf_set_coalesce(struct net_device *netdev, struct ethtool_coalesce *ec, int queue) {struct iavf_adapter *adapter =netdev_priv (netdev); -struct iavf_vsi *vsi = &adapter->vsi;int i; -if (ec->tx_max_coalesced_frames_irq || ec->rx_max_coalesced_frames_irq) - vsi->work_limit = ec->tx_max_coalesced_frames_irq; -if (ec->rx_coalesce_usecs ==0 ) {if (ec->use_adaptive_rx_coalesce)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,static const struct ethtool_ops iavf_ethtool_ops = { .supported_coalesce_params =ETHTOOL_COALESCE_USECS | -ETHTOOL_COALESCE_MAX_FRAMES | -ETHTOOL_COALESCE_MAX_FRAMES_IRQ |ETHTOOL_COALESCE_USE_ADAPTIVE , .get_drvinfo = iavf_get_drvinfo, .get_link = ethtool_op_get_link,
drivers/net/ethernet/intel/iavf/iavf_main.c +0 -1
@@ -2327,7 +2327,6 @@ int iavf_parse_vf_resource_msg(struct iavf_adapter *adapter) adapter->vsi.back = adapter; adapter->vsi.base_vector =1 ; - adapter->vsi.work_limit =IAVF_DEFAULT_IRQ_WORK ; vsi->netdev = adapter->netdev; vsi->qs_handle = adapter->vsi_res->qset_handle;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,struct iavf_tx_buffer *tx_buf;struct iavf_tx_desc *tx_desc;unsigned int total_bytes =0 , total_packets =0 ; -unsigned int budget = vsi->work_limit; +unsigned int budget =IAVF_DEFAULT_IRQ_WORK ; tx_buf = &tx_ring->tx_bi[i]; tx_desc =IAVF_TX_DESC (tx_ring, i);
Signature · 6 lines
2.35.3 _______________________________________________ Intel-wired-lan mailing list [email protected] https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Tony Nguyen
maintainerQuoted 11 lines · Jun Zhang
Remove support for rx/tx-frames and rx/tx-frames-irq as it is introducing counterintuitive settings and is not stated in any requirement.
Remove fromsupported_coalesce_paramsETHTOOL_COALESCE_MAX_FRAMESandETHTOOL_COALESCE_MAX_FRAMES_IRQ. As tx-frames-irq allowed user to change budget foriavf_clean_tx_irq, removework_limitand use define for budget.
Without this patch there would be possiblity 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.
Quoted 2 lines
Quoted 1 line
Signed-off-by Przemyslaw Patynowski <[email protected]>Signed-off-by Jun Zhang <[email protected]>
Same question/comment on this and for your other patch [1]. Please either fix ordering or change author based on which situation is happening.
[1] https://lore.kernel.org/intel-wired-lan/[email protected]/T/#u
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan