platform/upstream/bcc.git
9 years agoMerge pull request #23 from plumgrid/bblanco_dev
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

9 years agoReturn 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>
9 years agoMerge pull request #22 from plumgrid/bblanco_dev
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

9 years agoAdd 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>
9 years agoMerge pull request #21 from plumgrid/yhs_dev
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

9 years agoFix 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>
9 years agoMerge pull request #20 from plumgrid/small_test_fix
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

9 years agoFix 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>
9 years agoMerge pull request #19 from plumgrid/llvm_fix
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

9 years agoFix 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>
9 years agoMerge pull request #18 from plumgrid/issue16_cleanups
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

9 years agoAddress 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>
9 years agoMerge pull request #17 from plumgrid/issue16
4ast [Wed, 27 May 2015 18:01:26 +0000 (11:01 -0700)]
Merge pull request #17 from plumgrid/issue16

Address some of Issue #16

9 years agoAddress 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>
9 years agoMerge pull request #15 from plumgrid/clang_b_lang
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

9 years agoAdd 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>
9 years agoMerge pull request #14 from plumgrid/plumgrid/ysong_dev
Brenden [Mon, 11 May 2015 18:02:48 +0000 (14:02 -0400)]
Merge pull request #14 from plumgrid/plumgrid/ysong_dev

fix a typo

9 years agofix 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>
9 years agoMerge pull request #11 from plumgrid/clang_dev
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

9 years agoUse 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>
9 years agoMerge pull request #9 from plumgrid/fix_issue8
Brenden [Thu, 7 May 2015 20:53:35 +0000 (16:53 -0400)]
Merge pull request #9 from plumgrid/fix_issue8

Fix for Issue #8, pkt.rewrite_field

9 years agoFix for Issue #8, pkt.rewrite_field
Brenden Blanco [Thu, 7 May 2015 20:14:00 +0000 (13:14 -0700)]
Fix for Issue #8, pkt.rewrite_field

* This was unintentionally removed in the last cleanup, adding it back.
* Also adding support for $ip.dst = XXX style syntax
* This is an ugly commit, please bear with it until I figure out the
  structure of the language, especially w.r.t. proto:: type fields.

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoMerge pull request #7 from plumgrid/clang-300
4ast [Wed, 6 May 2015 16:01:59 +0000 (09:01 -0700)]
Merge pull request #7 from plumgrid/clang-300

Reduce strength of clang requirement to 3.0

9 years agoReduce strength of clang requirement to 3.0
Brenden Blanco [Wed, 6 May 2015 15:53:00 +0000 (08:53 -0700)]
Reduce strength of clang requirement to 3.0

* All that is required is that clang binary IR is compatible
  with llvm 3.7.

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoMerge pull request #6 from plumgrid/ast_dev
Brenden [Tue, 5 May 2015 01:56:33 +0000 (18:56 -0700)]
Merge pull request #6 from plumgrid/ast_dev

fix build with bison 2.5

9 years agofix build with bison 2.5
Alexei Starovoitov [Tue, 5 May 2015 01:52:18 +0000 (18:52 -0700)]
fix build with bison 2.5

Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
9 years agoRemove breakpoint in virsh script left on accident
Brenden Blanco [Mon, 4 May 2015 05:47:13 +0000 (22:47 -0700)]
Remove breakpoint in virsh script left on accident

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoUpdated README, example virt-install script
Brenden Blanco [Sun, 3 May 2015 17:43:07 +0000 (10:43 -0700)]
Updated README, example virt-install script

* Add Getting Started section in README.md
* Add a virt-install script which creates a BPF-capable Fedora 21 VM
* Fix a test that was failing on F21

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoCreate README.md
Brenden [Sun, 3 May 2015 15:33:53 +0000 (08:33 -0700)]
Create README.md

9 years agoInitial commit
Brenden Blanco [Sun, 26 Apr 2015 16:41:58 +0000 (09:41 -0700)]
Initial commit

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoInitial commit
Brenden Blanco [Sun, 26 Apr 2015 07:56:42 +0000 (00:56 -0700)]
Initial commit

llvm-jit based parser and loader