{"action":"opened","issue":{"url":"https://api.github.com/repos/Igalia/snabb/issues/489","repository_url":"https://api.github.com/repos/Igalia/snabb","labels_url":"https://api.github.com/repos/Igalia/snabb/issues/489/labels{/name}","comments_url":"https://api.github.com/repos/Igalia/snabb/issues/489/comments","events_url":"https://api.github.com/repos/Igalia/snabb/issues/489/events","html_url":"https://github.com/Igalia/snabb/issues/489","id":183280334,"number":489,"title":"snabbvmx ignores vlan settings in .conf file","user":{"login":"mwiget","id":3111088,"avatar_url":"https://avatars.githubusercontent.com/u/3111088?v=3","gravatar_id":"","url":"https://api.github.com/users/mwiget","html_url":"https://github.com/mwiget","followers_url":"https://api.github.com/users/mwiget/followers","following_url":"https://api.github.com/users/mwiget/following{/other_user}","gists_url":"https://api.github.com/users/mwiget/gists{/gist_id}","starred_url":"https://api.github.com/users/mwiget/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwiget/subscriptions","organizations_url":"https://api.github.com/users/mwiget/orgs","repos_url":"https://api.github.com/users/mwiget/repos","events_url":"https://api.github.com/users/mwiget/events{/privacy}","received_events_url":"https://api.github.com/users/mwiget/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-16T17:54:46Z","updated_at":"2016-10-16T17:54:46Z","closed_at":null,"body":"Trying to get vlan support in snabbvmx working, based on the test case example https://github.com/Igalia/snabb/tree/lwaftr/src/program/snabbvmx/tests/end-to-end/data/vlan\r\n\r\nUsing the following config files:\r\n\r\nsnabbvmx-lwaftr-xe1.cfg:\r\n```\r\nreturn {\r\n  lwaftr = \"snabbvmx-lwaftr-xe1.conf\",\r\n  settings = {\r\n    ingress_drop_action = \"flush\",\r\n  },\r\n  ipv6_interface = {\r\n    ipv6_address = \"\",\r\n    cache_refresh_interval = 1,\r\n  },\r\n  ipv4_interface = {\r\n    ipv4_address = \"172.20.2.16\",\r\n    cache_refresh_interval = 1,\r\n  },\r\n}\r\n```\r\n\r\nsnabbvmx-lwaftr-xe1.conf:\r\n```\r\nhairpinning = false,\r\nbinding_table = binding_table_60k.txt.s,\r\naftr_ipv6_ip = 2001:db8::1,\r\naftr_ipv4_ip = 172.20.2.16,\r\naftr_mac_inet_side = 02:b0:53:89:04:00,\r\ninet_mac = 02:02:02:02:02:02,\r\naftr_mac_b4_side = 02:b0:53:89:04:00,\r\nnext_hop6_mac = 02:02:02:02:02:02,\r\nipv4_mtu = 9000,\r\nipv6_mtu = 9000,\r\nvlan_tagging = true,\r\nv4_vlan_tag = 100,\r\nv6_vlan_tag = 100,\r\n```\r\n\r\n\r\n\r\nRunning lwaftr standalone works as expected:\r\n\r\n```\r\n$ cat test_snabb_lwaftr_xe1.sh\r\n#!/bin/bash\r\necho \"launching snabb lwaftr on-a-stick on PCI 0000:04:00.0\"\r\nsudo usr/local/bin/snabb lwaftr run --conf snabbvmx-lwaftr-xe1.conf --on-a-stick 0000:04:00.0\r\nmwiget@xeon:~/vmxlwaftr/tests/vlan-test$ ./test_snabb_lwaftr_xe1.sh\r\nlaunching snabb lwaftr on-a-stick on PCI 0000:04:00.0\r\nloading compiled binding table from ./binding_table_60k.txt.s.o\r\ncompiled binding table ./binding_table_60k.txt.s.o is up to date.\r\n```\r\n\r\nTo generate vlan traffic, I've used this:\r\n\r\n```\r\nsnabb packetblaster lwaftr --src_mac 02:02:02:02:02:02 --dst_mac 02:b0:53:89:04:00 --b4 2001:db8::40,10.10.0.0,1024 --aftr 2001:db8:ffff::100 --count 60000 --rate 3.1 --pci 0000:04:00.1 --vlan 100\r\npacketblaster lwaftr: Sending 60000 clients at 3.100 MPPS to 0000:04:00.1\r\n\r\nIPv6: 2001:db8::40 > 2001:db8:ffff::100: 10.10.0.0:1024 > 8.8.8.8:12345\r\n      source IPv6 and source IPv4/Port adjusted per client\r\nIPv6 packet sizes: 104,104,104,104,104,104,104,634,634,634,1540\r\n\r\nIPv4: 8.8.8.8:12345 > 10.10.0.0:1024\r\n      destination IPv4 and Port adjusted per client\r\nIPv4 packet sizes: 64,64,64,64,64,64,64,594,594,594,1500\r\nvlan set to 100\r\nv6+v4: 0.000+1.766 = 1.766490 MPPS, 0.000+5.330 = 5.329517 Gbps, lost 41.569%\r\nv6+v4: 0.000+3.099 = 3.098588 MPPS, 0.000+9.348 = 9.347615 Gbps, lost 0.008%\r\nv6+v4: 0.000+3.099 = 3.098671 MPPS, 0.000+9.348 = 9.347739 Gbps, lost 0.007%\r\n```\r\n\r\nBut when running snabbvmx, no traffic is processed:\r\n\r\n```\r\n$ cat test_snabb_lwaftr_xe1.sh\r\n#!/bin/bash\r\necho \"launching snabb lwaftr on-a-stick on PCI 0000:04:00.0\"\r\nsudo usr/local/bin/snabb lwaftr run --conf snabbvmx-lwaftr-xe1.conf --on-a-stick 0000:04:00.0\r\n\r\n$ ./test_snabb_snabbvmx_xe1.sh\r\nlaunching snabb snabbvmx on-a-stick on PCI 0000:04:00.0\r\nRing buffer size set to 2048\r\nloading compiled binding table from ./binding_table_60k.txt.s.o\r\ncompiled binding table ./binding_table_60k.txt.s.o is up to date.\r\nHairpinning: no\r\nnic_xe1 ether 02:b0:53:89:04:00\r\nIPv6 fragmentation and reassembly: no\r\nIPv4 fragmentation and reassembly: no\r\nlwAFTR service: enabled\r\nRunning without VM (no vHostUser sock_path set)\r\nnh_fwd6: cache_refresh_interval set to 0 seconds\r\nnh_fwd6: static next_hop_mac 02:02:02:02:02:02\r\nloading compiled binding table from ./binding_table_60k.txt.s.o\r\ncompiled binding table ./binding_table_60k.txt.s.o is up to date.\r\nnh_fwd4: cache_refresh_interval set to 0 seconds\r\nnh_fwd4: static next_hop_mac 02:02:02:02:02:02\r\nIngress drop monitor: flush (threshold: 100000 packets; wait: 20 seconds; interval: 1.00 seconds)\r\n```\r\n\r\npacketblaster shows no packets received:\r\n\r\n```\r\n$ ./run-gen5b.sh\r\nens6f1 at 0000:04:00.1 has , running at 3.1 gbps\r\nsudo taskset -c 4 ../snabb/src/snabb packetblaster lwaftr --src_mac 02:02:02:02:02:02 --dst_mac 02:b0:53:89:04:00 --b4 2001:db8::40,10.10.0.0,1024 --aftr 2001:db8:ffff::100 --count 60000 --rate 3.1 --pci 0000:04:00.1 --vlan 100\r\npacketblaster lwaftr: Sending 60000 clients at 3.100 MPPS to 0000:04:00.1\r\n\r\nIPv6: 2001:db8::40 > 2001:db8:ffff::100: 10.10.0.0:1024 > 8.8.8.8:12345\r\n      source IPv6 and source IPv4/Port adjusted per client\r\nIPv6 packet sizes: 104,104,104,104,104,104,104,634,634,634,1540\r\n\r\nIPv4: 8.8.8.8:12345 > 10.10.0.0:1024\r\n      destination IPv4 and Port adjusted per client\r\nIPv4 packet sizes: 64,64,64,64,64,64,64,594,594,594,1500\r\nvlan set to 100\r\nv6+v4: 0.000+0.000 = 0.000000 MPPS, 0.000+0.000 = 0.000000 Gbps, lost nan%\r\nv6+v4: 0.000+0.000 = 0.000000 MPPS, 0.000+0.000 = 0.000000 Gbps, lost nan%\r\n```\r\n\r\nSending untagged traffic to snabbvmx (with vlan set), processes traffic:\r\n\r\n```\r\nsudo taskset -c 4 ../snabb/src/snabb packetblaster lwaftr --src_mac 02:02:02:02:02:02 --dst_mac 02:b0:53:89:04:00 --b4 2001:db8::40,10.10.0.0,1024 --aftr 2001:db8:ffff::100 --count 60000 --rate 3.1 --pci 0000:04:00.1\r\npacketblaster lwaftr: Sending 60000 clients at 3.100 MPPS to 0000:04:00.1\r\n\r\nIPv6: 2001:db8::40 > 2001:db8:ffff::100: 10.10.0.0:1024 > 8.8.8.8:12345\r\n      source IPv6 and source IPv4/Port adjusted per client\r\nIPv6 packet sizes: 104,104,104,104,104,104,104,634,634,634,1540\r\n\r\nIPv4: 8.8.8.8:12345 > 10.10.0.0:1024\r\n      destination IPv4 and Port adjusted per client\r\nIPv4 packet sizes: 64,64,64,64,64,64,64,594,594,594,1500\r\nv6+v4: 0.834+0.833 = 1.666858 MPPS, 2.613+2.345 = 4.957152 Gbps, lost 91.443%\r\nv6+v4: 1.550+1.550 = 3.100000 MPPS, 4.874+4.378 = 9.252662 Gbps, lost 0.000%\r\nv6+v4: 1.550+1.550 = 3.100013 MPPS, 4.874+4.378 = 9.252686 Gbps, lost 0.000%\r\n```\r\n\r\nSo it seems there is some configuration missing in the .cfg file to make this work, but that contradicts the vlan end-to-end testcase \r\n\r\nhttps://github.com/Igalia/snabb/tree/lwaftr/src/program/snabbvmx/tests/end-to-end/data/vlan\r\n\r\n\r\nBinding table used: \r\n\r\n[binding_table_60k.txt](https://github.com/Igalia/snabb/files/531992/binding_table_60k.txt)\r\n\r\n"}}
{"actor":{"display_login":"mwiget"}}