From 934e455a3566f0f8e74d45a5ff4f9b55ed83ed36 Mon Sep 17 00:00:00 2001 From: vdasu Date: Sun, 12 Jul 2026 15:18:26 -0400 Subject: [PATCH] bmc: return TC_ACT_OK instead of XDP_PASS in TC programs bmc_tx_filter_main and bmc_update_cache_main are sched_cls (TC) programs but returned XDP_PASS on their early-out paths. XDP_PASS == 2 == TC_ACT_SHOT, so a short frame (ip + 1 > data_end) and the !stats paths were dropped instead of passed. Use TC_ACT_OK, matching every other return in these functions. --- bmc/bmc_kern.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bmc/bmc_kern.c b/bmc/bmc_kern.c index 5a2f064..9a4c5c0 100644 --- a/bmc/bmc_kern.c +++ b/bmc/bmc_kern.c @@ -512,7 +512,7 @@ int bmc_tx_filter_main(struct __sk_buff *skb) return TC_ACT_OK; if (ip + 1 > data_end) - return XDP_PASS; + return TC_ACT_OK; if (ip->protocol != IPPROTO_UDP) return TC_ACT_OK; @@ -527,7 +527,7 @@ int bmc_tx_filter_main(struct __sk_buff *skb) struct bmc_stats *stats = bpf_map_lookup_elem(&map_stats, &zero); if (!stats) { - return XDP_PASS; + return TC_ACT_OK; } stats->get_resp_count++; @@ -594,7 +594,7 @@ int bmc_update_cache_main(struct __sk_buff *skb) bpf_spin_unlock(&entry->lock); struct bmc_stats *stats = bpf_map_lookup_elem(&map_stats, &zero); if (!stats) { - return XDP_PASS; + return TC_ACT_OK; } stats->update_count++; } else {