Re: [PATCH bpf-next v5 6/9] bpf, net: switch to dynamic registration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 10/20/23 08:12, Kui-Feng Lee wrote:


On 10/18/23 18:49, Martin KaFai Lau wrote:
On 10/17/23 9:23 AM, thinker.li@xxxxxxxxx wrote:
From: Kui-Feng Lee <thinker.li@xxxxxxxxx>
  static const struct bpf_struct_ops *
  bpf_struct_ops_find_value(struct btf *btf, u32 value_id)
  {
+    const struct bpf_struct_ops *st_ops = NULL;
+    const struct bpf_struct_ops **st_ops_list;
      unsigned int i;
+    u32 cnt = 0;
      if (!value_id || !btf_vmlinux)

The "!btf_vmlinux" should have been changed to "!btf" in the earlier patch (patch 2?),

This is not btf. It mean to check if btf_vmlinux is initialized.
It is not necessary anymore.
For checking btf, the following btf_get_struct_ops() will keep cnt zero
if btf is NULL, so it is unnecessary as well.

Forget my previous comment.  I think you are right!





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux