2010-07-30 23:55:06

by Josh Hunt

[permalink] [raw]
Subject: [PATCH] net: Add getsockopt support for TCP thin-streams

Initial TCP thin-stream commit did not add getsockopt support for the new
socket options: TCP_THIN_LINEAR_TIMEOUTS and TCP_THIN_DUPACK. This adds support
for them.

Signed-off-by: Josh Hunt <[email protected]>
---
net/ipv4/tcp.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 65afeae..3ed3525 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2591,6 +2591,12 @@ static int do_tcp_getsockopt(struct sock *sk, int level,
return -EFAULT;
return 0;
}
+ case TCP_THIN_LINEAR_TIMEOUTS:
+ val = tp->thin_lto;
+ break;
+ case TCP_THIN_DUPACK:
+ val = tp->thin_dupack;
+ break;
default:
return -ENOPROTOOPT;
}
--
1.7.0.4


2010-08-02 12:22:28

by Andreas Petlund

[permalink] [raw]
Subject: Re: [PATCH] net: Add getsockopt support for TCP thin-streams

On 07/31/2010 01:49 AM, Josh Hunt wrote:
> Initial TCP thin-stream commit did not add getsockopt support for the new
> socket options: TCP_THIN_LINEAR_TIMEOUTS and TCP_THIN_DUPACK. This adds support
> for them.
>
> Signed-off-by: Josh Hunt <[email protected]>
> ---
> net/ipv4/tcp.c | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
> index 65afeae..3ed3525 100644
> --- a/net/ipv4/tcp.c
> +++ b/net/ipv4/tcp.c
> @@ -2591,6 +2591,12 @@ static int do_tcp_getsockopt(struct sock *sk, int level,
> return -EFAULT;
> return 0;
> }
> + case TCP_THIN_LINEAR_TIMEOUTS:
> + val = tp->thin_lto;
> + break;
> + case TCP_THIN_DUPACK:
> + val = tp->thin_dupack;
> + break;
> default:
> return -ENOPROTOOPT;
> }

Thanks for noticing and fixing this :)

Tested-by: Andreas Petlund <[email protected]>
Acked-by: Andreas Petlund <[email protected]>

-Andreas

2010-08-03 00:25:22

by David Miller

[permalink] [raw]
Subject: Re: [PATCH] net: Add getsockopt support for TCP thin-streams

From: Andreas Petlund <[email protected]>
Date: Mon, 02 Aug 2010 13:46:32 +0200

> On 07/31/2010 01:49 AM, Josh Hunt wrote:
>> Initial TCP thin-stream commit did not add getsockopt support for the new
>> socket options: TCP_THIN_LINEAR_TIMEOUTS and TCP_THIN_DUPACK. This adds support
>> for them.
>>
>> Signed-off-by: Josh Hunt <[email protected]>
...
> Tested-by: Andreas Petlund <[email protected]>
> Acked-by: Andreas Petlund <[email protected]>

Applied, thanks.