Subject: Rare project developers
List archive
Re: [rare-dev] polka is approaching rare... was: Re: custom crc32 library in freerouter
Chronological Thread
- From: mc36 <>
- To: Cristina Klippel Dominicini <>
- Cc: Rafael Silva Guimarães <>, "" <>, "Moises R. N. Ribeiro" <>, Magnos Martinello <>
- Subject: Re: [rare-dev] polka is approaching rare... was: Re: custom crc32 library in freerouter
- Date: Thu, 28 Oct 2021 07:47:24 +0200
hi,
i go inline...
regards,
cs
On 10/28/21 03:05, Cristina Klippel Dominicini wrote:
Hi Csaba,thanks! it was just your good paper and good sample code that helped a lot!
That is amazing progress!!!
some more progess here, as you're carrying ethertype within polka header, i
added
some mpls over polka test cases...
so one can tunnel mpls vpns (both layer2 and layer3) through a polka domain...
https://github.com/mc36/freeRouter/commit/aa261c3e3a5bf33f85e8068cf7555653f24c4e85
sounds interesting, especially the array of irreducible polys that i'm
I shared with you our repository with the preliminary code translation to
Java, which comprises the routeid computation for a given path (represented
by a set of nodeids and its respective portids). Today I taught classes all
day, and was not able to provide appropriate feedback, but tomorrow I will
translate the part related to the generation of arbitrary irreducible
polynomials for the nodeids and the CRC-based forwarding.
interested at the moment...
at the moment, i pick the n+1 entry and check if it have all gcm <= 1 to thet
If you are getting this exception, it means that your nodeID polynomials arebut interestingly, i had to comment out the irreducible check: throw new
Exception("NodeID polynomial is not irreducible");
not irreducible, which is a requisite for using the Chinese Remainder Theorem.
previous n entries...
you can find in previous mails the S array for your polkaMainTest.java, imho
those polys are irreducible... :)
but all in all, you know math better than me, sooo i'm open to change my
mind/code... :))
sounds interesting, waiting for your upcoming mails...
Regarding the design decisions (tables, MAC rewrite, indexes...), I agree with your previous considerations. I will elaborate some discussion points for tomorrow.
The discussion in the VC yesterday with you, Frederic and Jordi highlightedthanks... just for your information, i enabled polka in my homenet
very interesting arguments to exploit PolKA's benefits in real-world
deployments.
networkwide and things seems normal...
i can pass packets over real interfaces.... at the moment they're completely
handled in java's crc16 code,
but i'll progress soon with the p4dpdk dataplane export to see how if works
in emulated hardware...
(that one will enable some more test cases concentrating on polka dataplane,
so after that, i can
progress merging your patch to the tofino code and bring that to all tests
passing level...)
sid#show config-differences
router bgp4 65535
no redistribute connected
exit
interface tunnel1
no description
tunnel vrf v1
] tunnel source loopback0
tunnel destination 10.10.10.1
tunnel domain-name 10.10.10.5 10.10.10.20 10.10.10.199
tunnel mode polka
vrf forwarding v1
ipv4 address 1.1.1.2 255.255.255.252
no shutdown
no log-link-change
exit
sid#ping 1.1.1.1
pinging 1.1.1.1, src=10.10.10.227, vrf=v1, cnt=5, len=64, tim=1000, gap=0,
ttl=255, tos=0, flow=0, fill=0, sweep=false, multi=false, detail=false
!!!!!
result=100%, recv/sent/lost/err=5/5/0/0, rtt min/avg/max/total=30/31/33/159
sid#show interfaces tun1
tunnel1 is up (since 00:00:31, 2 changes)
description:
type is polka, hwaddr=none, mtu=1500, bw=8000kbps, vrf=v1
ip4 address=1.1.1.2/30, netmask=255.255.255.252, ifcid=619101103
received 0 packets (0 bytes) dropped 2 packets (132 bytes)
transmitted 15 packets (990 bytes) promisc=false macsec=false
sid#debug iface polka
sid#ping 1.1.1.1
pinging 1.1.1.1, src=10.10.10.227, vrf=v1, cnt=5, len=64, tim=1000, gap=0,
ttl=255, tos=0, flow=0, fill=0, sweep=false, multi=false, detail=false
debug ifcPolka.send2eth:ifcPolka.java:263 tx ttl=255 proto=2048 route= 00 00
00 00 00 00 00 00 22 54 dc cf 40 10 9e 59
!debug ifcPolka.send2eth:ifcPolka.java:263 tx ttl=255 proto=2048 route= 00 00
00 00 00 00 00 00 22 54 dc cf 40 10 9e 59
!debug ifcPolka.send2eth:ifcPolka.java:263 tx ttl=255 proto=2048 route= 00 00
00 00 00 00 00 00 22 54 dc cf 40 10 9e 59
!debug ifcPolka.send2eth:ifcPolka.java:263 tx ttl=255 proto=2048 route= 00 00
00 00 00 00 00 00 22 54 dc cf 40 10 9e 59
!debug ifcPolka.send2eth:ifcPolka.java:263 tx ttl=255 proto=2048 route= 00 00
00 00 00 00 00 00 22 54 dc cf 40 10 9e 59
!
result=100%, recv/sent/lost/err=5/5/0/0, rtt min/avg/max/total=31/32/35/164
sid#
Best regards,
Cristina
________________________________________
De: mc36 <>
Enviado: quarta-feira, 27 de outubro de 2021 20:23
Para: Cristina Klippel Dominicini
Cc: Rafael Silva Guimarães; ; Moises R. N. Ribeiro;
Magnos Martinello
Assunto: Re: polka is approaching rare... was: Re: custom crc32 library in
freerouter
hi,
sorry for the spam... finally managed to find out what was the issue with my
crc issue:
the degree of the S polynominals i used was 15 instead of 16... now i changed
a bit the
configs to start the polys at 64k and now thing seems fine here with crc16
computation...
https://github.com/mc36/freeRouter/commit/fe7f83f7464fe4383c733795d2919eacb8e3e98f
i'll do some more tests but if things are normal then i'll proceed tomorrow
with the
much simpler task: to export the iface-->coeff and the
(neighboring)nodeid-->nexthop
tables from freerouter... then the next step will be to introduce polka to
the p4dpdk
dataplane... i run a 30 node homenet on top of that dataplane so it'll be the
next
level of testing here, in live network... :)
regards,
cs
mc36@safe:/data.pub/src$ ./zzz.sh
s0=10000000000000000 17
s1=10000000000000001 17
s2=10000000000000011 17
s3=10000000000000101 17
s4=10000000000001001 17
s5=10000000000001111 17
s6=10000000000010001 17
s7=10000000000011011 17
s8=10000000000011101 17
s9=10000000000101011 17
o0=0xfbe8
o1=0x0003
o2=0x544e
o3=0x0005
o4=0x989f
o5=0x0007
o6=0x6cd7
o7=0x0008
o8=0x0009
o9=0x0000
r= 00 00 00 00 be 43 e1 8c ed 0f 43 ed 0a c6 fb e8
i=0 crc=0000 dif=fbe8 xor=fbe8
i=1 crc=fbeb dif=fbe8 xor=0003
i=2 crc=afa6 dif=fbe8 xor=544e
i=3 crc=fbed dif=fbe8 xor=0005
i=4 crc=6377 dif=fbe8 xor=989f
i=5 crc=fbef dif=fbe8 xor=0007
i=6 crc=973f dif=fbe8 xor=6cd7
i=7 crc=fbe0 dif=fbe8 xor=0008
i=8 crc=fbe1 dif=fbe8 xor=0009
i=9 crc=fbe8 dif=fbe8 xor=0000
On 10/28/21 00:38, mc36 wrote:
hi,
thanks for adding me... i've cross-checked the calculators and found that
yours and mine create the same routeid...
did some cosmetical changes, the printer functions and the sX and oX arrays
have been updated in your code...
below are the runs from yours and mine, both calculate the same routeid:
0x999e998f5578001
but interestingly, i had to comment out the irreducible check: throw new
Exception("NodeID polynomial is not irreducible");
egards,
cs
à à à à à à à long s1Array[] = {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0};
à à à à à à à long s2Array[] = {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 1};
à à à à à à à long s3Array[] = {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 1};
à à à à à à à long s4Array[] = {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 0, 1};
à à à à à à à long o1Array[] = {0, 0, 0, 1};
à à à à à à à long o2Array[] = {0, 0, 1, 0};
à à à à à à à long o3Array[] = {0, 0, 1, 1};
à à à à à à à long o4Array[] = {0, 0, 0, 0};
Oct 28, 2021 12:19:52 AM polka.PolKA <init>
FINE: PolKA Constructor
Oct 28, 2021 12:19:52 AM polka.PolKA <init>
FINE: S = [x^15, 1+x^15, 1+x+x^15, 1+x^2+x^15]
Oct 28, 2021 12:19:52 AM polka.PolKA <init>
FINE: O = [1, x, 1+x, 0]
Oct 28, 2021 12:19:52 AM polka.PolKA calculateR
INFO: PolKA RouteID Computation
Oct 28, 2021 12:19:52 AM polka.PolKA printPoly
INFO: S0 = 1000000000000000 = 0x8000
Oct 28, 2021 12:19:52 AM polka.PolKA printPoly
INFO: S1 = 1000000000000001 = 0x8001
Oct 28, 2021 12:19:52 AM polka.PolKA printPoly
INFO: S2 = 1000000000000011 = 0x8003
Oct 28, 2021 12:19:52 AM polka.PolKA printPoly
INFO: S3 = 1000000000000101 = 0x8005
Oct 28, 2021 12:19:52 AM polka.PolKA printPoly
INFO: O0 = 0001 = 0x1
Oct 28, 2021 12:19:52 AM polka.PolKA printPoly
INFO: O1 = 0010 = 0x2
Oct 28, 2021 12:19:52 AM polka.PolKA printPoly
INFO: O2 = 0011 = 0x3
Oct 28, 2021 12:19:52 AM polka.PolKA printPoly
INFO: O3 = 0000 = 0x0
Oct 28, 2021 12:19:52 AM polka.PolKA printPoly
INFO: t0 = 1000000000000111000000000001001000000000001111 = 0x2001c004800f
Oct 28, 2021 12:19:52 AM polka.PolKA printPoly
INFO: t1 = 1000000000000110000000000001111000000000000000 = 0x200180078000
Oct 28, 2021 12:19:52 AM polka.PolKA printPoly
INFO: t2 = 1000000000000100000000000000101000000000000000 = 0x200100028000
Oct 28, 2021 12:19:52 AM polka.PolKA printPoly
INFO: t3 = 1000000000000010000000000000011000000000000000 = 0x200080018000
Oct 28, 2021 12:19:52 AM polka.PolKA printPoly
INFO: n0 = 11001100110011 = 0x3333
Oct 28, 2021 12:19:52 AM polka.PolKA printPoly
INFO: n1 = 1000000000000 = 0x1000
Oct 28, 2021 12:19:52 AM polka.PolKA printPoly
INFO: n2 = 100101010101011 = 0x4aab
Oct 28, 2021 12:19:52 AM polka.PolKA printPoly
INFO: n3 = 110100110011010 = 0x699a
Oct 28, 2021 12:19:52 AM polka.PolKA printPoly
INFO: xx0 = 11001100110010001100110011010010101010101001000000000000001 =
0x666466695548001
Oct 28, 2021 12:19:52 AM polka.PolKA printPoly
INFO: xx1 = 10000000000001100000000000011110000000000000000000000000000 =
0x4003000f0000000
Oct 28, 2021 12:19:52 AM polka.PolKA printPoly
INFO: xx2 = 1101111111111011111111111110011010000000001001000000000000000 =
0x1bff7ffcd0048000
Oct 28, 2021 12:19:52 AM polka.PolKA printPoly
INFO: xx3 = 0000 = 0x0
Oct 28, 2021 12:19:52 AM polka.PolKA printPoly
INFO: x = 1100110011001000010011001101010110101010100000000000000000001 =
0x1999099ab5500001
Oct 28, 2021 12:19:52 AM polka.PolKA printPoly
INFO: m = 1000000000000111000000000001001000000000001111000000000000000 =
0x1000e00240078000
Oct 28, 2021 12:19:52 AM polka.PolKA printPoly
INFO: f = 0100110011001111010011001100011110101010101111000000000000001 =
0x999e998f5578001
Oct 28, 2021 12:19:52 AM polka.PolKA calculateR
FINE: Check[0]:
Oct 28, 2021 12:19:52 AM polka.PolKA calculateR
FINE: == true
Oct 28, 2021 12:19:52 AM polka.PolKA calculateR
FINE: Check[1]:
Oct 28, 2021 12:19:52 AM polka.PolKA calculateR
FINE: == true
Oct 28, 2021 12:19:52 AM polka.PolKA calculateR
FINE: Check[2]:
Oct 28, 2021 12:19:52 AM polka.PolKA calculateR
FINE: == true
Oct 28, 2021 12:19:52 AM polka.PolKA calculateR
FINE: Check[3]:
Oct 28, 2021 12:19:52 AM polka.PolKA calculateR
FINE: == true
Oct 28, 2021 12:19:52 AM polka.PolKA printPoly
INFO: R = 0100110011001111010011001100011110101010101111000000000000001 =
0x999e998f5578001
BUILD SUCCESSFUL (total time: 0 seconds)
s0=1000000000000000
s1=1000000000000001
s2=1000000000000011
s3=1000000000000101
s4=1000000000001001
s5=1000000000010001
s6=1000000000010111
s7=1000000000011011
s8=1000000000100001
s9=1000000000101101
t0 = 2001c004800f
n0 = 3333
t1 = 200180078000
n1 = 1000
t2 = 200100028000
n2 = 4aab
t3 = 200080018000
n3 = 699a
xx0 = 666466695548001
xx1 = 4003000f0000000
xx2 = 1bff7ffcd0048000
xx3 = 0
x = 1999099ab5500001
o0=0x0001
o1=0x0002
o2=0x0003
o3=0x0000
o4=0x0f26
o5=0x27db
o6=0x2df6
o7=0x3ca4
o8=0x4382
o9=0x1d24
r= 00 00 00 00 00 00 00 00 09 99 e9 98 f5 57 80 01
crc=d581 dif=8001 xor=5580
mc36@safe:/data.pub/src$
On 10/27/21 23:25, mc36 wrote:
hi,
ohh, i forgot to mention that if you're interested to execute the tests then
do the following:
$ wget src.nop.hu/rtr.zip
$ unzip rtr.zip
$ cd src
src$ ./c.sh
src$ java -jar rtr.jar test tester rout-bgp529 wait
it'll start the processes for the bgp based polka test...
then it'll pause at the end... then in some new windows, you can access the
routers:
$ telnet localhost 20001Ã Ã Ã Ã #for r1
$ telnet localhost 20002Ã Ã Ã Ã #for r2
$ telnet localhost 20003Ã Ã Ã Ã #for r3
not too much to see there, just bare minimal at the moment:
- show ipv4 srindex v1Ã Ã Ã Ã Ã Ã #to see the nodeid to prefix mapping
table... in the dataplanes, it'll be a shortcut to a nexthop...
- show ipv6 srindex v1Ã Ã Ã Ã Ã Ã #to see the nodeid to prefix mapping
table... in the dataplanes, it'll be a shortcut to a nexthop...
- display inter eth1 etherà à #here you can see the polka packets
received/sent counters per interface... ctrl+q to stop viewing...
- debug iface polkaà à à à à à à à à #to activate polka packet
debugging on a given router...
- term monà à à à à à à à à à à à à à à à à à #to see the
debugs interactive
- show loggà à à à à à à à à à à à à à à à à #to see the
historical debugs
regards,
cs
On 10/27/21 22:42, mc36 wrote:
hi,
sorry for the spam... so i introduced polka in freerouter with this huge
change:
https://github.com/mc36/freeRouter/commit/2f0981910316236abc044eaaffa694a531bb7ff3
unfortunately for now, the forwarding can only work with the cryPoly class,
which is a nicer version i previously sent to you... the issue i'm facing
right now is that i cannot figure out how to apply crc16 properly...
i'm generating the S values and compute a routeid that i can decode with the S
according to your paper, but when it comes to applying crc16, i fail
somehow...
the value that come out after the final xor is invalid...
i've written a small tester for that at http://src.nop.hu/src/zzz.java
it generates 10 16bit polynomials starting at 32768, those are the Sn
values...
then encodes the path 1->3 3->5 5->7 7->8 8->9... then it decode with the
poly class, those are the On values... whose appear on the left side,
those right side seems correct... the rest have garbage, obviously...
but when it come to crc16, it fails to decode correctly...:(
any idea is highly welcome! :)
thanks,
cs
here is how you can try it yourself:
$ wget src.nop.hu/rtr.zip > /dev/null
$ unzip rtr.zip
$ cd src
src$ ./c.sh
src$ ./zzz.sh
it gives you the following:
s0=1000000000000000
s1=1000000000000001
s2=1000000000000011
s3=1000000000000101
s4=1000000000001001
s5=1000000000010001
s6=1000000000010111
s7=1000000000011011
s8=1000000000100001
s9=1000000000101101
o0=0x04a6
o1=0x0003
o2=0x7371
o3=0x0005
o4=0x5da0
o5=0x0007
o6=0x2ce9
o7=0x0008
o8=0x0009
o9=0x0000
r= 00 00 00 00 00 e7 52 d4 f9 b9 4a b7 a9 0a 04 a6
crc=2254 dif=04a6 xor=26f2
On 10/27/21 14:28, mc36 wrote:
hi,
as said before, i came up with my own poly.java which is specific to gf(2),
had add,sub,mul,div and modinv...
at the moment it have an S generator and a checker... below is a test run,
first some basic poly math, then
your paper's calculation, which is fine, then a randomly generated S and O,
encoding of R and verification of it...
everything seems fine at least as i see, but i have issues with your
polka.patch... there, you propose the numbers
0x2b,0x2d,0x39,0x3f,0x47,0x53,0x8d,0xbd,0xd7,0xf5, i checked some and it
seems to me that these are not irreducible...
for an example, i picked up randomly 0x3f and 0x53 and according to my poly
lib, it have a gcm of 1001... you can verify it at
http://www.ee.unb.ca/cgi-bin/tervo/calc.pl?num=111111&den=1001&f=d and
http://www.ee.unb.ca/cgi-bin/tervo/calc.pl?num=1010011&den=1001&f=d
both of them give back 000 as remainder...
as for now, i have everything, i'll slowly integrate it to freerouter to see
how it fits... :)
seeking for your comments,
regards,
cs
[..]
________________________________
Esta mensagem (incluindo anexos) contém informação confidencial destinada
a um usuário especÃfico e seu conteúdo é protegido por lei. Se você não
é o destinatário correto deve apagar esta mensagem.
O emitente desta mensagem é responsável por seu conteúdo e endereçamento.
Cabe ao destinatário cuidar quanto ao tratamento adequado. A divulgação,
reprodução e/ou distribuição sem a devida autorização ou qualquer outra
ação sem conformidade com as normas internas do Ifes são proibidas e
passÃveis de sanção disciplinar, cÃvel e criminal.
- Re: [rare-dev] custom crc32 library in freerouter, (continued)
- Re: [rare-dev] custom crc32 library in freerouter, mc36, 10/20/2021
- Message not available
- Re: [rare-dev] custom crc32 library in freerouter, mc36, 10/21/2021
- Message not available
- Re: [rare-dev] custom crc32 library in freerouter, mc36, 10/22/2021
- [rare-dev] polka is approaching rare... was: Re: custom crc32 library in freerouter, mc36, 10/23/2021
- Message not available
- Re: [rare-dev] polka is approaching rare... was: Re: custom crc32 library in freerouter, mc36, 10/26/2021
- Re: [rare-dev] polka is approaching rare... was: Re: custom crc32 library in freerouter, mc36, 10/27/2021
- Re: [rare-dev] polka is approaching rare... was: Re: custom crc32 library in freerouter, mc36, 10/27/2021
- Re: [rare-dev] polka is approaching rare... was: Re: custom crc32 library in freerouter, mc36, 10/27/2021
- Re: [rare-dev] polka is approaching rare... was: Re: custom crc32 library in freerouter, mc36, 10/27/2021
- Re: [rare-dev] polka is approaching rare... was: Re: custom crc32 library in freerouter, mc36, 10/27/2021
- Message not available
- Re: [rare-dev] polka is approaching rare... was: Re: custom crc32 library in freerouter, mc36, 10/28/2021
- Re: [rare-dev] polka is approaching rare... was: Re: custom crc32 library in freerouter, mc36, 10/28/2021
- Re: [rare-dev] polka is approaching rare... was: Re: custom crc32 library in freerouter, mc36, 10/30/2021
- Re: [rare-dev] polka is approaching rare... was: Re: custom crc32 library in freerouter, Frédéric LOUI, 10/30/2021
- Re: [rare-dev] polka is approaching rare... was: Re: custom crc32 library in freerouter, mc36, 10/30/2021
- Message not available
- Re: [rare-dev] custom crc32 library in freerouter, mc36, 10/20/2021
Archive powered by MHonArc 2.6.19.