platform/upstream/bcc.git
8 years agoMerge pull request #172 from brendangregg/master
Brenden Blanco [Sat, 29 Aug 2015 15:08:01 +0000 (08:08 -0700)]
Merge pull request #172 from brendangregg/master

initial ksym() and ksymaddr()

8 years agoMerge remote-tracking branch 'upstream/master'
Brendan Gregg [Sat, 29 Aug 2015 08:32:34 +0000 (18:32 +1000)]
Merge remote-tracking branch 'upstream/master'

8 years agoMerge pull request #170 from iovisor/bblanco_dev
4ast [Sat, 29 Aug 2015 05:56:50 +0000 (22:56 -0700)]
Merge pull request #170 from iovisor/bblanco_dev

Add beta RPM spec and docker script for centos

8 years agoAdd another spec dependency
Brenden Blanco [Sat, 29 Aug 2015 05:53:56 +0000 (22:53 -0700)]
Add another spec dependency

Testing buildbot

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
8 years agoAdd one dependency to spec
Brenden Blanco [Sat, 29 Aug 2015 05:45:27 +0000 (22:45 -0700)]
Add one dependency to spec

Also, testing buildbot with this tiny change

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
8 years agomake use of BPF.ksym()
Brendan Gregg [Sat, 29 Aug 2015 05:14:07 +0000 (15:14 +1000)]
make use of BPF.ksym()

8 years agoprovide ksym() and ksymaddr()
Brendan Gregg [Sat, 29 Aug 2015 05:12:57 +0000 (15:12 +1000)]
provide ksym() and ksymaddr()

8 years agouse new event_re option to improve vfscount
Brendan Gregg [Sat, 29 Aug 2015 04:53:22 +0000 (14:53 +1000)]
use new event_re option to improve vfscount

8 years agoAdd beta RPM spec and docker script for centos
Brenden Blanco [Sat, 29 Aug 2015 04:44:35 +0000 (21:44 -0700)]
Add beta RPM spec and docker script for centos

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
8 years agoMerge pull request #168 from iovisor/weichunc_dev
Brenden Blanco [Thu, 27 Aug 2015 07:59:34 +0000 (00:59 -0700)]
Merge pull request #168 from iovisor/weichunc_dev

Add gretap support for full mesh tunnel

8 years agoAdd gretap support for full mesh tunnel
Wei-Chun Chao [Wed, 26 Aug 2015 21:57:21 +0000 (14:57 -0700)]
Add gretap support for full mesh tunnel

Signed-off-by: Wei-Chun Chao <weichunc@plumgrid.com>
8 years agoMerge pull request #166 from iovisor/bblanco_dev
4ast [Wed, 26 Aug 2015 14:49:41 +0000 (07:49 -0700)]
Merge pull request #166 from iovisor/bblanco_dev

Add proper debian build support, rename libbcc.so

8 years agoMerge pull request #167 from brendangregg/master
Brenden Blanco [Wed, 26 Aug 2015 13:46:37 +0000 (06:46 -0700)]
Merge pull request #167 from brendangregg/master

improve examples using new features

8 years agoimprove code by utilizing trace_readline_fields()
Brendan Gregg [Wed, 26 Aug 2015 10:16:29 +0000 (20:16 +1000)]
improve code by utilizing trace_readline_fields()

8 years agoimprove code by utilizing .clear()
Brendan Gregg [Wed, 26 Aug 2015 10:15:18 +0000 (20:15 +1000)]
improve code by utilizing .clear()

8 years agoSupport versioning out of git tree in debuild
Brenden Blanco [Wed, 26 Aug 2015 07:13:23 +0000 (00:13 -0700)]
Support versioning out of git tree in debuild

This adds support for properly tagging the build when cmake is run not
in a git tree, which is the case when building from src-deb.

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
8 years agoAdd proper debian build support
Brenden Blanco [Wed, 26 Aug 2015 06:14:25 +0000 (23:14 -0700)]
Add proper debian build support

The cmake based build system is nice, but not quite production ready.
Move to the more painful but featureful debuild style. This is one step
towards an upstreamable package.

Rename libbpfprog (ugh) to libbcc.

Split out python-bpf and libbcc-examples into separate packages that
depend on libbcc.

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

Fix print() breakage in python 2.7 environments

8 years agoFix print() breakage in python 2.7 environments
Brenden Blanco [Wed, 26 Aug 2015 05:40:21 +0000 (22:40 -0700)]
Fix print() breakage in python 2.7 environments

Fixes: #164
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
8 years agoMerge pull request #163 from iovisor/bblanco_dev
4ast [Tue, 25 Aug 2015 14:36:16 +0000 (07:36 -0700)]
Merge pull request #163 from iovisor/bblanco_dev

Add debug flag to enable prints from kernel verifier

8 years agotest_trace4 is unreliable, use a different test regex
Brenden Blanco [Tue, 25 Aug 2015 06:55:59 +0000 (23:55 -0700)]
test_trace4 is unreliable, use a different test regex

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
8 years agoAdd debug flag to enable prints from kernel verifier
Brenden Blanco [Tue, 25 Aug 2015 06:42:42 +0000 (23:42 -0700)]
Add debug flag to enable prints from kernel verifier

Add flag to BPF() to enable debug prints from the verifier. Use by
passing 0x2 to debug= in the constructor. Add docstring for BPF
constructor.

Also, optimize bpf_prog_load so that by default the kernel is not
asked to print the verbose output. The program will be "loaded" a second
time to capture the verifier failure message.

Fixes: #147
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
8 years agoMerge pull request #162 from iovisor/bblanco_dev
4ast [Tue, 25 Aug 2015 05:02:49 +0000 (22:02 -0700)]
Merge pull request #162 from iovisor/bblanco_dev

Add regex support to attach_k[ret]probe

8 years agoAdd regex support to attach_k[ret]probe
Brenden Blanco [Tue, 25 Aug 2015 04:33:25 +0000 (21:33 -0700)]
Add regex support to attach_k[ret]probe

Add new event_re parameter to kprobe functions. This searches through
the list of functions/symbols in <tracefs>/available_filter_functions
for all matching functions. Every one is attached.

Add a test case for attach_k[ret]probe.

Fixes: #141
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
8 years agoMerge pull request #161 from svinota/master
yonghong-song [Mon, 24 Aug 2015 23:15:48 +0000 (16:15 -0700)]
Merge pull request #161 from svinota/master

examples: use IPDB `wait_ip()` feature

8 years agoexamples: use IPDB `wait_ip()` feature
Peter V. Saveliev [Mon, 24 Aug 2015 19:55:35 +0000 (21:55 +0200)]
examples: use IPDB `wait_ip()` feature

8 years agoMerge pull request #160 from iovisor/bblanco_dev
4ast [Mon, 24 Aug 2015 19:23:09 +0000 (12:23 -0700)]
Merge pull request #160 from iovisor/bblanco_dev

Add field support to trace_print and friends

8 years agoAdd field support to trace_print and friends
Brenden Blanco [Mon, 24 Aug 2015 19:06:36 +0000 (12:06 -0700)]
Add field support to trace_print and friends

Add trace_readline_fields helper to parse the output of trace_pipe
Add field parsing support to trace_print. Addresses #149.
Fix typo in trace_open s/trace/tracefile/
Make nonblocking=False the default in trace_readline
Use IOError vs BlockingIOError for greater compatibility (untested)

Fixes: #149
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
8 years agoMerge pull request #158 from iovisor/bblanco_dev
4ast [Mon, 24 Aug 2015 16:55:57 +0000 (09:55 -0700)]
Merge pull request #158 from iovisor/bblanco_dev

Fix map.clear() usage for array type maps

8 years agoFix map.clear() usage for array type maps
Brenden Blanco [Mon, 24 Aug 2015 05:59:38 +0000 (22:59 -0700)]
Fix map.clear() usage for array type maps

Calling delete on an array type map entry does not have an effect.
Instead, the entry needs to be zeroed out, since the array slot always
exists. To avoid unnecessary calls to update(), only call update() when
the map type is array-like. The type was not exposed to python up until
now, so add it.

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
8 years agoMerge pull request #157 from iovisor/bblanco_dev
4ast [Sat, 22 Aug 2015 16:55:09 +0000 (09:55 -0700)]
Merge pull request #157 from iovisor/bblanco_dev

Add test case for clearing of maps from python

8 years agoAdd test case for clearing of maps from python
Brenden Blanco [Sat, 22 Aug 2015 15:33:29 +0000 (08:33 -0700)]
Add test case for clearing of maps from python

Fixes: #142
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
8 years agoMerge pull request #156 from iovisor/bblanco_dev
4ast [Fri, 21 Aug 2015 23:37:01 +0000 (16:37 -0700)]
Merge pull request #156 from iovisor/bblanco_dev

Add BPF python helpers for reading trace_pipe

8 years agoAdd BPF python helpers for reading trace_pipe
Brenden Blanco [Fri, 21 Aug 2015 23:33:02 +0000 (16:33 -0700)]
Add BPF python helpers for reading trace_pipe

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
8 years agoMerge pull request #153 from brendangregg/master
Brenden Blanco [Thu, 20 Aug 2015 19:56:35 +0000 (12:56 -0700)]
Merge pull request #153 from brendangregg/master

more examples of b[] syntax, fix func arg passing

8 years agotidier example
Brendan Gregg [Thu, 20 Aug 2015 19:52:30 +0000 (12:52 -0700)]
tidier example

8 years agomore examples of b[] syntax, fix func arg passing
Brendan Gregg [Thu, 20 Aug 2015 19:40:37 +0000 (12:40 -0700)]
more examples of b[] syntax, fix func arg passing

8 years agoMerge pull request #152 from iovisor/bblanco_dev
4ast [Thu, 20 Aug 2015 18:46:42 +0000 (11:46 -0700)]
Merge pull request #152 from iovisor/bblanco_dev

Add getitem api to BPF object to reference tables

8 years agoAdd getitem api to BPF object to reference tables
Brenden Blanco [Thu, 20 Aug 2015 18:27:21 +0000 (11:27 -0700)]
Add getitem api to BPF object to reference tables

To simplify some common usage patterns, add a getitem api to the BPF
class. This wraps the get_table() api and allows the api user to skip
keeping their own get_table handle.

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

Change API of attach_kprobe to take a name argument

8 years agoChange API of attach_kprobe to take a name argument
Brenden Blanco [Wed, 19 Aug 2015 22:39:19 +0000 (15:39 -0700)]
Change API of attach_kprobe to take a name argument

Per feedback on the attach_kprobe api, change up the arguments to remove
the load_func that typically preceeds the call. Instead, move this
inside the attach_kprobe implementation. Also, this makes attach_kprobe
need to be non-static. The same applies to attach_kretprobe.

Old:
fn = b.load_func("hello", BPF.KPROBE)
BPF.attach_kprobe(fn, "sys_clone")

New:
b.attach_kprobe(event="sys_clone", fn_name="hello")

Note that the kwarg style is not required, but I fixed up the current
usages to provide readability.

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
8 years agoMerge pull request #150 from brendangregg/master
Brenden Blanco [Wed, 19 Aug 2015 00:55:32 +0000 (17:55 -0700)]
Merge pull request #150 from brendangregg/master

some bcc examples and tools

8 years agosave some syscalls
Brendan Gregg [Tue, 18 Aug 2015 23:53:41 +0000 (16:53 -0700)]
save some syscalls

8 years agopython 2 & 3 compatibility
Brendan Gregg [Tue, 18 Aug 2015 23:49:48 +0000 (16:49 -0700)]
python 2 & 3 compatibility

8 years agosupport odd Linux distros
Brendan Gregg [Tue, 18 Aug 2015 23:11:35 +0000 (16:11 -0700)]
support odd Linux distros

8 years agocleaner get_table calls
Brendan Gregg [Tue, 18 Aug 2015 22:34:56 +0000 (15:34 -0700)]
cleaner get_table calls

8 years agoinclude paths
Brendan Gregg [Tue, 18 Aug 2015 22:17:29 +0000 (15:17 -0700)]
include paths

8 years agosome bcc examples and tools
Brendan Gregg [Tue, 18 Aug 2015 21:56:14 +0000 (14:56 -0700)]
some bcc examples and tools

8 years agoMerge pull request #134 from iovisor/bblanco_dev v0.1.5
4ast [Mon, 17 Aug 2015 17:32:28 +0000 (10:32 -0700)]
Merge pull request #134 from iovisor/bblanco_dev

Add format string argument to bpf-run

8 years agoAdd format string argument to bpf-run
Brenden Blanco [Mon, 17 Aug 2015 17:24:20 +0000 (10:24 -0700)]
Add format string argument to bpf-run

Usage:
bpf-run -f "time={3} output={5}"

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
8 years agoMerge pull request #133 from iovisor/bblanco_dev
4ast [Mon, 17 Aug 2015 16:41:04 +0000 (09:41 -0700)]
Merge pull request #133 from iovisor/bblanco_dev

Add bpf-run command line tool

8 years agoAdd bpf-run command line tool
Brenden Blanco [Mon, 17 Aug 2015 16:37:30 +0000 (09:37 -0700)]
Add bpf-run command line tool

Example usage:
sudo bpf-run -p sys_clone -c 'bpf_trace_printk("Hello, World!\n");' -t

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
8 years agoMerge pull request #132 from iovisor/yhs_dev
Brenden Blanco [Mon, 17 Aug 2015 03:06:35 +0000 (20:06 -0700)]
Merge pull request #132 from iovisor/yhs_dev

add dhcp support for tunnel-mesh

8 years agoadd dhcp support for tunnel-mesh
Yonghong Song [Thu, 13 Aug 2015 10:04:40 +0000 (03:04 -0700)]
add dhcp support for tunnel-mesh

Signed-off-by: Yonghong Song <yhs@plumgrid.com>
8 years agoMerge pull request #130 from iovisor/yhs_dev
Brenden Blanco [Thu, 13 Aug 2015 00:33:18 +0000 (17:33 -0700)]
Merge pull request #130 from iovisor/yhs_dev

add vlan_learning and distributed_bridge in libbcc package

8 years agoMerge pull request #131 from iovisor/weichunc_dev
Brenden Blanco [Thu, 13 Aug 2015 00:32:19 +0000 (17:32 -0700)]
Merge pull request #131 from iovisor/weichunc_dev

distributed_bridge: check ip address before validating traffic

8 years agodistributed_bridge: check ip address before validating traffic
Wei-Chun Chao [Thu, 13 Aug 2015 00:13:24 +0000 (17:13 -0700)]
distributed_bridge: check ip address before validating traffic

Signed-off-by: Wei-Chun Chao <weichunc@plumgrid.com>
8 years agoadd vlan_learning and distributed_bridge in libbcc package
Yonghong Song [Thu, 13 Aug 2015 00:08:39 +0000 (17:08 -0700)]
add vlan_learning and distributed_bridge in libbcc package

Signed-off-by: Yonghong Song <yhs@plumgrid.com>
8 years agoMerge pull request #129 from iovisor/weichunc_dev
Brenden Blanco [Wed, 12 Aug 2015 23:25:31 +0000 (16:25 -0700)]
Merge pull request #129 from iovisor/weichunc_dev

distributed_bridge: wait for ns comes up before validating traffic

8 years agodistributed_bridge: wait for ns comes up before validating traffic
Wei-Chun Chao [Wed, 12 Aug 2015 23:04:06 +0000 (16:04 -0700)]
distributed_bridge: wait for ns comes up before validating traffic

Sometimes it takes longer for ns to complete configuration.

Signed-off-by: Wei-Chun Chao <weichunc@plumgrid.com>
8 years agoMerge pull request #128 from iovisor/weichunc_dev
Brenden Blanco [Wed, 12 Aug 2015 20:14:24 +0000 (13:14 -0700)]
Merge pull request #128 from iovisor/weichunc_dev

test_brb2: only account for IP and ARP packets

8 years agoMerge pull request #127 from iovisor/bblanco_dev
4ast [Wed, 12 Aug 2015 20:09:35 +0000 (13:09 -0700)]
Merge pull request #127 from iovisor/bblanco_dev

Changes to support map entry read/write in fuse

8 years agotest_brb2: only account for IP and ARP packets
Wei-Chun Chao [Wed, 12 Aug 2015 20:08:08 +0000 (13:08 -0700)]
test_brb2: only account for IP and ARP packets

Sometimes background noise fails the test

Signed-off-by: Wei-Chun Chao <weichunc@plumgrid.com>
8 years agoAdd testing for scanf/printf in python, deprecate table_update
Brenden Blanco [Wed, 12 Aug 2015 19:08:00 +0000 (12:08 -0700)]
Add testing for scanf/printf in python, deprecate table_update

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
8 years agoAdd sscanf C api for parsing key/leaf ascii to binary
Brenden Blanco [Wed, 12 Aug 2015 15:55:09 +0000 (08:55 -0700)]
Add sscanf C api for parsing key/leaf ascii to binary

Expose an individual API of the what is done in table_update, that lets
the caller use the module to parse keys for it.

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
8 years agoMerge pull request #126 from iovisor/yhs_dev
Brenden Blanco [Wed, 12 Aug 2015 15:25:50 +0000 (08:25 -0700)]
Merge pull request #126 from iovisor/yhs_dev

clean up potential conflict veth before creating new one in create_ns

8 years agoclose ipr to avoid fd leak
Yonghong Song [Wed, 12 Aug 2015 15:21:57 +0000 (08:21 -0700)]
close ipr to avoid fd leak

Signed-off-by: Yonghong Song <yhs@plumgrid.com>
8 years agouse pyroute2 IProute to remove the stale veth
Yonghong Song [Tue, 11 Aug 2015 02:04:58 +0000 (19:04 -0700)]
use pyroute2 IProute to remove the stale veth

Signed-off-by: Yonghong Song <yhs@plumgrid.com>
8 years agoMerge pull request #125 from iovisor/bblanco_dev v0.1.4
4ast [Wed, 12 Aug 2015 01:41:35 +0000 (18:41 -0700)]
Merge pull request #125 from iovisor/bblanco_dev

Add printf for key/leaf and fix trace_printk bug

8 years agoSupport nested rewrite of trace arguments in bpf_trace_printk
Brenden Blanco [Wed, 12 Aug 2015 01:33:49 +0000 (18:33 -0700)]
Support nested rewrite of trace arguments in bpf_trace_printk

There was an issue where the rewrite of bpf_trace_printk combined with
conversion of function argument to ctx->$reg was mangling the text. Fix
up this case and add a test.

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
8 years agoAdd printf key/leaf writer functionality
Brenden Blanco [Tue, 11 Aug 2015 16:30:13 +0000 (09:30 -0700)]
Add printf key/leaf writer functionality

This extends upon the sscanf reader functionality, with the intent of
providing key/leaf pretty printing

Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
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 agoclean up potential conflict veth before creating new one in create_ns
Yonghong Song [Tue, 11 Aug 2015 00:33:24 +0000 (17:33 -0700)]
clean up potential conflict veth before creating new one in create_ns

Signed-off-by: Yonghong Song <yhs@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