samples/bpf: Remove unused variables in tc_l2_redirect_kern.c

These variables are never referenced in the code, just remove them.

Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20241111062312.3541-1-zhujun2@cmss.chinamobile.com
This commit is contained in:
Zhu Jun 2024-11-10 22:23:12 -08:00 committed by Andrii Nakryiko
parent b7b31f184f
commit 3fcfbfe307

View File

@ -63,8 +63,6 @@ int _l2_to_iptun_ingress_forward(struct __sk_buff *skb)
void *data_end = (void *)(long)skb->data_end;
int key = 0, *ifindex;
int ret;
if (data + sizeof(*eth) > data_end)
return TC_ACT_OK;
@ -114,8 +112,6 @@ int _l2_to_iptun_ingress_redirect(struct __sk_buff *skb)
void *data_end = (void *)(long)skb->data_end;
int key = 0, *ifindex;
int ret;
if (data + sizeof(*eth) > data_end)
return TC_ACT_OK;