platform/upstream/bcc.git
9 years agoMerge pull request #83 from iovisor/yhs_dev
Brenden Blanco [Sat, 11 Jul 2015 20:01:48 +0000 (13:01 -0700)]
Merge pull request #83 from iovisor/yhs_dev

Yhs dev

9 years agodo not demonize iperf server and netserver
Yonghong Song [Sat, 11 Jul 2015 16:44:05 +0000 (09:44 -0700)]
do not demonize iperf server and netserver

  o This way, process kill happens correctly.

Signed-off-by: Yonghong Song <yhs@plumgrid.com>
9 years agoexplicit kill deamon "iperf" and "netserver" in namespace
Yonghong Song [Sat, 11 Jul 2015 07:18:50 +0000 (00:18 -0700)]
explicit kill deamon "iperf" and "netserver" in namespace

   o sometimes, NSPipe kill may not really kill the process
   o with the explicit kill, remove the cleanup for outer veth's
     associated with namespace

Signed-off-by: Yonghong Song <yhs@plumgrid.com>
9 years agoadd required parameter ifc_name for additional ifc adding to ns
Yonghong Song [Sat, 11 Jul 2015 05:58:59 +0000 (22:58 -0700)]
add required parameter ifc_name for additional ifc adding to ns

    o make some long lines in python codes shorter
    o use python style unused variable name "_"

Signed-off-by: Yonghong Song <yhs@plumgrid.com>
9 years agorewrite test_brb/test_brb2 python binding with pyroute2
Yonghong Song [Fri, 10 Jul 2015 17:12:47 +0000 (10:12 -0700)]
rewrite test_brb/test_brb2 python binding with pyroute2

Signed-off-by: Yonghong Song <yhs@plumgrid.com>
9 years agofix and improve test brb/brb2
Yonghong Song [Mon, 6 Jul 2015 16:16:25 +0000 (09:16 -0700)]
fix and improve test brb/brb2

   o disable ipv6 for newly-created net devices to avoid unaccountable pkt counting
   o explicitly enable ip_forward in router namespace
   o proper cleanup in case of validation failure
   o in test_brb, use different tc_index to differentiate the packet source (pem or router_ns)
   o change bpf program return value to 1 so that the packet will be dropped instead of being
     passed up to the stack

Signed-off-by: Yonghong Song <yhs@plumgrid.com>
9 years agoMerge pull request #82 from iovisor/bblanco_dev
4ast [Wed, 8 Jul 2015 00:48:14 +0000 (17:48 -0700)]
Merge pull request #82 from iovisor/bblanco_dev

Update README.md examples and INSTALL.md

9 years agoUpdate README.md examples and INSTALL.md
Brenden Blanco [Wed, 8 Jul 2015 00:38:30 +0000 (17:38 -0700)]
Update README.md examples and INSTALL.md

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoMerge pull request #81 from iovisor/bblanco_dev
4ast [Tue, 7 Jul 2015 21:08:21 +0000 (14:08 -0700)]
Merge pull request #81 from iovisor/bblanco_dev

Update README with install info, few cleanups

9 years agoFix newlines in README
Brenden Blanco [Tue, 7 Jul 2015 20:10:21 +0000 (13:10 -0700)]
Fix newlines in README

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoUpdate README with install info, few cleanups
Brenden Blanco [Tue, 7 Jul 2015 20:05:22 +0000 (13:05 -0700)]
Update README with install info, few cleanups

* Add some examples to package
* Fix bpf_trace_printk bug not supporting 0 format args
* Make src_file arg loading a little bit more intelligent in BPF()
* Update README with Hello, World step-by-step

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoMerge pull request #80 from iovisor/bblanco_dev
4ast [Tue, 7 Jul 2015 16:47:10 +0000 (09:47 -0700)]
Merge pull request #80 from iovisor/bblanco_dev

Add multiple build support styles

9 years agoAdd multiple build support styles
Brenden Blanco [Tue, 7 Jul 2015 06:41:23 +0000 (23:41 -0700)]
Add multiple build support styles

* Add RPM and DEB packaging targets (using CPack from CMake) to build
  binary packages for Fedora and Ubuntu targets.
* Add Docker build scripts for each of the above that run the build in
  the right environment (assuming docker is available).
 - In Ubuntu, build against the LLVM 3.7 nightly snapshots
 - In Fedora, build against LLVM 3.7 from git (takes longer)
* Depending on packages installed on the build machine, it may be
  possible to cross-package for other targets without invoking Docker.
* Re-introduce src/cc/compat directory to keep the build stable for the
  time being. Similarly, it was necessary to #define some ugly constants
  that should eventually show up in libc.
* Add a few simple version checks to allow a partially working (really
  tracing only) libbcc in 4.1 kernels.

TODO (followup commit): Re-work the READMEs

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoWIP: rpm packaging
Brenden Blanco [Fri, 3 Jul 2015 23:10:29 +0000 (16:10 -0700)]
WIP: rpm packaging

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoUpdate libvirt script to use fedora22
Brenden Blanco [Fri, 3 Jul 2015 00:48:41 +0000 (17:48 -0700)]
Update libvirt script to use fedora22

* Install into lib64 instead of lib
* Pull 4.2 kernel from rawhide instead of building it

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoMerge pull request #78 from iovisor/bblanco_dev
4ast [Thu, 2 Jul 2015 17:34:51 +0000 (10:34 -0700)]
Merge pull request #78 from iovisor/bblanco_dev

Drop PROTO macro syntax and introduce alternative

9 years agoUpdate missing monitor.c to use cursor_advance
Brenden Blanco [Thu, 2 Jul 2015 17:31:32 +0000 (10:31 -0700)]
Update missing monitor.c to use cursor_advance

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoDrop PROTO macro syntax and introduce alternative
Brenden Blanco [Thu, 2 Jul 2015 17:02:04 +0000 (10:02 -0700)]
Drop PROTO macro syntax and introduce alternative

* Feedback given by some external users was that the PROTO syntax was
  opaque and unintuitive. As such, drop that macro and introduce an
  alternative syntax.
* Convert all to use 'cursor_advance' macro API

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoMerge pull request #77 from iovisor/bblanco_dev
4ast [Thu, 2 Jul 2015 01:42:25 +0000 (18:42 -0700)]
Merge pull request #77 from iovisor/bblanco_dev

Automate bpf_probe_read

9 years agoAutomate bpf_probe_read
Brenden Blanco [Wed, 1 Jul 2015 22:23:18 +0000 (15:23 -0700)]
Automate bpf_probe_read

* Rewrite accesses to args beyond the first to use bpf_probe_read
 - Support struct access
 - Support POD type accesses

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoMerge pull request #76 from iovisor/bblanco_dev
4ast [Tue, 30 Jun 2015 18:12:35 +0000 (11:12 -0700)]
Merge pull request #76 from iovisor/bblanco_dev

Clean some brittle parts of clang rewriter

9 years agoClean some brittle parts of clang rewriter
Brenden Blanco [Mon, 29 Jun 2015 18:09:00 +0000 (11:09 -0700)]
Clean some brittle parts of clang rewriter

* Rewrites of text inside of a macro (even if just the arguments) is not
  support by clang. Convert macro definitions to pure rewrites instead.
* For packet field access, no longer require 'skb' named
  argument...instead, learn it from the function parameter list.
* Add a complex test case...supposedly this should have failed issue
  #10, but the C version does not exhibit the same failure as the B
  version.

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoMerge pull request #75 from iovisor/bblanco_dev
4ast [Sun, 28 Jun 2015 08:26:36 +0000 (01:26 -0700)]
Merge pull request #75 from iovisor/bblanco_dev

Make tunnel example more user friendly

9 years agoMake tunnel example more user friendly
Brenden Blanco [Thu, 25 Jun 2015 01:31:14 +0000 (18:31 -0700)]
Make tunnel example more user friendly

* Move files to separate directory
* Add README
* Run http server automatically from main.py
* Add setup.sh script to automate dependencies

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoMerge pull request #74 from iovisor/yhs_dev
Brenden Blanco [Tue, 23 Jun 2015 22:14:08 +0000 (15:14 -0700)]
Merge pull request #74 from iovisor/yhs_dev

use new get_table interface to avoid specify key/leaf type in py code

9 years agoMerge pull request #73 from iovisor/bblanco_dev
4ast [Tue, 23 Jun 2015 22:04:21 +0000 (15:04 -0700)]
Merge pull request #73 from iovisor/bblanco_dev

Add vxlan tunnel monitoring example

9 years agouse new get_table interface to avoid specify key/leaf type in py code
Yonghong Song [Tue, 23 Jun 2015 21:10:01 +0000 (14:10 -0700)]
use new get_table interface to avoid specify key/leaf type in py code

Signed-off-by: Yonghong Song <yhs@plumgrid.com>
9 years agoMerge pull request #72 from iovisor/yhs_dev
Brenden Blanco [Tue, 23 Jun 2015 19:42:24 +0000 (12:42 -0700)]
Merge pull request #72 from iovisor/yhs_dev

use "raw_input" instead "input" to avoid python 2.7 exception

9 years agouse builtins.input for backward/forward compability
Yonghong Song [Tue, 23 Jun 2015 19:36:56 +0000 (12:36 -0700)]
use builtins.input for backward/forward compability

Signed-off-by: Yonghong Song <yhs@plumgrid.com>
9 years agouse "raw_input" instead "input" to avoid python 2.7 exception
Yonghong Song [Tue, 23 Jun 2015 19:25:24 +0000 (12:25 -0700)]
use "raw_input" instead "input" to avoid python 2.7 exception

Signed-off-by: Yonghong Song <yhs@plumgrid.com>
9 years agoAdd vxlan tunnel monitoring example
Brenden Blanco [Tue, 23 Jun 2015 13:53:47 +0000 (06:53 -0700)]
Add vxlan tunnel monitoring example

* Example simulates many vxlan hosts ("hypervisors") with multiple clients per
  host. Some clients will be sending traffic to another client on a different
  host.
* Add vxlan header to proto.h
* Remove unused import line in vlan_learning
* NOTE: to display this demo, it is required to checkout the chord graph demo
  from https://github.com/drzaeus77/chord-transitions.git.
  Follow the instructions in that repo to get a simple http server up and
  running.

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoMerge pull request #71 from iovisor/bblanco_dev
4ast [Fri, 19 Jun 2015 16:11:47 +0000 (09:11 -0700)]
Merge pull request #71 from iovisor/bblanco_dev

Rework vlan example to be 1:1, no mac learning

9 years agoMerge pull request #70 from iovisor/ast_dev
Brenden Blanco [Thu, 18 Jun 2015 22:07:04 +0000 (15:07 -0700)]
Merge pull request #70 from iovisor/ast_dev

example that shows usages of maps, probe_read, get_current_pid helpers

9 years agoexample that shows usages of maps, probe_read, get_current_pid helpers
Alexei Starovoitov [Thu, 18 Jun 2015 21:41:17 +0000 (14:41 -0700)]
example that shows usages of maps, probe_read, get_current_pid helpers

$ ./task_switch.py

task_switch[ 2379->    0]=4
task_switch[ 3914->    0]=2
task_switch[ 3133->    0]=5
task_switch[10903->    0]=100  <-- 100 times python process switched into idle
task_switch[  116->    0]=1
task_switch[    0->   14]=1
task_switch[10803->    0]=1
task_switch[22292->    0]=1
task_switch[    0->22292]=1
task_switch[    0->10803]=1
task_switch[   30->    0]=1
task_switch[    0->10903]=100  <-- 100 times back into python

Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
9 years agoRework vlan example to be 1:1, no mac learning
Brenden Blanco [Fri, 19 Jun 2015 00:53:31 +0000 (17:53 -0700)]
Rework vlan example to be 1:1, no mac learning

* Use ifindex instead of src_mac to program egress table
* Remove the static arp programming
* Get the example to work in python2

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoMerge pull request #69 from iovisor/bblanco_dev
4ast [Thu, 18 Jun 2015 07:52:39 +0000 (00:52 -0700)]
Merge pull request #69 from iovisor/bblanco_dev

Move shared example code into simulation.py

9 years agoMove shared example code into simulation.py
Brenden Blanco [Thu, 18 Jun 2015 07:28:47 +0000 (00:28 -0700)]
Move shared example code into simulation.py

* Create a class for the examples to share, helps with IPDB cleanup and
  namespace creation.

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoMerge pull request #68 from iovisor/bblanco_dev
4ast [Thu, 18 Jun 2015 01:29:54 +0000 (18:29 -0700)]
Merge pull request #68 from iovisor/bblanco_dev

Remove update() call from vlan example

9 years agoRemove update() call from vlan example
Brenden Blanco [Thu, 18 Jun 2015 00:30:13 +0000 (17:30 -0700)]
Remove update() call from vlan example

* Breakage from previous commit

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoMerge pull request #67 from iovisor/bblanco_dev
4ast [Thu, 18 Jun 2015 00:28:32 +0000 (17:28 -0700)]
Merge pull request #67 from iovisor/bblanco_dev

Make python table accesses more pythonic

9 years agoMake python table accesses more pythonic
Brenden Blanco [Thu, 18 Jun 2015 00:22:11 +0000 (17:22 -0700)]
Make python table accesses more pythonic

* Add [] support in BPF.Table class
* Remove uses of lookup/update
* Add del support

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoMerge pull request #65 from iovisor/ast_dev
Brenden Blanco [Wed, 17 Jun 2015 20:06:22 +0000 (13:06 -0700)]
Merge pull request #65 from iovisor/ast_dev

add get_current_pid/tgid/uid/gid/comm helpers

9 years agoupdate FAQ for past.builtins
Alexei Starovoitov [Wed, 17 Jun 2015 19:55:42 +0000 (12:55 -0700)]
update FAQ for past.builtins

Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
9 years agoadd get_current_pid/tgid/uid/gid/comm helpers
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>
9 years agoMerge pull request #64 from iovisor/bblanco_dev
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

9 years agoAutomatically 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>
9 years agoMerge pull request #63 from iovisor/bblanco_dev
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

9 years agoUse update() instead of init() in neighbor example
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>
9 years agoUse netperf for testing, update comments
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>
9 years agoAdd example for BPF+tc rate limiting
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>
9 years agoMerge pull request #62 from iovisor/bblanco_dev
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

9 years agoRemove simple_ipdb example as redundant
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>
9 years agoAdd simple examples for using pyroute2+tc
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>
9 years agoFix python2.7 compatibility breakage
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>
9 years agoMerge pull request #58 from iovisor/yhs_dev
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

9 years agoreduce 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>
9 years agoMerge pull request #57 from iovisor/bblanco_dev
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

9 years agoFix breakage in vlan_learning example
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>
9 years agoAutomatically detect key/leaf type in clang
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>
9 years agoMerge pull request #55 from iovisor/bblanco_dev
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

9 years agoMerge pull request #56 from iovisor/test_brb-fix
yonghong-song [Fri, 12 Jun 2015 02:51:06 +0000 (19:51 -0700)]
Merge pull request #56 from iovisor/test_brb-fix

9 years agoUse "ip" instead of "route" command
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>
9 years agoFix python3 incompatible code in tests
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>
9 years agoMerge pull request #54 from iovisor/yhs_dev
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

9 years agoCleanups for some build/compile failures
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>
9 years agopython commands module is removed in python 3, use subprocess
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>
9 years agoMerge pull request #53 from iovisor/yhs_dev
Brenden Blanco [Thu, 11 Jun 2015 22:55:19 +0000 (15:55 -0700)]
Merge pull request #53 from iovisor/yhs_dev

Yhs dev

9 years agoAdd an FAQ entry to provide workaround for potential bpf pkg installation problem.
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>
9 years agofix README to provide more clarity for potential python pkg installation issue
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>
9 years agoMerge pull request #51 from iovisor/marcol_dev
4ast [Thu, 11 Jun 2015 21:44:01 +0000 (14:44 -0700)]
Merge pull request #51 from iovisor/marcol_dev

Update readme and FAQs

9 years agoMerge pull request #50 from iovisor/bblanco_dev
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

9 years agoTurn off vlan_learning BPF debug
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>
9 years agoUpdate FAQs to include minimal kernel instructions
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.

9 years agoRemove the BPF_EXPORT macro, use rewriter instead
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>
9 years agoUpdate README with kernel headers information
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.

9 years agoMerge pull request #49 from iovisor/bblanco_dev
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

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

9 years agoavoid 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>
9 years agoMerge pull request #47 from iovisor/bblanco_dev
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

9 years agoAdd 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>
9 years agoMerge pull request #46 from iovisor/yhs_dev v0.1.1
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)

9 years agoadd 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>
9 years agoMerge pull request #45 from iovisor/yhs_dev
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

9 years agouse 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>
9 years agoMerge pull request #44 from iovisor/yhs_dev
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_* …

9 years agouse ethernet->src/dst to get mac address instead of primitive load_* functions
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>
9 years agoMerge pull request #43 from iovisor/dext-fix
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

9 years agoMerge pull request #42 from iovisor/yhs_dev
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

9 years agoFix for >32B bpf_pkt_dext calls
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>
9 years agoadd a bridge-router-bridge test with router implemented as a namespace
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>
9 years agoMerge pull request #40 from iovisor/ast_dev
Brenden Blanco [Wed, 10 Jun 2015 03:39:10 +0000 (20:39 -0700)]
Merge pull request #40 from iovisor/ast_dev

start building FAQ

9 years agostart building FAQ
Alexei Starovoitov [Wed, 10 Jun 2015 03:36:56 +0000 (20:36 -0700)]
start building FAQ

9 years agoMerge pull request #39 from iovisor/revision-fix
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

9 years agoOmit 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>
9 years agoMerge pull request #38 from iovisor/ast_dev
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

9 years agobuild 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>
9 years agoMerge pull request #37 from iovisor/quick_fix
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

9 years agoDrop '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>
9 years agoMerge pull request #36 from iovisor/install_cleanups
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