Skip to content

Instantly share code, notes, and snippets.

@softhedev
softhedev / setup_sriov_vfs.sh
Created July 11, 2025 19:43
SR-IOV VF Setup Script: Automates creation of Virtual Functions (VFs) on specified NICs, assigns VLANs, and pins IRQs to CPU cores for performance tuning. Designed for high-throughput, NUMA-aware environments
#!/bin/bash
#
# ─────────────────────────────────────────────────────────────────────────────
# Script Name : setup_sriov_vfs.sh
# Description : Automates the configuration of SR-IOV Virtual Functions (VFs)
# on specified Physical Functions (PFs), assigns VLAN IDs, and
# pins IRQs to specific CPUs for optimal NUMA locality and
# performance tuning. Also disables reverse path filtering (rp_filter)
# to ensure proper network behavior in advanced routing scenarios.
#