Skip to content

Commit

Permalink
Merge PR #1285 (v2018.01.1 bugfix release) into master
Browse files Browse the repository at this point in the history
  • Loading branch information
eugeneia committed Feb 13, 2018
2 parents 2ad3ed2 + b5f3f1f commit 2ba2df0
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 33 deletions.
6 changes: 5 additions & 1 deletion src/apps/intel_mp/intel_mp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
]]
}

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/apps/ipv4/reassemble.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/apps/ipv6/reassemble.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/doc/branches.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <luke@snabb.co>
Maintainer: Max Rottenkolber <max@mr.gy>

#### kbara-next

Expand Down
4 changes: 2 additions & 2 deletions src/lib/hardware/register.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
9 changes: 3 additions & 6 deletions src/program/lwaftr/run/run.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 3 additions & 17 deletions src/program/lwaftr/tests/propbased/genyang.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions src/program/lwaftr/tests/subcommands/run_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2ba2df0

Please sign in to comment.