mbox series

[v4,bpf-next,0/2] Add support to set window_clamp from bpf setsockops

Message ID 20201202213152.435886-1-prankgup@fb.com (mailing list archive)
Headers show
Series Add support to set window_clamp from bpf setsockops | expand

Message

Prankur gupta Dec. 2, 2020, 9:31 p.m. UTC
This patch contains support to set tcp window_field field from bpf setsockops.

v2: Used TCP_WINDOW_CLAMP setsockopt logic for bpf_setsockopt (review comment addressed)

v3: Created a common function for duplicated code (review comment addressed)

v4: Removing logic to pass struct sock and struct tcp_sock together (review comment addressed)

Prankur gupta (2):
  bpf: Adds support for setting window clamp
  selftests/bpf: Add Userspace tests for TCP_WINDOW_CLAMP

 include/net/tcp.h                             |  1 +
 net/core/filter.c                             |  3 ++
 net/ipv4/tcp.c                                | 25 +++++++++-----
 tools/testing/selftests/bpf/bpf_tcp_helpers.h |  1 +
 .../selftests/bpf/prog_tests/tcpbpf_user.c    |  4 +++
 .../selftests/bpf/progs/test_tcpbpf_kern.c    | 33 +++++++++++++++++++
 tools/testing/selftests/bpf/test_tcpbpf.h     |  2 ++
 7 files changed, 60 insertions(+), 9 deletions(-)

Comments

Martin KaFai Lau Dec. 3, 2020, 8:51 p.m. UTC | #1
On Wed, Dec 02, 2020 at 01:31:50PM -0800, Prankur gupta wrote:
> This patch contains support to set tcp window_field field from bpf setsockops.
> 
> v2: Used TCP_WINDOW_CLAMP setsockopt logic for bpf_setsockopt (review comment addressed)
> 
> v3: Created a common function for duplicated code (review comment addressed)
> 
> v4: Removing logic to pass struct sock and struct tcp_sock together (review comment addressed)
nit.  A short line even for cover letter.

Acked-by: Martin KaFai Lau <kafai@fb.com>
Alexei Starovoitov Dec. 4, 2020, 1:44 a.m. UTC | #2
On Wed, Dec 02, 2020 at 01:31:50PM -0800, Prankur gupta wrote:
> This patch contains support to set tcp window_field field from bpf setsockops.
> 
> v2: Used TCP_WINDOW_CLAMP setsockopt logic for bpf_setsockopt (review comment addressed)
> 
> v3: Created a common function for duplicated code (review comment addressed)
> 
> v4: Removing logic to pass struct sock and struct tcp_sock together (review comment addressed)

Applied, Thanks