Skip to content

Commit

Permalink
Merge pull request #279 from eugeneia/nfv_config-fixes
Browse files Browse the repository at this point in the history
[lib.nfv.config] Minor and major (app network layout) fixes
  • Loading branch information
lukego committed Oct 9, 2014
2 parents 73b4cae + 12b2008 commit d22a510
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/lib/nfv/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ local PacketFilter = require("apps.packet_filter.packet_filter").PacketFilter
local RateLimiter = require("apps.rate_limiter.rate_limiter").RateLimiter
local nd_light = require("apps.ipv6.nd_light")
local L2TPv3 = require("apps.keyed_ipv6_tunnel.tunnel").SimpleKeyedTunnel
local ns_responder = require("apps.ipv6.ns_responder")
local ffi = require("ffi")
local C = ffi.C
local AF_INET6 = 10
Expand Down Expand Up @@ -53,15 +52,17 @@ function load (file, pciaddr, sockpath)
-- Setup IPv6 neighbor discovery/solicitation responder.
-- This will talk to our local gateway.
local ND = "ND_"..name
config.app(c, ND, nd_light, {local_mac = mac_address,
local_ip = t.tunnel.local_ip,
next_hop = t.tunnel.next_hop})
-- VM -> Tunnel -> Network
config.app(c, ND, nd_light,
{local_mac = mac_address,
local_ip = t.tunnel.local_ip,
next_hop = t.tunnel.next_hop})
-- VM -> Tunnel -> ND <-> Network
config.link(c, VM_tx.." -> "..Tunnel..".decapsulated")
-- Network -> ND -> Tunnel -> VM
config.link(c, Tunnel..".encapsulated -> "..ND..".north")
-- Network <-> ND -> Tunnel -> VM
config.link(c, ND..".north -> "..Tunnel..".encapsulated")
config.link(c, Tunnel..".decapsulated -> "..VM_rx)
VM_rx, VM_tx = ND..".south", Tunnel..".encapsulated"
VM_rx, VM_tx = ND..".south", ND..".south"
end
if policing and t.gbps then
local QoS = "QoS_"..name
Expand Down Expand Up @@ -110,5 +111,6 @@ function selftest ()
do
print("testing:", confpath)
apply(load(confpath, pcideva, "/dev/null"))
engine.main({duration = 0.25})
end
end

0 comments on commit d22a510

Please sign in to comment.