Commit fddf6344 authored by Hejing Li's avatar Hejing Li
Browse files

example script checkpoint

parent f115d2ac
...@@ -34,22 +34,22 @@ nic1 = system.IntelI40eNIC(sys) ...@@ -34,22 +34,22 @@ nic1 = system.IntelI40eNIC(sys)
nic1.add_ipv4('10.0.0.2') nic1.add_ipv4('10.0.0.2')
pcichannel1 = system.PCIeChannel(pcie1, nic1.pci_if) pcichannel1 = system.PCIeChannel(pcie1, nic1.pci_if)
''' # create switch and its ports
port0 = spec.NetDev() switch = system.EthSwitch(sys)
port1 = spec.NetDev() netif0 = system.EthInterface(switch)
switch = spec.Switch(system) switch.if_add(netif0)
switch.install_netdev(port0) netif1 = system.EthInterface(switch)
switch.install_netdev(port1) switch.if_add(netif1)
ethchannel0 = spec.Eth(system) # create channels and connect the switch to the host nics
ethchannel0.install(nic0, port0) ethchannel0 = system.EthChannel(switch.eth_ifs[0], nic0.eth_if)
ethchannel1 = spec.Eth(system) ethchannel1 = system.EthChannel(switch.eth_ifs[1], nic1.eth_if)
ethchannel1.install(nic1, port1)
# configure the software to run on the host # configure the software to run on the host
host0.app = spec.NetperfClient('10.0.0.2') host0.add_app(system.NetperfClient(host0, nic1.ip))
host1.app = spec.NetperfServer() host1.add_app(system.NetperfServer(host1))
'''
""" """
Execution Config Execution Config
""" """
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment