{ "info": { "author": "Huynh Tu Dang", "author_email": "huynh.tu.dang@usi.ch", "bugtrack_url": null, "classifiers": [], "description": "P4Benchmark\n=============\n\nTool to benchmark P4 Compilers and Targets\n\nInstallation\n------------\n\nRun the following commands::\n\n pip install -r requirements.txt\n python setup.py install\n\nGenerate P4 Program and PCAP file for testing\n---------------------------------------------\n\n* **Benchmark parse field**\n\nThe generated P4 program parses Ethernet,\nPTP and a customized header containing 4 fields and each field is 16-bit wide::\n\n p4benchmark --feature parse-field --fields 4\n\n* **Benchmark parse header**\n\nThe generated P4 program parses Ethernet, PTP and\na customized number of headers each containing a customized number of fields.\nEach field is 16-bit wide::\n\n p4benchmark --feature parse-header --fields 4 --headers 4\n\n* **Benchmark parse complex**\n\nThe generated P4 program parses Ethernet, PTP and\na parse graph that has the depth of 2 and each node has 2 branches::\n\n p4benchmark --feature parse-complex --depth 2 --fanout 2\n\n* **Benchmark action complexity**\n\nThe generated P4 program has N=2 number of set-field operations::\n\n p4benchmark --feature set-field --operations 2\n\n* **Benchmark header addition**\n\nThe generated P4 program adds N=2 number of headers to packets::\n\n p4benchmark --feature add-header --headers 2\n\n* **Benchmark header removal**\n\nThe generated P4 program removes N=2 number of headers to packets::\n\n p4benchmark --feature rm-header --headers 2\n\n* **Benchmark processing pipeline**\n\nThe generated P4 program applies N=2 number of tables::\n\n p4benchmark --feature pipeline --tables 2 --table-size 32\n\n* **Benchmark Read State**\n\nThe generated P4 program declares 1 register and performs 10 number of read operations::\n\n p4benchmark --feature read-state --registers 1 --operation 10\n\n* **Benchmark Write State**\n\nThe generated P4 program declares 1 register and performs 10 number of write operations::\n\n p4benchmark --feature write-state --registers 1 --operation 10\n\nGenerated Files\n---------------\n\nThe `output` directory contains::\n\n $ ls output\n commands.txt main.p4 run_switch.sh run_test.py test.pcap\n\n 1. main.p4 The desired program to benchmark a particular feature of the P4 target\n 2. test.pcap Sample packet crafted to match the parser or tables\n 3. run_switch.sh Script to run and configure bmv2\n 4. commands.txt Match-action rules for tables\n 5. run_test.py Python packet generator and receiver\n\n\nRun Behavioral Target\n---------------------\nRequire Behavioral Model 2 and P4C::\n\n $ cd output\n $ ./run_switch\n\nRun Python packet generator\n---------------------------\n\nIn another terminal, run::\n\n $ cd output\n $ sudo ./run_test.py --nb-headers 1 --nb-fields 4\n\nPKTGEN (Send PCAP file)\n-----------------------\n\nOr, you could use a high performance packet generator that sends the prepared\nPCAP file and sniffs for returning packets\n\n**Build**\n\nRequrire `cmake` and `libpcap`::\n\n cd pktgen\n mkdir build\n cd build\n cmake ..\n make\n\n**Run pktgen**\n\nThis packet generator reads the prepared PCAP file and send `c` copies of that\npacket at `t` Byte per second out of the interface `veth4`. The result is stored\nin the `result` directory::\n\n $ p4benchmark/pktgen/build\n $ sudo ./p4benchmark -p ../../output/test.pcap -i veth4 -c 10000 -t 10000 -o result", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/usi-systems/p4benchmark", "keywords": "P4 benchmark", "license": "GPL-3.0", "maintainer": null, "maintainer_email": null, "name": "P4Benchmark", "package_url": "https://pypi.org/project/P4Benchmark/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/P4Benchmark/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/usi-systems/p4benchmark" }, "release_url": "https://pypi.org/project/P4Benchmark/0.1.3/", "requires_dist": null, "requires_python": null, "summary": "A tool for generating P4 programs which test various aspect of P4 compilers and targets.", "version": "0.1.3" }, "last_serial": 2460334, "releases": { "0.1.1": [], "0.1.3": [ { "comment_text": "", "digests": { "md5": "2cd908ddad0663a975baef058a85594e", "sha256": "7d2d54b94a7774c38f3be90926a7df908d6397775f43c417f940243bfd28a994" }, "downloads": -1, "filename": "P4Benchmark-0.1.3.tar.gz", "has_sig": false, "md5_digest": "2cd908ddad0663a975baef058a85594e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21188, "upload_time": "2016-11-14T20:10:13", "url": "https://files.pythonhosted.org/packages/15/70/329250ecad3585affe6bad4ced6fbded9dae64d91e0e302f44b978488480/P4Benchmark-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2cd908ddad0663a975baef058a85594e", "sha256": "7d2d54b94a7774c38f3be90926a7df908d6397775f43c417f940243bfd28a994" }, "downloads": -1, "filename": "P4Benchmark-0.1.3.tar.gz", "has_sig": false, "md5_digest": "2cd908ddad0663a975baef058a85594e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21188, "upload_time": "2016-11-14T20:10:13", "url": "https://files.pythonhosted.org/packages/15/70/329250ecad3585affe6bad4ced6fbded9dae64d91e0e302f44b978488480/P4Benchmark-0.1.3.tar.gz" } ] }