netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: sdf@google.com
To: Martin KaFai Lau <kafai@fb.com>
Cc: bpf@vger.kernel.org, netdev@vger.kernel.org,
	Alexei Starovoitov <ast@kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	David Miller <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>,
	kernel-team@fb.com, Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH v2 bpf-next 00/17] bpf: net: Remove duplicated code from bpf_getsockopt()
Date: Fri, 2 Sep 2022 15:16:32 -0700	[thread overview]
Message-ID: <YxKAwN/PgQE4pAon@google.com> (raw)
In-Reply-To: <20220902002750.2887415-1-kafai@fb.com>

On 09/01, Martin KaFai Lau wrote:
> From: Martin KaFai Lau <martin.lau@kernel.org>

> The earlier commits [0] removed duplicated code from bpf_setsockopt().
> This series is to remove duplicated code from bpf_getsockopt().

> Unlike the setsockopt() which had already changed to take
> the sockptr_t argument, the same has not been done to
> getsockopt().  This is the extra step being done in this
> series.

> [0]: https://lore.kernel.org/all/20220817061704.4174272-1-kafai@fb.com/

> v2:
> - The previous v2 did not reach the list. It is a resend.
> - Add comments on bpf_getsockopt() should not free
>    the saved_syn (Stanislav)
> - Explicitly null-terminate the tcp-cc name (Stanislav)

Looks great!

Reviewed-by: Stanislav Fomichev <sdf@google.com>

> Martin KaFai Lau (17):
>    net: Change sock_getsockopt() to take the sk ptr instead of the sock
>      ptr
>    bpf: net: Change sk_getsockopt() to take the sockptr_t argument
>    bpf: net: Avoid sk_getsockopt() taking sk lock when called from bpf
>    bpf: net: Change do_tcp_getsockopt() to take the sockptr_t argument
>    bpf: net: Avoid do_tcp_getsockopt() taking sk lock when called from
>      bpf
>    bpf: net: Change do_ip_getsockopt() to take the sockptr_t argument
>    bpf: net: Avoid do_ip_getsockopt() taking sk lock when called from bpf
>    net: Remove unused flags argument from do_ipv6_getsockopt
>    net: Add a len argument to compat_ipv6_get_msfilter()
>    bpf: net: Change do_ipv6_getsockopt() to take the sockptr_t argument
>    bpf: net: Avoid do_ipv6_getsockopt() taking sk lock when called from
>      bpf
>    bpf: Embed kernel CONFIG check into the if statement in bpf_getsockopt
>    bpf: Change bpf_getsockopt(SOL_SOCKET) to reuse sk_getsockopt()
>    bpf: Change bpf_getsockopt(SOL_TCP) to reuse do_tcp_getsockopt()
>    bpf: Change bpf_getsockopt(SOL_IP) to reuse do_ip_getsockopt()
>    bpf: Change bpf_getsockopt(SOL_IPV6) to reuse do_ipv6_getsockopt()
>    selftest/bpf: Add test for bpf_getsockopt()

>   include/linux/filter.h                        |   3 +-
>   include/linux/igmp.h                          |   4 +-
>   include/linux/mroute.h                        |   6 +-
>   include/linux/mroute6.h                       |   4 +-
>   include/linux/sockptr.h                       |   5 +
>   include/net/ip.h                              |   2 +
>   include/net/ipv6.h                            |   4 +-
>   include/net/ipv6_stubs.h                      |   2 +
>   include/net/sock.h                            |   2 +
>   include/net/tcp.h                             |   2 +
>   net/core/filter.c                             | 220 ++++++++----------
>   net/core/sock.c                               |  51 ++--
>   net/ipv4/igmp.c                               |  22 +-
>   net/ipv4/ip_sockglue.c                        |  98 ++++----
>   net/ipv4/ipmr.c                               |   9 +-
>   net/ipv4/tcp.c                                |  92 ++++----
>   net/ipv6/af_inet6.c                           |   1 +
>   net/ipv6/ip6mr.c                              |  10 +-
>   net/ipv6/ipv6_sockglue.c                      |  95 ++++----
>   net/ipv6/mcast.c                              |   8 +-
>   .../selftests/bpf/progs/bpf_tracing_net.h     |   1 +
>   .../selftests/bpf/progs/setget_sockopt.c      | 148 ++++--------
>   22 files changed, 379 insertions(+), 410 deletions(-)

> --
> 2.30.2


  reply	other threads:[~2022-09-02 22:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-02  0:27 [PATCH v2 bpf-next 00/17] bpf: net: Remove duplicated code from bpf_getsockopt() Martin KaFai Lau
2022-09-02 22:16 ` sdf [this message]
2022-09-03  3:50 ` patchwork-bot+netdevbpf

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=YxKAwN/PgQE4pAon@google.com \
    --to=sdf@google.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kafai@fb.com \
    --cc=kernel-team@fb.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).