knic is a small educational Linux virtual Ethernet driver. It creates a
paired knic0 and knic1; packets transmitted by one interface are delivered
to the other.
Current features:
- Multiple bounded RX queues
- Per-queue NAPI polling and GRO
- TX subqueue backpressure
- Synchronized network statistics
- Basic ethtool driver, channel, and statistics support
- Network namespace and lifecycle stress tests
Install the compiler, make, and headers for the running kernel, then run:
make
sudo insmod knic.koThe namespace test configures both interfaces and tests traffic in both directions:
./scripts/ns_test.shFor repeated traffic and module lifecycle testing:
./scripts/stress_lifecycle.shInspect the driver with:
ethtool -i knic0
ethtool -l knic0
ethtool -S knic0./scripts/cleanup.sh
make cleanThis driver is intended for learning and does not control real hardware.