[02/10] net/cnxk: set VF default root schedule weight

Message ID 20240517074448.3146611-2-ndabilpuram@marvell.com (mailing list archive)
State Changes Requested
Delegated to: Jerin Jacob
Headers
Series [01/10] common/cnxk: sync VF root weight with kernel |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Nithin Dabilpuram May 17, 2024, 7:44 a.m. UTC
  From: Satha Rao <skoteshwar@marvell.com>

To get better performance on LBK or VF interfaces, set the default
root schedule weight to known tested value.

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
---
 drivers/net/cnxk/cnxk_ethdev.c | 4 ++++
 1 file changed, 4 insertions(+)
  

Patch

diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c
index 95a3d8aaf9..1bccebad9f 100644
--- a/drivers/net/cnxk/cnxk_ethdev.c
+++ b/drivers/net/cnxk/cnxk_ethdev.c
@@ -7,6 +7,8 @@ 
 
 #define CNXK_NIX_CQ_INL_CLAMP_MAX (64UL * 1024UL)
 
+#define NIX_TM_DFLT_RR_WT 71
+
 static inline uint64_t
 nix_get_rx_offload_capa(struct cnxk_eth_dev *dev)
 {
@@ -1884,6 +1886,8 @@  cnxk_eth_dev_init(struct rte_eth_dev *eth_dev)
 	nix->pci_dev = pci_dev;
 	nix->hw_vlan_ins = true;
 	nix->port_id = eth_dev->data->port_id;
+	/* For better performance set default VF root schedule weight */
+	nix->root_sched_weight = NIX_TM_DFLT_RR_WT;
 	if (roc_feature_nix_has_own_meta_aura())
 		nix->local_meta_aura_ena = true;
 	rc = roc_nix_dev_init(nix);