#!/bin/sh # ------------------------------------------------------------- # Mellanox NIC firmware performance tuning for AMD platforms. # # Iterates over all detected Mellanox network devices # and applies selected optimizations. # # Run this once after installing new NIC. # Requires system reboot. # ------------------------------------------------------------- # Enable aggressive CQE Zipping. cqe_compression=1 # Enable relaxed ordering for PCI operations. pci_wr_ordering=1 # Disable DevX. uctx_en=0 devs=$(ls -d /sys/class/net/*/device/infiniband_verbs/uverbs* | cut -d / -f 5) for dev in $devs; do pci_addr=$(grep PCI_SLOT_NAME /sys/class/net/$dev/device/uevent | tail -c +15) echo Device: $dev $pci_addr mstconfig -y -d $pci_addr s \ CQE_COMPRESSION=$cqe_compression \ PCI_WR_ORDERING=$pci_wr_ordering \ UCTX_EN=$uctx_en done