platform/upstream/bcc.git
8 years agoMerge pull request #123 from iovisor/bblanco_dev
4ast [Tue, 11 Aug 2015 20:07:27 +0000 (13:07 -0700)]
Merge pull request #123 from iovisor/bblanco_dev

Fix recursive loop in parsing pointer to self struct

8 years agoFix recursive loop in parsing pointer to self struct
Brenden Blanco [Tue, 11 Aug 2015 19:45:00 +0000 (12:45 -0700)]
Fix recursive loop in parsing pointer to self struct

Issue occurs in the description visitor class, when the struct used in a
map key is a pointer to self, as in:

struct node;
struct node {
  struct node *next;
};

Avoid this in the desc by using "unsigned long long" for all pointers.

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
8 years agoMerge pull request #122 from iovisor/yhs_dev2
Brenden Blanco [Mon, 10 Aug 2015 19:06:06 +0000 (12:06 -0700)]
Merge pull request #122 from iovisor/yhs_dev2

Fixing more ctrl-c problem

8 years agoMerge pull request #121 from iovisor/weichunc_dev
Brenden Blanco [Mon, 10 Aug 2015 19:05:06 +0000 (12:05 -0700)]
Merge pull request #121 from iovisor/weichunc_dev

add connectivity validation in distributed bridge examples

8 years agoMerge pull request #120 from iovisor/yhs_dev
Brenden Blanco [Mon, 10 Aug 2015 19:04:27 +0000 (12:04 -0700)]
Merge pull request #120 from iovisor/yhs_dev

Add one line desc output for simple_tc

8 years agoadd connectivity validation in distributed bridge examples
Wei-Chun Chao [Mon, 10 Aug 2015 18:56:14 +0000 (11:56 -0700)]
add connectivity validation in distributed bridge examples

Signed-off-by: Wei-Chun Chao <weichunc@plumgrid.com>
8 years agoFixing more ctrl-c problem
Yonghong Song [Mon, 10 Aug 2015 18:35:28 +0000 (11:35 -0700)]
Fixing more ctrl-c problem

Signed-off-by: Yonghong Song <yhs@plumgrid.com>
8 years agoprint out simple_tc success at the end of test
Yonghong Song [Mon, 10 Aug 2015 18:19:53 +0000 (11:19 -0700)]
print out simple_tc success at the end of test

Signed-off-by: Yonghong Song <yhs@plumgrid.com>
8 years agoAdd one line desc output for simple_tc
Yonghong Song [Mon, 10 Aug 2015 16:40:11 +0000 (09:40 -0700)]
Add one line desc output for simple_tc

  o Also suggest task_switch.py to try with libbcc package

Signed-off-by: Yonghong Song <yhs@plumgrid.com>
8 years agoMerge pull request #119 from iovisor/bblanco_dev
4ast [Mon, 10 Aug 2015 05:51:52 +0000 (22:51 -0700)]
Merge pull request #119 from iovisor/bblanco_dev

Patch series: reorganize bpf_module and add sscanf feature for fuse

8 years agoCleanup some flags left on during development
Brenden Blanco [Sun, 9 Aug 2015 04:21:26 +0000 (21:21 -0700)]
Cleanup some flags left on during development

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
8 years agoAdd update_table API: accepts sscanf style strings and populates a map
Brenden Blanco [Sun, 9 Aug 2015 04:00:59 +0000 (21:00 -0700)]
Add update_table API: accepts sscanf style strings and populates a map

This is the culmination of the previous patches. It adds an api that can
input map data in a string format, but validating the numbers and
locations of data fields. The use case is for fuse file input/output. A
printf api may follow.

Take the table with key/leaf of:
  struct Key { int a; int b; };
  struct Leaf { int a; int b; int c; struct SubLeaf { int x; int y; } s; };

One would input to this table using:
  update_table(table_name, "{1 2}", "{1 2 -3 {9 0xa}}");

The implementation uses a JITed function for each unique type, that is
invoked to run sscanf on behalf of the caller. The input must have the
exact right number of arguments. Bit fields are supported, but the
caller must be aware of the collapse of those bitfields into an aligned
field, as well as endianness.

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
8 years agoConvert bpf_module structures to use vector instead of map for tables
Brenden Blanco [Sat, 8 Aug 2015 05:04:56 +0000 (22:04 -0700)]
Convert bpf_module structures to use vector instead of map for tables

It was bothering me that a whole bunch of accesses to the tables were
based on a string hash lookup, in addition to the vectors that were kept
to convert ids to names. Switch those around, as well as the api
internally.

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
8 years agoRemove some deprecated checks in bpf_module
Brenden Blanco [Sat, 8 Aug 2015 04:25:46 +0000 (21:25 -0700)]
Remove some deprecated checks in bpf_module

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
8 years agoAdd LLVM IR based sscanf routine, to be run by the JIT
Brenden Blanco [Sat, 8 Aug 2015 04:04:35 +0000 (21:04 -0700)]
Add LLVM IR based sscanf routine, to be run by the JIT

After the modules have been created, create a helper function for each
table leaf/key type.

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
8 years agoRename BPFTable to TableDesc
Brenden Blanco [Fri, 7 Aug 2015 16:59:48 +0000 (09:59 -0700)]
Rename BPFTable to TableDesc

This whole project is about bpf, prefixing everything with the same
acronym is redundant.

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
8 years agoExtract table types from B programs as well
Brenden Blanco [Fri, 7 Aug 2015 16:56:46 +0000 (09:56 -0700)]
Extract table types from B programs as well

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
8 years agoAdd framework to support map string reader (fuse feature)
Brenden Blanco [Fri, 7 Aug 2015 15:28:02 +0000 (08:28 -0700)]
Add framework to support map string reader (fuse feature)

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
8 years agoMerge pull request #118 from iovisor/bblanco_dev v0.1.3
4ast [Wed, 5 Aug 2015 22:23:42 +0000 (15:23 -0700)]
Merge pull request #118 from iovisor/bblanco_dev

Add cmake checks for required test programs

8 years agoChange wording to "Recommended"
Brenden Blanco [Wed, 5 Aug 2015 22:17:50 +0000 (15:17 -0700)]
Change wording to "Recommended"

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
8 years agoAdd cmake checks for required test programs
Brenden Blanco [Wed, 5 Aug 2015 22:09:17 +0000 (15:09 -0700)]
Add cmake checks for required test programs

Set as warning, since the build will still work fine and be able to
create a binary package.

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
8 years agoMerge pull request #117 from iovisor/bblanco_dev
4ast [Wed, 5 Aug 2015 22:06:44 +0000 (15:06 -0700)]
Merge pull request #117 from iovisor/bblanco_dev

Move helper.h prototype for tail call into 4.2 section

8 years agoMove helper.h prototype for tail call into 4.2 section
Brenden Blanco [Wed, 5 Aug 2015 21:00:48 +0000 (14:00 -0700)]
Move helper.h prototype for tail call into 4.2 section

With #115, bpf_tail_call was incorrectly disabled in 4.2 builds.

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
8 years agoMerge pull request #116 from iovisor/bblanco_dev
4ast [Wed, 5 Aug 2015 19:13:36 +0000 (12:13 -0700)]
Merge pull request #116 from iovisor/bblanco_dev

Add INSTALL.md instructions for using Ubuntu binary build

8 years agoAdd INSTALL.md instructions for using Ubuntu binary build
Brenden Blanco [Wed, 5 Aug 2015 19:09:59 +0000 (12:09 -0700)]
Add INSTALL.md instructions for using Ubuntu binary build

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
8 years agoMerge pull request #115 from iovisor/bblanco_dev v0.1.2
Brenden Blanco [Wed, 5 Aug 2015 13:42:45 +0000 (06:42 -0700)]
Merge pull request #115 from iovisor/bblanco_dev

Flags for 4.3 were accidentally committed, revert

8 years agoFlags for 4.3 were accidentally committed, revert
Brenden Blanco [Tue, 4 Aug 2015 23:57:14 +0000 (16:57 -0700)]
Flags for 4.3 were accidentally committed, revert

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
8 years agoMerge pull request #114 from iovisor/weichunc_dev
Brenden Blanco [Tue, 4 Aug 2015 23:56:46 +0000 (16:56 -0700)]
Merge pull request #114 from iovisor/weichunc_dev

release IPDB in host ns early

8 years agorelease IPDB in host ns early
Wei-Chun Chao [Tue, 4 Aug 2015 23:29:11 +0000 (16:29 -0700)]
release IPDB in host ns early

We need it for setting vxlan flow based flags currently. Release
it once the interfaces are set up. This does not help Ctrl-C on
main.py though.

Signed-off-by: Wei-Chun Chao <weichunc@plumgrid.com>
8 years agoMerge pull request #113 from iovisor/bblanco_dev
weichunc [Tue, 4 Aug 2015 22:50:33 +0000 (15:50 -0700)]
Merge pull request #113 from iovisor/bblanco_dev

Suggest Release and add X86 target in readme

8 years agoSuggest Release and add X86 target in readme
Brenden Blanco [Tue, 4 Aug 2015 22:44:20 +0000 (15:44 -0700)]
Suggest Release and add X86 target in readme

The default CMAKE_BUILD_TYPE is Debug when cloning from git, suggest
Release instead.

Also, there are some worrisome warnings during cmake when X86 target is
omitted. Additionally, I may want X86 target support for a future
feature, so lets suggest it here.

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
8 years agoMerge pull request #112 from iovisor/weichunc_dev
Brenden Blanco [Tue, 4 Aug 2015 22:30:21 +0000 (15:30 -0700)]
Merge pull request #112 from iovisor/weichunc_dev

llvm 3.7+ deb is broken

8 years agollvm 3.7+ deb is broken
Wei-Chun Chao [Tue, 4 Aug 2015 22:26:18 +0000 (15:26 -0700)]
llvm 3.7+ deb is broken

https://llvm.org/bugs/show_bug.cgi?id=24154

Build from source until it's resolved. Another plan is to provide
binary package.

Signed-off-by: Wei-Chun Chao <weichunc@plumgrid.com>
8 years agoMerge pull request #110 from iovisor/yhs_dev
Brenden Blanco [Tue, 4 Aug 2015 22:24:26 +0000 (15:24 -0700)]
Merge pull request #110 from iovisor/yhs_dev

better clean up of created namespace/interfaces if ctrl-c is pressed

8 years agoMerge pull request #111 from iovisor/weichunc_dev
Brenden Blanco [Tue, 4 Aug 2015 22:17:17 +0000 (15:17 -0700)]
Merge pull request #111 from iovisor/weichunc_dev

fix tunnel_mesh.py

8 years agofix tunnel_mesh.py
Wei-Chun Chao [Tue, 4 Aug 2015 22:14:28 +0000 (15:14 -0700)]
fix tunnel_mesh.py

The IP assignment was wrong.

Signed-off-by: Wei-Chun Chao <weichunc@plumgrid.com>
9 years agobetter clean up of created namespace/interfaces if ctrl-c is pressed
Yonghong Song [Tue, 4 Aug 2015 18:10:31 +0000 (11:10 -0700)]
better clean up of created namespace/interfaces if ctrl-c is pressed

  o There are still some cases when ctrl-c is pressed, the program does not exit
    gracefully, with a however lower probability. In my random manual experiments,
    one in ten cases it still hangs and needs further ctrl-z.

Signed-off-by: Yonghong Song <yhs@plumgrid.com>
9 years agoMerge pull request #107 from iovisor/bblanco_dev
4ast [Tue, 4 Aug 2015 00:36:07 +0000 (17:36 -0700)]
Merge pull request #107 from iovisor/bblanco_dev

Reorganize bpf_module into multiple frontend implementations

9 years agoMerge pull request #106 from tuxology/master
Brenden Blanco [Mon, 3 Aug 2015 23:31:45 +0000 (16:31 -0700)]
Merge pull request #106 from tuxology/master

Add project logo and source files

9 years agoMove rest of frontend implementation into subdirs
Brenden Blanco [Mon, 3 Aug 2015 23:26:22 +0000 (16:26 -0700)]
Move rest of frontend implementation into subdirs

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoAdd project logo and source files
Suchakra Sharma [Mon, 3 Aug 2015 23:22:22 +0000 (19:22 -0400)]
Add project logo and source files

The logo contains elements which are in public domain. The gear
has been modified from illustration submitted by 'hank0071' on
OpenClipart and the font used is Open Sans. There seems to be no
restriction on commercial use.

Signed-off-by: Suchakra Sharma <suchakrapani.sharma@polymtl.ca>
9 years agoMove (some) frontend specific logic to the respective directories
Brenden Blanco [Mon, 3 Aug 2015 22:40:07 +0000 (15:40 -0700)]
Move (some) frontend specific logic to the respective directories

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoMove frontends into individual directories
Brenden Blanco [Mon, 3 Aug 2015 17:59:20 +0000 (10:59 -0700)]
Move frontends into individual directories

Other commits to follow with cleanup of the code itself.

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoMerge pull request #105 from iovisor/bblanco_dev
4ast [Sun, 2 Aug 2015 23:20:43 +0000 (16:20 -0700)]
Merge pull request #105 from iovisor/bblanco_dev

Enable memory cleanup in Clang, otherwise 500KB lost per compile

9 years agoEnable memory cleanup in Clang, otherwise 500KB lost per compile
Brenden Blanco [Fri, 31 Jul 2015 22:41:31 +0000 (15:41 -0700)]
Enable memory cleanup in Clang, otherwise 500KB lost per compile

Since it is meant for the command line, clang ships with no memory
cleanup. We intend to run as a long-lived process, so enable that
cleanup. Valgrind now reports only trivial (and non-increasing over
time) memory leaks.

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoMerge pull request #102 from iovisor/bblanco_dev
yonghong-song [Fri, 31 Jul 2015 22:57:28 +0000 (15:57 -0700)]
Merge pull request #102 from iovisor/bblanco_dev

Add version check for functions only in >= 4.3 kernel

9 years agoMerge pull request #104 from iovisor/bcc_export
yonghong-song [Fri, 31 Jul 2015 21:59:05 +0000 (14:59 -0700)]
Merge pull request #104 from iovisor/bcc_export

Add pkg-config support and include compat/linux* in packaging

9 years agoAdd pkg-config support and include compat/linux* in packaging
Brenden Blanco [Fri, 31 Jul 2015 20:04:16 +0000 (13:04 -0700)]
Add pkg-config support and include compat/linux* in packaging

Different kernel header versions has been a continuing source of pain.
Though I don't prefer this approach, it seems the most reliable way to
get a build (for the time being) is to bundle the linux/bpf*.h in a
compat directory in the target install location.

To get visibility into that compat directory from another library, one
will need to rely on pkg-config --cflags argument to pull in that compat
directory.

Future work will be to avoid bundling the compat directory if the
version of linux-libc-dev is high enough, or if the presence of the
result of 'make headers_install' from the running kernel can be
detected.

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoAdd version check for functions only in >= 4.3 kernel
Brenden Blanco [Fri, 31 Jul 2015 16:53:00 +0000 (09:53 -0700)]
Add version check for functions only in >= 4.3 kernel

Addresses issue #100

Note to developers working off of net-next: you will need to locally
disable this patch to make use of the new features.

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoMerge pull request #99 from iovisor/weichunc_dev
4ast [Fri, 31 Jul 2015 02:14:37 +0000 (19:14 -0700)]
Merge pull request #99 from iovisor/weichunc_dev

Assign ip address to br

9 years agoAssign ip address to br
Wei-Chun Chao [Fri, 31 Jul 2015 02:03:49 +0000 (19:03 -0700)]
Assign ip address to br

Signed-off-by: Wei-Chun Chao <weichunc@plumgrid.com>
9 years agoMerge pull request #98 from iovisor/ast_dev
Brenden Blanco [Thu, 30 Jul 2015 22:48:19 +0000 (15:48 -0700)]
Merge pull request #98 from iovisor/ast_dev

fix incorrect DataLayout

9 years agofix incorrect DataLayout
Alexei Starovoitov [Thu, 30 Jul 2015 22:43:57 +0000 (15:43 -0700)]
fix incorrect DataLayout

Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
9 years agoMerge pull request #97 from iovisor/ast_dev
Brenden Blanco [Thu, 30 Jul 2015 21:30:24 +0000 (14:30 -0700)]
Merge pull request #97 from iovisor/ast_dev

update tunnel_key prototypes

9 years agoupdate tunnel_key prototypes
Alexei Starovoitov [Thu, 30 Jul 2015 21:14:09 +0000 (14:14 -0700)]
update tunnel_key prototypes

Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
9 years agoMerge pull request #96 from iovisor/bblanco_dev
4ast [Thu, 30 Jul 2015 16:37:08 +0000 (09:37 -0700)]
Merge pull request #96 from iovisor/bblanco_dev

Add option for custom log string to bpf_prog_load

9 years agoAdd option for custom log string to bpf_prog_load
Brenden Blanco [Wed, 29 Jul 2015 22:47:51 +0000 (15:47 -0700)]
Add option for custom log string to bpf_prog_load

bpf_prog_load was unconditionally printing the error from the kernel to
stderr. If libbpf is used in a library, that library may want to collect
the error to a custom location (a logfile). So, provide an option to
store the string elsewhere than stderr.

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoMerge pull request #95 from iovisor/yhs_dev
Brenden Blanco [Tue, 28 Jul 2015 23:14:55 +0000 (16:14 -0700)]
Merge pull request #95 from iovisor/yhs_dev

import "input" from "builtins" for python v2/v3 compatibility

9 years agoimport "input" from "builtins" for python v2/v3 compatibility
Yonghong Song [Tue, 28 Jul 2015 23:11:08 +0000 (16:11 -0700)]
import "input" from "builtins" for python v2/v3 compatibility

Signed-off-by: Yonghong Song <yhs@plumgrid.com>
9 years agoMerge pull request #94 from iovisor/weichunc_dev
Brenden Blanco [Tue, 28 Jul 2015 20:49:38 +0000 (13:49 -0700)]
Merge pull request #94 from iovisor/weichunc_dev

full mesh vxlan example without multicast

9 years agofull mesh vxlan example without multicast
Wei-Chun Chao [Tue, 28 Jul 2015 20:44:20 +0000 (13:44 -0700)]
full mesh vxlan example without multicast

Run 'sudo python ./main.py mesh'

Signed-off-by: Wei-Chun Chao <weichunc@plumgrid.com>
9 years agoMerge pull request #93 from iovisor/dist_bridge
4ast [Tue, 28 Jul 2015 20:20:10 +0000 (13:20 -0700)]
Merge pull request #93 from iovisor/dist_bridge

Dist bridge

9 years agoAdd distributed bridge example, using vxlan mcast
Brenden Blanco [Tue, 28 Jul 2015 17:47:33 +0000 (10:47 -0700)]
Add distributed bridge example, using vxlan mcast

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoAdd bpf_tunnel_info and helpers
Brenden Blanco [Tue, 28 Jul 2015 17:45:52 +0000 (10:45 -0700)]
Add bpf_tunnel_info and helpers

* Update compat.h
* Move bpf_clone_redirect to signed int, matching the implementation.
  This allows error codes to be compared to < 0.

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoMerge pull request #92 from iovisor/bblanco_dev
4ast [Tue, 28 Jul 2015 20:17:30 +0000 (13:17 -0700)]
Merge pull request #92 from iovisor/bblanco_dev

Add index-based function references to c api

9 years agoInclude libbpf.h in some places, cleanup constants
Brenden Blanco [Tue, 28 Jul 2015 19:29:36 +0000 (12:29 -0700)]
Include libbpf.h in some places, cleanup constants

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoAdd #define for ".bpf.fn."
Brenden Blanco [Tue, 28 Jul 2015 18:57:32 +0000 (11:57 -0700)]
Add #define for ".bpf.fn."

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoAdd index-based function references to c api
Brenden Blanco [Tue, 28 Jul 2015 03:29:25 +0000 (20:29 -0700)]
Add index-based function references to c api

* Add the index based API so that an external api (bcc-fuse) can iterate
  through the maps and functions that were compiled in this program.
* Add a more unique section prefix to disambiguate exportable functions.

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoMerge pull request #91 from iovisor/bcc_export
4ast [Mon, 27 Jul 2015 16:14:16 +0000 (09:14 -0700)]
Merge pull request #91 from iovisor/bcc_export

Include bcc headers in /usr/include

9 years agoKill wrapper .h, add #include to libbpf.h
Brenden Blanco [Sun, 26 Jul 2015 00:17:10 +0000 (17:17 -0700)]
Kill wrapper .h, add #include to libbpf.h

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoInclude bcc headers in /usr/include
Brenden Blanco [Thu, 23 Jul 2015 20:19:13 +0000 (13:19 -0700)]
Include bcc headers in /usr/include

* Add wrapper bcc.h to include dependencies
* Add text bpf_module_create_* to list of exports

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoMerge pull request #90 from iovisor/yhs_dev
Brenden Blanco [Wed, 22 Jul 2015 18:20:09 +0000 (11:20 -0700)]
Merge pull request #90 from iovisor/yhs_dev

simply vlan_learning example with newer vlan_push/pop helpers

9 years agoupdate ifindex/vlan info unconditionally in the map in vlan_learning example
Yonghong Song [Wed, 22 Jul 2015 18:04:23 +0000 (11:04 -0700)]
update ifindex/vlan info unconditionally in the map in vlan_learning example

Signed-off-by: Yonghong Song <yhs@plumgrid.com>
9 years agosimply vlan_learning example with newer vlan_push/pop helpers
Yonghong Song [Wed, 22 Jul 2015 17:17:39 +0000 (10:17 -0700)]
simply vlan_learning example with newer vlan_push/pop helpers

Signed-off-by: Yonghong Song <yhs@plumgrid.com>
9 years agoMerge pull request #89 from iovisor/quick_fix
4ast [Tue, 21 Jul 2015 21:07:19 +0000 (14:07 -0700)]
Merge pull request #89 from iovisor/quick_fix

Cache function handles in BPF class

9 years agoCache function handles in BPF class
Brenden Blanco [Tue, 21 Jul 2015 18:45:52 +0000 (11:45 -0700)]
Cache function handles in BPF class

* This means repeated calls to get_func() are now allowed

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoMerge pull request #87 from iovisor/yhs_dev
Brenden Blanco [Sat, 18 Jul 2015 04:24:02 +0000 (21:24 -0700)]
Merge pull request #87 from iovisor/yhs_dev

use running linux version number for feature availability checking

9 years agouse better error reporting interface
Yonghong Song [Fri, 17 Jul 2015 05:18:33 +0000 (22:18 -0700)]
use better error reporting interface

Signed-off-by: Yonghong Song <yhs@plumgrid.com>
9 years agoadd error checking/reporting in case that maps/prog is not supported
Yonghong Song [Fri, 17 Jul 2015 04:30:41 +0000 (21:30 -0700)]
add error checking/reporting in case that maps/prog is not supported

Signed-off-by: Yonghong Song <yhs@plumgrid.com>
9 years agouse running linux version number for feature availability checking
Yonghong Song [Fri, 17 Jul 2015 03:20:22 +0000 (20:20 -0700)]
use running linux version number for feature availability checking

Signed-off-by: Yonghong Song <yhs@plumgrid.com>
9 years agoMerge pull request #85 from iovisor/bblanco_dev
yonghong-song [Tue, 14 Jul 2015 06:10:25 +0000 (23:10 -0700)]
Merge pull request #85 from iovisor/bblanco_dev

Change to simulator arguments for readability

9 years agoRestore disable_ipv6 of out_ifc in simulation.py
Brenden Blanco [Tue, 14 Jul 2015 05:44:16 +0000 (22:44 -0700)]
Restore disable_ipv6 of out_ifc in simulation.py

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
9 years agoChange to simulator arguments for readability
Brenden Blanco [Tue, 14 Jul 2015 04:10:39 +0000 (21:10 -0700)]
Change to simulator arguments for readability

* Let one argument be optional
* Disable ipv6 for whole namespace once
* Python 2/3 compatibility fix

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

Bugfix for simulation.py

9 years agoBugfix for simulation.py
Brenden Blanco [Tue, 14 Jul 2015 03:57:34 +0000 (20:57 -0700)]
Bugfix for simulation.py

* Ignore exceptions and continue cleanup of dead children
* Set loopback interface up

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
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>