- 23 May, 2017 2 commits
-
-
Brenden Blanco authored
Add support for generic XDP mode
-
Andy Gospodarek authored
Reused some of the code and command-line format from kernel XDP samples. $ sudo ./xdp_drop_count.py -S enp1s0 Printing drops per IP protocol-number, hit CTRL+C to stop 17: 36616 pkt/s 17: 19720757 pkt/s 17: 19685768 pkt/s 17: 19643601 pkt/s 17: 19694537 pkt/s [...] $ sudo ./xdp_drop_count.py enp1s0 Printing drops per IP protocol-number, hit CTRL+C to stop 17: 7029 pkt/s 17: 29996706 pkt/s 17: 30048705 pkt/s 17: 30261417 pkt/s 17: 30291967 pkt/s [...] Throughput difference is expected since generic XDP takes more instructions per packet than optimized XDP. v2: switch __u32 to uint32_t in bpf_attach_xdp Signed-off-by: Andy Gospodarek <gospo@broadcom.com>
-
- 22 May, 2017 3 commits
- 21 May, 2017 3 commits
- 20 May, 2017 9 commits
-
-
Teng Qin authored
-
Teng Qin authored
-
Brenden Blanco authored
Add ability for users to control symboling behavior
-
Teng Qin authored
As the symbol type check now controled by the specified `bcc_symbol_option` and handled in lower level, there is not need to pass the type flag to the callback anymore.
-
Teng Qin authored
This commit makes `ProcSyms` constructor takes a `bcc_symbol_option`, and pass it down to underlying calls to control symboling behavior. If `nullptr` is passed, `ProcSyms` will use default setting, which is to use debug file, verify debug file checksum, and only load function symbols. This commit also makes `bcc_symcache_new` take a `bcc_symbol_option` parameter and pass it to the underlying `ProcSyms` constructor.
-
Teng Qin authored
This commit makes `bcc_resolve_symname` to take an `bcc_symbol_option` parameter, and pass it to underlying calls to control symboling behavior. When `NULL` is passed, it will fallback to default which is current behavior that uses debug file, verify debug file CRC, and check all types of symbols. This commit also removes the unneccesary intermediate `bcc_find_symbol_addr`. Added documentation for usage of the API, updated most call sites to use default with `NULL`, and fixed some memory leaks at call sites.
-
Teng Qin authored
`bcc_resolve_symname` should free `sym->module` on error. Also remove unused `sym_search_t`
-
Teng Qin authored
This commit changes `bcc_foreach_symbol` to use the new `bcc_symbol_option` to control it only wants function symbols. Also renamed it to bcc_foreach_function_symbol and added comments for better information. This commit maintained current behavior of the function to prefer use debug file and check debug file CRC. We could add option to configure that behavior in the future if needed.
-
Teng Qin authored
This commit adds a `bcc_symbol_option` to configure various symboling behaviors. Currently added options for reading debug file, and what type of symbols are wanted. This commit also makes bcc_elf_foreach_sym take a `bcc_symbol_option` parameter and repect the specified configurations.
-
- 19 May, 2017 1 commit
-
-
Brenden Blanco authored
Use new Kernel functionality to get first key of map
-
- 18 May, 2017 7 commits
-
-
Teng Qin authored
-
Teng Qin authored
-
Teng Qin authored
This commit adds bpf_get_first_key helper, which gets the first key of the map. It automatically tries to use the new Kernel functionality and falls back to old Kernel behavior. This helps us unify the logic to walk a map across different APIs (Python, C++, etc.)
-
Brenden Blanco authored
Workaround for possible race in pyroute2.ipdb
-
Brenden Blanco authored
In simulation.py, add a call to initdb() to force-refresh the netlink socket and the interface list. Signed-off-by: Brenden Blanco <bblanco@gmail.com>
-
4ast authored
remove trailing white spaces from source code files
-
Mauricio Vasquez B authored
Trailing white spaces cause problems with git. Signed-off-by: Mauricio Vasquez B <mauricio.vasquez@polito.it>
-
- 17 May, 2017 2 commits
-
-
4ast authored
Enable recursive scanf support for char[] as string
-
Brenden Blanco authored
Improve the internal documentation for the reader and writer generated functions in the case that u8[]=>"" is used. Change one `+=` to `=`. Signed-off-by: Brenden Blanco <bblanco@gmail.com>
-
- 16 May, 2017 1 commit
-
-
Teng Qin authored
-
- 15 May, 2017 1 commit
-
-
Brenden Blanco authored
When a bpf table contains i8[] in one of its keys/leaves, use "" to enclose the value, rather than [ %i %i %i ... ] format. This simplifies the code that is generated for cases such as #1154, and brings it back under ~200ms code generation, instead of >30s. This change of format is not particularly robust (it doesn't handle escaping the doublequote character itself), but it should make more sense for the common case, such as tracing files and pathnames. The test case included tests both the functionality of the format string handling as well as the compile time, since test_clang already has an implicit 10second timeout limit. Fixes: #1154 Signed-off-by: Brenden Blanco <bblanco@gmail.com>
-
- 12 May, 2017 1 commit
-
-
Brenden Blanco authored
Fix bug when finding symbols for shared libraries
-
- 11 May, 2017 3 commits
-
-
Teng Qin authored
-
4ast authored
llvm5.0: use input kind helper to avoid breakage
-
Brenden Blanco authored
Move FileDesc to separated header file and install
-
- 10 May, 2017 7 commits
-
-
Teng Qin authored
-
Brenden Blanco authored
Upstream llvm renamed an enum, so use a helper function that is available in all versions to fix compatibility. Signed-off-by: Brenden Blanco <bblanco@gmail.com>
-
4ast authored
Use late-binding to finalize snprintf/sscanf
-
Brenden Blanco authored
Signed-off-by: Brenden Blanco <bblanco@gmail.com>
-
Brenden Blanco authored
Fedora compile
-
Brenden Blanco authored
The api should return 0, not the number of bytes successfully written (which is what snprintf directly returns). Signed-off-by: Brenden Blanco <bblanco@gmail.com>
-
Brenden Blanco authored
Not all users require the snprintf/sscanf helpers, and in some types the finalization can take a long time. Defer the finalization until the first use. Wrap the invocation with a bound function such that the BPFTable and other users don't need to keep an explicit BPFModule reference. Use-after-free will be avoided by resetting the function to an error-returning stub when/if the BPFModule is freed. Signed-off-by: Brenden Blanco <bblanco@gmail.com>
-