Skip to content

Instantly share code, notes, and snippets.

View lavacano's full-sized avatar

Lavacano lavacano

View GitHub Profile
@lavacano
lavacano / sriov-watchdog.service
Created April 16, 2026 03:26
sriov-watchdog.sh systemd version
[Unit]
Description=SR-IOV VF Watchdog for BCM57810 SR-IOV VMs
After=pve-guests.service
[Service]
Type=oneshot
ExecStart=/usr/local/bin/sriov-watchdog.sh
# Prevent FD/env leaks to child processes
PrivateTmp=true
# Kill any leftover children when the script exits (belt + suspenders)
@lavacano
lavacano / sriov-watchdog.sh crontab version
Last active April 16, 2026 03:24
SR-IOV VF Watchdog for Proxmox VE (bnx2x)
#!/bin/bash
# ============================================================================
# SR-IOV VF Watchdog for Proxmox VE
# ============================================================================
# Monitors VMs using SR-IOV VFs from a BCM57810 PF for network degradation.
# When detected, gracefully stops affected VMs, resets SR-IOV VFs, and
# restarts them.
#
# Root cause: bnx2x VF PCIe link can degrade to Width x0, causing transmit
# timeouts, RCU stalls, and cascading failures inside the VM.
@lavacano
lavacano / 10-wancarp
Last active March 14, 2026 00:35 — forked from spali/10-wancarp
Disable WAN Interface on CARP Backup
#!/usr/local/bin/php
<?php
declare(strict_types=1);
/*
* OPNsense HA Failover Script - FINAL CORRECTED VERSION
* Makes targeted changes for WAN, Tunnels, and Services.
* Controls services that are not CARP-aware.
* Correctly handles default route on backup node.
@lavacano
lavacano / exefile.reg
Created October 24, 2023 20:46
Implement Quality of Service (QoS) for Eve Online (Expedited Forwarding DSCP)
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\QoS\exefile.exe]
"Application Name"="exefile.exe"
"DSCP Value"="46"
"Local IP Prefix Length"="*"
"Local IP"="*"
"Local Port"="*"
"Protocol"="*"
"Remote IP Prefix Length"="*"