Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General improvements #27

Merged
merged 6 commits into from
Nov 13, 2023
Merged

Conversation

qdeslandes
Copy link
Contributor

No description provided.

BPF_NETFILTER program type support introduced 2-step BPF program
loading, but the post-unload callback for TC wasn't available.

Signed-off-by: Quentin Deslandes <[email protected]>
Copy link

codecov bot commented Nov 13, 2023

Codecov Report

Attention: 143 lines in your changes are missing coverage. Please review.

Comparison is base (9d623d8) 13.77% compared to head (87fc416) 13.49%.
Report is 9 commits behind head on main.

❗ Current head 87fc416 differs from pull request most recent head 24e3d9c. Consider uploading reports for the commit 24e3d9c to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #27      +/-   ##
==========================================
- Coverage   13.77%   13.49%   -0.29%     
==========================================
  Files          33       33              
  Lines        2388     2283     -105     
==========================================
- Hits          329      308      -21     
+ Misses       2059     1975      -84     
Files Coverage Δ
src/core/verdict.c 100.00% <100.00%> (ø)
src/generator/fixup.c 0.00% <ø> (ø)
src/generator/nf.c 5.45% <66.66%> (+0.19%) ⬆️
src/core/rule.c 0.00% <0.00%> (ø)
src/generator/tc.c 0.00% <0.00%> (ø)
src/generator/stub.c 0.00% <0.00%> (ø)
src/generator/codegen.c 12.62% <0.00%> (-1.27%) ⬇️
src/generator/program.c 7.03% <4.16%> (+0.43%) ⬆️
src/core/context.c 10.75% <8.57%> (+1.48%) ⬆️
src/xlate/ipt/ipt.c 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

BPF_EXIT_INSN() is added to the codegen by the rules, or the program
itself. The flavour doesn't need to add a BPF_EXIT_INSN().

Signed-off-by: Quentin Deslandes <[email protected]>
Install bpfilter.pc into CMake's libdir instead of datadir.

Add ubsan and asan to bpfilter.pc in debug mode.

Signed-off-by: Quentin Deslandes <[email protected]>
ipt_getinfo and ipt_get_entries are both used (as a pointer) but
undefined in bpfilter.h.

Forward-declare both structure to prevent compilation warning.

Signed-off-by: Quentin Deslandes <[email protected]>
Do not read bf_response.data_len in bf_recv_response() if
bf_response.status is not successful.

Signed-off-by: Quentin Deslandes <[email protected]>
@qdeslandes qdeslandes marked this pull request as ready for review November 13, 2023 15:27
@qdeslandes qdeslandes merged commit 7c88a61 into facebook:main Nov 13, 2023
5 checks passed
@qdeslandes qdeslandes deleted the general_improvements branch November 13, 2023 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants