[P4-dev] heavy_hitter: number of packets sent by h1,h2 and h3.

Aldo Febro af12abw at gmail.com
Thu Nov 23 21:51:35 EST 2017


Hi,

I tried the reference solution for heavy hitter tutorial to find out how
many packets sent by h1, h2, h3. I launched "read_counter.sh" but it
returned the following error message:
"RuntimeCmd: Error: Invalid counter name (ip_src_counter)"

https://github.com/p4lang/tutorials/blob/master/SIGCOMM_2016/heavy_hitter/read_counters.sh

When I checked the reference solution file (heavy_hitter.p4), it doesn't
have ip_src_counter defined, so that makes sense. However, it has 2
registers defined (heavy_hitter_counter1 and heavy_hitter_counter2).

After running the 'send.py' file, these registers have the following values:

===[heavy_hitter_counter1]===

RuntimeCmd: register_read heavy_hitter_counter1 0
heavy_hitter_counter1[0]=  251
RuntimeCmd: register_read heavy_hitter_counter1 1
heavy_hitter_counter1[1]=  0
RuntimeCmd: register_read heavy_hitter_counter1 2
heavy_hitter_counter1[2]=  0
RuntimeCmd: register_read heavy_hitter_counter1 3
heavy_hitter_counter1[3]=  208
RuntimeCmd: register_read heavy_hitter_counter1 4
heavy_hitter_counter1[4]=  0
RuntimeCmd: register_read heavy_hitter_counter1 5
heavy_hitter_counter1[5]=  0
RuntimeCmd: register_read heavy_hitter_counter1 6
heavy_hitter_counter1[6]=  0
RuntimeCmd: register_read heavy_hitter_counter1 7
heavy_hitter_counter1[7]=  183
RuntimeCmd: register_read heavy_hitter_counter1 8
heavy_hitter_counter1[8]=  0
RuntimeCmd: register_read heavy_hitter_counter1 9
heavy_hitter_counter1[9]=  112
RuntimeCmd: register_read heavy_hitter_counter1 10
heavy_hitter_counter1[10]=  0
RuntimeCmd: register_read heavy_hitter_counter1 11
heavy_hitter_counter1[11]=  0
RuntimeCmd: register_read heavy_hitter_counter1 12
heavy_hitter_counter1[12]=  263
RuntimeCmd: register_read heavy_hitter_counter1 13
heavy_hitter_counter1[13]=  150
RuntimeCmd: register_read heavy_hitter_counter1 14
heavy_hitter_counter1[14]=  105
RuntimeCmd: register_read heavy_hitter_counter1 15
heavy_hitter_counter1[15]=  30
RuntimeCmd:


===[heavy_hitter_counter2]===

RuntimeCmd: register_read heavy_hitter_counter2 0
heavy_hitter_counter2[0]=  30
RuntimeCmd: register_read heavy_hitter_counter2 1
heavy_hitter_counter2[1]=  208
RuntimeCmd: register_read heavy_hitter_counter2 2
heavy_hitter_counter2[2]=  0
RuntimeCmd: register_read heavy_hitter_counter2 3
heavy_hitter_counter2[3]=  114
RuntimeCmd: register_read heavy_hitter_counter2 4
heavy_hitter_counter2[4]=  0
RuntimeCmd: register_read heavy_hitter_counter2 5
heavy_hitter_counter2[5]=  0
RuntimeCmd: register_read heavy_hitter_counter2 6
heavy_hitter_counter2[6]=  297
RuntimeCmd: register_read heavy_hitter_counter2 7
heavy_hitter_counter2[7]=  112
RuntimeCmd: register_read heavy_hitter_counter2 8
heavy_hitter_counter2[8]=  0
RuntimeCmd: register_read heavy_hitter_counter2 9
heavy_hitter_counter2[9]=  183
RuntimeCmd: register_read heavy_hitter_counter2 10
heavy_hitter_counter2[10]=  208
RuntimeCmd: register_read heavy_hitter_counter2 11
heavy_hitter_counter2[11]=  0
RuntimeCmd: register_read heavy_hitter_counter2 12
heavy_hitter_counter2[12]=  0
RuntimeCmd: register_read heavy_hitter_counter2 13
heavy_hitter_counter2[13]=  0
RuntimeCmd: register_read heavy_hitter_counter2 14
heavy_hitter_counter2[14]=  0
RuntimeCmd: register_read heavy_hitter_counter2 15
heavy_hitter_counter2[15]=  150
RuntimeCmd:

>From these value, how would you determine which host sent which packets?

I'm wondering if the solution reference here is a complete one:
https://github.com/p4lang/tutorials/blob/master/SIGCOMM_2016/heavy_hitter/solution.tar.gz

Any help will be appreciated. Thanks!

Aldo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20171123/751ec813/attachment-0002.html>


More information about the P4-dev mailing list