#!/bin/sh
# DF-4259 — on a machine with a Myson NIC under load:
#   flood the interface while cycling it down/up; the freed RX clusters can
#   be DMA'd into after reuse -> corruption/panic with packet bytes.
ping -f -i 0.001 <gateway> &       # traffic in flight
p=$!
i=0
while [ $i -lt 200 ]; do
	ifconfig my0 down
	# tiny window: engines running down while buffers are freed
	ifconfig my0 up
	i=$((i+1))
done
kill $p 2>/dev/null
dmesg | tail -30
echo "expected on affected hw under timing pressure: panic with ethernet "
echo "payload bytes at the fault address, or silent memory corruption"
