Skip to content

Commit

Permalink
Merge PR #942 (intel1g env var canon) into kbara-next
Browse files Browse the repository at this point in the history
  • Loading branch information
Katerina Barone-Adesi committed Jul 1, 2016
2 parents d54fd69 + 4dec991 commit ffaa105
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/apps/intel/intel1g.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
-- Note: section and page numbers in the comments below refer to the i210 data sheet

-- run selftest() on APU2's second/middle NIC:
-- sudo SNABB_SELFTEST_INTEL1G_0="0000:02:00.0" ./snabb snsh -t apps.intel.intel1g
-- sudo SNABB_PCI_INTEL1G0="0000:02:00.0" ./snabb snsh -t apps.intel.intel1g

-- Note: rxqueue >0 not working yet!

Expand Down Expand Up @@ -107,7 +107,7 @@ function Intel1g:new(conf)
-- Setup device access
pci.unbind_device_from_linux(pciaddress)
pci.set_bus_master(pciaddress, true)
local regs, mmiofd = pci.map_pci_memory(pciaddress, 0)
local regs, mmiofd = pci.map_pci_memory_locked(pciaddress, 0)

-- Common utilities, see snabb/src/lib/hardware/register.lua
local function bitvalue (value)
Expand Down Expand Up @@ -632,9 +632,9 @@ end -- function Intel1g:new()

function selftest ()
print("selftest: Intel1g")
local pciaddr = os.getenv("SNABB_SELFTEST_INTEL1G_0")
local pciaddr = os.getenv("SNABB_PCI_INTEL1G0")
if not pciaddr then
print("SNABB_SELFTEST_INTEL1G_0 not set")
print("SNABB_PCI_INTEL1G0 not set")
os.exit(engine.test_skipped_code)
end

Expand Down
3 changes: 3 additions & 0 deletions src/doc/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ the tests:
`SNABB_PCI1` in Intel specific tests. Some Intel specific tests (namely
packetblaster based benchmarks) will be skipped if these are not set.

* `SNABB_PCI_INTEL1G0`, `SNABB_PCI_INTEL1G1`—Optional PCI addresses for use in
Intel1G selftest.

* `SNABB_PCI_SOLARFLARE0`, `SNABB_PCI_SOLARFLARE1`—Optional PCI addresses
of two wired Solarflare NICs. These are preferred over `SNABB_PCI0` and
`SNABB_PCI1` in Solarflare specific tests.
Expand Down
2 changes: 2 additions & 0 deletions src/scripts/dock.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ docker run --rm --privileged -i -v $(dirname $PWD):/snabb $DOCKERFLAGS \
-e SNABB_PCI1=$SNABB_PCI1 \
-e SNABB_PCI_INTEL0=$SNABB_PCI_INTEL0 \
-e SNABB_PCI_INTEL1=$SNABB_PCI_INTEL1 \
-e SNABB_PCI_INTEL1G0=$SNABB_PCI_INTEL1G0 \
-e SNABB_PCI_INTEL1G1=$SNABB_PCI_INTEL1G1 \
-e SNABB_PCI_SOLARFLARE0=$SNABB_PCI_SOLARFLARE0 \
-e SNABB_PCI_SOLARFLARE1=$SNABB_PCI_SOLARFLARE1 \
-e SNABB_TELNET0=$SNABB_TELNET0 \
Expand Down

0 comments on commit ffaa105

Please sign in to comment.