GithubHelp home page GithubHelp logo

beaucoup's People

Contributors

chenxiaoqino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

beaucoup's Issues

struct.error: short format requires (-0x7fff - 1) <= number <= 0x7fff

There is another issue here. When I run the python simulator, it reports errors as follows.

$ python3 py/simulator.py --seed=1 test/IR.json test/caida0.npy test/reports.npz
Traceback (most recent call last): File "py/simulator.py", line 34, in <module> lib_eval.simulate_run(args.npy_filename, args.out_filename, IR, args.seed, debug=args.verbose) File "/home/ltang/Workspace/research/store/BeauCoup/py/core/lib_eval.py", line 189, in simulate_run val=h_compute[j](Trace[i]) File "/home/ltang/Workspace/research/store/BeauCoup/py/core/lib_eval.py", line 108, in <lambda> return lambda val:pull_pack_and_compute(list_indexes,val, mask, seedbytes, Pack_formatstring) File "/home/ltang/Workspace/research/store/BeauCoup/py/core/lib_eval.py", line 105, in pull_pack_and_compute base+=struct.pack(Pack_formatstring[i],value_list[i]) struct.error: short format requires (-0x7fff - 1) <= number <= 0x7fff

The IR.json is compiled from the query_examples.yaml file in BeauCoup folder.

jinja2.exceptions.UndefinedError: dict object has no element 0

How to reproduce:

  • Clone repository
  • Install dependencies
  • Run python3 py/compiler.py -v --gamma=1.0 query_examples.yaml IR.json from repository root
  • Run python3 py/p4gen.py -v IR.json p4src/beaucoup.p4template beaucoup.p4

I pinpointed this issue to the following blocks in the Jinja2 template:

{% for i in range(16) %}
{% if K1 in keydefn[i] %}
  {{i}} : {{A1}}();
{% endif %}
{% if K2 in keydefn[i] %}
  {{i}} : {{A2}}();
{% endif %}
{% endfor %}

The template receives the following dictionary as keydefn argument, which does not have a "0"-element:

{1: ('hdr.ipv4.src_addr',), 2: ('hdr.ipv4.dst_addr', 'hdr.tcp.dst_port'), 3: ('hdr.ipv4.src_addr', 'hdr.ipv4.dst_addr'), 4: ('hdr.ipv4.dst_addr',), 5: ('hdr.ipv4.src_addr', 'hdr.tcp.dst_port'), 6: ('hdr.ipv4.src_addr', 'hdr.udp.dst_port'), 7: ('hdr.ipv4.dst_addr', 'hdr.udp.dst_port'), 8: ('hdr.ipv4.src_addr', 'hdr.ipv4.dst_addr', 'hdr.tcp.src_port'), 9: ('hdr.ipv4.src_addr', 'hdr.ipv4.dst_addr', 'hdr.udp.src_port'), 10: ('hdr.ipv4.src_addr', 'hdr.ipv4.dst_addr', 'hdr.tcp.dst_port'), 11: ('hdr.ipv4.src_addr', 'hdr.ipv4.dst_addr', 'hdr.udp.dst_port'), 12: ('hdr.ipv4.src_addr', 'hdr.ipv4.dst_addr', 'hdr.tcp.src_port', 'hdr.tcp.dst_port')}

Am I doing something wrong? Or is there an issue with the template?

Question of SDN vs P4

The program work just fine, but I was wondering why you choose P4 switch?
Is there a necessary need for using P4 switch.

Trace Pre-processing TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

when running python3 py/trace_prep.py ../../dataset/pcap/test.pcap test/caida0.npy I have the following error:

Traceback (most recent call last): File "py/trace_prep.py", line 22, in <module> nparray = lib_eval.parse_pcap_into_npy(args.PCAP_filename, args.count, args.verbose) File "/home/ltang/Workspace/research/store/BeauCoup/py/core/lib_eval.py", line 79, in parse_pcap_into_npy packets_numerical.append(tuple(to_list(pdict))) File "/home/ltang/Workspace/research/store/BeauCoup/py/core/lib_eval.py", line 73, in to_list line[i]=int(line[i]) TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

Note that test.pcap is a small pcap file extract from CAIDA18 traces

Errors in plotting results

Hi Xiaoqi,
In py/core/lib_eval.py, line293, should it be
vect=trial_finish[QID] ?

I cannot get correct error results with vect=trial_finish[qid] .

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.