public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [net] tcp: add SO_PEEK_OFF socket option tor TCPv6
@ 2024-07-20 14:09 jmaloy
  2024-07-21 13:22 ` Eric Dumazet
  2024-07-23  0:52 ` Jakub Kicinski
  0 siblings, 2 replies; 5+ messages in thread
From: jmaloy @ 2024-07-20 14:09 UTC (permalink / raw)
  To: netdev, davem
  Cc: kuba, passt-dev, jmaloy, sbrivio, lvivier, dgibson, eric.dumazet,
	edumazet

From: Jon Maloy <jmaloy@redhat.com>

When we added the SO_PEEK_OFF socket option to TCP we forgot
to add it even for TCP on IPv6.

We do that here.

Fixes: 05ea491641d3 ("tcp: add support for SO_PEEK_OFF socket option")

Signed-off-by: Jon Maloy <jmaloy@redhat.com>
---
 net/ipv6/af_inet6.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index 90d2c7e3f5e9..ba69b86f1c7d 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -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,
-- 
@@ -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,
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [net] tcp: add SO_PEEK_OFF socket option tor TCPv6
  2024-07-20 14:09 [net] tcp: add SO_PEEK_OFF socket option tor TCPv6 jmaloy
@ 2024-07-21 13:22 ` Eric Dumazet
  2024-07-21 14:14   ` Jason Xing
  2024-07-23  0:52 ` Jakub Kicinski
  1 sibling, 1 reply; 5+ messages in thread
From: Eric Dumazet @ 2024-07-21 13:22 UTC (permalink / raw)
  To: jmaloy
  Cc: netdev, davem, kuba, passt-dev, sbrivio, lvivier, dgibson, eric.dumazet

On Sat, Jul 20, 2024 at 7:09 AM <jmaloy@redhat.com> wrote:
>
> From: Jon Maloy <jmaloy@redhat.com>
>
> When we added the SO_PEEK_OFF socket option to TCP we forgot
> to add it even for TCP on IPv6.
>
> We do that here.
>
> Fixes: 05ea491641d3 ("tcp: add support for SO_PEEK_OFF socket option")
>
> Signed-off-by: Jon Maloy <jmaloy@redhat.com>

Reviewed-by: Eric Dumazet <edumazet@google.com>

It would be nice to add a selftest for SO_PEEK_OFF for TCP and UDP,
any volunteers ?

Thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [net] tcp: add SO_PEEK_OFF socket option tor TCPv6
  2024-07-21 13:22 ` Eric Dumazet
@ 2024-07-21 14:14   ` Jason Xing
  2024-08-14 17:47     ` Jon Maloy
  0 siblings, 1 reply; 5+ messages in thread
From: Jason Xing @ 2024-07-21 14:14 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: jmaloy, netdev, davem, kuba, passt-dev, sbrivio, lvivier,
	dgibson, eric.dumazet

On Sun, Jul 21, 2024 at 11:23 PM Eric Dumazet <edumazet@google.com> wrote:
>
> On Sat, Jul 20, 2024 at 7:09 AM <jmaloy@redhat.com> wrote:
> >
> > From: Jon Maloy <jmaloy@redhat.com>
> >
> > When we added the SO_PEEK_OFF socket option to TCP we forgot
> > to add it even for TCP on IPv6.
> >
> > We do that here.
> >
> > Fixes: 05ea491641d3 ("tcp: add support for SO_PEEK_OFF socket option")
> >
> > Signed-off-by: Jon Maloy <jmaloy@redhat.com>
>
> Reviewed-by: Eric Dumazet <edumazet@google.com>
>
> It would be nice to add a selftest for SO_PEEK_OFF for TCP and UDP,
> any volunteers ?

If Jon doesn't have much time, I volunteer :) :p

Thanks,
Jason

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [net] tcp: add SO_PEEK_OFF socket option tor TCPv6
  2024-07-20 14:09 [net] tcp: add SO_PEEK_OFF socket option tor TCPv6 jmaloy
  2024-07-21 13:22 ` Eric Dumazet
@ 2024-07-23  0:52 ` Jakub Kicinski
  1 sibling, 0 replies; 5+ messages in thread
From: Jakub Kicinski @ 2024-07-23  0:52 UTC (permalink / raw)
  To: jmaloy
  Cc: netdev, davem, passt-dev, sbrivio, lvivier, dgibson,
	eric.dumazet, edumazet

On Sat, 20 Jul 2024 10:09:14 -0400 jmaloy@redhat.com wrote:
> Fixes: 05ea491641d3 ("tcp: add support for SO_PEEK_OFF socket option")
> 
> Signed-off-by: Jon Maloy <jmaloy@redhat.com>

Please repost with the selftest and the empty line between Fixes and
S-o-b removed.
-- 
pw-bot: cr

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [net] tcp: add SO_PEEK_OFF socket option tor TCPv6
  2024-07-21 14:14   ` Jason Xing
@ 2024-08-14 17:47     ` Jon Maloy
  0 siblings, 0 replies; 5+ messages in thread
From: Jon Maloy @ 2024-08-14 17:47 UTC (permalink / raw)
  To: Jason Xing, Eric Dumazet
  Cc: netdev, davem, kuba, passt-dev, sbrivio, lvivier, dgibson, eric.dumazet



On 2024-07-21 12:13, Jason Xing wrote:
> On Sun, Jul 21, 2024 at 11:23 PM Eric Dumazet <edumazet@google.com> wrote:
>> On Sat, Jul 20, 2024 at 7:09 AM <jmaloy@redhat.com> wrote:
>>> From: Jon Maloy <jmaloy@redhat.com>
>>>
>>> When we added the SO_PEEK_OFF socket option to TCP we forgot
>>> to add it even for TCP on IPv6.
>>>
>>> We do that here.
>>>
>>> Fixes: 05ea491641d3 ("tcp: add support for SO_PEEK_OFF socket option")
>>>
>>> Signed-off-by: Jon Maloy <jmaloy@redhat.com>
>> Reviewed-by: Eric Dumazet <edumazet@google.com>
>>
>> It would be nice to add a selftest for SO_PEEK_OFF for TCP and UDP,
>> any volunteers ?
> If Jon doesn't have much time, I volunteer :) :p
>
> Thanks,
> Jason
I have been offline for a few weeks, so I didn't see this until now.
You are totally welcome ;-)
///jon


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-08-14 17:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-20 14:09 [net] tcp: add SO_PEEK_OFF socket option tor TCPv6 jmaloy
2024-07-21 13:22 ` Eric Dumazet
2024-07-21 14:14   ` Jason Xing
2024-08-14 17:47     ` Jon Maloy
2024-07-23  0:52 ` Jakub Kicinski

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

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 IMAP folder(s).