Skip to content

Latest commit

 

History

22 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Let-Me-Count

Collaborate with Yifan Lin.

Median trick is implemented on the 'median-trick' branch. (Only Tofino version).

git clone https://github.com/ZER0-Nu1L/Let-Me-Count.git
cd Let-Me-Count
git submodule update --init

p4app version

cd ./let-me-count.p4app

split your terminal to several panes. (terminal0)

sudo make run

(terminal1)

sudo make h1
./receive.py

(terminal2)

sudo make h1
./send.py 10.0.1.1 "123"

Tofino version

This release assumes that you have access to Barefoot SDE and that you have configured the basic environment.

cd ./let-me-count.tofino

Pplit your terminal to several panes and execute . ~/tools/set_sde.bash for all of them.

(terminal1)

~/tools/p4_build.sh ./p4src/letmecount.p4

(terminal2)(if on Tofino model)

sudo ~/tools/veth_setup.sh
$SDE/run_tofino_model.sh -p letmecount --log-dir ./logs

# ...
# In the end 
sudo ~/tools/veth_teardown.sh

(terminal3)

$SDE/run_switchd.sh -p letmecount

(terminal4)

$SDE/run_bfshell.sh -b ./bfrt_python/setup.py [-i]

Use -i to stay in the interactive mode after the script has been executed.

(terminal5)

sudo python ./pkt/recv.py veth2

(terminal6)

# Reset
sudo python ./pkt/send.py --control_bit 0
# pktgen & replay
sudo python ./pkt/pktgen.py pkt/mypcap -n 1500
sudo tcpreplay -i veth1 -M 0.1 ./pkt/mypcap/test.pcap
# check
sudo python ./pkt/send.py --control_bit 1

You can see demo below:

演示视频

About

Fuzzy distinct counting

Resources

Stars

9 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages