on ubuntu16,
Followed those steps and I made docker image: stratumproject/tofino-model:9.3.1
Then, run command:
cxc@u16-108:~$ docker run --rm -it --privileged --network=host stratumproject/tofino-model:9.3.1
No of Veths is 64
Adding CPU veth
vm.nr_hugepages = 128
PRIVS: Eff=0x00000000 Perm=0x00002006 Inh=0x00000000
Performing preliminary checks on config file
Opening p4 target config file '/usr/share/stratum/tofino_skip_p4.conf' ...
Loaded p4 target config file
Package size 1
No of Chips is 1
No of Packages is 1
Chip 0 SKU: defaulting to BFN77110
Chip 0 SKU setting: sku 0 pipe mode 0
Chip 0 Physical pipes enabled bitmap 0xf
Adding interface veth0 as port 0
Adding interface veth2 as port 1
Adding interface veth4 as port 2
Adding interface veth6 as port 3
Adding interface veth8 as port 4
Adding interface veth10 as port 5
Adding interface veth12 as port 6
Adding interface veth14 as port 7
Adding interface veth16 as port 8
Adding interface veth18 as port 9
Adding interface veth20 as port 10
Adding interface veth22 as port 11
Adding interface veth24 as port 12
Adding interface veth26 as port 13
Adding interface veth28 as port 14
Adding interface veth30 as port 15
Adding interface veth32 as port 16
Adding interface veth250 as port 64
Simulation target: Asic Model
Using TCP port range: 8001-8004
Listen socket created
bind done on port 8001. Listening..
CLI listening on port 8000
Waiting for incoming connections...
Afterwards, I ran it in another terminal window, but encountered a problem:
cxc@u16-108:~$ PLATFORM=barefoot-tofino-model /home/cxc/
start_stratum.9.2.0.sh -bf_switchd_background=false --chassis_config_file=/etc/stratum/barefoot-tofino-model/chassis_config.pb.txt -enable_onlp=false
+ [[ -z barefoot-tofino-model ]]
+ [[ -z barefoot-tofino-model ]]
+ '[' -d /etc/onl ']'
+ '[' -n '' ']'
+ '[' -n '' ']'
+ LOG_DIR=/var/log
+ SDE_VERSION=9.2.0
++ uname -r
+ KERNEL_VERSION=4.15.0-142-generic
+ DOCKER_IMAGE=stratumproject/stratum-bf
+ DOCKER_IMAGE_TAG=bf-sde-9.2.0.tar-linux-4.14.151-OpenNetworkLinux
++ uname -r
++ uname -r
+ docker run -it --rm --privileged -v /dev:/dev -v /sys:/sys -v /lib/modules/4.15.0-142-generic:/lib/modules/4.15.0-142-generic --env PLATFORM=barefoot-tofino-model -p 28000:28000 -p 9339:9339 -p 9559:9559 -v /var/log:/var/log/stratum stratumproject/stratum-bf:bf-sde-9.2.0.tar-linux-4.14.151-OpenNetworkLinux -bf_switchd_background=false --chassis_config_file=/etc/stratum/barefoot-tofino-model/chassis_config.pb.txt -enable_onlp=false
Cannot find port map file /etc/stratum/barefoot-tofino-model/port_map.jsonCan you give me an example of a port-map.json that can be used for tofino-model?