diff --git a/src/apps/intel_mp/intel_mp.lua b/src/apps/intel_mp/intel_mp.lua index 1c4e4de4d4..23f3d896d5 100644 --- a/src/apps/intel_mp/intel_mp.lua +++ b/src/apps/intel_mp/intel_mp.lua @@ -276,6 +276,7 @@ PQMPRC 0x10038 +0x100*0..7 RCR Per Queue Multicast Packets Received singleton = [[ EEMNGCTL 0x01010 - RW Manageability EEPROM-Mode Control Register EEC 0x00010 - RW EEPROM-Mode Control Register +FACTPS 0x05B30 - Function Active and Power State to MNG ]] } @@ -603,6 +604,7 @@ function Intel:load_registers(key) end function Intel:load_queue_registers(key) local v = reg[key] + if v.inherit then self:load_queue_registers(v.inherit) end if v.txq and self.txq then register.define(v.txq, self.r, self.base, self.txq) end @@ -1088,7 +1090,9 @@ function Intel1g:init_phy () self.r.SW_FW_SYNC:clr(bits { SW_PHY_SM = 1 }) self:unlock_fw_sem() - self.r.EEMNGCTL:wait(bits { CFG_DONE0 = 18 }) + -- Determine PCI function to physical port mapping + local lan_id = self.r.STATUS:bits(2,2) + self.r.EEMNGCTL:wait(bits { CFG_DONE = 18 + lan_id }) --[[ self:lock_fw_sem() diff --git a/src/apps/ipv4/reassemble.lua b/src/apps/ipv4/reassemble.lua index a98187dafc..16c588b044 100644 --- a/src/apps/ipv4/reassemble.lua +++ b/src/apps/ipv4/reassemble.lua @@ -430,7 +430,7 @@ function selftest() "pkt["..i.."] expected "..expected..", got "..actual) end packet.free(result) - link.free(reassembler.input.output, 'reassembly input') + link.free(reassembler.input.input, 'reassembly input') link.free(reassembler.output.output, 'reassembly output') shm.delete_frame(reassembler.shm) end diff --git a/src/apps/ipv6/reassemble.lua b/src/apps/ipv6/reassemble.lua index 5f5b037f6f..3d86fd9146 100644 --- a/src/apps/ipv6/reassemble.lua +++ b/src/apps/ipv6/reassemble.lua @@ -429,7 +429,7 @@ function selftest() "pkt["..i.."] expected "..expected..", got "..actual) end packet.free(result) - link.free(reassembler.input.output, 'reassembly input') + link.free(reassembler.input.input, 'reassembly input') link.free(reassembler.output.output, 'reassembly output') shm.delete_frame(reassembler.shm) end diff --git a/src/doc/branches.md b/src/doc/branches.md index 8aa22a89a2..cbe3329711 100644 --- a/src/doc/branches.md +++ b/src/doc/branches.md @@ -32,14 +32,14 @@ The current state of each branch with respect to master is visible here: #### fixes - BRANCH: fixes git://github.com/lukego/snabbswitch + BRANCH: fixes git://github.com/snabbco/snabb Test and integration branch for bug fixes. - Contains the changes for the next weekly maintenance release. - Merges Pull Requests that fix bugs in the latest release. - Generally stable. - Maintainer: Luke Gorrie + Maintainer: Max Rottenkolber #### kbara-next diff --git a/src/lib/hardware/register.lua b/src/lib/hardware/register.lua index cc04cc629b..19a2b3b73c 100644 --- a/src/lib/hardware/register.lua +++ b/src/lib/hardware/register.lua @@ -120,8 +120,8 @@ end --- Metatables for the three different types of register local mt = { RO = {__index = { read=Register.read, wait=Register.wait, - reset=Register.noop, print=Register.print}, - bits=ro_bits, byte=ro_byte, + reset=Register.noop, print=Register.print, + bits=ro_bits, byte=ro_byte}, __call = Register.read, __tostring = Register.__tostring}, RW = {__index = { read=Register.read, write=Register.write, wait=Register.wait, set=Register.set, clr=Register.clr, reset=Register.noop, diff --git a/src/program/lwaftr/run/run.lua b/src/program/lwaftr/run/run.lua index 5b53e78aa4..3f09c45505 100644 --- a/src/program/lwaftr/run/run.lua +++ b/src/program/lwaftr/run/run.lua @@ -119,13 +119,10 @@ function parse_args(args) if opts.mirror then assert(opts["on-a-stick"], "Mirror option is only valid in on-a-stick mode") end - if opts["on-a-stick"] then - scheduling.pci_addrs = { v4 } - return opts, scheduling, conf_file, v4 - else - scheduling.pci_addrs = { v4, v6 } - return opts, scheduling, conf_file, v4, v6 + if opts["on-a-stick"] and v6 then + fatal("Options --on-a-stick and --v6 are mutually exclusive.") end + return opts, scheduling, conf_file, v4, v6 end -- Requires a V4V6 splitter if running in on-a-stick mode and VLAN tag values diff --git a/src/program/lwaftr/tests/propbased/genyang.lua b/src/program/lwaftr/tests/propbased/genyang.lua index 2cf1dd710d..a2adb27789 100644 --- a/src/program/lwaftr/tests/propbased/genyang.lua +++ b/src/program/lwaftr/tests/propbased/genyang.lua @@ -36,26 +36,11 @@ function generate_any(pid, schema) -- leaf-list cases (for remove, we need a case with a selector too) -- Note: this assumes a list or leaf-list case exists in the schema at all elseif cmd == "add" then - local query, val, schema - local ok = false - while not ok do - query, val, schema = generate_config_xpath_and_val(schema) - if string.match(tostring(val), "^{.*}$") then - ok = true - end - end - --local query, val, schema = generate_config_xpath_and_val(schema) + local query, val, schema = generate_config_xpath_and_val(schema) return string.format("./snabb config add -s %s %s \"%s\" \"%s\"", schema, pid, query, val) else - local query, val, schema - local ok = false - while not ok do - query, val, schema = generate_config_xpath_and_val(schema) - if string.match(query, "[]]$") then - ok = true - end - end + local query, val, schema = generate_config_xpath_and_val(schema) return string.format("./snabb config remove -s %s %s \"%s\"", schema, pid, query) end @@ -297,6 +282,7 @@ local function generate_xpath_and_node_info(schema, for_state) if handler then handler(node) end end local function visit_body(node) + if not node then return end local ids = {} for id, node in pairs(node.body) do -- only choose nodes that are used in configs unless diff --git a/src/program/lwaftr/tests/subcommands/run_test.py b/src/program/lwaftr/tests/subcommands/run_test.py index 5719051e72..bcc39ea9c6 100644 --- a/src/program/lwaftr/tests/subcommands/run_test.py +++ b/src/program/lwaftr/tests/subcommands/run_test.py @@ -22,9 +22,8 @@ class TestRun(BaseTestCase): ) def test_run(self): - output = self.run_cmd(self.cmd_args) - self.assertIn(b'link report', output, - b'\n'.join((b'OUTPUT', output))) + output = self.run_cmd(self.cmd_args).decode(ENC) + self.assertIn("Migrating instance", output) def test_run_on_a_stick_migration(self): # The LwAFTR should be abel to migrate from non-on-a-stick -> on-a-stick