Skip to contentSkip to conversation

mlxsw: pci: Adjust value of CPU egress traffic class

PATCH Applied Jiri Pirko 2 participants 2 messages Jan 5, 2016 – Jan 6, 2016

Subsystems (3)
lore
Share & tools
lore

Jiri Pirko

author
#0 lore raw

PATCH 1/1 mlxsw: pci: Adjust value of CPU egress traffic class

From: Ido Schimmel <[email protected]>

During initialization, when creating the send descriptor queues (SDQs), we specify the CPU egress traffic class of each SDQ. The maximum number of classes of this type is different in the two ASICs supported by this PCI driver.

New firmware versions check this value is set correctly, which causes errors on the Spectrum ASIC, as its max exposed egress traffic class is lower than 7.

Solve this by setting this field to 3, which is an acceptable value for both ASICs.

Note that we currently do not expose the QoS capabilities of the ASICs, so setting this to an hardcoded value is OK for now.

---
 drivers/net/ethernet/mellanox/mlxsw/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlxsw/pci.c +1 -1
index d2102e5..c071077 100644
@@ -384,7 +384,7 @@ static int mlxsw_pci_sdq_init(struct mlxsw_pci *mlxsw_pci, char *mbox,
 
 	/* Set CQ of same number of this SDQ. */
 	mlxsw_cmd_mbox_sw2hw_dq_cq_set(mbox, q->num);
-	mlxsw_cmd_mbox_sw2hw_dq_sdq_tclass_set(mbox, 7);
+	mlxsw_cmd_mbox_sw2hw_dq_sdq_tclass_set(mbox, 3);
 	mlxsw_cmd_mbox_sw2hw_dq_log2_dq_sz_set(mbox, 3); /* 8 pages */
 	for (i = 0; i < MLXSW_PCI_AQ_PAGES; i++) {
 		dma_addr_t mapaddr = __mlxsw_pci_queue_page_get(q, i);
Signature · 1 line
1.9.3
maintainer Applied
#1 lore raw

From: Jiri Pirko <[email protected]>
Date: Tue, 5 Jan 2016 11:36:40 +0100

Quoted 11 lines

From: Ido Schimmel <[email protected]>

During initialization, when creating the send descriptor queues (SDQs), we specify the CPU egress traffic class of each SDQ. The maximum number of classes of this type is different in the two ASICs supported by this PCI driver.

New firmware versions check this value is set correctly, which causes errors on the Spectrum ASIC, as its max exposed egress traffic class is lower than 7.

Quoted 8 lines

Solve this by setting this field to 3, which is an acceptable value for both ASICs.

Note that we currently do not expose the QoS capabilities of the ASICs, so setting this to an hardcoded value is OK for now.

Applied, thanks Jiri.