xref: /illumos-gate/usr/src/uts/common/io/mlxcx/mlxcx.conf (revision 5014e1fa)
1ebb7c6fdSAlex Wilson#
2ebb7c6fdSAlex Wilson# This file and its contents are supplied under the terms of the
3ebb7c6fdSAlex Wilson# Common Development and Distribution License ("CDDL"), version 1.0.
4ebb7c6fdSAlex Wilson# You may only use this file in accordance with the terms of version
5ebb7c6fdSAlex Wilson# 1.0 of the CDDL.
6ebb7c6fdSAlex Wilson#
7ebb7c6fdSAlex Wilson# A full copy of the text of the CDDL should have accompanied this
8ebb7c6fdSAlex Wilson# source.  A copy of the CDDL is also available via the Internet at
9ebb7c6fdSAlex Wilson# http://www.illumos.org/license/CDDL.
10ebb7c6fdSAlex Wilson#
11ebb7c6fdSAlex Wilson
12ebb7c6fdSAlex Wilson#
13ebb7c6fdSAlex Wilson# Copyright 2018, Joyent, Inc.
14*5014e1faSAlex Wilson# Copyright 2023 The University of Queensland
1522d05228SPaul Winder# Copyright 2020 RackTop Systems, Inc.
16ebb7c6fdSAlex Wilson#
17ebb7c6fdSAlex Wilson
18ebb7c6fdSAlex Wilson#
19ebb7c6fdSAlex Wilson# Driver.conf file for Mellanox Connect-X 4/5/6.
20bbf21555SRichard Lowe# See mlxcx(4D) for valid options.
21ebb7c6fdSAlex Wilson#
22ebb7c6fdSAlex Wilson
23ebb7c6fdSAlex Wilson#
24ebb7c6fdSAlex Wilson# Sizing of event and completion queues.
25ebb7c6fdSAlex Wilson#
26ebb7c6fdSAlex Wilson# The number of entries on each queue will be (1 << *_size_shift) -- so
2722d05228SPaul Winder# a value of 10 would mean 1024 entries.
28ebb7c6fdSAlex Wilson#
29ebb7c6fdSAlex Wilson#eq_size_shift = 9;
3022d05228SPaul Winder
3122d05228SPaul Winder# The default for devices with a maximum supported speed up to 10Gb/s
32ebb7c6fdSAlex Wilson#cq_size_shift = 10;
3322d05228SPaul Winder#
3422d05228SPaul Winder# The default for devices with a maximum supported speed above 10Gb/s
3522d05228SPaul Winder#cq_size_shift = 12;
36ebb7c6fdSAlex Wilson
37ebb7c6fdSAlex Wilson#
38ebb7c6fdSAlex Wilson# Sizing of send and receive queues.
39ebb7c6fdSAlex Wilson#
40ebb7c6fdSAlex Wilson# Note that this determines the size of the RX and TX rings that mlxcx will
41ebb7c6fdSAlex Wilson# advertise to MAC. It also determines how many packet buffers we will allocate
42ebb7c6fdSAlex Wilson# when starting the interface.
43ebb7c6fdSAlex Wilson#
4422d05228SPaul Winder# The defaults for devices with a maximum supported speed up to 10Gb/s
45ebb7c6fdSAlex Wilson#sq_size_shift = 11;
46ebb7c6fdSAlex Wilson#rq_size_shift = 10;
4722d05228SPaul Winder#
4822d05228SPaul Winder# The defaults for devices with a maximum supported speed above 10Gb/s
4922d05228SPaul Winder#sq_size_shift = 13;
5022d05228SPaul Winder#rq_size_shift = 12;
51ebb7c6fdSAlex Wilson
52ebb7c6fdSAlex Wilson#
53ebb7c6fdSAlex Wilson# Number and configuration of TX groups and rings.
54ebb7c6fdSAlex Wilson#
55ebb7c6fdSAlex Wilson#tx_ngroups = 1;
56ebb7c6fdSAlex Wilson#tx_nrings_per_group = 64;
57ebb7c6fdSAlex Wilson
58ebb7c6fdSAlex Wilson#
59ebb7c6fdSAlex Wilson# Number and configuration of RX groups and rings.
60ebb7c6fdSAlex Wilson#
61ebb7c6fdSAlex Wilson#rx_ngroups_large = 2;
62ebb7c6fdSAlex Wilson#rx_nrings_per_large_group = 16;
63ebb7c6fdSAlex Wilson#rx_ngroups_small = 256;
64ebb7c6fdSAlex Wilson#rx_nrings_per_small_group = 4;
65ebb7c6fdSAlex Wilson
66ebb7c6fdSAlex Wilson#
67ebb7c6fdSAlex Wilson# Number of flow table entries allocated to root flow tables.
68ebb7c6fdSAlex Wilson#
69ebb7c6fdSAlex Wilson# This places an upper ceiling on how many MAC addresses can be filtered into
70ebb7c6fdSAlex Wilson# groups across the whole NIC. If you have a lot of VNICs you might want to
71ebb7c6fdSAlex Wilson# raise this (and probably also rx_ngroups_small).
72ebb7c6fdSAlex Wilson#
73ebb7c6fdSAlex Wilson#ftbl_root_size_shift = 12;
74ebb7c6fdSAlex Wilson
75ebb7c6fdSAlex Wilson#
76ebb7c6fdSAlex Wilson# Number of flow table entries allocated to each L1 VLAN filtering table.
77ebb7c6fdSAlex Wilson#
78ebb7c6fdSAlex Wilson# This places a limit on the number of VLANs that one MAC address can be
79ebb7c6fdSAlex Wilson# associated with before falling back to software classification. Two entries
80ebb7c6fdSAlex Wilson# are always reserved for the non-VLAN catch-all and promisc entries.
81ebb7c6fdSAlex Wilson#
82ebb7c6fdSAlex Wilson# Note: illumos MAC today only supports giving a single VLAN per MAC address
83ebb7c6fdSAlex Wilson# to hardware drivers anyway, so setting this higher is pointless until that
84ebb7c6fdSAlex Wilson# changes.
85ebb7c6fdSAlex Wilson#
86ebb7c6fdSAlex Wilson#ftbl_vlan_size_shift = 4;
87ebb7c6fdSAlex Wilson
88ebb7c6fdSAlex Wilson#
89ebb7c6fdSAlex Wilson# Interrupt and completion moderation.
90ebb7c6fdSAlex Wilson#
91ebb7c6fdSAlex Wilson#cqemod_period_usec = 50;
92ebb7c6fdSAlex Wilson#cqemod_count = <80% of cq_size>;
93ebb7c6fdSAlex Wilson#intrmod_period_usec = 10;
94ebb7c6fdSAlex Wilson
95ebb7c6fdSAlex Wilson#
96ebb7c6fdSAlex Wilson# Minimum packet size before we use a ddi_dma_bind_addr() rather than bcopy()
97ebb7c6fdSAlex Wilson# of the packet data. DMA binds are expensive and involve taking locks in the
98ebb7c6fdSAlex Wilson# PCI nexus driver, so it's seldom worth doing them for small packets.
99ebb7c6fdSAlex Wilson#
100ebb7c6fdSAlex Wilson#tx_bind_threshold = 2048;
101ebb7c6fdSAlex Wilson
102ebb7c6fdSAlex Wilson#
103ebb7c6fdSAlex Wilson# Interval between periodic double-checks of queue status against hardware
104ebb7c6fdSAlex Wilson# state. This is used to detect hardware stalls or errors, as well as guard
105ebb7c6fdSAlex Wilson# against driver bugs.
106ebb7c6fdSAlex Wilson#
107ebb7c6fdSAlex Wilson# If set to too high a frequency, checks may impact NIC performance. Can be
108ebb7c6fdSAlex Wilson# set to zero to disable periodic checking entirely.
109ebb7c6fdSAlex Wilson#
110ebb7c6fdSAlex Wilson#eq_check_interval_sec = 30;
111ebb7c6fdSAlex Wilson#cq_check_interval_sec = 300;
112ebb7c6fdSAlex Wilson#wq_check_interval_sec = 300;
11322d05228SPaul Winder
11422d05228SPaul Winder#
11522d05228SPaul Winder# To provide some level of moderation and aid latencies, after
11622d05228SPaul Winder# "rx_limit_per_completion" packets are received in a single completion
11722d05228SPaul Winder# event, the interrupt handler will pass the chain up the receive stack.
11822d05228SPaul Winder#
11922d05228SPaul Winder#rx_limit_per_completion = 256;
120*5014e1faSAlex Wilson
121*5014e1faSAlex Wilson#
122*5014e1faSAlex Wilson# Minimum size of packet buffers allowed to be loaned to MAC when the ring
123*5014e1faSAlex Wilson# has reached >=50% of its buffers already on loan. Packet buffers smaller than
124*5014e1faSAlex Wilson# this will be copied. At >= 75% of buffers on loan, all packets will be
125*5014e1faSAlex Wilson# copied instead of loaned.
126*5014e1faSAlex Wilson#
127*5014e1faSAlex Wilson# If your workload involves lots of very deep socket queues, you may find some
128*5014e1faSAlex Wilson# performance gains in adjusting this.
129*5014e1faSAlex Wilson#
130*5014e1faSAlex Wilson#rx_p50_loan_min_size = 256;
131