Skip to content

Commit b30b0f2

Browse files
Fei Chenfacebook-github-bot
authored andcommitted
fixed the broken TPR_DEBUG
Summary: https://fb.workplace.com/groups/1008959556589501/permalink/1943718926446888/ tpr bpf code was not compiling with TPR_DEBUG defined. Fixed it by using third-party/libbpf/master/src/bpf_endian.h instead of our own bpf_endian.h file. Reviewed By: lima1756 Differential Revision: D77147727 fbshipit-source-id: 25d5331df94d129b0c132afb5bdae0062a105cad
1 parent 327fc25 commit b30b0f2

3 files changed

Lines changed: 3 additions & 61 deletions

File tree

katran/tpr/bpf/bpf_endian.h

Lines changed: 0 additions & 59 deletions
This file was deleted.

katran/tpr/bpf/tcp_pkt_router_common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#include <bpf/vmlinux/vmlinux.h>
99
#endif
1010

11+
#include <bpf/bpf_endian.h>
1112
#include <bpf/bpf_helpers.h>
1213

13-
#include "bpf_endian.h"
1414
#include "tcp_pkt_router_consts.h"
1515
#include "tcp_pkt_router_maps.h"
1616
#include "tcp_pkt_router_structs.h"

katran/tpr/bpf/tcp_pkt_router_passive_hdlr.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@ static inline bool should_ignore_due_to_kde(struct bpf_sock_ops* skops) {
2727
kde_opt.kind = KDE_CLT_TCP_HDR_OPT_KIND;
2828
int ret = bpf_load_hdr_opt(skops, &kde_opt, sizeof(kde_opt), load_flags);
2929
if (ret == KDE_CLT_TCP_HDR_OPT_V2_LEN) {
30-
if (s_info->kde_zones)
30+
if (s_info->kde_zones) {
3131
if ((s_info->kde_zones & kde_opt.zone) == kde_opt.zone) {
3232
return true;
3333
} else if (s_info->kde_zones == KDE_ZONE_ALL) {
3434
return true;
3535
}
36+
}
3637
}
3738
}
3839
return false;

0 commit comments

Comments
 (0)