BPF List
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: Hou Tao <houtao@huaweicloud.com>, bpf@vger.kernel.org
Cc: "Martin KaFai Lau" <martin.lau@linux.dev>,
	"Alexei Starovoitov" <alexei.starovoitov@gmail.com>,
	"Andrii Nakryiko" <andrii@kernel.org>,
	"Eduard Zingerman" <eddyz87@gmail.com>,
	"Song Liu" <song@kernel.org>, "Hao Luo" <haoluo@google.com>,
	"Yonghong Song" <yonghong.song@linux.dev>,
	"KP Singh" <kpsingh@kernel.org>,
	"Stanislav Fomichev" <sdf@fomichev.me>,
	"Jiri Olsa" <jolsa@kernel.org>,
	"John Fastabend" <john.fastabend@gmail.com>,
	"Toke Høiland-Jørgensen" <toke@redhat.com>,
	"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Thomas Weißschuh" <linux@weissschuh.net>,
	houtao1@huawei.com, xukuohai@huawei.com
Subject: Re: [PATCH bpf v2 2/9] bpf: Remove unnecessary kfree(im_node) in lpm_trie_update_elem
Date: Mon, 2 Dec 2024 17:10:40 +0100	[thread overview]
Message-ID: <a0d44807-5cf7-4ba7-a7ea-e59448d28bd9@iogearbox.net> (raw)
In-Reply-To: <20241127004641.1118269-3-houtao@huaweicloud.com>

On 11/27/24 1:46 AM, Hou Tao wrote:
> From: Hou Tao <houtao1@huawei.com>
> 
> There is no need to call kfree(im_node) when updating element fails,
> because im_node must be NULL. Remove the unnecessary kfree() for
> im_node.
> 
> Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com>
> Signed-off-by: Hou Tao <houtao1@huawei.com>

Acked-by: Daniel Borkmann <daniel@iogearbox.net>

Small nit if you respin, or follow-up: Given we remove this, the im_node = NULL
init is then also not needed anymore.

  reply	other threads:[~2024-12-02 16:27 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-27  0:46 [PATCH bpf v2 0/9] Fixes for LPM trie Hou Tao
2024-11-27  0:46 ` [PATCH bpf v2 1/9] bpf: Remove unnecessary check when updating " Hou Tao
2024-12-02 16:08   ` Daniel Borkmann
2024-11-27  0:46 ` [PATCH bpf v2 2/9] bpf: Remove unnecessary kfree(im_node) in lpm_trie_update_elem Hou Tao
2024-12-02 16:10   ` Daniel Borkmann [this message]
2024-11-27  0:46 ` [PATCH bpf v2 3/9] bpf: Handle BPF_EXIST and BPF_NOEXIST for LPM trie Hou Tao
2024-12-02 17:17   ` Daniel Borkmann
2024-11-27  0:46 ` [PATCH bpf v2 4/9] bpf: Handle in-place update for full LPM trie correctly Hou Tao
2024-11-29 11:45   ` Toke Høiland-Jørgensen
2024-11-27  0:46 ` [PATCH bpf v2 5/9] bpf: Fix exact match conditions in trie_get_next_key() Hou Tao
2024-11-27  0:46 ` [PATCH bpf v2 6/9] bpf: Switch to bpf mem allocator for LPM trie Hou Tao
2024-11-27  5:51   ` Alexei Starovoitov
2024-11-28  4:12     ` Hou Tao
2024-11-29 12:01   ` Toke Høiland-Jørgensen
2024-11-27  0:46 ` [PATCH bpf v2 7/9] bpf: Use raw_spinlock_t " Hou Tao
2024-11-29 12:18   ` Toke Høiland-Jørgensen
2024-12-03  1:42     ` Alexei Starovoitov
2024-12-05  8:52       ` Hou Tao
2024-12-05  9:47         ` Toke Høiland-Jørgensen
2024-12-15  9:37           ` Hou Tao
2024-12-15 16:51             ` Toke Høiland-Jørgensen
2024-12-05 17:06         ` Alexei Starovoitov
2024-12-06  0:48           ` Hou Tao
2024-12-06  1:40             ` Alexei Starovoitov
2024-11-27  0:46 ` [PATCH bpf v2 8/9] selftests/bpf: Move test_lpm_map.c to map_tests Hou Tao
2024-11-27  0:46 ` [PATCH bpf v2 9/9] selftests/bpf: Add more test cases for LPM trie Hou Tao
2024-11-27  5:39   ` Alexei Starovoitov
2024-11-27  8:02     ` Hou Tao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a0d44807-5cf7-4ba7-a7ea-e59448d28bd9@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=bigeasy@linutronix.de \
    --cc=bpf@vger.kernel.org \
    --cc=eddyz87@gmail.com \
    --cc=haoluo@google.com \
    --cc=houtao1@huawei.com \
    --cc=houtao@huaweicloud.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=linux@weissschuh.net \
    --cc=martin.lau@linux.dev \
    --cc=sdf@fomichev.me \
    --cc=song@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=toke@redhat.com \
    --cc=xukuohai@huawei.com \
    --cc=yonghong.song@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox