Adding SO_PEEK_OFF for TCPv6
Subsystems (3)
v3 cover Adding SO_PEEK_OFF for TCPv6
From: Jon Maloy <[email protected]>
Adding SO_PEEK_OFF for TCPv6 and selftest for both TCPv4 and TCPv6
Jon Maloy (2):
tcp: add SO_PEEK_OFF socket option tor TCPv6
selftests: add selftest for tcp SO_PEEK_OFF support
net/ipv6/af_inet6.c | 1 + tools/testing/selftests/net/Makefile | 1 + tools/testing/selftests/net/tcp_so_peek_off.c | 183 ++++++++++++++++++ 3 files changed, 185 insertions(+) create mode 100644 tools/testing/selftests/net/tcp_so_peek_off.c
Signature · 1 line
2.45.2
PATCH v3 1/2 tcp: add SO_PEEK_OFF socket option tor TCPv6
From: Jon Maloy <[email protected]>
When doing further testing of the recently added SO_PEEK_OFF feature for TCP I realized I had omitted to add it for TCP/IPv6.
I do that here.
---
v2: Removed redundant whitespace between "Fixes" and
"Signed-off-by" lines. Based on feedback from J. Kicinski.
v3: Rephrased commit log to make it clear how the TCP/IPv6 omission
was discovered. Based on feedback from J. Kicinski.
--- net/ipv6/af_inet6.c | 1 + 1 file changed, 1 insertion(+)
net/ipv6/af_inet6.c +1 -0
@@ -708,6 +708,7 @@ const struct proto_ops inet6_stream_ops = { .splice_eof = inet_splice_eof, .sendmsg_locked = tcp_sendmsg_locked, .splice_read = tcp_splice_read, + .set_peek_off = sk_set_peek_off, .read_sock = tcp_read_sock, .read_skb = tcp_read_skb, .peek_len = tcp_peek_len,
Signature · 1 line
2.45.2
Re: [net-next, v3 1/2] tcp: add SO_PEEK_OFF socket option tor TCPv6
Quoted 6 lines · On Thu, Aug 29, 2024 at 2:38 AM <[email protected]> wrote:
From: Jon Maloy <[email protected]>
When doing further testing of the recently added
SO_PEEK_OFFfeature for TCP I realized I had omitted to add it for TCP/IPv6.
Quoted 8 lines
I do that here.
Fixes 05ea491641d3 ("tcp: add support for SO_PEEK_OFF socket option")Reviewed-by Eric Dumazet <[email protected]>Reviewed-by David Gibson <[email protected]>Reviewed-by Stefano Brivio <[email protected]>Tested-by Stefano Brivio <[email protected]>Signed-off-by Jon Maloy <[email protected]>
PATCH v3 2/2 selftests: add selftest for tcp SO_PEEK_OFF support
In reply to [email protected]From: Jon Maloy <[email protected]>
We add a selftest to check that the new feature added in commit 05ea491641d3 ("tcp: add support for SO_PEEK_OFF socket option") works correctly.
---
v2: Made correction based on Jason Xing's comment.
v3: Removed redundant whitespace at end of file.
Based on comment from Jakub Kicinski.
--- tools/testing/selftests/net/Makefile | 1 + tools/testing/selftests/net/tcp_so_peek_off.c | 183 ++++++++++++++++++ 2 files changed, 184 insertions(+) create mode 100644 tools/testing/selftests/net/tcp_so_peek_off.c
tools/testing/selftests/net/Makefile +1 -0
@@ -80,6 +80,7 @@ TEST_PROGS += io_uring_zerocopy_tx.sh TEST_GEN_FILES += bind_bhash TEST_GEN_PROGS += sk_bind_sendto_listen TEST_GEN_PROGS += sk_connect_zero_addr +TEST_GEN_PROGS += tcp_so_peek_off TEST_PROGS += test_ingress_egress_chaining.sh TEST_GEN_PROGS += so_incoming_cpu TEST_PROGS += sctp_vrf.sh
tools/testing/selftests/net/tcp_so_peek_off.c new file +183 -0
183 lines not on this page · raw message
Signature · 1 line
2.45.2
Quoted 1 line · On Wed, 28 Aug 2024 14:37:50 -0400 [email protected] wrote:
Adding
SO_PEEK_OFFfor TCPv6 and selftest for both TCPv4 and TCPv6
Applied, thanks.