* [PATCH] samples/bpf: Remove unused variables
@ 2024-10-09 8:21 Zhu Jun
2024-10-10 1:30 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 5+ messages in thread
From: Zhu Jun @ 2024-10-09 8:21 UTC (permalink / raw)
To: martin.lau
Cc: eddyz87, song, yonghong.song, john.fastabend, kpsingh, sdf,
haoluo, jolsa, bpf, linux-kernel, andrii, daniel, ast, Zhu Jun
These variables are never referenced in the code, just remove them.
Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
---
samples/bpf/tc_l2_redirect_kern.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/samples/bpf/tc_l2_redirect_kern.c b/samples/bpf/tc_l2_redirect_kern.c
index fd2fa0004330..0b48f7ddf521 100644
--- 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;
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] samples/bpf: Remove unused variables
2024-10-09 8:21 [PATCH] samples/bpf: Remove unused variables Zhu Jun
@ 2024-10-10 1:30 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-10-10 1:30 UTC (permalink / raw)
To: Zhu Jun
Cc: martin.lau, eddyz87, song, yonghong.song, john.fastabend, kpsingh,
sdf, haoluo, jolsa, bpf, linux-kernel, andrii, daniel, ast
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@kernel.org>:
On Wed, 9 Oct 2024 01:21:38 -0700 you wrote:
> These variables are never referenced in the code, just remove them.
>
> Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
> ---
> samples/bpf/tc_l2_redirect_kern.c | 2 --
> 1 file changed, 2 deletions(-)
Here is the summary with links:
- samples/bpf: Remove unused variables
https://git.kernel.org/bpf/bpf-next/c/965fdf95a327
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] samples/bpf: Remove unused variables
@ 2024-11-11 6:23 Zhu Jun
2024-11-13 20:30 ` patchwork-bot+netdevbpf
2024-11-13 20:41 ` Andrii Nakryiko
0 siblings, 2 replies; 5+ messages in thread
From: Zhu Jun @ 2024-11-11 6:23 UTC (permalink / raw)
To: martin.lau
Cc: eddyz87, yonghong.song, john.fastabend, sdf, haoluo, jolsa, bpf,
linux-kernel, zhujun2
These variables are never referenced in the code, just remove them
Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
---
samples/bpf/tc_l2_redirect_kern.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/samples/bpf/tc_l2_redirect_kern.c b/samples/bpf/tc_l2_redirect_kern.c
index fd2fa0004330..729657d77802 100644
--- a/samples/bpf/tc_l2_redirect_kern.c
+++ b/samples/bpf/tc_l2_redirect_kern.c
@@ -64,8 +64,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;
@@ -115,8 +113,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;
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] samples/bpf: Remove unused variables
2024-11-11 6:23 Zhu Jun
@ 2024-11-13 20:30 ` patchwork-bot+netdevbpf
2024-11-13 20:41 ` Andrii Nakryiko
1 sibling, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-11-13 20:30 UTC (permalink / raw)
To: Zhu Jun
Cc: martin.lau, eddyz87, yonghong.song, john.fastabend, sdf, haoluo,
jolsa, bpf, linux-kernel
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:
On Sun, 10 Nov 2024 22:23:12 -0800 you wrote:
> These variables are never referenced in the code, just remove them
>
> Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
> ---
> samples/bpf/tc_l2_redirect_kern.c | 4 ----
> 1 file changed, 4 deletions(-)
Here is the summary with links:
- samples/bpf: Remove unused variables
https://git.kernel.org/bpf/bpf-next/c/3fcfbfe307dd
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] samples/bpf: Remove unused variables
2024-11-11 6:23 Zhu Jun
2024-11-13 20:30 ` patchwork-bot+netdevbpf
@ 2024-11-13 20:41 ` Andrii Nakryiko
1 sibling, 0 replies; 5+ messages in thread
From: Andrii Nakryiko @ 2024-11-13 20:41 UTC (permalink / raw)
To: Zhu Jun
Cc: martin.lau, eddyz87, yonghong.song, john.fastabend, sdf, haoluo,
jolsa, bpf, linux-kernel
On Sun, Nov 10, 2024 at 10:23 PM Zhu Jun <zhujun2@cmss.chinamobile.com> wrote:
>
> These variables are never referenced in the code, just remove them
>
> Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
> ---
> samples/bpf/tc_l2_redirect_kern.c | 4 ----
> 1 file changed, 4 deletions(-)
>
applied to bpf-next (but added file name to subject, so not sure if
bot will pick this up)
> diff --git a/samples/bpf/tc_l2_redirect_kern.c b/samples/bpf/tc_l2_redirect_kern.c
> index fd2fa0004330..729657d77802 100644
> --- a/samples/bpf/tc_l2_redirect_kern.c
> +++ b/samples/bpf/tc_l2_redirect_kern.c
> @@ -64,8 +64,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;
>
> @@ -115,8 +113,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;
>
> --
> 2.17.1
>
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-11-13 20:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-09 8:21 [PATCH] samples/bpf: Remove unused variables Zhu Jun
2024-10-10 1:30 ` patchwork-bot+netdevbpf
-- strict thread matches above, loose matches on Subject: below --
2024-11-11 6:23 Zhu Jun
2024-11-13 20:30 ` patchwork-bot+netdevbpf
2024-11-13 20:41 ` Andrii Nakryiko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox