Skip to content

Commit

Permalink
Remove legacy_file_names param from bpf_object() buck rule
Browse files Browse the repository at this point in the history
Summary:
We are getting rid of the legacy_file_names parameter from the bpf_object() rule in buck, which means all bpf sources must end with '.bpf.c' now, and cannot merely end in '.c'. We are thus renaming any usages in fbcode that still rely on '.c' srcs.

I also made some changes in an attempt to follow our other naming conventions where I could, such as getting rid of the '_kern' suffix, but unfortunately katran has a LOT of files and buck rules with that (some of which is directly referenced in code as well), which makes it more effort than it's worth in this diff.

Reviewed By: avasylev, anakryiko

Differential Revision: D49080409

fbshipit-source-id: a178a5832eecce87d7e63c7bcad3d19b259e1546
  • Loading branch information
arthurshau authored and facebook-github-bot committed Sep 8, 2023
1 parent 4620f54 commit d343d22
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 4 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion katran/lib/linux_includes/bpf.h
Original file line number Diff line number Diff line change
Expand Up @@ -1053,7 +1053,7 @@ union bpf_attr {
* into it. An example is available in file
* *samples/bpf/trace_output_user.c* in the Linux kernel source
* tree (the eBPF program counterpart is in
* *samples/bpf/trace_output_kern.c*).
* *samples/bpf/trace_output.bpf.c*).
*
* **bpf_perf_event_output**\ () achieves better performance
* than **bpf_trace_printk**\ () for sharing data with user
Expand Down
2 changes: 1 addition & 1 deletion katran/tpr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ set(BPFOBJECT_EXTRA_DEFINES "-DKATRAN_CMAKE_BUILD")
find_package(BpfObject REQUIRED)

bpf_object(tpr_bpf
bpf/tcp_pkt_router_kern.c
bpf/tcp_pkt_router.bpf.c

)

Expand Down
4 changes: 2 additions & 2 deletions katran/tpr/TcpPktRouter.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
#include <katran/tpr/bpf_util/BpfSkeleton.h>

#ifdef KATRAN_CMAKE_BUILD
#include "tpr_bpf.skel.h" // @manual
#include "tpr.skel.h" // @manual
#else
#include <katran/tpr/bpf/tpr_bpf.skel.h>
#include <katran/tpr/bpf/tpr.skel.h>
#endif

namespace katran_tpr {
Expand Down
File renamed without changes.

0 comments on commit d343d22

Please sign in to comment.