Commit 6d3f753c authored by Jiawen Wu's avatar Jiawen Wu Committed by Jakub Kicinski
Browse files

net: ngbe: change the default ITR setting



Change the default RX/TX ITR for wx_mac_em devices from 20K to 7K, which
is an experience value from out-of-tree ngbe driver, to get higher
performance on some platforms with weak single-core performance.

TCP_SRTEAM test on Phytium 2000+ shows that the throughput of 64-Byte
packets is increased from 350.53Mbits/s to 395.92Mbits/s.

Signed-off-by: default avatarJiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: default avatarMichal Swiatkowski <michal.swiatkowski@linux.intel.com>
Link: https://patch.msgid.link/20250821023408.53472-2-jiawenwu@trustnetic.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 2fa1369d
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -359,10 +359,14 @@ int wx_set_coalesce(struct net_device *netdev,
	else
		wx->rx_itr_setting = ec->rx_coalesce_usecs;

	if (wx->rx_itr_setting == 1)
		rx_itr_param = WX_20K_ITR;
	if (wx->rx_itr_setting == 1) {
		if (wx->mac.type == wx_mac_em)
			rx_itr_param = WX_7K_ITR;
		else
			rx_itr_param = WX_20K_ITR;
	} else {
		rx_itr_param = wx->rx_itr_setting;
	}

	if (ec->tx_coalesce_usecs > 1)
		wx->tx_itr_setting = ec->tx_coalesce_usecs << 2;
@@ -377,7 +381,7 @@ int wx_set_coalesce(struct net_device *netdev,
			tx_itr_param = WX_12K_ITR;
			break;
		default:
			tx_itr_param = WX_20K_ITR;
			tx_itr_param = WX_7K_ITR;
			break;
		}
	} else {
+2 −3
Original line number Diff line number Diff line
@@ -119,9 +119,8 @@ static int ngbe_sw_init(struct wx *wx)
						   num_online_cpus());
	wx->rss_enabled = true;

	/* enable itr by default in dynamic mode */
	wx->rx_itr_setting = 1;
	wx->tx_itr_setting = 1;
	wx->rx_itr_setting = WX_7K_ITR;
	wx->tx_itr_setting = WX_7K_ITR;

	/* set default ring sizes */
	wx->tx_ring_count = NGBE_DEFAULT_TXD;