networkservicemesh / cmd-forwarder-vpp

Apache License 2.0
2 stars 22 forks source link

Upgrade cmd-forwarder-vpp to using VPP v21.06 #284

Closed edwarnicke closed 3 years ago

edwarnicke commented 3 years ago

Currently NSM uses v19.06 of VPP. The current version is v21.06. We should upgrade.

To do this I would suggest first upgrading a for of https://github.com/edwarnicke/govpp to VPP v21.06. Many (but not all) of the patches/ will have already been incorporated into that version of VPP.

Then I would suggest upgrading sdk-vpp to use the updated binapi, and testing with cmd-forwarder-vpp with the base Docker images updated.

glazychev-art commented 3 years ago

Found that cmd-forwarder-vpp docker tests don't work with memif. Created a fix for VPP: https://gerrit.fd.io/r/c/vpp/+/33303

glazychev-art commented 3 years ago

There is still problem with memif on v21.06. When I run ping I see: Failed: no source address for egress interface.

In details

Found a similar problem in vpp mailing list: https://lists.fd.io/g/vpp-dev/topic/84038840 You can find in this post a link to PR - https://gerrit.fd.io/r/c/vpp/+/32801 (not merged yet). And this is a great fix for memif IP mode! But Ethernet mode doesn't work.

IP Mode

IP mode is set by this code: https://github.com/FDio/vpp/blob/master/src/plugins/memif/memif.c#L841-L845 And interface registering: https://github.com/FDio/vpp/blob/master/src/plugins/memif/memif.c#L979-L983 As you can see, memif IP is P2P. Using this patch everything works fine: https://gerrit.fd.io/r/c/vpp/+/32801/1/src/vnet/fib/fib_sas.c#64

Ethernet Mode

But, let's take a look at Ethernet mode registering: https://github.com/FDio/vpp/blob/master/src/plugins/memif/memif.c#L972-L975 It is a NOT P2P. So, this patch doesn't work.

glazychev-art commented 3 years ago

@edwarnicke Could you please share your thoughts?

glazychev-art commented 3 years ago

Current status of cmd-forwarder-vpp docker-tests:

--- FAIL: TestForwarderTestSuite (12.68s)
    --- FAIL: TestForwarderTestSuite/TestCombinations (11.10s)
        --- FAIL: TestForwarderTestSuite/TestCombinations/Ethernet (4.40s)
            --- FAIL: TestForwarderTestSuite/TestCombinations/Ethernet/Kernel (1.51s)
                --- PASS: TestForwarderTestSuite/TestCombinations/Ethernet/Kernel/Kernel (0.44s)
                --- FAIL: TestForwarderTestSuite/TestCombinations/Ethernet/Kernel/Memif (0.54s)
                --- FAIL: TestForwarderTestSuite/TestCombinations/Ethernet/Kernel/Vxlan (0.53s)
            --- FAIL: TestForwarderTestSuite/TestCombinations/Ethernet/Memif (1.47s)
                --- FAIL: TestForwarderTestSuite/TestCombinations/Ethernet/Memif/Kernel (0.53s)
                --- FAIL: TestForwarderTestSuite/TestCombinations/Ethernet/Memif/Memif (0.48s)
                --- FAIL: TestForwarderTestSuite/TestCombinations/Ethernet/Memif/Vxlan (0.46s)
            --- FAIL: TestForwarderTestSuite/TestCombinations/Ethernet/Vxlan (1.42s)
                --- FAIL: TestForwarderTestSuite/TestCombinations/Ethernet/Vxlan/Kernel (0.43s)
                --- FAIL: TestForwarderTestSuite/TestCombinations/Ethernet/Vxlan/Memif (0.54s)
                --- FAIL: TestForwarderTestSuite/TestCombinations/Ethernet/Vxlan/Vxlan (0.45s)
        --- PASS: TestForwarderTestSuite/TestCombinations/Ip (6.70s)
            --- PASS: TestForwarderTestSuite/TestCombinations/Ip/Kernel (1.74s)
                --- PASS: TestForwarderTestSuite/TestCombinations/Ip/Kernel/Kernel (0.42s)
                --- PASS: TestForwarderTestSuite/TestCombinations/Ip/Kernel/Memif (0.65s)
                --- PASS: TestForwarderTestSuite/TestCombinations/Ip/Kernel/Wireguard (0.67s)
            --- PASS: TestForwarderTestSuite/TestCombinations/Ip/Memif (2.44s)
                --- PASS: TestForwarderTestSuite/TestCombinations/Ip/Memif/Kernel (0.69s)
                --- PASS: TestForwarderTestSuite/TestCombinations/Ip/Memif/Memif (0.90s)
                --- PASS: TestForwarderTestSuite/TestCombinations/Ip/Memif/Wireguard (0.86s)
            --- PASS: TestForwarderTestSuite/TestCombinations/Ip/Wireguard (2.51s)
                --- PASS: TestForwarderTestSuite/TestCombinations/Ip/Wireguard/Kernel (0.70s)
                --- PASS: TestForwarderTestSuite/TestCombinations/Ip/Wireguard/Memif (0.94s)
                --- PASS: TestForwarderTestSuite/TestCombinations/Ip/Wireguard/Wireguard (0.87s)

UPD: this status is wrong. See below: https://github.com/networkservicemesh/cmd-forwarder-vpp/issues/284#issuecomment-890755702

edwarnicke commented 3 years ago

@glazychev-art Do we know what changed? Because the ethernet registration is two years old at this point...

glazychev-art commented 3 years ago

@edwarnicke Yes. There were changes in fib stuff. I guess it was here: https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commit;h=e2fe097424fb169dfe01421ff17b8ccd0c26b4a6

edwarnicke commented 3 years ago

@glazychev-art Do you know if we are getting this error in the forwarder's vpp, or in the vpp-client or vpp-server instances being used for testing? Basically, does the ping packet even arrive at the forwarder, or is it getting dropped in the vpp that is sending the ping?

glazychev-art commented 3 years ago

@edwarnicke It is getting dropped in the vpp that is sending the ping. For example, I catch it on vpp-server side.

glazychev-art commented 3 years ago

Current status of cmd-forwarder-vpp docker-tests:

--- FAIL: TestForwarderTestSuite (10.85s)
    --- FAIL: TestForwarderTestSuite/TestCombinations (9.48s)
        --- FAIL: TestForwarderTestSuite/TestCombinations/Ethernet (4.08s)
            --- FAIL: TestForwarderTestSuite/TestCombinations/Ethernet/Kernel (1.30s)
                --- PASS: TestForwarderTestSuite/TestCombinations/Ethernet/Kernel/Kernel (0.38s)
                --- FAIL: TestForwarderTestSuite/TestCombinations/Ethernet/Kernel/Memif (0.49s)
                --- FAIL: TestForwarderTestSuite/TestCombinations/Ethernet/Kernel/Vxlan (0.43s)
            --- FAIL: TestForwarderTestSuite/TestCombinations/Ethernet/Memif (1.41s)
                --- FAIL: TestForwarderTestSuite/TestCombinations/Ethernet/Memif/Kernel (0.47s)
                --- FAIL: TestForwarderTestSuite/TestCombinations/Ethernet/Memif/Memif (0.48s)
                --- FAIL: TestForwarderTestSuite/TestCombinations/Ethernet/Memif/Vxlan (0.46s)
            --- FAIL: TestForwarderTestSuite/TestCombinations/Ethernet/Vxlan (1.36s)
                --- FAIL: TestForwarderTestSuite/TestCombinations/Ethernet/Vxlan/Kernel (0.41s)
                --- FAIL: TestForwarderTestSuite/TestCombinations/Ethernet/Vxlan/Memif (0.48s)
                --- FAIL: TestForwarderTestSuite/TestCombinations/Ethernet/Vxlan/Vxlan (0.46s)
        --- FAIL: TestForwarderTestSuite/TestCombinations/Ip (5.40s)
            --- FAIL: TestForwarderTestSuite/TestCombinations/Ip/Kernel (1.54s)
                --- PASS: TestForwarderTestSuite/TestCombinations/Ip/Kernel/Kernel (0.41s)
                --- PASS: TestForwarderTestSuite/TestCombinations/Ip/Kernel/Memif (0.71s)
                --- FAIL: TestForwarderTestSuite/TestCombinations/Ip/Kernel/Wireguard (0.41s)
            --- FAIL: TestForwarderTestSuite/TestCombinations/Ip/Memif (2.28s)
                --- PASS: TestForwarderTestSuite/TestCombinations/Ip/Memif/Kernel (0.70s)
                --- PASS: TestForwarderTestSuite/TestCombinations/Ip/Memif/Memif (0.92s)
                --- FAIL: TestForwarderTestSuite/TestCombinations/Ip/Memif/Wireguard (0.66s)
            --- FAIL: TestForwarderTestSuite/TestCombinations/Ip/Wireguard (1.59s)
                --- FAIL: TestForwarderTestSuite/TestCombinations/Ip/Wireguard/Kernel (0.44s)
                --- FAIL: TestForwarderTestSuite/TestCombinations/Ip/Wireguard/Memif (0.70s)
                --- FAIL: TestForwarderTestSuite/TestCombinations/Ip/Wireguard/Wireguard (0.46s)
    --- PASS: TestForwarderTestSuite/TestHealthCheck (0.00s)
glazychev-art commented 3 years ago

JIRA issue - https://jira.fd.io/browse/VPP-1992

edwarnicke commented 3 years ago

This [works] for tag v21.06.0-9-16f166164 :) Set the Docker tag to that and:

go get github.com/edwarnicke/govpp@v21.06.0-9-16f166164
go mod tidy

and you should be in business :)

glazychev-art commented 3 years ago

All PRs were merged for this issue