Alexei Starovoitov [Wed, 17 Jun 2015 19:45:49 +0000 (12:45 -0700)]
add get_current_pid/tgid/uid/gid/comm helpers
Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
4ast [Wed, 17 Jun 2015 19:29:08 +0000 (12:29 -0700)]
Merge pull request #64 from iovisor/bblanco_dev
Automatically compute sizeof in bpf_trace_printk
Brenden Blanco [Wed, 17 Jun 2015 19:07:27 +0000 (12:07 -0700)]
Automatically compute sizeof in bpf_trace_printk
* Addresses issue #61
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
4ast [Wed, 17 Jun 2015 00:35:13 +0000 (17:35 -0700)]
Merge pull request #63 from iovisor/bblanco_dev
Add example for BPF+tc rate limiting
Brenden Blanco [Wed, 17 Jun 2015 00:26:46 +0000 (17:26 -0700)]
Use update() instead of init() in neighbor example
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
Brenden Blanco [Wed, 17 Jun 2015 00:18:58 +0000 (17:18 -0700)]
Use netperf for testing, update comments
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
Brenden Blanco [Tue, 16 Jun 2015 20:50:16 +0000 (13:50 -0700)]
Add example for BPF+tc rate limiting
* Adding an example to address #59, simulation of bandwidth sharing
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
4ast [Tue, 16 Jun 2015 18:31:30 +0000 (11:31 -0700)]
Merge pull request #62 from iovisor/bblanco_dev
Compatibility fixes and pyroute2 examples
Brenden Blanco [Tue, 16 Jun 2015 18:00:45 +0000 (11:00 -0700)]
Remove simple_ipdb example as redundant
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
Brenden Blanco [Tue, 16 Jun 2015 07:21:57 +0000 (00:21 -0700)]
Add simple examples for using pyroute2+tc
* simple_tc shows using just IPRoute
* simple_ipdb shows using IPDB as well, slightly more complicated
- If the exception handling is done as shown, hangs may result
- If only IPRoute is used, this shouldn't be the case
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
Brenden Blanco [Tue, 16 Jun 2015 05:57:41 +0000 (22:57 -0700)]
Fix python2.7 compatibility breakage
* Add requirement on 'future' package to ensure backwards compatibility
- If working in dev environment, do 'sudo pip install future'
Note: end-users installing a compiled package with pip should have
future installed as a dependency automatically.
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
Brenden Blanco [Fri, 12 Jun 2015 23:02:34 +0000 (16:02 -0700)]
Merge pull request #58 from iovisor/yhs_dev
reduce test time for test_brb and test_brb2
Yonghong Song [Fri, 12 Jun 2015 22:26:49 +0000 (15:26 -0700)]
reduce test time for test_brb and test_brb2
Signed-off-by: Yonghong Song <yhs@plumgrid.com>
4ast [Fri, 12 Jun 2015 21:45:02 +0000 (14:45 -0700)]
Merge pull request #57 from iovisor/bblanco_dev
Automatically detect key/leaf type in clang
Brenden Blanco [Fri, 12 Jun 2015 21:33:21 +0000 (14:33 -0700)]
Fix breakage in vlan_learning example
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
Brenden Blanco [Fri, 12 Jun 2015 21:07:04 +0000 (14:07 -0700)]
Automatically detect key/leaf type in clang
* Parse the key and leaf types used for table definition, and pass the
type info back into python using a json transport
* Remove the subscript operator support
* Migrate the tests that are able to drop they Key/Leaf definition. Keep
it around for the tests that are B/C compatible
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
4ast [Fri, 12 Jun 2015 03:02:28 +0000 (20:02 -0700)]
Merge pull request #55 from iovisor/bblanco_dev
Cleanups for some build/compile failures
yonghong-song [Fri, 12 Jun 2015 02:51:06 +0000 (19:51 -0700)]
Merge pull request #56 from iovisor/test_brb-fix
Brenden Blanco [Fri, 12 Jun 2015 00:21:14 +0000 (17:21 -0700)]
Use "ip" instead of "route" command
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
Brenden Blanco [Fri, 12 Jun 2015 00:05:53 +0000 (17:05 -0700)]
Fix python3 incompatible code in tests
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
Brenden Blanco [Thu, 11 Jun 2015 23:39:50 +0000 (16:39 -0700)]
Merge pull request #54 from iovisor/yhs_dev
python commands module is removed in python 3, use subprocess
Brenden Blanco [Thu, 11 Jun 2015 23:20:49 +0000 (16:20 -0700)]
Cleanups for some build/compile failures
* Change ftw to nftw, and do depth-first tmpdir cleanup
* Scrub CROSS_COMPILE variable before kbuild_helpers
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
Yonghong Song [Thu, 11 Jun 2015 23:03:19 +0000 (16:03 -0700)]
python commands module is removed in python 3, use subprocess
Signed-off-by: Yonghong Song <yhs@plumgrid.com>
Brenden Blanco [Thu, 11 Jun 2015 22:55:19 +0000 (15:55 -0700)]
Merge pull request #53 from iovisor/yhs_dev
Yhs dev
Yonghong Song [Thu, 11 Jun 2015 22:38:24 +0000 (15:38 -0700)]
Add an FAQ entry to provide workaround for potential bpf pkg installation problem.
Signed-off-by: Yonghong Song <yhs@plumgrid.com>
Yonghong Song [Thu, 11 Jun 2015 22:22:25 +0000 (15:22 -0700)]
fix README to provide more clarity for potential python pkg installation issue
Signed-off-by: Yonghong Song <yhs@plumgrid.com>
4ast [Thu, 11 Jun 2015 21:44:01 +0000 (14:44 -0700)]
Merge pull request #51 from iovisor/marcol_dev
Update readme and FAQs
4ast [Thu, 11 Jun 2015 21:42:44 +0000 (14:42 -0700)]
Merge pull request #50 from iovisor/bblanco_dev
Remove the BPF_EXPORT macro, use rewriter instead
Brenden Blanco [Thu, 11 Jun 2015 21:41:37 +0000 (14:41 -0700)]
Turn off vlan_learning BPF debug
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
Marco Leogrande [Thu, 11 Jun 2015 21:39:13 +0000 (14:39 -0700)]
Update FAQs to include minimal kernel instructions
Specifically, mention the step to install the kernel image, modules
and headers.
Brenden Blanco [Thu, 11 Jun 2015 21:31:31 +0000 (14:31 -0700)]
Remove the BPF_EXPORT macro, use rewriter instead
* Add a BFrontentAction to recognize any external linkage function as
being available for export, and internally set the section attribute.
* Change bpf helpers to be static inline
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
Marco Leogrande [Thu, 11 Jun 2015 21:26:30 +0000 (14:26 -0700)]
Update README with kernel headers information
Include kernel headers >=4.1 as a prerequisite.
4ast [Thu, 11 Jun 2015 19:44:04 +0000 (12:44 -0700)]
Merge pull request #49 from iovisor/bblanco_dev
Add kprobe auto-cleanup and header fix
Brenden Blanco [Thu, 11 Jun 2015 19:35:55 +0000 (12:35 -0700)]
Add kprobe auto-cleanup and header fix
* Add bpf_detach_kprobe helper to libbpf
* Automatically invoke detach at python program exit
* Add "uapi/" to one include in helpers.h
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
Brenden Blanco [Thu, 11 Jun 2015 19:06:57 +0000 (12:06 -0700)]
Merge pull request #48 from iovisor/yhs_dev
avoid include file linux/bpf.h in helpers.h
Yonghong Song [Thu, 11 Jun 2015 18:54:26 +0000 (11:54 -0700)]
avoid include file linux/bpf.h in helpers.h
o use uapi/linux/bpf.h instead
o to be consistent with kernel/samples/bpf/
Signed-off-by: Yonghong Song <yhs@plumgrid.com>
4ast [Thu, 11 Jun 2015 18:27:44 +0000 (11:27 -0700)]
Merge pull request #47 from iovisor/bblanco_dev
Add a Learning VLAN program example
Brenden Blanco [Tue, 9 Jun 2015 20:58:42 +0000 (13:58 -0700)]
Add a Learning VLAN program example
* Create a simulation of a physical network with multiple vlans, which
can accept and distribute connections from multiple clients in
overlapping subnets. The program will assign to a worker based on mac
address.
* Remove a hardcoded SO_ATTACH_BPF literal, and fix one spacing
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
4ast [Wed, 10 Jun 2015 21:05:57 +0000 (14:05 -0700)]
Merge pull request #46 from iovisor/yhs_dev
add another bridge-router-bridge test (test_brb2)
Yonghong Song [Wed, 10 Jun 2015 06:33:47 +0000 (23:33 -0700)]
add another bridge-router-bridge test (test_brb2)
o router is implemented as a namespace, similar to test_brb.
o using linux bridge to provide bridge functionality.
In test_brb, a simple bpf program implemented limited
bridge functionality.
o on my local box, test_brb performance is roughly 12% better
than test_brb2.
Signed-off-by: Yonghong Song <yhs@plumgrid.com>
Brenden Blanco [Wed, 10 Jun 2015 17:08:05 +0000 (10:08 -0700)]
Merge pull request #45 from iovisor/yhs_dev
use 64bit ulonglong to represent mac address
Yonghong Song [Wed, 10 Jun 2015 16:33:57 +0000 (09:33 -0700)]
use 64bit ulonglong to represent mac address
Signed-off-by: Yonghong Song <yhs@plumgrid.com>
4ast [Wed, 10 Jun 2015 15:50:24 +0000 (08:50 -0700)]
Merge pull request #44 from iovisor/yhs_dev
use ethernet->src/dst to get mac address instead of primitive load_* …
Yonghong Song [Wed, 10 Jun 2015 15:21:55 +0000 (08:21 -0700)]
use ethernet->src/dst to get mac address instead of primitive load_* functions
Signed-off-by: Yonghong Song <yhs@plumgrid.com>
4ast [Wed, 10 Jun 2015 05:47:16 +0000 (22:47 -0700)]
Merge pull request #43 from iovisor/dext-fix
Fix for >32B bpf_pkt_dext calls
4ast [Wed, 10 Jun 2015 05:46:37 +0000 (22:46 -0700)]
Merge pull request #42 from iovisor/yhs_dev
add a bridge-router-bridge test with router implemented as a namespace
Brenden Blanco [Wed, 10 Jun 2015 05:42:38 +0000 (22:42 -0700)]
Fix for >32B bpf_pkt_dext calls
* Fix the shift which was 4 (bytes) instead of 32 (bits)
* Remove an incorrect ntoh
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
Yonghong Song [Mon, 8 Jun 2015 20:22:09 +0000 (13:22 -0700)]
add a bridge-router-bridge test with router implemented as a namespace
Signed-off-by: Yonghong Song <yhs@plumgrid.com>
Brenden Blanco [Wed, 10 Jun 2015 03:39:10 +0000 (20:39 -0700)]
Merge pull request #40 from iovisor/ast_dev
start building FAQ
Alexei Starovoitov [Wed, 10 Jun 2015 03:36:56 +0000 (20:36 -0700)]
start building FAQ
4ast [Wed, 10 Jun 2015 03:32:33 +0000 (20:32 -0700)]
Merge pull request #39 from iovisor/revision-fix
Omit leading 'v' from python .tar.gz revision
Brenden Blanco [Wed, 10 Jun 2015 03:28:27 +0000 (20:28 -0700)]
Omit leading 'v' from python .tar.gz revision
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
Brenden Blanco [Wed, 10 Jun 2015 03:22:00 +0000 (20:22 -0700)]
Merge pull request #38 from iovisor/ast_dev
build without have to install llvm/clang
Alexei Starovoitov [Wed, 10 Jun 2015 02:37:38 +0000 (19:37 -0700)]
build without have to install llvm/clang
just update PATH to include 'llvm-config' from your local
llvm build directory.
Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
4ast [Wed, 10 Jun 2015 01:10:08 +0000 (18:10 -0700)]
Merge pull request #37 from iovisor/quick_fix
Drop 'experimental' from README.md
Brenden Blanco [Wed, 10 Jun 2015 01:00:23 +0000 (18:00 -0700)]
Drop 'experimental' from README.md
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
4ast [Wed, 10 Jun 2015 00:58:42 +0000 (17:58 -0700)]
Merge pull request #36 from iovisor/install_cleanups
Make installation prefixes more realistic
Brenden Blanco [Wed, 10 Jun 2015 00:43:27 +0000 (17:43 -0700)]
Make installation prefixes more realistic
* Add/document cmake variables that control various installation path
options. See README.md for examples.
* Updated README a bit
* Hide helpers.h from include requirements
* Install things to real paths in a proper way. Header files will go
into <prefix>/share/bcc/include.
* Move the kickstart script readme to its own directory.
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
Brenden Blanco [Tue, 9 Jun 2015 21:00:50 +0000 (14:00 -0700)]
Merge pull request #34 from iovisor/ast_dev
fix build with gcc < 4.9
Alexei Starovoitov [Tue, 9 Jun 2015 19:50:42 +0000 (12:50 -0700)]
fix build with gcc < 4.9
Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
4ast [Mon, 8 Jun 2015 19:41:56 +0000 (12:41 -0700)]
Merge pull request #33 from iovisor/bblanco_dev
Fix test_call1 for systems without default qdisc
Brenden Blanco [Mon, 8 Jun 2015 19:06:00 +0000 (12:06 -0700)]
Fix test_call1 for systems without default qdisc
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
4ast [Mon, 8 Jun 2015 19:06:10 +0000 (12:06 -0700)]
Merge pull request #32 from iovisor/bblanco_dev
Fix test_xlate1 when systems have no default tc
Brenden Blanco [Mon, 8 Jun 2015 19:01:07 +0000 (12:01 -0700)]
Fix test_xlate1 when systems have no default tc
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
4ast [Mon, 8 Jun 2015 06:04:02 +0000 (23:04 -0700)]
Merge pull request #31 from iovisor/bblanco_dev
Remove BPF_LL_OFF usage
Brenden Blanco [Mon, 8 Jun 2015 06:00:14 +0000 (23:00 -0700)]
Remove BPF_LL_OFF usage
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
4ast [Mon, 8 Jun 2015 05:39:10 +0000 (22:39 -0700)]
Merge pull request #30 from iovisor/bblanco_dev
Add python packaging for the bpf library
Brenden Blanco [Mon, 8 Jun 2015 05:32:33 +0000 (22:32 -0700)]
Add python packaging for the bpf library
* Add tagging/git support
* Reorganize bpf py lib to be more pythonic
* Add pip installable builders
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
4ast [Fri, 5 Jun 2015 20:35:39 +0000 (13:35 -0700)]
Merge pull request #29 from iovisor/bblanco_dev
Add simple single file example
Brenden Blanco [Fri, 5 Jun 2015 20:28:17 +0000 (13:28 -0700)]
Add simple single file example
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
4ast [Fri, 5 Jun 2015 18:22:08 +0000 (11:22 -0700)]
Merge pull request #28 from iovisor/bblanco_dev
Update license in source code to be Apache 2
Brenden Blanco [Fri, 5 Jun 2015 18:15:27 +0000 (11:15 -0700)]
Update license in source code to be Apache 2
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
4ast [Fri, 5 Jun 2015 06:17:56 +0000 (23:17 -0700)]
Merge pull request #27 from plumgrid/bblanco_dev
Convert to using pyroute2 for tc
Brenden Blanco [Fri, 5 Jun 2015 01:01:42 +0000 (18:01 -0700)]
Convert to using pyroute2 for tc
* Remove libbpf.c netlink
* Requires pyroute2 from source
git clone https://github.com/svinota/pyroute2.git;
cd pyroute2; sudo make install
Update: Remove references to mnl
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
Brenden Blanco [Fri, 5 Jun 2015 04:45:05 +0000 (21:45 -0700)]
Create COPYRIGHT.txt
Brenden Blanco [Fri, 5 Jun 2015 03:43:57 +0000 (20:43 -0700)]
Create LICENSE.txt
4ast [Mon, 1 Jun 2015 17:31:53 +0000 (10:31 -0700)]
Merge pull request #25 from plumgrid/bblanco_dev
Rename files and a few functions
Brenden Blanco [Mon, 1 Jun 2015 17:15:42 +0000 (10:15 -0700)]
Rename files and a few functions
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
4ast [Mon, 1 Jun 2015 17:01:51 +0000 (10:01 -0700)]
Merge pull request #24 from plumgrid/bblanco_dev
Add support for packet field write
Brenden Blanco [Fri, 29 May 2015 18:14:20 +0000 (11:14 -0700)]
Add support for packet field write
* Rewrite LValue packet dereference to bpf_dins
* Add incr_csum as a macro
* Update names of a few functions
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
4ast [Fri, 29 May 2015 02:16:07 +0000 (19:16 -0700)]
Merge pull request #23 from plumgrid/bblanco_dev
Return 0 in lookup_or_init error path
Brenden Blanco [Fri, 29 May 2015 01:40:09 +0000 (18:40 -0700)]
Return 0 in lookup_or_init error path
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
4ast [Fri, 29 May 2015 01:37:30 +0000 (18:37 -0700)]
Merge pull request #22 from plumgrid/bblanco_dev
Add packet read syntax to c parser
Brenden Blanco [Fri, 29 May 2015 01:19:38 +0000 (18:19 -0700)]
Add packet read syntax to c parser
* C macro-based state machine
* Add lookup_or_init helper routine instead of array syntax
* Recognize references to protocol headers and translate into dext call
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
Brenden [Thu, 28 May 2015 21:41:18 +0000 (14:41 -0700)]
Merge pull request #21 from plumgrid/yhs_dev
Fix a python (version 2.7.3) error
Yonghong Song [Thu, 28 May 2015 21:24:08 +0000 (14:24 -0700)]
Fix a python (version 2.7.3) error
Signed-off-by: Yonghong Song <yhs@plumgrid.com>
4ast [Thu, 28 May 2015 00:20:27 +0000 (17:20 -0700)]
Merge pull request #20 from plumgrid/small_test_fix
Fix for 2 tests
Brenden Blanco [Wed, 27 May 2015 23:56:08 +0000 (16:56 -0700)]
Fix for 2 tests
* name needed to be right ctype
* python runtime was complaining about dangling socket fd
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
4ast [Wed, 27 May 2015 23:53:29 +0000 (16:53 -0700)]
Merge pull request #19 from plumgrid/llvm_fix
Fix for LLVM C++ api change
Brenden Blanco [Wed, 27 May 2015 23:48:15 +0000 (16:48 -0700)]
Fix for LLVM C++ api change
* IRBuilder::CreateCallN was deprecated, use the vector based mechanism
for passing args instead
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
4ast [Wed, 27 May 2015 22:46:54 +0000 (15:46 -0700)]
Merge pull request #18 from plumgrid/issue16_cleanups
Address comments and add tail_call example
Brenden Blanco [Wed, 27 May 2015 22:41:35 +0000 (15:41 -0700)]
Address comments and add tail_call example
* Cleanup some api names and definitions
* Add <table>.call() in C api, which maps to bpf_tail_call
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
4ast [Wed, 27 May 2015 18:01:26 +0000 (11:01 -0700)]
Merge pull request #17 from plumgrid/issue16
Address some of Issue #16
Brenden Blanco [Wed, 27 May 2015 08:29:34 +0000 (01:29 -0700)]
Address some of Issue #16
* Introduce Function object in bpf.py
- prog load types (kprobe, socket, etc.) are independent
- fd is a member of each function, to be used later (e.g. tail call table)
* Allow functions to be defined inline in the .py as a text argument
* Rename BPFProgram to BPFModule, which should make more sense
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
4ast [Tue, 26 May 2015 21:02:33 +0000 (14:02 -0700)]
Merge pull request #15 from plumgrid/clang_b_lang
Add clang support to bcc
Brenden Blanco [Tue, 26 May 2015 18:48:17 +0000 (11:48 -0700)]
Add clang support to bcc
* Frontend options: b and modified c languages
* Tests written for both languages
* Automatic kbuild integration
* Some cleanups and files moved
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
Brenden [Mon, 11 May 2015 18:02:48 +0000 (14:02 -0400)]
Merge pull request #14 from plumgrid/plumgrid/ysong_dev
fix a typo
Yonghong Song [Mon, 11 May 2015 18:00:02 +0000 (11:00 -0700)]
fix a typo
Signed-off-by: Yonghong Song <yhs@plumgrid.com>
4ast [Mon, 11 May 2015 06:08:13 +0000 (23:08 -0700)]
Merge pull request #11 from plumgrid/clang_dev
Use clang as a lib to parse the helper file live
Brenden Blanco [Sun, 10 May 2015 19:15:06 +0000 (12:15 -0700)]
Use clang as a lib to parse the helper file live
* Add clang as a library to the .so...this adds about 16M of stuff
* Compute the build flags for clang from the current kernel's header
build tree. It generates a makefile on the fly and caches the minimal
flags as an output.
* Followup to this would be to migrate bitops.c to be #include'd as well
as the proto.d/kprobe.d stuff.
* For now, requires clang to be installed in /opt/local/llvm...see cmake
files to override this.
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>