diff mbox series

[bpf] bpf: Fix oudated __bpf_skc_lookup() comment

Message ID 2c105a1ff3071796189093c536218e44ea3b1aa0.1659122785.git.dxu@dxuuu.xyz (mailing list archive)
State Superseded
Delegated to: BPF
Headers show
Series [bpf] bpf: Fix oudated __bpf_skc_lookup() comment | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for bpf
netdev/fixes_present success Fixes tag present in non-next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 25 this patch: 25
netdev/cc_maintainers fail 1 blamed authors not CCed: lmb@cloudflare.com; 14 maintainers not CCed: john.fastabend@gmail.com song@kernel.org sdf@google.com martin.lau@linux.dev davem@davemloft.net netdev@vger.kernel.org edumazet@google.com kpsingh@kernel.org lmb@cloudflare.com kuba@kernel.org jolsa@kernel.org pabeni@redhat.com haoluo@google.com yhs@fb.com
netdev/build_clang success Errors and warnings before: 6 this patch: 6
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 25 this patch: 25
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
bpf/vmtest-bpf-VM_Test-2 fail Logs for Kernel LATEST on Array with gcc
bpf/vmtest-bpf-VM_Test-3 fail Logs for Kernel LATEST on Array with llvm-15
bpf/vmtest-bpf-PR fail PR summary
bpf/vmtest-bpf-VM_Test-1 fail Logs for Kernel LATEST on Array with gcc

Commit Message

Daniel Xu July 29, 2022, 7:45 p.m. UTC
The function returns a pointer now.

Fixes: edbf8c01de5a ("bpf: add skc_lookup_tcp helper")
Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
---
 net/core/filter.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Andrii Nakryiko July 29, 2022, 10:27 p.m. UTC | #1
On Fri, Jul 29, 2022 at 12:47 PM Daniel Xu <dxu@dxuuu.xyz> wrote:
>
> The function returns a pointer now.
>
> Fixes: edbf8c01de5a ("bpf: add skc_lookup_tcp helper")
> Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
> ---

This was already done in [0] in bpf-next.

  [0] f5be22c64bd6 ("bpf: Fix bpf_skc_lookup comment wrt. return type")


>  net/core/filter.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/net/core/filter.c b/net/core/filter.c
> index 5d16d66727fc..866ca05f95e0 100644
> --- a/net/core/filter.c
> +++ b/net/core/filter.c
> @@ -6463,8 +6463,6 @@ static struct sock *sk_lookup(struct net *net, struct bpf_sock_tuple *tuple,
>
>  /* bpf_skc_lookup performs the core lookup for different types of sockets,
>   * taking a reference on the socket if it doesn't have the flag SOCK_RCU_FREE.
> - * Returns the socket as an 'unsigned long' to simplify the casting in the
> - * callers to satisfy BPF_CALL declarations.
>   */
>  static struct sock *
>  __bpf_skc_lookup(struct sk_buff *skb, struct bpf_sock_tuple *tuple, u32 len,
> --
> 2.37.1
>
diff mbox series

Patch

diff --git a/net/core/filter.c b/net/core/filter.c
index 5d16d66727fc..866ca05f95e0 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -6463,8 +6463,6 @@  static struct sock *sk_lookup(struct net *net, struct bpf_sock_tuple *tuple,
 
 /* bpf_skc_lookup performs the core lookup for different types of sockets,
  * taking a reference on the socket if it doesn't have the flag SOCK_RCU_FREE.
- * Returns the socket as an 'unsigned long' to simplify the casting in the
- * callers to satisfy BPF_CALL declarations.
  */
 static struct sock *
 __bpf_skc_lookup(struct sk_buff *skb, struct bpf_sock_tuple *tuple, u32 len,