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

ip checksum issue ? #26

Closed
sbernard31 opened this issue Feb 12, 2019 · 11 comments
Closed

ip checksum issue ? #26

sbernard31 opened this issue Feb 12, 2019 · 11 comments

Comments

@sbernard31
Copy link

Hi,
I'm pretty much a novice in XDP and low level network protocol but reading rfc791 I understand that checksum should be calculate using the whole ip header.

E.g. :

 Checksum

    The internet header checksum is recomputed if the internet header is
    changed.  For example, a reduction of the time to live, additions or
    changes to internet options, or due to fragmentation.  This checksum
    at the internet level is intended to protect the internet header
    fields from transmission errors.

So would it be more correct to calculate checksum using iph->ihl instead of sizeof(struct iphdr) in balancer_helpers.h ?

(bonus question why using >> 1 instead of / 2 ? 2nd solution seems semantically more appropriate, is there any reason or this is just a programming preference ?)

@tehnerd
Copy link
Contributor

tehnerd commented Feb 12, 2019

  1. unroll for this loop is being done in compile time. iph->ihl is a runtime var. so unroll wont be possible. for balancer code it doesn't matter that we use struct iphdr, as we dont support anything w/ ip options set (so iph->ihl for us is always equal to 5 aka sizeof(struct iphdr))

  2. preference. butall of this computed in compile time. so there wont be any perf difference of / vs >>.

@sbernard31
Copy link
Author

Thx @tehnerd for the quick response.

About unroll, As I understand, the idea is to replace at compile time a loop by a "static" sequence of instructions. I would have said that was because dynamic loop was not accepted by the bpf verifier, but I write an XDP program with a loop like this :

iph->check = 0;
u32 csum = 0;
__u16 * next_iph_u16 = (__u16 *)iph;
for (int i = 0; i < iph->ihl / 2; i++) {
    csum += *next_iph_u16++;
}
iph->check = ~((csum & 0xffff) + (csum >> 16));

And it seems that works.
So is this about optimization ? or did I missed something ?

@tehnerd
Copy link
Contributor

tehnerd commented Feb 13, 2019

Have you tried to load it into kernel? Program compiled != it is going to work in kernel. Bpf’s verifier will refuse it when you will try to do so

@sbernard31
Copy link
Author

I make it works. I mean I tested it and see modified packet with wireshark.

But If I well understand you, you don't expect this code works ?

@tehnerd
Copy link
Contributor

tehnerd commented Feb 13, 2019

Could you share the whole code of your program?

@tehnerd
Copy link
Contributor

tehnerd commented Feb 13, 2019

Yes I don’t expect your code to work. Unless somewhere above you have line like “iph->ihl = 5” and compiler doing unroll for you under the hood

@sbernard31
Copy link
Author

sbernard31 commented Feb 13, 2019

Here is my code not intended to be shared I just played with XDP to understand it ...

@tehnerd
Copy link
Contributor

tehnerd commented Feb 13, 2019

ok. so your code w/ BPF(blahblahb, debug=2):

//  this is equal to line 78
80: (15) if r1 == 0x100007f goto pc+72
 R0=inv2 R1=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff)) R6=ctx(id=0,off=0,imm=0) R7=pkt(id=0,off=0,r=34,imm=0) R8=pkt(id=0,off=14,r=34,imm=0) R10=fp0
81: (b7) r1 = 0
// this is memset  from 81
82: (73) *(u8 *)(r7 +5) = r1
83: (73) *(u8 *)(r7 +4) = r1
84: (73) *(u8 *)(r7 +3) = r1
85: (73) *(u8 *)(r7 +2) = r1
86: (73) *(u8 *)(r7 +1) = r1
87: (73) *(u8 *)(r7 +0) = r1
88: (b7) r2 = 16777343
// this is 82 
89: (63) *(u32 *)(r7 +30) = r2
// this is 87
90: (6b) *(u16 *)(r7 +24) = r1
// this is 89
91: (71) r2 = *(u8 *)(r7 +14)
// r3 now equal to the start of the packet. first byte is version + ihl
92: (bf) r3 = r2
// this is testing that ihl at least more than 1
93: (57) r3 &= 14
94: (15) if r3 == 0x0 goto pc+4
 R0=inv2 R1=inv0 R2=inv(id=0,umax_value=255,var_off=(0x0; 0xff)) R3=inv(id=0,umax_value=14,var_off=(0x0; 0xe)) R6=ctx(id=0,off=0,imm=0) R7=pkt(id=0,off=0,r=34,imm=0) R8=pkt(id=0,off=14,r=34,imm=0) R10=fp0
95: (69) r1 = *(u16 *)(r8 +0)
// r2 point to first byte of the packet. two lines bellow is ihl/2
96: (77) r2 >>= 1
97: (57) r2 &= 7
// this says "if ihl /2 is more that 1 (so original ihl is more than 2) -> exit
98: (25) if r2 > 0x1 goto pc+55
 R0=inv2 R1=inv(id=0,umax_value=65535,var_off=(0x0; 0xffff)) R2=inv(id=0,umax_value=1,var_off=(0x0; 0x1)) R3=inv(id=0,umax_value=14,var_off=(0x0; 0xe)) R6=ctx(id=0,off=0,imm=0) R7=pkt(id=0,off=0,r=34,imm=0) R8=pkt(id=0,off=14,r=34,imm=0) R10=fp0
99: (bf) r2 = r1
100: (77) r2 >>= 16
101: (0f) r2 += r1
// here aends first pass of the loop and we exit form it. line 102 here is equal to line 94 in your code
102: (a7) r2 ^= -1
// line below is equal to line 94 in your code. 
103: (6b) *(u16 *)(r7 +24) = r2

// bellow is memcpy etc
104: (71) r1 = *(u8 *)(r7 +9)
105: (67) r1 <<= 8
106: (71) r2 = *(u8 *)(r7 +8)
107: (4f) r1 |= r2
108: (71) r2 = *(u8 *)(r7 +11)
109: (67) r2 <<= 8
110: (71) r3 = *(u8 *)(r7 +10)
111: (4f) r2 |= r3
112: (67) r2 <<= 16
113: (4f) r2 |= r1
114: (71) r3 = *(u8 *)(r7 +1)
115: (67) r3 <<= 8
116: (71) r1 = *(u8 *)(r7 +0)
117: (4f) r3 |= r1
118: (71) r1 = *(u8 *)(r7 +3)
119: (67) r1 <<= 8
120: (71) r4 = *(u8 *)(r7 +2)
121: (4f) r1 |= r4
122: (63) *(u32 *)(r10 -40) = r2
123: (67) r1 <<= 16
124: (4f) r1 |= r3
125: (71) r2 = *(u8 *)(r7 +5)
126: (67) r2 <<= 8
127: (71) r3 = *(u8 *)(r7 +4)
128: (4f) r2 |= r3
129: (71) r3 = *(u8 *)(r7 +7)
130: (67) r3 <<= 8
131: (71) r4 = *(u8 *)(r7 +6)
132: (4f) r3 |= r4
133: (67) r3 <<= 16
134: (4f) r3 |= r2
135: (67) r3 <<= 32
136: (4f) r3 |= r1

as you can see from comments above from bpf's assembler pov loop is executed at most once. in comparison if we would do the way we do in katran's code (by uncommenting 91 and commenting out line 90)

82: (73) *(u8 *)(r7 +5) = r1
83: (73) *(u8 *)(r7 +4) = r1
84: (73) *(u8 *)(r7 +3) = r1
85: (73) *(u8 *)(r7 +2) = r1
86: (73) *(u8 *)(r7 +1) = r1
87: (73) *(u8 *)(r7 +0) = r1
88: (b7) r1 = 16777343
89: (63) *(u32 *)(r7 +30) = r1
90: (69) r1 = *(u16 *)(r7 +14)
91: (69) r2 = *(u16 *)(r7 +16)
92: (0f) r2 += r1
93: (69) r1 = *(u16 *)(r7 +18)
94: (0f) r2 += r1
95: (69) r1 = *(u16 *)(r7 +20)
96: (0f) r2 += r1
97: (69) r1 = *(u16 *)(r7 +22)
98: (0f) r2 += r1
99: (69) r1 = *(u16 *)(r7 +26)
100: (0f) r2 += r1
101: (69) r1 = *(u16 *)(r7 +28)
102: (0f) r2 += r1
103: (07) r2 += 383
104: (bf) r1 = r2
105: (77) r1 >>= 16
106: (0f) r1 += r2
107: (a7) r1 ^= -1
108: (6b) *(u16 *)(r7 +24) = r1

you can see full unroll and everything is workign as expected.
if you would run tcpdump w/ -vvv flags from your version you will see that csum is not correct.
so yeah. your code doesnt work as you expect it to work

@sbernard31
Copy link
Author

Thx a lot about the detailed explanation !

Playing with wireshark a bit, I validate that your way calculates valid checksum (and of course mine not)

But I was a bit confused about why "my code" is translated in this byte code... I mean : why it is unroll like there is at most one iteration in the loop?

I finally get that IHL is the size in 32 bit words, so the code I wanted to write :

iph->check = 0;
u32 csum = 0;
__u16 * next_iph_u16 = (__u16 *)iph;
for (int i = 0; i < iph->ihl *  2; i++) {
    csum += *next_iph_u16++;
}
iph->check = ~((csum & 0xffff) + (csum >> 16));

Fixing that, we get a more expected result as the byte code is now rejected by Bpf's verifier.

bpf: Failed to load program: Invalid argument
back-edge from insn 149 to 142

So a question remains, how could we calculate a checksum taking into account "variable size" IP options ? I mean, one of the XDP use case is about modifying packet and so calculate checksum should be a pretty standard use case ? Or maybe IP options is almost never used ?

(I totally aware that now my questions do not concern Katran directly, so do not hesitate to tell me if I abuse of your time or knowledge.)

@tehnerd
Copy link
Contributor

tehnerd commented Feb 13, 2019

"So a question remains, how could we calculate a checksum taking into account "variable size" IP options ?" by using bpf_csum_diff (see https://github.com/facebookincubator/katran/blob/master/katran/lib/bpf/balancer_helpers.h#L47 as example). but you need a kernel w/ support for this helper (it is not in 18.04 ubuntu yet).

"Or maybe IP options is almost never used ?" in real world on host-to-host packets they don't (there is some application for em for protocols, which are run between routers; but this is out of scope of this discussion)

@sbernard31
Copy link
Author

Ok, I get it. Thx again for your time :)

facebook-github-bot pushed a commit that referenced this issue Jul 16, 2020
Summary:
This diff adds a minimal workflow for running integrations tests for Mononoke. Currently only one test is run and it fails.

This also splits the regular Mononoke CI into separate files for Linux and Mac to match the current style in Eden repo.
There are the "scopeguard::defer" fixes here that somehow escaped the CI tests.
Some tweaks have been made to "integration_runner_real.py" to make it runnable outside FB context.
Lastly the change from using "[[ -v ... ]" to "[[ -n "${...:-}" ]]; in "library.sh" was made because the former is not supported by the default Bash version preinstalled on modern MacOS.

Pull Request resolved: facebook/sapling#26

Reviewed By: krallin

Differential Revision: D22541344

Pulled By: lukaspiatkowski

fbshipit-source-id: 5023d147823166a8754be852c29b1e7b0e6d9f5f
facebook-github-bot pushed a commit that referenced this issue Feb 9, 2022
Summary:
Pull Request resolved: facebookexperimental/rust-shed#26

Pull Request resolved: facebook/sapling#104

No need for the checked in generated code anymore

Successful external CI Linux run on Git Hub PR: https://github.com/facebookexperimental/eden/runs/5130405984?check_suite_focus=true

Mac PR run fails with a SSL cert issue, will look separately

Reviewed By: chadaustin, mitrandir77

Differential Revision: D33840545

fbshipit-source-id: eafc2a0e2191d438fd828adeebc2e318d319025f
dgrnbrg-meta added a commit to dgrnbrg-meta/katran that referenced this issue Mar 11, 2022
Summary:
X-link: facebook/fb303#26

X-link: facebookarchive/bistro#59

X-link: facebook/folly#1734

X-link: facebook/fboss#113

Adds an environment variable to getdeps to provide `hg` info to avoid calling `hg` directly.

When using `getdeps` inside a containerized environment (which we need to build Research Super Cluster tooling with the correct linker attributes), `getdeps` fails because of unregistered mercurial extensions in the `hgrc`.

This allows `getdeps` to be useable in an environment where the mercurial extensions used in a project aren't installed/available.

Reviewed By: vivekspai

Differential Revision: D34732506

fbshipit-source-id: dee1af2f87140e7c67213806022da5d8dd1ee82d
facebook-github-bot pushed a commit that referenced this issue 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 issue 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
None yet
Projects
None yet
Development

No branches or pull requests

2 participants