RE: [PATCH bpf-next] bpf/devmap: remove drops variable from bq_xmit_all()
From: John Fastabend
Date: Fri May 28 2021 - 00:02:36 EST
Hangbin Liu wrote:
> As Colin pointed out, the first drops assignment after declaration will
> be overwritten by the second drops assignment before using, which makes
> it useless.
>
> Since the drops variable will be used only once. Just remove it and
> use "cnt - sent" in trace_xdp_devmap_xmit()
>
> Reported-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
> Fixes: cb261b594b41 ("bpf: Run devmap xdp_prog on flush instead of bulk enqueue")
> Signed-off-by: Hangbin Liu <liuhangbin@xxxxxxxxx>
> ---
> kernel/bpf/devmap.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
Thanks
Acked-by: John Fastabend <john.fastabend@xxxxxxxxx>