snabb
snabb copied to clipboard
MAC address table overflow
Using the intel10g driver, it seems to be possible to get a MAC address table overflow error (core/main.lua:26: MAC address table overflow) if you ever use more than 128 MAC addresses. Even if they are not used simultaneously (e.g., you reconfigure the NIC app repeatedly without reseting the NIC).
Is this behavior ok, or should the driver disable unused MAC addresses after all apps using it are gone? (it does this for VLAN tags and I think it could do the same for MACs) I'm asking because I'm wondering what the behavior should be for intel_mp.
Here's an example script that demonstrates the issue (running it will fail the assertion):
#!../../snabb snsh
-- Test mac address allocation
local basic_apps = require("apps.basic.basic_apps")
local intel = require("apps.intel.intel_app")
local lib = require("core.lib")
local pciaddr0 = lib.getenv("SNABB_PCI_INTEL0")
-- 128 is one more than the 127 limit
for i=0, 128 do
local c = config.new()
config.app(c, "nic", intel.driver,
{ pciaddr = pciaddr0,
vmdq = true,
macaddr = "00:11:22:33:44:" .. string.format("%02x", i) })
config.app(c, "source", basic_apps.Source)
config.link(c, "source.out0 -> nic.input")
engine.configure(c)
engine.main({ duration = 0.01 })
end
Comparatively, it's fine to do the same thing with VLAN tags:
#!../../snabb snsh
local basic_apps = require("apps.basic.basic_apps")
local intel = require("apps.intel.intel_app")
local lib = require("core.lib")
local pciaddr0 = lib.getenv("SNABB_PCI_INTEL0")
-- 256 > 63 limit
for i=0, 256 do
local c = config.new()
config.app(c, "nic", intel.driver,
{ pciaddr = pciaddr0,
vmdq = true,
vlan = i })
config.app(c, "source", basic_apps.Source)
config.link(c, "source.out0 -> nic.input")
engine.configure(c)
engine.main({ duration = 0.01 })
end