From 0d41c9332058604c90409e319411118d1fcbabab Mon Sep 17 00:00:00 2001 From: Nikhil Dixit Limaye Date: Tue, 10 Oct 2023 11:22:11 -0700 Subject: [PATCH] Tc decap bpf for TPR decap stats Summary: Based on the discussion on D49706202, moving the TPR validation stats logic to a separate tc bpf program, that will be managed outside of tw (similar to decap_info). This diffs starts with empty prog that builds. TPR validation to be added in next diffs Reviewed By: lalitg845 Differential Revision: D50090569 fbshipit-source-id: 9c5aa15576f4f3517c1086f5ce9b3081d2c22b51 --- katran/decap/tc_bpf/tc_decap_stats.bpf.c | 28 ++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 katran/decap/tc_bpf/tc_decap_stats.bpf.c diff --git a/katran/decap/tc_bpf/tc_decap_stats.bpf.c b/katran/decap/tc_bpf/tc_decap_stats.bpf.c new file mode 100644 index 000000000..5ebec9920 --- /dev/null +++ b/katran/decap/tc_bpf/tc_decap_stats.bpf.c @@ -0,0 +1,28 @@ + +/* Copyright (C) 2019-present, Facebook, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include +#include + +#include "katran/lib/linux_includes/bpf_helpers.h" + +SEC("tc") +int tcdecapinfo(struct __sk_buff* skb) { + return TC_ACT_UNSPEC; +} + +char _license[] SEC("license") = "GPL";