projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5bf1557
)
samples/bpf: Remove unused variables
author
Zhu Jun
<zhujun2@cmss.chinamobile.com>
Wed, 9 Oct 2024 08:21:38 +0000
(
01:21
-0700)
committer
Alexei Starovoitov
<ast@kernel.org>
Thu, 10 Oct 2024 01:22:04 +0000
(18:22 -0700)
These variables are never referenced in the code, just remove them.
Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
Link:
https://lore.kernel.org/r/20241009082138.7971-1-zhujun2@cmss.chinamobile.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
samples/bpf/tc_l2_redirect_kern.c
patch
|
blob
|
blame
|
history
diff --git
a/samples/bpf/tc_l2_redirect_kern.c
b/samples/bpf/tc_l2_redirect_kern.c
index fd2fa00043305a7de0d3a3d51061c5a0d6833046..0b48f7ddf521946f2e605a2d8f61606b67a78737 100644
(file)
--- a/
samples/bpf/tc_l2_redirect_kern.c
+++ b/
samples/bpf/tc_l2_redirect_kern.c
@@
-58,7
+58,6
@@
static __always_inline bool is_vip_addr(__be16 eth_proto, __be32 daddr)
SEC("l2_to_iptun_ingress_forward")
int _l2_to_iptun_ingress_forward(struct __sk_buff *skb)
{
- struct bpf_tunnel_key tkey = {};
void *data = (void *)(long)skb->data;
struct eth_hdr *eth = data;
void *data_end = (void *)(long)skb->data_end;
@@
-205,7
+204,6
@@
int _l2_to_ip6tun_ingress_redirect(struct __sk_buff *skb)
SEC("drop_non_tun_vip")
int _drop_non_tun_vip(struct __sk_buff *skb)
{
- struct bpf_tunnel_key tkey = {};
void *data = (void *)(long)skb->data;
struct eth_hdr *eth = data;
void *data_end = (void *)(long)skb->data_end;