Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update docs #2

Merged
merged 5 commits into from
May 27, 2018
Merged

update docs #2

merged 5 commits into from
May 27, 2018

Conversation

CodeDotJS
Copy link
Contributor

I extensively read the docs to understand this Projects, but at some places, I found some mistakes and minor issues, I've formatted the docs in a little better way to improve the readability.

@facebook-github-bot
Copy link
Contributor

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label May 26, 2018
@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

Copy link
Contributor

@tehnerd tehnerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow. This is great. Thanks. There is one small nit and after that we are ready to land it.

DEVELOPING.md Outdated
to be located in `deps/linux/bpfprog/bpf/`. These files are:

1. __`balancer_kern.o`__ - object file w/ main BPF program for forwarding
2. __`ealthchecking_ipip.o`__ - object file w/ BPF program for the forwarding of
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: healthchecking

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

@tehnerd
Copy link
Contributor

tehnerd commented May 26, 2018

Tnx

@tehnerd tehnerd merged commit 71c9b71 into facebookincubator:master May 27, 2018
tehnerd pushed a commit that referenced this pull request Jun 7, 2018
Summary:
in this sync:
1) updated kernel's includes
2) added support for ICMP "packet too big" generation if recved packet
is bigger then MAX_PCKT_SIZE (turned off by default as this requires
bpf_xdp_adjust_tail helper from 4.17)
3) unittests for #2
4) formating/renaming of few internal structs
tehnerd added a commit to tehnerd/katran that referenced this pull request Jun 9, 2020
with current logic macros for toobig is being run even w/o
icmp_toobig_generation. hence naming is not correct.

as a side not new added test fixture (facebookincubator#33) doing exactly the same as
(facebookincubator#1 and facebookincubator#2 in KatranOptionalTestFixtures; and nop if katran was built
w/o katran_introspection). initially idea behind KatranTestFixutres was
that there only tests which should works/make sense under vanilla build
(aka w/o any additional defines)
@tehnerd tehnerd mentioned this pull request Jun 9, 2020
facebook-github-bot pushed a commit that referenced this pull request Jun 10, 2020
Summary:
with current logic macros for toobig is being run even w/o
icmp_toobig_generation. hence naming is not correct.

as a side not new added test fixture (#33) doing exactly the same as
(#1 and #2 in KatranOptionalTestFixtures; and nop if katran was built
w/o katran_introspection). initially idea behind KatranTestFixutres was
that there only tests which should works/make sense under vanilla build
(aka w/o any additional defines)
Pull Request resolved: #86

Reviewed By: jdryan

Differential Revision: D21948111

fbshipit-source-id: 25b2922cfdb63d6b5b9b9dae7b0010003f8fc771
facebook-github-bot pushed a commit that referenced this pull request Sep 21, 2020
Summary:
this PR contains two diffs. first one revert ef8a0b3 as 2nd one allows to solve the same usecase (which is not yet implemented in that reverted diff) in more generic way.

2nd diff contains a logic to reload balancer's program in runtime w/ minimum to none disruption. it archives this by:
loading new bpf program. but for that program all maps, which were loaded/populated in original version, would be reused instead of creating a new one and populating em. e.g. by doing this we would preserv connection tracking maps and existing flow wont be affected. missed maps (e.g. the ones which exist only in new version) would be created if needed.

as a part of this logic optionally new config could be provided (e.g. if new code requires src ip to be specified and old one does not: e.g. for gue encap).

This new feature does not handle cleanup logic (e.g. if new (reloaded) balancer's code requires less maps than original one, unused maps wont be removed/freed). right now it is questionable if such ability would be useful and it is definitely would increase complexity).

Aside from reloading balancer program, it should be also reattached. so user of the library should do something like:
```
1. lb.reloadBalancerProg(path) << to reload bpf program. at this point old one is still attached, so forwarding still would be done by old bpf program.
2. lb.attachBpfProgs() << reattaching new bpf program (either to interface directly, or to the shared prog array). in both cases this (reattachment in kernel) is done under RCU/lock so it is safe to do in runtime and wont disrupt any traffic.
```

right now reloading of healthchecking program is not supported.

Note on maps renaming: libbpf's way to share map between different bpf program's requires for map's name to be no more than 15 chars. hence some names were shortened.

Some reload examples/tests:
1. original code does not have introspection enabled, but reloaded does:
```
 ./os_run_tester.sh "-reloaded_balancer_prog=/tmp/balancer_kern.o    -iobuf_storage"
+ '[' -z '' ']'
++ pwd
+ KATRAN_BUILD_DIR=/home/tehnerd/projects/sdd/projects/katran/_build/build
+ '[' -z '' ']'
++ pwd
+ DEPS_DIR=/home/tehnerd/projects/sdd/projects/katran/_build/deps
+ sudo sh -c '/home/tehnerd/projects/sdd/projects/katran/_build/build/katran/lib/testing/katran_tester -balancer_prog /home/tehnerd/projects/sdd/projects/katran/_build/deps/bpfprog/bpf/balancer_kern.o -test_from_fixtures=true -reloaded_balancer_prog=/tmp/balancer_kern.o    -iobuf_storage'
E0912 04:25:11.888264  3031 BpfLoader.cpp:94] Can't find map w/ name: lpm_src_v4
E0912 04:25:11.888324  3031 BpfLoader.cpp:94] Can't find map w/ name: decap_dst
E0912 04:25:11.888327  3031 BpfLoader.cpp:94] Can't find map w/ name: event_pipe
E0912 04:25:11.888329  3031 BpfLoader.cpp:94] Can't find map w/ name: pckt_srcs
E0912 04:25:11.888332  3031 BpfLoader.cpp:94] Can't find map w/ name: hc_pckt_srcs_map
I0912 04:25:11.888345  3031 KatranLb.cpp:717] adding new vip: 10.200.1.1:80:17
I0912 04:25:11.936579  3031 KatranLb.cpp:717] adding new vip: 10.200.1.1:80:6
I0912 04:25:11.980474  3031 KatranLb.cpp:717] adding new vip: 10.200.1.2:0:6
I0912 04:25:12.025903  3031 KatranLb.cpp:717] adding new vip: 10.200.1.4:0:6
I0912 04:25:12.071620  3031 KatranLb.cpp:821] modyfing vip: 10.200.1.4:0:6
I0912 04:25:12.071635  3031 KatranLb.cpp:717] adding new vip: 10.200.1.3:80:6
I0912 04:25:12.117257  3031 KatranLb.cpp:717] adding new vip: fc00:1::1:80:6
I0912 04:25:12.163430  3031 KatranLb.cpp:717] adding new vip: 10.200.1.5:443:17
I0912 04:25:12.163468  3031 KatranLb.cpp:821] modyfing vip: 10.200.1.5:443:17
I0912 04:25:12.209666  3031 KatranLb.cpp:717] adding new vip: fc00:1::2:443:17
I0912 04:25:12.209704  3031 KatranLb.cpp:821] modyfing vip: fc00:1::2:443:17
I0912 04:25:12.256033  3031 BpfTester.cpp:220] Test: packet to UDP based v4 VIP (and v4 real)                     result: Passed
I0912 04:25:12.256158  3031 BpfTester.cpp:220] Test: packet to TCP based v4 VIP (and v4 real)                     result: Passed
I0912 04:25:12.256224  3031 BpfTester.cpp:220] Test: packet to TCP based v4 VIP (and v4 real) + ToS in IPV4       result: Passed
I0912 04:25:12.256345  3031 BpfTester.cpp:220] Test: packet to TCP based v4 VIP (and v4 real; any dst ports).     result: Passed
I0912 04:25:12.256420  3031 BpfTester.cpp:220] Test: packet to TCP based v4 VIP (and v6 real)                     result: Passed
I0912 04:25:12.256491  3031 BpfTester.cpp:220] Test: packet to TCP based v6 VIP (and v6 real)                     result: Passed
I0912 04:25:12.256561  3031 BpfTester.cpp:220] Test: packet to TCP based v6 VIP (and v6 real) with ToS / tc set   result: Passed
I0912 04:25:12.256614  3031 BpfTester.cpp:220] Test: v4 ICMP echo-request                                         result: Passed
I0912 04:25:12.256640  3031 BpfTester.cpp:220] Test: v6 ICMP echo-request                                         result: Passed
I0912 04:25:12.256667  3031 BpfTester.cpp:220] Test: v4 ICMP dest-unreachabe fragmentation-needed                 result: Passed
I0912 04:25:12.256701  3031 BpfTester.cpp:220] Test: v6 ICMP packet-too-big                                       result: Passed
I0912 04:25:12.256772  3031 BpfTester.cpp:220] Test: drop of IPv4 packet w/ options                               result: Passed
I0912 04:25:12.256798  3031 BpfTester.cpp:220] Test: drop of IPv4 fragmented packet                               result: Passed
I0912 04:25:12.256824  3031 BpfTester.cpp:220] Test: drop of IPv6 fragmented packet                               result: Passed
I0912 04:25:12.256851  3031 BpfTester.cpp:220] Test: pass of v4 packet with dst not equal to any configured VIP   result: Passed
I0912 04:25:12.256877  3031 BpfTester.cpp:220] Test: pass of v6 packet with dst not equal to any configured VIP   result: Passed
I0912 04:25:12.256903  3031 BpfTester.cpp:220] Test: pass of arp packet                                           result: Passed
I0912 04:25:12.256932  3031 BpfTester.cpp:220] Test: LRU hit                                                      result: Passed
I0912 04:25:12.256958  3031 BpfTester.cpp:220] Test: packet #1 dst port hashing only                              result: Passed
I0912 04:25:12.256987  3031 BpfTester.cpp:220] Test: packet #2 dst port hashing only                              result: Passed
I0912 04:25:12.257014  3031 BpfTester.cpp:220] Test: ipinip packet                                                result: Passed
I0912 04:25:12.257041  3031 BpfTester.cpp:220] Test: ipv6inipv6 packet                                            result: Passed
I0912 04:25:12.257069  3031 BpfTester.cpp:220] Test: ipv4inipv6 packet                                            result: Passed
I0912 04:25:12.257097  3031 BpfTester.cpp:220] Test: QUIC: long header. Client Initial type. LRU miss             result: Passed
I0912 04:25:12.257123  3031 BpfTester.cpp:220] Test: QUIC: long header. 0-RTT Protected. CH. LRU hit.             result: Passed
I0912 04:25:12.257149  3031 BpfTester.cpp:220] Test: QUIC: long header. Handshake. v4 vip v6 real. Conn Id based. result: Passed
I0912 04:25:12.257176  3031 BpfTester.cpp:220] Test: QUIC: long header. Retry. v4 vip v6 real. Conn Id based.     result: Passed
I0912 04:25:12.257205  3031 BpfTester.cpp:220] Test: QUIC: long header. client initial. v6 vip v6 real. LRU miss  result: Passed
I0912 04:25:12.257232  3031 BpfTester.cpp:220] Test: QUIC: short header. No connection id. CH. LRU hit            result: Passed
I0912 04:25:12.257259  3031 BpfTester.cpp:220] Test: QUIC: short header w/ connection id                          result: Passed
I0912 04:25:12.257325  3031 BpfTester.cpp:220] Test: QUIC: short header w/ connection id but non-existing mapping result: Passed
I0912 04:25:12.257351  3031 BpfTester.cpp:220] Test: QUIC: short header w/ conn id. host id = 0. CH. LRU hit      result: Passed
I0912 04:25:12.257402  3031 BpfTester.cpp:220] Test: UDP: big packet of length 1515. trigger PACKET TOOBIG        result: Passed
I0912 04:25:12.257406  3031 katran_tester.cpp:257] Testing counter's sanity. Printing on errors only
I0912 04:25:12.257494  3031 katran_tester.cpp:313] Testing of counters is complete
E0912 04:25:12.257956  3031 KatranSimulator.cpp:168] src and dst must have same address family
E0912 04:25:12.257961  3031 KatranSimulator.cpp:161] malformed src or dst ip address. src: aaaa dst: bbbb

I0912 04:25:12.257963  3031 katran_tester.cpp:337] Test katran monitor.    <<<< NOTHING HERE. AS INTROSPECTION IS NOT ENABLED FOR ORIGINAL VERSION

E0912 04:25:13.258879  3031 BpfLoader.cpp:104] Can't find prog with name: cls-hc
I0912 04:25:13.258942  3031 katran_tester.cpp:179] Healthchecking not enabled. Skipping HC related tests
libbpf: Error in bpf_create_map_xattr(event_pipe):ERROR: strerror_r(-524)=22(-524). Retrying without BTF.
E0912 04:25:13.292759  3031 BpfLoader.cpp:94] Can't find map w/ name: lpm_src_v4
E0912 04:25:13.292776  3031 BpfLoader.cpp:94] Can't find map w/ name: decap_dst
E0912 04:25:13.292783  3031 BpfLoader.cpp:94] Can't find map w/ name: pckt_srcs
E0912 04:25:13.292788  3031 BpfLoader.cpp:94] Can't find map w/ name: hc_pckt_srcs_map
I0912 04:25:13.293278  3031 KatranLb.cpp:717] adding new vip: 10.200.1.1:80:17
I0912 04:25:13.293290  3031 KatranLb.cpp:725] trying to add already existing vip
I0912 04:25:13.293299  3031 KatranLb.cpp:717] adding new vip: 10.200.1.1:80:6
I0912 04:25:13.293303  3031 KatranLb.cpp:725] trying to add already existing vip
I0912 04:25:13.293306  3031 KatranLb.cpp:717] adding new vip: 10.200.1.2:0:6
I0912 04:25:13.293309  3031 KatranLb.cpp:725] trying to add already existing vip
I0912 04:25:13.293313  3031 KatranLb.cpp:717] adding new vip: 10.200.1.4:0:6
I0912 04:25:13.293320  3031 KatranLb.cpp:725] trying to add already existing vip
I0912 04:25:13.293329  3031 KatranLb.cpp:821] modyfing vip: 10.200.1.4:0:6
I0912 04:25:13.293337  3031 KatranLb.cpp:717] adding new vip: 10.200.1.3:80:6
I0912 04:25:13.293341  3031 KatranLb.cpp:725] trying to add already existing vip
I0912 04:25:13.293349  3031 KatranLb.cpp:717] adding new vip: fc00:1::1:80:6
I0912 04:25:13.293354  3031 KatranLb.cpp:725] trying to add already existing vip
I0912 04:25:13.293359  3031 KatranLb.cpp:1456] trying to add already existing mapping for 10.0.0.1
I0912 04:25:13.293365  3031 KatranLb.cpp:1456] trying to add already existing mapping for 10.0.0.2
I0912 04:25:13.293368  3031 KatranLb.cpp:1456] trying to add already existing mapping for 10.0.0.3
I0912 04:25:13.293372  3031 KatranLb.cpp:1456] trying to add already existing mapping for fc00::1
I0912 04:25:13.293377  3031 KatranLb.cpp:1456] trying to add already existing mapping for fc00::2
I0912 04:25:13.293381  3031 KatranLb.cpp:1456] trying to add already existing mapping for fc00::3
I0912 04:25:13.293385  3031 KatranLb.cpp:717] adding new vip: 10.200.1.5:443:17
I0912 04:25:13.293390  3031 KatranLb.cpp:725] trying to add already existing vip
I0912 04:25:13.293392  3031 KatranLb.cpp:821] modyfing vip: 10.200.1.5:443:17
I0912 04:25:13.293399  3031 KatranLb.cpp:717] adding new vip: fc00:1::2:443:17
I0912 04:25:13.293403  3031 KatranLb.cpp:725] trying to add already existing vip
I0912 04:25:13.293407  3031 KatranLb.cpp:821] modyfing vip: fc00:1::2:443:17
I0912 04:25:13.293608  3031 BpfTester.cpp:220] Test: packet to UDP based v4 VIP (and v4 real)                     result: Passed
I0912 04:25:13.293678  3031 BpfTester.cpp:220] Test: packet to TCP based v4 VIP (and v4 real)                     result: Passed
I0912 04:25:13.293714  3031 BpfTester.cpp:220] Test: packet to TCP based v4 VIP (and v4 real) + ToS in IPV4       result: Passed
I0912 04:25:13.293747  3031 BpfTester.cpp:220] Test: packet to TCP based v4 VIP (and v4 real; any dst ports).     result: Passed
I0912 04:25:13.293783  3031 BpfTester.cpp:220] Test: packet to TCP based v4 VIP (and v6 real)                     result: Passed
I0912 04:25:13.293820  3031 BpfTester.cpp:220] Test: packet to TCP based v6 VIP (and v6 real)                     result: Passed
I0912 04:25:13.293856  3031 BpfTester.cpp:220] Test: packet to TCP based v6 VIP (and v6 real) with ToS / tc set   result: Passed
I0912 04:25:13.293889  3031 BpfTester.cpp:220] Test: v4 ICMP echo-request                                         result: Passed
I0912 04:25:13.293923  3031 BpfTester.cpp:220] Test: v6 ICMP echo-request                                         result: Passed
I0912 04:25:13.293959  3031 BpfTester.cpp:220] Test: v4 ICMP dest-unreachabe fragmentation-needed                 result: Passed
I0912 04:25:13.293995  3031 BpfTester.cpp:220] Test: v6 ICMP packet-too-big                                       result: Passed
I0912 04:25:13.294030  3031 BpfTester.cpp:220] Test: drop of IPv4 packet w/ options                               result: Passed
I0912 04:25:13.294064  3031 BpfTester.cpp:220] Test: drop of IPv4 fragmented packet                               result: Passed
I0912 04:25:13.294096  3031 BpfTester.cpp:220] Test: drop of IPv6 fragmented packet                               result: Passed
I0912 04:25:13.294131  3031 BpfTester.cpp:220] Test: pass of v4 packet with dst not equal to any configured VIP   result: Passed
I0912 04:25:13.294165  3031 BpfTester.cpp:220] Test: pass of v6 packet with dst not equal to any configured VIP   result: Passed
I0912 04:25:13.294199  3031 BpfTester.cpp:220] Test: pass of arp packet                                           result: Passed
I0912 04:25:13.294234  3031 BpfTester.cpp:220] Test: LRU hit                                                      result: Passed
I0912 04:25:13.294315  3031 BpfTester.cpp:220] Test: packet #1 dst port hashing only                              result: Passed
I0912 04:25:13.294358  3031 BpfTester.cpp:220] Test: packet #2 dst port hashing only                              result: Passed
I0912 04:25:13.294399  3031 BpfTester.cpp:220] Test: ipinip packet                                                result: Passed
I0912 04:25:13.294474  3031 BpfTester.cpp:220] Test: ipv6inipv6 packet                                            result: Passed
I0912 04:25:13.294514  3031 BpfTester.cpp:220] Test: ipv4inipv6 packet                                            result: Passed
I0912 04:25:13.294555  3031 BpfTester.cpp:220] Test: QUIC: long header. Client Initial type. LRU miss             result: Passed
I0912 04:25:13.294595  3031 BpfTester.cpp:220] Test: QUIC: long header. 0-RTT Protected. CH. LRU hit.             result: Passed
I0912 04:25:13.294633  3031 BpfTester.cpp:220] Test: QUIC: long header. Handshake. v4 vip v6 real. Conn Id based. result: Passed
I0912 04:25:13.294672  3031 BpfTester.cpp:220] Test: QUIC: long header. Retry. v4 vip v6 real. Conn Id based.     result: Passed
I0912 04:25:13.294713  3031 BpfTester.cpp:220] Test: QUIC: long header. client initial. v6 vip v6 real. LRU miss  result: Passed
I0912 04:25:13.294751  3031 BpfTester.cpp:220] Test: QUIC: short header. No connection id. CH. LRU hit            result: Passed
I0912 04:25:13.294791  3031 BpfTester.cpp:220] Test: QUIC: short header w/ connection id                          result: Passed
I0912 04:25:13.294831  3031 BpfTester.cpp:220] Test: QUIC: short header w/ connection id but non-existing mapping result: Passed
I0912 04:25:13.294868  3031 BpfTester.cpp:220] Test: QUIC: short header w/ conn id. host id = 0. CH. LRU hit      result: Passed
I0912 04:25:13.294950  3031 BpfTester.cpp:220] Test: UDP: big packet of length 1515. trigger PACKET TOOBIG        result: Passed
I0912 04:25:13.294958  3031 katran_tester.cpp:257] Testing counter's sanity. Printing on errors only
I0912 04:25:13.294987  3031 katran_tester.cpp:261] per Vip counter is incorrect for vip:10.200.1.1
I0912 04:25:13.295011  3031 katran_tester.cpp:266] LRU counter is incorrect
I0912 04:25:13.295030  3031 katran_tester.cpp:271] per pckt type LRU miss counter is incorrect
I0912 04:25:13.295051  3031 katran_tester.cpp:276] LRU fallback counter is incorrect
I0912 04:25:13.295070  3031 katran_tester.cpp:280] Counters for QUIC packets routed with CH: 10,  with connection-id: 8
I0912 04:25:13.295078  3031 katran_tester.cpp:282] Counters for routing of QUIC packets is wrong.
I0912 04:25:13.295100  3031 katran_tester.cpp:296] incorrect stats for real: 10.0.0.1
I0912 04:25:13.295109  3031 katran_tester.cpp:297] Expected to be incorrect w/ non default build flags
I0912 04:25:13.295128  3031 katran_tester.cpp:296] incorrect stats for real: 10.0.0.2
I0912 04:25:13.295136  3031 katran_tester.cpp:297] Expected to be incorrect w/ non default build flags
I0912 04:25:13.295156  3031 katran_tester.cpp:296] incorrect stats for real: 10.0.0.3
I0912 04:25:13.295164  3031 katran_tester.cpp:297] Expected to be incorrect w/ non default build flags
I0912 04:25:13.295186  3031 katran_tester.cpp:296] incorrect stats for real: fc00::1
I0912 04:25:13.295193  3031 katran_tester.cpp:297] Expected to be incorrect w/ non default build flags
I0912 04:25:13.295213  3031 katran_tester.cpp:296] incorrect stats for real: fc00::2
I0912 04:25:13.295222  3031 katran_tester.cpp:297] Expected to be incorrect w/ non default build flags
I0912 04:25:13.295243  3031 katran_tester.cpp:296] incorrect stats for real: fc00::3
I0912 04:25:13.295250  3031 katran_tester.cpp:297] Expected to be incorrect w/ non default build flags
I0912 04:25:13.295255  3031 katran_tester.cpp:313] Testing of counters is complete
E0912 04:25:13.295521  3031 KatranSimulator.cpp:168] src and dst must have same address family
E0912 04:25:13.295527  3031 KatranSimulator.cpp:161] malformed src or dst ip address. src: aaaa dst: bbbb

I0912 04:25:13.295531  3031 katran_tester.cpp:337] Test katran monitor <<< RELOADED VERSION CONTAINS INTROSPECTION. SOME DATA ABOUT PACKETS WERE SENT THROUGH PERF PIPE

I0912 04:25:14.296711  3031 katran_tester.cpp:167] buffer length is: 194
I0912 04:25:14.296993  3031 katran_tester.cpp:167] buffer length is: 168
E0912 04:25:14.297132  3031 BpfLoader.cpp:104] Can't find prog with name: cls-hc
I0912 04:25:14.297152  3031 katran_tester.cpp:179] Healthchecking not enabled. Skipping HC related tests
```

another example balancer without gue vs w/ gue encap.

```
./os_run_tester.sh "-reloaded_balancer_prog=/tmp/balancer_kern.o    -gue"
+ '[' -z '' ']'
++ pwd
+ KATRAN_BUILD_DIR=/home/tehnerd/projects/sdd/projects/katran/_build/build
+ '[' -z '' ']'
++ pwd
+ DEPS_DIR=/home/tehnerd/projects/sdd/projects/katran/_build/deps
+ sudo sh -c '/home/tehnerd/projects/sdd/projects/katran/_build/build/katran/lib/testing/katran_tester -balancer_prog /home/tehnerd/projects/sdd/projects/katran/_build/deps/bpfprog/bpf/balancer_kern.o -test_from_fixtures=true -reloaded_balancer_prog=/tmp/balancer_kern.o    -gue'
E0912 04:31:14.927762  3131 BpfLoader.cpp:94] Can't find map w/ name: lpm_src_v4
E0912 04:31:14.927841  3131 BpfLoader.cpp:94] Can't find map w/ name: decap_dst
E0912 04:31:14.927852  3131 BpfLoader.cpp:94] Can't find map w/ name: event_pipe
E0912 04:31:14.927856  3131 BpfLoader.cpp:94] Can't find map w/ name: pckt_srcs
E0912 04:31:14.927861  3131 BpfLoader.cpp:94] Can't find map w/ name: hc_pckt_srcs_map
I0912 04:31:14.927877  3131 KatranLb.cpp:717] adding new vip: 10.200.1.1:80:17
I0912 04:31:14.976330  3131 KatranLb.cpp:717] adding new vip: 10.200.1.1:80:6
I0912 04:31:15.021167  3131 KatranLb.cpp:717] adding new vip: 10.200.1.2:0:6
I0912 04:31:15.067157  3131 KatranLb.cpp:717] adding new vip: 10.200.1.4:0:6
I0912 04:31:15.113668  3131 KatranLb.cpp:821] modyfing vip: 10.200.1.4:0:6
I0912 04:31:15.113682  3131 KatranLb.cpp:717] adding new vip: 10.200.1.3:80:6
I0912 04:31:15.160688  3131 KatranLb.cpp:717] adding new vip: fc00:1::1:80:6
I0912 04:31:15.207733  3131 KatranLb.cpp:717] adding new vip: 10.200.1.5:443:17
I0912 04:31:15.207773  3131 KatranLb.cpp:821] modyfing vip: 10.200.1.5:443:17
I0912 04:31:15.255038  3131 KatranLb.cpp:717] adding new vip: fc00:1::2:443:17
I0912 04:31:15.255079  3131 KatranLb.cpp:821] modyfing vip: fc00:1::2:443:17

MOST OF THE TESTS FAILED

I0912 04:31:15.302585  3131 BpfTester.cpp:220] Test: packet to UDP based v4 VIP (and v4 real)                     result: Failed
I0912 04:31:15.302676  3131 BpfTester.cpp:220] Test: packet to TCP based v4 VIP (and v4 real)                     result: Failed
I0912 04:31:15.302933  3131 BpfTester.cpp:220] Test: packet to TCP based v4 VIP (and v4 real; any dst ports).     result: Failed
I0912 04:31:15.303011  3131 BpfTester.cpp:220] Test: packet to TCP based v4 VIP (and v6 real)                     result: Failed
I0912 04:31:15.303089  3131 BpfTester.cpp:220] Test: packet to TCP based v6 VIP (and v6 real)                     result: Failed
I0912 04:31:15.303159  3131 BpfTester.cpp:220] Test: v4 ICMP echo-request                                         result: Passed
I0912 04:31:15.303215  3131 BpfTester.cpp:220] Test: v6 ICMP echo-request                                         result: Passed
I0912 04:31:15.303270  3131 BpfTester.cpp:220] Test: v4 ICMP dest-unreachabe fragmentation-needed                 result: Failed
I0912 04:31:15.303301  3131 BpfTester.cpp:220] Test: v6 ICMP packet-too-big                                       result: Failed
I0912 04:31:15.303329  3131 BpfTester.cpp:220] Test: drop of IPv4 packet w/ options                               result: Passed
I0912 04:31:15.303357  3131 BpfTester.cpp:220] Test: drop of IPv4 fragmented packet                               result: Passed
I0912 04:31:15.303386  3131 BpfTester.cpp:220] Test: drop of IPv6 fragmented packet                               result: Passed
I0912 04:31:15.303414  3131 BpfTester.cpp:220] Test: pass of v4 packet with dst not equal to any configured VIP   result: Passed
I0912 04:31:15.303443  3131 BpfTester.cpp:220] Test: pass of v6 packet with dst not equal to any configured VIP   result: Passed
I0912 04:31:15.303472  3131 BpfTester.cpp:220] Test: pass of arp packet                                           result: Passed
I0912 04:31:15.303501  3131 BpfTester.cpp:220] Test: LRU hit                                                      result: Failed
I0912 04:31:15.303530  3131 BpfTester.cpp:220] Test: packet #1 dst port hashing only                              result: Failed
I0912 04:31:15.303560  3131 BpfTester.cpp:220] Test: packet #2 dst port hashing only                              result: Failed
I0912 04:31:15.303587  3131 BpfTester.cpp:220] Test: gue ipv4 inner ipv4 outer packet                             result: Passed
I0912 04:31:15.303613  3131 BpfTester.cpp:220] Test: gue ipv6 inner ipv6 outer packet                             result: Passed
I0912 04:31:15.303651  3131 BpfTester.cpp:220] Test: gue ipv4 inner ipv6 outer packet                             result: Passed
I0912 04:31:15.303678  3131 BpfTester.cpp:220] Test: QUIC: long header. Client Initial type. LRU miss             result: Failed
I0912 04:31:15.303707  3131 BpfTester.cpp:220] Test: QUIC: long header. 0-RTT Protected. CH. LRU hit.             result: Failed
I0912 04:31:15.303735  3131 BpfTester.cpp:220] Test: QUIC: long header. Handshake. v4 vip v6 real. Conn Id based. result: Failed
I0912 04:31:15.303761  3131 BpfTester.cpp:220] Test: QUIC: long header. Retry. v4 vip v6 real. Conn Id based.     result: Failed
I0912 04:31:15.303786  3131 BpfTester.cpp:220] Test: QUIC: long header. client initial. v6 vip v6 real. LRU miss  result: Failed
I0912 04:31:15.303812  3131 BpfTester.cpp:220] Test: QUIC: short header. No connection id. CH. LRU hit            result: Failed
I0912 04:31:15.303839  3131 BpfTester.cpp:220] Test: QUIC: short header w/ connection id                          result: Failed
I0912 04:31:15.303867  3131 BpfTester.cpp:220] Test: QUIC: short header w/ connection id but non-existing mapping result: Failed
I0912 04:31:15.303892  3131 BpfTester.cpp:220] Test: QUIC: short header w/ conn id. host id = 0. CH. LRU hit      result: Failed
I0912 04:31:15.303918  3131 BpfTester.cpp:220] Test: packet to TCP based v4 VIP (and v4 real) + ToS in IPV4       result: Failed
I0912 04:31:15.303946  3131 BpfTester.cpp:220] Test: packet to TCP based v6 VIP (and v6 real) with ToS / tc set   result: Failed
I0912 04:31:15.303949  3131 katran_tester.cpp:257] Testing counter's sanity. Printing on errors only
I0912 04:31:15.304035  3131 katran_tester.cpp:313] Testing of counters is complete
E0912 04:31:15.304160  3131 KatranSimulator.cpp:168] src and dst must have same address family
E0912 04:31:15.304165  3131 KatranSimulator.cpp:161] malformed src or dst ip address. src: aaaa dst: bbbb
E0912 04:31:15.304169  3131 BpfLoader.cpp:104] Can't find prog with name: cls-hc
I0912 04:31:15.304173  3131 katran_tester.cpp:179] Healthchecking not enabled. Skipping HC related tests
E0912 04:31:15.307870  3131 BpfLoader.cpp:94] Can't find map w/ name: lpm_src_v4
E0912 04:31:15.307879  3131 BpfLoader.cpp:94] Can't find map w/ name: decap_dst
E0912 04:31:15.307884  3131 BpfLoader.cpp:94] Can't find map w/ name: event_pipe
E0912 04:31:15.307891  3131 BpfLoader.cpp:94] Can't find map w/ name: hc_pckt_srcs_map
I0912 04:31:15.307900  3131 KatranLb.cpp:717] adding new vip: 10.200.1.1:80:17
I0912 04:31:15.307905  3131 KatranLb.cpp:725] trying to add already existing vip
I0912 04:31:15.307911  3131 KatranLb.cpp:717] adding new vip: 10.200.1.1:80:6
I0912 04:31:15.307914  3131 KatranLb.cpp:725] trying to add already existing vip
I0912 04:31:15.307919  3131 KatranLb.cpp:717] adding new vip: 10.200.1.2:0:6
I0912 04:31:15.307922  3131 KatranLb.cpp:725] trying to add already existing vip
I0912 04:31:15.307926  3131 KatranLb.cpp:717] adding new vip: 10.200.1.4:0:6
I0912 04:31:15.307929  3131 KatranLb.cpp:725] trying to add already existing vip
I0912 04:31:15.307934  3131 KatranLb.cpp:821] modyfing vip: 10.200.1.4:0:6
I0912 04:31:15.307940  3131 KatranLb.cpp:717] adding new vip: 10.200.1.3:80:6
I0912 04:31:15.307943  3131 KatranLb.cpp:725] trying to add already existing vip
I0912 04:31:15.307950  3131 KatranLb.cpp:717] adding new vip: fc00:1::1:80:6
I0912 04:31:15.307955  3131 KatranLb.cpp:725] trying to add already existing vip
I0912 04:31:15.307960  3131 KatranLb.cpp:1456] trying to add already existing mapping for 10.0.0.1
I0912 04:31:15.307965  3131 KatranLb.cpp:1456] trying to add already existing mapping for 10.0.0.2
I0912 04:31:15.307968  3131 KatranLb.cpp:1456] trying to add already existing mapping for 10.0.0.3
I0912 04:31:15.307972  3131 KatranLb.cpp:1456] trying to add already existing mapping for fc00::1
I0912 04:31:15.307976  3131 KatranLb.cpp:1456] trying to add already existing mapping for fc00::2
I0912 04:31:15.307979  3131 KatranLb.cpp:1456] trying to add already existing mapping for fc00::3
I0912 04:31:15.307982  3131 KatranLb.cpp:717] adding new vip: 10.200.1.5:443:17
I0912 04:31:15.307986  3131 KatranLb.cpp:725] trying to add already existing vip
I0912 04:31:15.307988  3131 KatranLb.cpp:821] modyfing vip: 10.200.1.5:443:17
I0912 04:31:15.307994  3131 KatranLb.cpp:717] adding new vip: fc00:1::2:443:17
I0912 04:31:15.307997  3131 KatranLb.cpp:725] trying to add already existing vip
I0912 04:31:15.308001  3131 KatranLb.cpp:821] modyfing vip: fc00:1::2:443:17

ALL TESTS PASSED

I0912 04:31:15.308081  3131 BpfTester.cpp:220] Test: packet to UDP based v4 VIP (and v4 real)                     result: Passed
I0912 04:31:15.308329  3131 BpfTester.cpp:220] Test: packet to TCP based v4 VIP (and v4 real)                     result: Passed
I0912 04:31:15.308414  3131 BpfTester.cpp:220] Test: packet to TCP based v4 VIP (and v4 real; any dst ports).     result: Passed
I0912 04:31:15.308488  3131 BpfTester.cpp:220] Test: packet to TCP based v4 VIP (and v6 real)                     result: Passed
I0912 04:31:15.308558  3131 BpfTester.cpp:220] Test: packet to TCP based v6 VIP (and v6 real)                     result: Passed
I0912 04:31:15.308648  3131 BpfTester.cpp:220] Test: v4 ICMP echo-request                                         result: Passed
I0912 04:31:15.308672  3131 BpfTester.cpp:220] Test: v6 ICMP echo-request                                         result: Passed
I0912 04:31:15.308696  3131 BpfTester.cpp:220] Test: v4 ICMP dest-unreachabe fragmentation-needed                 result: Passed
I0912 04:31:15.308723  3131 BpfTester.cpp:220] Test: v6 ICMP packet-too-big                                       result: Passed
I0912 04:31:15.308750  3131 BpfTester.cpp:220] Test: drop of IPv4 packet w/ options                               result: Passed
I0912 04:31:15.308773  3131 BpfTester.cpp:220] Test: drop of IPv4 fragmented packet                               result: Passed
I0912 04:31:15.308799  3131 BpfTester.cpp:220] Test: drop of IPv6 fragmented packet                               result: Passed
I0912 04:31:15.308822  3131 BpfTester.cpp:220] Test: pass of v4 packet with dst not equal to any configured VIP   result: Passed
I0912 04:31:15.308852  3131 BpfTester.cpp:220] Test: pass of v6 packet with dst not equal to any configured VIP   result: Passed
I0912 04:31:15.308881  3131 BpfTester.cpp:220] Test: pass of arp packet                                           result: Passed
I0912 04:31:15.308902  3131 BpfTester.cpp:220] Test: LRU hit                                                      result: Passed
I0912 04:31:15.308929  3131 BpfTester.cpp:220] Test: packet #1 dst port hashing only                              result: Passed
I0912 04:31:15.308954  3131 BpfTester.cpp:220] Test: packet #2 dst port hashing only                              result: Passed
I0912 04:31:15.308977  3131 BpfTester.cpp:220] Test: gue ipv4 inner ipv4 outer packet                             result: Passed
I0912 04:31:15.309006  3131 BpfTester.cpp:220] Test: gue ipv6 inner ipv6 outer packet                             result: Passed
I0912 04:31:15.309032  3131 BpfTester.cpp:220] Test: gue ipv4 inner ipv6 outer packet                             result: Passed
I0912 04:31:15.309060  3131 BpfTester.cpp:220] Test: QUIC: long header. Client Initial type. LRU miss             result: Passed
I0912 04:31:15.309085  3131 BpfTester.cpp:220] Test: QUIC: long header. 0-RTT Protected. CH. LRU hit.             result: Passed
I0912 04:31:15.309108  3131 BpfTester.cpp:220] Test: QUIC: long header. Handshake. v4 vip v6 real. Conn Id based. result: Passed
I0912 04:31:15.309135  3131 BpfTester.cpp:220] Test: QUIC: long header. Retry. v4 vip v6 real. Conn Id based.     result: Passed
I0912 04:31:15.309167  3131 BpfTester.cpp:220] Test: QUIC: long header. client initial. v6 vip v6 real. LRU miss  result: Passed
I0912 04:31:15.309195  3131 BpfTester.cpp:220] Test: QUIC: short header. No connection id. CH. LRU hit            result: Passed
I0912 04:31:15.309217  3131 BpfTester.cpp:220] Test: QUIC: short header w/ connection id                          result: Passed
I0912 04:31:15.309243  3131 BpfTester.cpp:220] Test: QUIC: short header w/ connection id but non-existing mapping result: Passed
I0912 04:31:15.309267  3131 BpfTester.cpp:220] Test: QUIC: short header w/ conn id. host id = 0. CH. LRU hit      result: Passed
I0912 04:31:15.309290  3131 BpfTester.cpp:220] Test: packet to TCP based v4 VIP (and v4 real) + ToS in IPV4       result: Passed
I0912 04:31:15.309319  3131 BpfTester.cpp:220] Test: packet to TCP based v6 VIP (and v6 real) with ToS / tc set   result: Passed
I0912 04:31:15.309324  3131 katran_tester.cpp:257] Testing counter's sanity. Printing on errors only
I0912 04:31:15.309350  3131 katran_tester.cpp:261] per Vip counter is incorrect for vip:10.200.1.1
I0912 04:31:15.309361  3131 katran_tester.cpp:266] LRU counter is incorrect
I0912 04:31:15.309371  3131 katran_tester.cpp:271] per pckt type LRU miss counter is incorrect
I0912 04:31:15.309381  3131 katran_tester.cpp:276] LRU fallback counter is incorrect
I0912 04:31:15.309391  3131 katran_tester.cpp:280] Counters for QUIC packets routed with CH: 10,  with connection-id: 8
I0912 04:31:15.309394  3131 katran_tester.cpp:282] Counters for routing of QUIC packets is wrong.
I0912 04:31:15.309406  3131 katran_tester.cpp:296] incorrect stats for real: 10.0.0.1
I0912 04:31:15.309410  3131 katran_tester.cpp:297] Expected to be incorrect w/ non default build flags
I0912 04:31:15.309418  3131 katran_tester.cpp:296] incorrect stats for real: 10.0.0.2
I0912 04:31:15.309422  3131 katran_tester.cpp:297] Expected to be incorrect w/ non default build flags
I0912 04:31:15.309429  3131 katran_tester.cpp:296] incorrect stats for real: 10.0.0.3
I0912 04:31:15.309432  3131 katran_tester.cpp:297] Expected to be incorrect w/ non default build flags
I0912 04:31:15.309442  3131 katran_tester.cpp:296] incorrect stats for real: fc00::1
I0912 04:31:15.309444  3131 katran_tester.cpp:297] Expected to be incorrect w/ non default build flags
I0912 04:31:15.309453  3131 katran_tester.cpp:296] incorrect stats for real: fc00::2
I0912 04:31:15.309455  3131 katran_tester.cpp:297] Expected to be incorrect w/ non default build flags
I0912 04:31:15.309463  3131 katran_tester.cpp:296] incorrect stats for real: fc00::3
I0912 04:31:15.309466  3131 katran_tester.cpp:297] Expected to be incorrect w/ non default build flags
I0912 04:31:15.309469  3131 katran_tester.cpp:313] Testing of counters is complete
E0912 04:31:15.309583  3131 KatranSimulator.cpp:168] src and dst must have same address family
E0912 04:31:15.309588  3131 KatranSimulator.cpp:161] malformed src or dst ip address. src: aaaa dst: bbbb
E0912 04:31:15.309595  3131 BpfLoader.cpp:104] Can't find prog with name: cls-hc
I0912 04:31:15.309599  3131 katran_tester.cpp:179] Healthchecking not enabled. Skipping HC related tests
```

Pull Request resolved: #96

Reviewed By: xttjsn

Differential Revision: D23674803

Pulled By: udippant

fbshipit-source-id: 3e93c42f97e5559258d87fa9ba0e47d8d52f5349
facebook-github-bot pushed a commit that referenced this pull request Nov 1, 2021
… a flag

Summary:
There are two things that are only supported in kernel-5.6+:
1) passing of variable defined in stack (in this case opt_state to parse_hdr_opt())
2) bounded loop without the #pragma unroll (https://lore.kernel.org/netdev/20190615191225.2409862-5-ast@kernel.org/)

The existing check meant to guard w/ the kernel version `#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 3, 0)`
at compile time isn't always effective since the bpf object can be compiled in host with different kernel version.

So, this diff adds a flag (TCP_HDR_OPT_SKIP_UNROLL_LOOP) for users to be able to toggle both #1 and #2.
'__always_inline__' addresses #1 since it makes the parse_hdr_opt() impl inline.
Therefore, the restriction on passing of the variable in stack memory isn't applicable.

Reviewed By: avasylev

Differential Revision: D32035828

fbshipit-source-id: 4b52652b761133359795414028777e331d54870f
facebook-github-bot pushed a commit that referenced this pull request Mar 20, 2024
Summary:
After diving in all the build system I found that the first error mentioned in #219 and #220

```
1597 | static_assert(formattable_char, "Mixing character types is disallowed.");
```

Was basically happening while compiling folly, after compiling it by itself I noticed this didn't happened, so I found that there was an issue with the fmt dependencies, removing the one that was downloaded by katran

The issue mentioned in: #221

Was because katran was configured to use C++14 by default, and some of the libraries of folly require C++17, updated our requirements.


Test Plan:
TEST Output:

```
Test project /home/ubuntu/ivanmorett/katran/_build/build/katran/lib/tests
      Start  1: IpHelpersTests.testV4ParsingBe
 1/56 Test  #1: IpHelpersTests.testV4ParsingBe .......................   Passed    0.01 sec
      Start  2: IpHelpersTests.testV4ParsingInt
 2/56 Test  #2: IpHelpersTests.testV4ParsingInt ......................   Passed    0.01 sec
      Start  3: IpHelpersTests.testV6ParsingBe
 3/56 Test  #3: IpHelpersTests.testV6ParsingBe .......................   Passed    0.01 sec
      Start  4: IpHelpersTests.testV6ParsingInt
 4/56 Test  #4: IpHelpersTests.testV6ParsingInt ......................   Passed    0.01 sec
      Start  5: IpHelpersTests.testIncorrectAddr
 5/56 Test  #5: IpHelpersTests.testIncorrectAddr .....................   Passed    0.01 sec
      Start  6: CHHelpersTest.testMaglevCHSameWeight
 6/56 Test  #6: CHHelpersTest.testMaglevCHSameWeight .................   Passed    0.01 sec
      Start  7: CHHelpersTest.testMaglevV2CHSameWeight
 7/56 Test  #7: CHHelpersTest.testMaglevV2CHSameWeight ...............   Passed    0.01 sec
      Start  8: CHHelpersTest.testMaglevCHDiffWeight
 8/56 Test  #8: CHHelpersTest.testMaglevCHDiffWeight .................   Passed    0.01 sec
      Start  9: CHHelpersTest.testMaglevV2CHDiffWeight
 9/56 Test  #9: CHHelpersTest.testMaglevV2CHDiffWeight ...............   Passed    0.01 sec
      Start 10: CHHelpersTest.testMaglevWeightsSumLargerThanRing
10/56 Test #10: CHHelpersTest.testMaglevWeightsSumLargerThanRing .....   Passed    0.01 sec
      Start 11: CHHelpersTest.testMaglevWeightsSumBelowRingSize
11/56 Test #11: CHHelpersTest.testMaglevWeightsSumBelowRingSize ......   Passed    0.01 sec
      Start 12: KatranLbTest.testChangeMac
12/56 Test #12: KatranLbTest.testChangeMac ...........................   Passed    0.01 sec
      Start 13: KatranLbTest.testIfIndex
13/56 Test #13: KatranLbTest.testIfIndex .............................   Passed    0.01 sec
      Start 14: KatranLbTest.testVipHelpers
14/56 Test #14: KatranLbTest.testVipHelpers ..........................   Passed    0.14 sec
      Start 15: KatranLbTest.testAddingInvalidVip
15/56 Test #15: KatranLbTest.testAddingInvalidVip ....................   Passed    0.01 sec
      Start 16: KatranLbTest.testRealHelpers
16/56 Test #16: KatranLbTest.testRealHelpers .........................   Passed    0.01 sec
      Start 17: KatranLbTest.testRealFlags
17/56 Test #17: KatranLbTest.testRealFlags ...........................   Passed    0.01 sec
      Start 18: KatranLbTest.testVipStatsHelper
18/56 Test #18: KatranLbTest.testVipStatsHelper ......................   Passed    0.01 sec
      Start 19: KatranLbTest.testLruStatsHelper
19/56 Test #19: KatranLbTest.testLruStatsHelper ......................   Passed    0.01 sec
      Start 20: KatranLbTest.testLruMissStatsHelper
20/56 Test #20: KatranLbTest.testLruMissStatsHelper ..................   Passed    0.01 sec
      Start 21: KatranLbTest.testHcHelpers
21/56 Test #21: KatranLbTest.testHcHelpers ...........................   Passed    0.01 sec
      Start 22: KatranLbTest.getVipFlags
22/56 Test #22: KatranLbTest.getVipFlags .............................   Passed    0.01 sec
      Start 23: KatranLbTest.getAllVips
23/56 Test #23: KatranLbTest.getAllVips ..............................   Passed    0.01 sec
      Start 24: KatranLbTest.testUpdateRealsHelper
24/56 Test #24: KatranLbTest.testUpdateRealsHelper ...................   Passed    0.07 sec
      Start 25: KatranLbTest.testUpdateQuicRealsHelper
25/56 Test #25: KatranLbTest.testUpdateQuicRealsHelper ...............   Passed    0.06 sec
      Start 26: KatranLbTest.testUpdateQuicReal
26/56 Test #26: KatranLbTest.testUpdateQuicReal ......................   Passed    0.01 sec
      Start 27: KatranLbTest.getRealsForVip
27/56 Test #27: KatranLbTest.getRealsForVip ..........................   Passed    0.01 sec
      Start 28: KatranLbTest.getHealthcheckersDst
28/56 Test #28: KatranLbTest.getHealthcheckersDst ....................   Passed    0.01 sec
      Start 29: KatranLbTest.invalidAddressHandling
29/56 Test #29: KatranLbTest.invalidAddressHandling ..................   Passed    0.01 sec
      Start 30: KatranLbTest.addInvalidSrcRoutingRule
30/56 Test #30: KatranLbTest.addInvalidSrcRoutingRule ................   Passed    0.01 sec
      Start 31: KatranLbTest.addValidSrcRoutingRuleV4
31/56 Test #31: KatranLbTest.addValidSrcRoutingRuleV4 ................   Passed    0.01 sec
      Start 32: KatranLbTest.addValidSrcRoutingRuleV6
32/56 Test #32: KatranLbTest.addValidSrcRoutingRuleV6 ................   Passed    0.01 sec
      Start 33: KatranLbTest.addMaxSrcRules
33/56 Test #33: KatranLbTest.addMaxSrcRules ..........................   Passed    0.01 sec
      Start 34: KatranLbTest.delSrcRules
34/56 Test #34: KatranLbTest.delSrcRules .............................   Passed    0.01 sec
      Start 35: KatranLbTest.clearSrcRules
35/56 Test #35: KatranLbTest.clearSrcRules ...........................   Passed    0.01 sec
      Start 36: KatranLbTest.addFewInvalidNets
36/56 Test #36: KatranLbTest.addFewInvalidNets .......................   Passed    0.01 sec
      Start 37: KatranLbTest.addInvalidDecapDst
37/56 Test #37: KatranLbTest.addInvalidDecapDst ......................   Passed    0.01 sec
      Start 38: KatranLbTest.addInvalidDecapDstNet
38/56 Test #38: KatranLbTest.addInvalidDecapDstNet ...................   Passed    0.01 sec
      Start 39: KatranLbTest.addValidDecapDst
39/56 Test #39: KatranLbTest.addValidDecapDst ........................   Passed    0.01 sec
      Start 40: KatranLbTest.delValidDecapDst
40/56 Test #40: KatranLbTest.delValidDecapDst ........................   Passed    0.01 sec
      Start 41: KatranLbTest.delInvalidDecapDst
41/56 Test #41: KatranLbTest.delInvalidDecapDst ......................   Passed    0.01 sec
      Start 42: KatranLbTest.addMaxDecapDst
42/56 Test #42: KatranLbTest.addMaxDecapDst ..........................   Passed    0.01 sec
      Start 43: VipTestF.testBatchUpdateReals
43/56 Test #43: VipTestF.testBatchUpdateReals ........................   Passed    0.04 sec
      Start 44: VipTestF.testBatchUpdateRealsWeight
44/56 Test #44: VipTestF.testBatchUpdateRealsWeight ..................   Passed    0.05 sec
      Start 45: VipTestF.testGetRealsAndWeight
45/56 Test #45: VipTestF.testGetRealsAndWeight .......................   Passed    0.01 sec
      Start 46: VipTestF.testGetReals
46/56 Test #46: VipTestF.testGetReals ................................   Passed    0.02 sec
      Start 47: VipTest.testAddRemoveReal
47/56 Test #47: VipTest.testAddRemoveReal ............................   Passed    0.01 sec
      Start 48: EventPipeCallbackTest.SimpleCallbackTest
48/56 Test #48: EventPipeCallbackTest.SimpleCallbackTest .............   Passed    0.01 sec
      Start 49: EventPipeCallbackTest.LargeWriteTest
49/56 Test #49: EventPipeCallbackTest.LargeWriteTest .................   Passed    0.15 sec
      Start 50: TestMonitoringServiceCore.SimpleAcceptSubscription
50/56 Test #50: TestMonitoringServiceCore.SimpleAcceptSubscription ...   Passed    0.01 sec
      Start 51: TestMonitoringServiceCore.SimpleErrors
51/56 Test #51: TestMonitoringServiceCore.SimpleErrors ...............   Passed    0.01 sec
      Start 52: TestMonitoringServiceCore.EventIntersection
52/56 Test #52: TestMonitoringServiceCore.EventIntersection ..........   Passed    0.01 sec
      Start 53: TestMonitoringServiceCore.RacingClients
53/56 Test #53: TestMonitoringServiceCore.RacingClients ..............   Passed    0.01 sec
      Start 54: TestMonitoringServiceCore.SubscribeAndCancel
54/56 Test #54: TestMonitoringServiceCore.SubscribeAndCancel .........   Passed    0.01 sec
      Start 55: PcapWriterTest.SingleWriter
55/56 Test #55: PcapWriterTest.SingleWriter ..........................   Passed    0.02 sec
      Start 56: PcapWriterTest.MultiWriter
56/56 Test #56: PcapWriterTest.MultiWriter ...........................   Passed    0.01 sec

100% tests passed, 0 tests failed out of 56

Total Test time (real) =   1.04 sec
+ cd ../testing/
+ ctest -v ./CMakeFiles ./CTestTestfile.cmake ./Makefile ./base64helpers-tests './base64helpers-tests[1]_include.cmake' './base64helpers-tests[1]_tests.cmake' ./cmake_install.cmake ./katran_tester ./libbase64_helpers.a ./libbpftester.a ./libkatran_test_provision.a ./libkatran_test_util.a ./libpcap_parser.a
ctest: /usr/local/lib/libcurl.so.4: no version information available (required by ctest)
Test project /home/ubuntu/ivanmorett/katran/_build/build/katran/lib/testing
    Start 1: Base64Tests.testEncode
1/2 Test #1: Base64Tests.testEncode ...........   Passed    0.01 sec
    Start 2: Base64Tests.testDecode
2/2 Test #2: Base64Tests.testDecode ...........   Passed    0.01 sec

100% tests passed, 0 tests failed out of 2

Total Test time (real) =   0.01 sec
+ popd
~/ivanmorett/katran/_build
```

Differential Revision: D55108012

Pulled By: lima1756
lima1756 added a commit that referenced this pull request Mar 20, 2024
Summary:
After diving in all the build system I found that the first error mentioned in #219 and #220

```
1597 | static_assert(formattable_char, "Mixing character types is disallowed.");
```

Was basically happening while compiling folly, after compiling it by itself I noticed this didn't happened, so I found that there was an issue with the fmt dependencies, removing the one that was downloaded by katran

The issue mentioned in: #221

Was because katran was configured to use C++14 by default, and some of the libraries of folly require C++17, updated our requirements.


Test Plan:
TEST Output:

```
Test project /home/ubuntu/ivanmorett/katran/_build/build/katran/lib/tests
      Start  1: IpHelpersTests.testV4ParsingBe
 1/56 Test  #1: IpHelpersTests.testV4ParsingBe .......................   Passed    0.01 sec
      Start  2: IpHelpersTests.testV4ParsingInt
 2/56 Test  #2: IpHelpersTests.testV4ParsingInt ......................   Passed    0.01 sec
      Start  3: IpHelpersTests.testV6ParsingBe
 3/56 Test  #3: IpHelpersTests.testV6ParsingBe .......................   Passed    0.01 sec
      Start  4: IpHelpersTests.testV6ParsingInt
 4/56 Test  #4: IpHelpersTests.testV6ParsingInt ......................   Passed    0.01 sec
      Start  5: IpHelpersTests.testIncorrectAddr
 5/56 Test  #5: IpHelpersTests.testIncorrectAddr .....................   Passed    0.01 sec
      Start  6: CHHelpersTest.testMaglevCHSameWeight
 6/56 Test  #6: CHHelpersTest.testMaglevCHSameWeight .................   Passed    0.01 sec
      Start  7: CHHelpersTest.testMaglevV2CHSameWeight
 7/56 Test  #7: CHHelpersTest.testMaglevV2CHSameWeight ...............   Passed    0.01 sec
      Start  8: CHHelpersTest.testMaglevCHDiffWeight
 8/56 Test  #8: CHHelpersTest.testMaglevCHDiffWeight .................   Passed    0.01 sec
      Start  9: CHHelpersTest.testMaglevV2CHDiffWeight
 9/56 Test  #9: CHHelpersTest.testMaglevV2CHDiffWeight ...............   Passed    0.01 sec
      Start 10: CHHelpersTest.testMaglevWeightsSumLargerThanRing
10/56 Test #10: CHHelpersTest.testMaglevWeightsSumLargerThanRing .....   Passed    0.01 sec
      Start 11: CHHelpersTest.testMaglevWeightsSumBelowRingSize
11/56 Test #11: CHHelpersTest.testMaglevWeightsSumBelowRingSize ......   Passed    0.01 sec
      Start 12: KatranLbTest.testChangeMac
12/56 Test #12: KatranLbTest.testChangeMac ...........................   Passed    0.01 sec
      Start 13: KatranLbTest.testIfIndex
13/56 Test #13: KatranLbTest.testIfIndex .............................   Passed    0.01 sec
      Start 14: KatranLbTest.testVipHelpers
14/56 Test #14: KatranLbTest.testVipHelpers ..........................   Passed    0.14 sec
      Start 15: KatranLbTest.testAddingInvalidVip
15/56 Test #15: KatranLbTest.testAddingInvalidVip ....................   Passed    0.01 sec
      Start 16: KatranLbTest.testRealHelpers
16/56 Test #16: KatranLbTest.testRealHelpers .........................   Passed    0.01 sec
      Start 17: KatranLbTest.testRealFlags
17/56 Test #17: KatranLbTest.testRealFlags ...........................   Passed    0.01 sec
      Start 18: KatranLbTest.testVipStatsHelper
18/56 Test #18: KatranLbTest.testVipStatsHelper ......................   Passed    0.01 sec
      Start 19: KatranLbTest.testLruStatsHelper
19/56 Test #19: KatranLbTest.testLruStatsHelper ......................   Passed    0.01 sec
      Start 20: KatranLbTest.testLruMissStatsHelper
20/56 Test #20: KatranLbTest.testLruMissStatsHelper ..................   Passed    0.01 sec
      Start 21: KatranLbTest.testHcHelpers
21/56 Test #21: KatranLbTest.testHcHelpers ...........................   Passed    0.01 sec
      Start 22: KatranLbTest.getVipFlags
22/56 Test #22: KatranLbTest.getVipFlags .............................   Passed    0.01 sec
      Start 23: KatranLbTest.getAllVips
23/56 Test #23: KatranLbTest.getAllVips ..............................   Passed    0.01 sec
      Start 24: KatranLbTest.testUpdateRealsHelper
24/56 Test #24: KatranLbTest.testUpdateRealsHelper ...................   Passed    0.07 sec
      Start 25: KatranLbTest.testUpdateQuicRealsHelper
25/56 Test #25: KatranLbTest.testUpdateQuicRealsHelper ...............   Passed    0.06 sec
      Start 26: KatranLbTest.testUpdateQuicReal
26/56 Test #26: KatranLbTest.testUpdateQuicReal ......................   Passed    0.01 sec
      Start 27: KatranLbTest.getRealsForVip
27/56 Test #27: KatranLbTest.getRealsForVip ..........................   Passed    0.01 sec
      Start 28: KatranLbTest.getHealthcheckersDst
28/56 Test #28: KatranLbTest.getHealthcheckersDst ....................   Passed    0.01 sec
      Start 29: KatranLbTest.invalidAddressHandling
29/56 Test #29: KatranLbTest.invalidAddressHandling ..................   Passed    0.01 sec
      Start 30: KatranLbTest.addInvalidSrcRoutingRule
30/56 Test #30: KatranLbTest.addInvalidSrcRoutingRule ................   Passed    0.01 sec
      Start 31: KatranLbTest.addValidSrcRoutingRuleV4
31/56 Test #31: KatranLbTest.addValidSrcRoutingRuleV4 ................   Passed    0.01 sec
      Start 32: KatranLbTest.addValidSrcRoutingRuleV6
32/56 Test #32: KatranLbTest.addValidSrcRoutingRuleV6 ................   Passed    0.01 sec
      Start 33: KatranLbTest.addMaxSrcRules
33/56 Test #33: KatranLbTest.addMaxSrcRules ..........................   Passed    0.01 sec
      Start 34: KatranLbTest.delSrcRules
34/56 Test #34: KatranLbTest.delSrcRules .............................   Passed    0.01 sec
      Start 35: KatranLbTest.clearSrcRules
35/56 Test #35: KatranLbTest.clearSrcRules ...........................   Passed    0.01 sec
      Start 36: KatranLbTest.addFewInvalidNets
36/56 Test #36: KatranLbTest.addFewInvalidNets .......................   Passed    0.01 sec
      Start 37: KatranLbTest.addInvalidDecapDst
37/56 Test #37: KatranLbTest.addInvalidDecapDst ......................   Passed    0.01 sec
      Start 38: KatranLbTest.addInvalidDecapDstNet
38/56 Test #38: KatranLbTest.addInvalidDecapDstNet ...................   Passed    0.01 sec
      Start 39: KatranLbTest.addValidDecapDst
39/56 Test #39: KatranLbTest.addValidDecapDst ........................   Passed    0.01 sec
      Start 40: KatranLbTest.delValidDecapDst
40/56 Test #40: KatranLbTest.delValidDecapDst ........................   Passed    0.01 sec
      Start 41: KatranLbTest.delInvalidDecapDst
41/56 Test #41: KatranLbTest.delInvalidDecapDst ......................   Passed    0.01 sec
      Start 42: KatranLbTest.addMaxDecapDst
42/56 Test #42: KatranLbTest.addMaxDecapDst ..........................   Passed    0.01 sec
      Start 43: VipTestF.testBatchUpdateReals
43/56 Test #43: VipTestF.testBatchUpdateReals ........................   Passed    0.04 sec
      Start 44: VipTestF.testBatchUpdateRealsWeight
44/56 Test #44: VipTestF.testBatchUpdateRealsWeight ..................   Passed    0.05 sec
      Start 45: VipTestF.testGetRealsAndWeight
45/56 Test #45: VipTestF.testGetRealsAndWeight .......................   Passed    0.01 sec
      Start 46: VipTestF.testGetReals
46/56 Test #46: VipTestF.testGetReals ................................   Passed    0.02 sec
      Start 47: VipTest.testAddRemoveReal
47/56 Test #47: VipTest.testAddRemoveReal ............................   Passed    0.01 sec
      Start 48: EventPipeCallbackTest.SimpleCallbackTest
48/56 Test #48: EventPipeCallbackTest.SimpleCallbackTest .............   Passed    0.01 sec
      Start 49: EventPipeCallbackTest.LargeWriteTest
49/56 Test #49: EventPipeCallbackTest.LargeWriteTest .................   Passed    0.15 sec
      Start 50: TestMonitoringServiceCore.SimpleAcceptSubscription
50/56 Test #50: TestMonitoringServiceCore.SimpleAcceptSubscription ...   Passed    0.01 sec
      Start 51: TestMonitoringServiceCore.SimpleErrors
51/56 Test #51: TestMonitoringServiceCore.SimpleErrors ...............   Passed    0.01 sec
      Start 52: TestMonitoringServiceCore.EventIntersection
52/56 Test #52: TestMonitoringServiceCore.EventIntersection ..........   Passed    0.01 sec
      Start 53: TestMonitoringServiceCore.RacingClients
53/56 Test #53: TestMonitoringServiceCore.RacingClients ..............   Passed    0.01 sec
      Start 54: TestMonitoringServiceCore.SubscribeAndCancel
54/56 Test #54: TestMonitoringServiceCore.SubscribeAndCancel .........   Passed    0.01 sec
      Start 55: PcapWriterTest.SingleWriter
55/56 Test #55: PcapWriterTest.SingleWriter ..........................   Passed    0.02 sec
      Start 56: PcapWriterTest.MultiWriter
56/56 Test #56: PcapWriterTest.MultiWriter ...........................   Passed    0.01 sec

100% tests passed, 0 tests failed out of 56

Total Test time (real) =   1.04 sec
+ cd ../testing/
+ ctest -v ./CMakeFiles ./CTestTestfile.cmake ./Makefile ./base64helpers-tests './base64helpers-tests[1]_include.cmake' './base64helpers-tests[1]_tests.cmake' ./cmake_install.cmake ./katran_tester ./libbase64_helpers.a ./libbpftester.a ./libkatran_test_provision.a ./libkatran_test_util.a ./libpcap_parser.a
ctest: /usr/local/lib/libcurl.so.4: no version information available (required by ctest)
Test project /home/ubuntu/ivanmorett/katran/_build/build/katran/lib/testing
    Start 1: Base64Tests.testEncode
1/2 Test #1: Base64Tests.testEncode ...........   Passed    0.01 sec
    Start 2: Base64Tests.testDecode
2/2 Test #2: Base64Tests.testDecode ...........   Passed    0.01 sec

100% tests passed, 0 tests failed out of 2

Total Test time (real) =   0.01 sec
+ popd
~/ivanmorett/katran/_build
```

Differential Revision: D55108012

Pulled By: lima1756
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants