netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] tcp: extend access to CC information
@ 2015-04-28 23:23 Eric Dumazet
  2015-04-28 23:23 ` [PATCH net-next 1/2] tcp: prepare CC get_info() access from getsockopt() Eric Dumazet
  2015-04-28 23:23 ` [PATCH net-next 2/2] tcp: add TCP_CC_INFO socket option Eric Dumazet
  0 siblings, 2 replies; 17+ messages in thread
From: Eric Dumazet @ 2015-04-28 23:23 UTC (permalink / raw)
  To: David S. Miller
  Cc: netdev, Eric Dumazet, Eric Dumazet, Yuchung Cheng, Neal Cardwell

Instead of being forced to use netlink, we want to get (optional) CC
information using a getsockopt() on the socket file handle.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Cc: Neal Cardwell <ncardwell@google.com>

Eric Dumazet (2):
  tcp: prepare CC get_info() access from getsockopt()
  tcp: add TCP_CC_INFO socket option

 include/net/tcp.h              |  5 ++++-
 include/uapi/linux/inet_diag.h |  4 ++++
 include/uapi/linux/tcp.h       |  1 +
 net/ipv4/inet_diag.c           |  8 +++++---
 net/ipv4/tcp.c                 | 21 +++++++++++++++++++++
 net/ipv4/tcp_dctcp.c           | 20 ++++++++++----------
 net/ipv4/tcp_illinois.c        | 21 +++++++++++----------
 net/ipv4/tcp_vegas.c           | 19 ++++++++++---------
 net/ipv4/tcp_vegas.h           |  3 ++-
 9 files changed, 68 insertions(+), 34 deletions(-)

-- 
2.2.0.rc0.207.ga3a616c

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

* [PATCH net-next 1/2] tcp: prepare CC get_info() access from getsockopt()
  2015-04-28 23:23 [PATCH net-next 0/2] tcp: extend access to CC information Eric Dumazet
@ 2015-04-28 23:23 ` Eric Dumazet
  2015-04-29  0:58   ` Neal Cardwell
                     ` (3 more replies)
  2015-04-28 23:23 ` [PATCH net-next 2/2] tcp: add TCP_CC_INFO socket option Eric Dumazet
  1 sibling, 4 replies; 17+ messages in thread
From: Eric Dumazet @ 2015-04-28 23:23 UTC (permalink / raw)
  To: David S. Miller
  Cc: netdev, Eric Dumazet, Eric Dumazet, Yuchung Cheng, Neal Cardwell

We would like that optional info provided by Congestion Control
modules using netlink can also be read using getsockopt()

This patch changes get_info() to put this information in a buffer,
instead of skb, like tcp_get_info(), so that following patch
can reuse this common infrastructure.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
---
 include/net/tcp.h              |  5 ++++-
 include/uapi/linux/inet_diag.h |  4 ++++
 net/ipv4/inet_diag.c           |  8 +++++---
 net/ipv4/tcp_dctcp.c           | 20 ++++++++++----------
 net/ipv4/tcp_illinois.c        | 21 +++++++++++----------
 net/ipv4/tcp_vegas.c           | 19 ++++++++++---------
 net/ipv4/tcp_vegas.h           |  3 ++-
 7 files changed, 46 insertions(+), 34 deletions(-)

diff --git a/include/net/tcp.h b/include/net/tcp.h
index 051dc5c2802d..d5b3089317fb 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -804,6 +804,8 @@ enum tcp_ca_ack_event_flags {
 /* Requires ECN/ECT set on all packets */
 #define TCP_CONG_NEEDS_ECN	0x2
 
+union tcp_cc_info;
+
 struct tcp_congestion_ops {
 	struct list_head	list;
 	u32 key;
@@ -829,7 +831,8 @@ struct tcp_congestion_ops {
 	/* hook for packet ack accounting (optional) */
 	void (*pkts_acked)(struct sock *sk, u32 num_acked, s32 rtt_us);
 	/* get info for inet_diag (optional) */
-	int (*get_info)(struct sock *sk, u32 ext, struct sk_buff *skb);
+	size_t (*get_info)(struct sock *sk, u32 ext, int *attr,
+			   union tcp_cc_info *info);
 
 	char 		name[TCP_CA_NAME_MAX];
 	struct module 	*owner;
diff --git a/include/uapi/linux/inet_diag.h b/include/uapi/linux/inet_diag.h
index d65c0a09efd3..c7093c75bdd6 100644
--- a/include/uapi/linux/inet_diag.h
+++ b/include/uapi/linux/inet_diag.h
@@ -143,4 +143,8 @@ struct tcp_dctcp_info {
 	__u32	dctcp_ab_tot;
 };
 
+union tcp_cc_info {
+	struct tcpvegas_info	vegas;
+	struct tcp_dctcp_info	dctcp;
+};
 #endif /* _UAPI_INET_DIAG_H_ */
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
index bb77ebdae3b3..4d32262c7502 100644
--- a/net/ipv4/inet_diag.c
+++ b/net/ipv4/inet_diag.c
@@ -224,14 +224,16 @@ int inet_sk_diag_fill(struct sock *sk, struct inet_connection_sock *icsk,
 	handler->idiag_get_info(sk, r, info);
 
 	if (sk->sk_state < TCP_TIME_WAIT) {
-		int err = 0;
+		union tcp_cc_info info;
+		size_t sz = 0;
+		int attr;
 
 		rcu_read_lock();
 		ca_ops = READ_ONCE(icsk->icsk_ca_ops);
 		if (ca_ops && ca_ops->get_info)
-			err = ca_ops->get_info(sk, ext, skb);
+			sz = ca_ops->get_info(sk, ext, &attr, &info);
 		rcu_read_unlock();
-		if (err < 0)
+		if (sz && nla_put(skb, attr, sz, &info) < 0)
 			goto errout;
 	}
 
diff --git a/net/ipv4/tcp_dctcp.c b/net/ipv4/tcp_dctcp.c
index 4376016f7fa5..4c41c1287197 100644
--- a/net/ipv4/tcp_dctcp.c
+++ b/net/ipv4/tcp_dctcp.c
@@ -277,7 +277,8 @@ static void dctcp_cwnd_event(struct sock *sk, enum tcp_ca_event ev)
 	}
 }
 
-static int dctcp_get_info(struct sock *sk, u32 ext, struct sk_buff *skb)
+static size_t dctcp_get_info(struct sock *sk, u32 ext, int *attr,
+			     union tcp_cc_info *info)
 {
 	const struct dctcp *ca = inet_csk_ca(sk);
 
@@ -286,18 +287,17 @@ static int dctcp_get_info(struct sock *sk, u32 ext, struct sk_buff *skb)
 	 */
 	if (ext & (1 << (INET_DIAG_DCTCPINFO - 1)) ||
 	    ext & (1 << (INET_DIAG_VEGASINFO - 1))) {
-		struct tcp_dctcp_info info;
-
-		memset(&info, 0, sizeof(info));
+		memset(info, 0, sizeof(struct tcp_dctcp_info));
 		if (inet_csk(sk)->icsk_ca_ops != &dctcp_reno) {
-			info.dctcp_enabled = 1;
-			info.dctcp_ce_state = (u16) ca->ce_state;
-			info.dctcp_alpha = ca->dctcp_alpha;
-			info.dctcp_ab_ecn = ca->acked_bytes_ecn;
-			info.dctcp_ab_tot = ca->acked_bytes_total;
+			info->dctcp.dctcp_enabled = 1;
+			info->dctcp.dctcp_ce_state = (u16) ca->ce_state;
+			info->dctcp.dctcp_alpha = ca->dctcp_alpha;
+			info->dctcp.dctcp_ab_ecn = ca->acked_bytes_ecn;
+			info->dctcp.dctcp_ab_tot = ca->acked_bytes_total;
 		}
 
-		return nla_put(skb, INET_DIAG_DCTCPINFO, sizeof(info), &info);
+		*attr = INET_DIAG_DCTCPINFO;
+		return sizeof(*info);
 	}
 	return 0;
 }
diff --git a/net/ipv4/tcp_illinois.c b/net/ipv4/tcp_illinois.c
index 67476f085e48..f71002e4db0b 100644
--- a/net/ipv4/tcp_illinois.c
+++ b/net/ipv4/tcp_illinois.c
@@ -300,24 +300,25 @@ static u32 tcp_illinois_ssthresh(struct sock *sk)
 }
 
 /* Extract info for Tcp socket info provided via netlink. */
-static int tcp_illinois_info(struct sock *sk, u32 ext, struct sk_buff *skb)
+static size_t tcp_illinois_info(struct sock *sk, u32 ext, int *attr,
+				union tcp_cc_info *info)
 {
 	const struct illinois *ca = inet_csk_ca(sk);
 
 	if (ext & (1 << (INET_DIAG_VEGASINFO - 1))) {
-		struct tcpvegas_info info = {
-			.tcpv_enabled = 1,
-			.tcpv_rttcnt = ca->cnt_rtt,
-			.tcpv_minrtt = ca->base_rtt,
-		};
+		info->vegas.tcpv_enabled = 1;
+		info->vegas.tcpv_rttcnt = ca->cnt_rtt;
+		info->vegas.tcpv_minrtt = ca->base_rtt;
+		info->vegas.tcpv_rtt = 0;
 
-		if (info.tcpv_rttcnt > 0) {
+		if (info->vegas.tcpv_rttcnt > 0) {
 			u64 t = ca->sum_rtt;
 
-			do_div(t, info.tcpv_rttcnt);
-			info.tcpv_rtt = t;
+			do_div(t, info->vegas.tcpv_rttcnt);
+			info->vegas.tcpv_rtt = t;
 		}
-		return nla_put(skb, INET_DIAG_VEGASINFO, sizeof(info), &info);
+		*attr = INET_DIAG_VEGASINFO;
+		return sizeof(struct tcpvegas_info);
 	}
 	return 0;
 }
diff --git a/net/ipv4/tcp_vegas.c b/net/ipv4/tcp_vegas.c
index c71a1b8f7bde..a6cea1d5e20d 100644
--- a/net/ipv4/tcp_vegas.c
+++ b/net/ipv4/tcp_vegas.c
@@ -286,18 +286,19 @@ static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 acked)
 }
 
 /* Extract info for Tcp socket info provided via netlink. */
-int tcp_vegas_get_info(struct sock *sk, u32 ext, struct sk_buff *skb)
+size_t tcp_vegas_get_info(struct sock *sk, u32 ext, int *attr,
+			  union tcp_cc_info *info)
 {
 	const struct vegas *ca = inet_csk_ca(sk);
+
 	if (ext & (1 << (INET_DIAG_VEGASINFO - 1))) {
-		struct tcpvegas_info info = {
-			.tcpv_enabled = ca->doing_vegas_now,
-			.tcpv_rttcnt = ca->cntRTT,
-			.tcpv_rtt = ca->baseRTT,
-			.tcpv_minrtt = ca->minRTT,
-		};
-
-		return nla_put(skb, INET_DIAG_VEGASINFO, sizeof(info), &info);
+		info->vegas.tcpv_enabled = ca->doing_vegas_now,
+		info->vegas.tcpv_rttcnt = ca->cntRTT,
+		info->vegas.tcpv_rtt = ca->baseRTT,
+		info->vegas.tcpv_minrtt = ca->minRTT,
+
+		*attr = INET_DIAG_VEGASINFO;
+		return sizeof(struct tcpvegas_info);
 	}
 	return 0;
 }
diff --git a/net/ipv4/tcp_vegas.h b/net/ipv4/tcp_vegas.h
index e8a6b33cc61d..ef9da5306c68 100644
--- a/net/ipv4/tcp_vegas.h
+++ b/net/ipv4/tcp_vegas.h
@@ -19,6 +19,7 @@ void tcp_vegas_init(struct sock *sk);
 void tcp_vegas_state(struct sock *sk, u8 ca_state);
 void tcp_vegas_pkts_acked(struct sock *sk, u32 cnt, s32 rtt_us);
 void tcp_vegas_cwnd_event(struct sock *sk, enum tcp_ca_event event);
-int tcp_vegas_get_info(struct sock *sk, u32 ext, struct sk_buff *skb);
+size_t tcp_vegas_get_info(struct sock *sk, u32 ext, int *attr,
+			  union tcp_cc_info *info);
 
 #endif	/* __TCP_VEGAS_H */
-- 
2.2.0.rc0.207.ga3a616c

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

* [PATCH net-next 2/2] tcp: add TCP_CC_INFO socket option
  2015-04-28 23:23 [PATCH net-next 0/2] tcp: extend access to CC information Eric Dumazet
  2015-04-28 23:23 ` [PATCH net-next 1/2] tcp: prepare CC get_info() access from getsockopt() Eric Dumazet
@ 2015-04-28 23:23 ` Eric Dumazet
  2015-04-29  1:00   ` Neal Cardwell
                     ` (3 more replies)
  1 sibling, 4 replies; 17+ messages in thread
From: Eric Dumazet @ 2015-04-28 23:23 UTC (permalink / raw)
  To: David S. Miller
  Cc: netdev, Eric Dumazet, Eric Dumazet, Yuchung Cheng, Neal Cardwell

Some Congestion Control modules can provide per flow information,
but current way to get this information is to use netlink.

Like TCP_INFO, let's add TCP_CC_INFO so that applications can
issue a getsockopt() if they have a socket file descriptor,
instead of playing complex netlink games.

Sample usage would be :

  union tcp_cc_info info;
  socklen_t len = sizeof(info);

  if (getsockopt(fd, SOL_TCP, TCP_CC_INFO, &info, &len) == -1)

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
---
 include/uapi/linux/tcp.h |  1 +
 net/ipv4/tcp.c           | 21 +++++++++++++++++++++
 2 files changed, 22 insertions(+)

diff --git a/include/uapi/linux/tcp.h b/include/uapi/linux/tcp.h
index 3b9718328d8b..937ec387276f 100644
--- a/include/uapi/linux/tcp.h
+++ b/include/uapi/linux/tcp.h
@@ -112,6 +112,7 @@ enum {
 #define TCP_FASTOPEN		23	/* Enable FastOpen on listeners */
 #define TCP_TIMESTAMP		24
 #define TCP_NOTSENT_LOWAT	25	/* limit number of unsent bytes in write queue */
+#define TCP_CC_INFO		26	/* Get Congestion Control (optional) info */
 
 struct tcp_repair_opt {
 	__u32	opt_code;
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 8c5cd9efebbc..1e06c75a6837 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -252,6 +252,7 @@
 #include <linux/types.h>
 #include <linux/fcntl.h>
 #include <linux/poll.h>
+#include <linux/inet_diag.h>
 #include <linux/init.h>
 #include <linux/fs.h>
 #include <linux/skbuff.h>
@@ -2734,6 +2735,26 @@ static int do_tcp_getsockopt(struct sock *sk, int level,
 			return -EFAULT;
 		return 0;
 	}
+	case TCP_CC_INFO: {
+		const struct tcp_congestion_ops *ca_ops;
+		union tcp_cc_info info;
+		size_t sz = 0;
+		int attr;
+
+		if (get_user(len, optlen))
+			return -EFAULT;
+
+		ca_ops = icsk->icsk_ca_ops;
+		if (ca_ops && ca_ops->get_info)
+			sz = ca_ops->get_info(sk, ~0U, &attr, &info);
+
+		len = min_t(unsigned int, len, sz);
+		if (put_user(len, optlen))
+			return -EFAULT;
+		if (copy_to_user(optval, &info, len))
+			return -EFAULT;
+		return 0;
+	}
 	case TCP_QUICKACK:
 		val = !icsk->icsk_ack.pingpong;
 		break;
-- 
2.2.0.rc0.207.ga3a616c

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

* Re: [PATCH net-next 1/2] tcp: prepare CC get_info() access from getsockopt()
  2015-04-28 23:23 ` [PATCH net-next 1/2] tcp: prepare CC get_info() access from getsockopt() Eric Dumazet
@ 2015-04-29  0:58   ` Neal Cardwell
  2015-04-29  7:55   ` Daniel Borkmann
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 17+ messages in thread
From: Neal Cardwell @ 2015-04-29  0:58 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: David S. Miller, netdev, Eric Dumazet, Yuchung Cheng

On Tue, Apr 28, 2015 at 7:23 PM, Eric Dumazet <edumazet@google.com> wrote:
> We would like that optional info provided by Congestion Control
> modules using netlink can also be read using getsockopt()
>
> This patch changes get_info() to put this information in a buffer,
> instead of skb, like tcp_get_info(), so that following patch
> can reuse this common infrastructure.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Yuchung Cheng <ycheng@google.com>
> Cc: Neal Cardwell <ncardwell@google.com>
> ---

Acked-by: Neal Cardwell <ncardwell@google.com>

Thanks, Eric!

neal

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

* Re: [PATCH net-next 2/2] tcp: add TCP_CC_INFO socket option
  2015-04-28 23:23 ` [PATCH net-next 2/2] tcp: add TCP_CC_INFO socket option Eric Dumazet
@ 2015-04-29  1:00   ` Neal Cardwell
  2015-04-29  8:17   ` Daniel Borkmann
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 17+ messages in thread
From: Neal Cardwell @ 2015-04-29  1:00 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: David S. Miller, netdev, Eric Dumazet, Yuchung Cheng

On Tue, Apr 28, 2015 at 7:23 PM, Eric Dumazet <edumazet@google.com> wrote:
> Some Congestion Control modules can provide per flow information,
> but current way to get this information is to use netlink.
>
> Like TCP_INFO, let's add TCP_CC_INFO so that applications can
> issue a getsockopt() if they have a socket file descriptor,
> instead of playing complex netlink games.
>
> Sample usage would be :
>
>   union tcp_cc_info info;
>   socklen_t len = sizeof(info);
>
>   if (getsockopt(fd, SOL_TCP, TCP_CC_INFO, &info, &len) == -1)
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Yuchung Cheng <ycheng@google.com>
> Cc: Neal Cardwell <ncardwell@google.com>
> ---

Acked-by: Neal Cardwell <ncardwell@google.com>

A very useful facility. Thanks for putting this together, Eric!

neal

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

* Re: [PATCH net-next 1/2] tcp: prepare CC get_info() access from getsockopt()
  2015-04-28 23:23 ` [PATCH net-next 1/2] tcp: prepare CC get_info() access from getsockopt() Eric Dumazet
  2015-04-29  0:58   ` Neal Cardwell
@ 2015-04-29  7:55   ` Daniel Borkmann
  2015-04-29 16:10   ` Yuchung Cheng
  2015-04-29 22:12   ` David Miller
  3 siblings, 0 replies; 17+ messages in thread
From: Daniel Borkmann @ 2015-04-29  7:55 UTC (permalink / raw)
  To: Eric Dumazet, David S. Miller
  Cc: netdev, Eric Dumazet, Yuchung Cheng, Neal Cardwell

On 04/29/2015 01:23 AM, Eric Dumazet wrote:
> We would like that optional info provided by Congestion Control
> modules using netlink can also be read using getsockopt()
>
> This patch changes get_info() to put this information in a buffer,
> instead of skb, like tcp_get_info(), so that following patch
> can reuse this common infrastructure.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Yuchung Cheng <ycheng@google.com>
> Cc: Neal Cardwell <ncardwell@google.com>

Looks good to me, thanks!

Acked-by: Daniel Borkmann <daniel@iogearbox.net>

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

* Re: [PATCH net-next 2/2] tcp: add TCP_CC_INFO socket option
  2015-04-28 23:23 ` [PATCH net-next 2/2] tcp: add TCP_CC_INFO socket option Eric Dumazet
  2015-04-29  1:00   ` Neal Cardwell
@ 2015-04-29  8:17   ` Daniel Borkmann
  2015-04-29 11:07     ` Eric Dumazet
  2015-04-29 16:15   ` Yuchung Cheng
  2015-04-29 22:12   ` David Miller
  3 siblings, 1 reply; 17+ messages in thread
From: Daniel Borkmann @ 2015-04-29  8:17 UTC (permalink / raw)
  To: Eric Dumazet, David S. Miller
  Cc: netdev, Eric Dumazet, Yuchung Cheng, Neal Cardwell

On 04/29/2015 01:23 AM, Eric Dumazet wrote:
> Some Congestion Control modules can provide per flow information,
> but current way to get this information is to use netlink.
>
> Like TCP_INFO, let's add TCP_CC_INFO so that applications can
> issue a getsockopt() if they have a socket file descriptor,
> instead of playing complex netlink games.
>
> Sample usage would be :
>
>    union tcp_cc_info info;
>    socklen_t len = sizeof(info);
>
>    if (getsockopt(fd, SOL_TCP, TCP_CC_INFO, &info, &len) == -1)
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Yuchung Cheng <ycheng@google.com>
> Cc: Neal Cardwell <ncardwell@google.com>

Presuming other cc algorithms would in future also export
internal information through this interface, would it make
sense to put tcp_cc_info into a container structure so we
don't miss out attr (vegas, dctcp, ...), like:

   struct tcp_cc_exp {
     u32               kind;
     union tcp_cc_info info;
   };

Otherwise looks good:

Acked-by: Daniel Borkmann <daniel@iogearbox.net>

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

* Re: [PATCH net-next 2/2] tcp: add TCP_CC_INFO socket option
  2015-04-29  8:17   ` Daniel Borkmann
@ 2015-04-29 11:07     ` Eric Dumazet
  2015-04-29 11:15       ` Daniel Borkmann
  0 siblings, 1 reply; 17+ messages in thread
From: Eric Dumazet @ 2015-04-29 11:07 UTC (permalink / raw)
  To: Daniel Borkmann
  Cc: Eric Dumazet, David S. Miller, netdev, Yuchung Cheng, Neal Cardwell

On Wed, 2015-04-29 at 10:17 +0200, Daniel Borkmann wrote:
> On 04/29/2015 01:23 AM, Eric Dumazet wrote:
> > Some Congestion Control modules can provide per flow information,
> > but current way to get this information is to use netlink.
> >
> > Like TCP_INFO, let's add TCP_CC_INFO so that applications can
> > issue a getsockopt() if they have a socket file descriptor,
> > instead of playing complex netlink games.
> >
> > Sample usage would be :
> >
> >    union tcp_cc_info info;
> >    socklen_t len = sizeof(info);
> >
> >    if (getsockopt(fd, SOL_TCP, TCP_CC_INFO, &info, &len) == -1)
> >
> > Signed-off-by: Eric Dumazet <edumazet@google.com>
> > Cc: Yuchung Cheng <ycheng@google.com>
> > Cc: Neal Cardwell <ncardwell@google.com>
> 
> Presuming other cc algorithms would in future also export
> internal information through this interface, would it make
> sense to put tcp_cc_info into a container structure so we
> don't miss out attr (vegas, dctcp, ...), like:
> 
>    struct tcp_cc_exp {
>      u32               kind;
>      union tcp_cc_info info;
>    };
> 
> Otherwise looks good:
> 
> Acked-by: Daniel Borkmann <daniel@iogearbox.net>

I thought of this, but I really believe this is not needed, as the
application can already fetch CC name (if really its does not know yet)

And I also wanted to get same layout for info provided by netlink and
getsockopt()

Thanks !

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

* Re: [PATCH net-next 2/2] tcp: add TCP_CC_INFO socket option
  2015-04-29 11:07     ` Eric Dumazet
@ 2015-04-29 11:15       ` Daniel Borkmann
  0 siblings, 0 replies; 17+ messages in thread
From: Daniel Borkmann @ 2015-04-29 11:15 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: Eric Dumazet, David S. Miller, netdev, Yuchung Cheng, Neal Cardwell

On 04/29/2015 01:07 PM, Eric Dumazet wrote:
> On Wed, 2015-04-29 at 10:17 +0200, Daniel Borkmann wrote:
>> On 04/29/2015 01:23 AM, Eric Dumazet wrote:
>>> Some Congestion Control modules can provide per flow information,
>>> but current way to get this information is to use netlink.
>>>
>>> Like TCP_INFO, let's add TCP_CC_INFO so that applications can
>>> issue a getsockopt() if they have a socket file descriptor,
>>> instead of playing complex netlink games.
>>>
>>> Sample usage would be :
>>>
>>>     union tcp_cc_info info;
>>>     socklen_t len = sizeof(info);
>>>
>>>     if (getsockopt(fd, SOL_TCP, TCP_CC_INFO, &info, &len) == -1)
>>>
>>> Signed-off-by: Eric Dumazet <edumazet@google.com>
>>> Cc: Yuchung Cheng <ycheng@google.com>
>>> Cc: Neal Cardwell <ncardwell@google.com>
>>
>> Presuming other cc algorithms would in future also export
>> internal information through this interface, would it make
>> sense to put tcp_cc_info into a container structure so we
>> don't miss out attr (vegas, dctcp, ...), like:
>>
>>     struct tcp_cc_exp {
>>       u32               kind;
>>       union tcp_cc_info info;
>>     };
>>
>> Otherwise looks good:
>>
>> Acked-by: Daniel Borkmann <daniel@iogearbox.net>
>
> I thought of this, but I really believe this is not needed, as the
> application can already fetch CC name (if really its does not know yet)
>
> And I also wanted to get same layout for info provided by netlink and
> getsockopt()

Ok, I'm fine with that. Presumably, applications making use of
this facility would most likely set the cc op themselves from
the application, so they know exactly what to expect here. Or,
might have fetched it via the cc name albeit a bit inconvenient,
but not impossible.

Thanks,
Daniel

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

* Re: [PATCH net-next 1/2] tcp: prepare CC get_info() access from getsockopt()
  2015-04-28 23:23 ` [PATCH net-next 1/2] tcp: prepare CC get_info() access from getsockopt() Eric Dumazet
  2015-04-29  0:58   ` Neal Cardwell
  2015-04-29  7:55   ` Daniel Borkmann
@ 2015-04-29 16:10   ` Yuchung Cheng
  2015-04-29 22:12   ` David Miller
  3 siblings, 0 replies; 17+ messages in thread
From: Yuchung Cheng @ 2015-04-29 16:10 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: David S. Miller, netdev, Eric Dumazet, Neal Cardwell

On Tue, Apr 28, 2015 at 4:23 PM, Eric Dumazet <edumazet@google.com> wrote:
> We would like that optional info provided by Congestion Control
> modules using netlink can also be read using getsockopt()
>
> This patch changes get_info() to put this information in a buffer,
> instead of skb, like tcp_get_info(), so that following patch
> can reuse this common infrastructure.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Yuchung Cheng <ycheng@google.com>
> Cc: Neal Cardwell <ncardwell@google.com>
Acked-by: Yuchung Cheng <ycheng@google.com>

> ---
>  include/net/tcp.h              |  5 ++++-
>  include/uapi/linux/inet_diag.h |  4 ++++
>  net/ipv4/inet_diag.c           |  8 +++++---
>  net/ipv4/tcp_dctcp.c           | 20 ++++++++++----------
>  net/ipv4/tcp_illinois.c        | 21 +++++++++++----------
>  net/ipv4/tcp_vegas.c           | 19 ++++++++++---------
>  net/ipv4/tcp_vegas.h           |  3 ++-
>  7 files changed, 46 insertions(+), 34 deletions(-)
>
> diff --git a/include/net/tcp.h b/include/net/tcp.h
> index 051dc5c2802d..d5b3089317fb 100644
> --- a/include/net/tcp.h
> +++ b/include/net/tcp.h
> @@ -804,6 +804,8 @@ enum tcp_ca_ack_event_flags {
>  /* Requires ECN/ECT set on all packets */
>  #define TCP_CONG_NEEDS_ECN     0x2
>
> +union tcp_cc_info;
> +
>  struct tcp_congestion_ops {
>         struct list_head        list;
>         u32 key;
> @@ -829,7 +831,8 @@ struct tcp_congestion_ops {
>         /* hook for packet ack accounting (optional) */
>         void (*pkts_acked)(struct sock *sk, u32 num_acked, s32 rtt_us);
>         /* get info for inet_diag (optional) */
> -       int (*get_info)(struct sock *sk, u32 ext, struct sk_buff *skb);
> +       size_t (*get_info)(struct sock *sk, u32 ext, int *attr,
> +                          union tcp_cc_info *info);
>
>         char            name[TCP_CA_NAME_MAX];
>         struct module   *owner;
> diff --git a/include/uapi/linux/inet_diag.h b/include/uapi/linux/inet_diag.h
> index d65c0a09efd3..c7093c75bdd6 100644
> --- a/include/uapi/linux/inet_diag.h
> +++ b/include/uapi/linux/inet_diag.h
> @@ -143,4 +143,8 @@ struct tcp_dctcp_info {
>         __u32   dctcp_ab_tot;
>  };
>
> +union tcp_cc_info {
> +       struct tcpvegas_info    vegas;
> +       struct tcp_dctcp_info   dctcp;
> +};
>  #endif /* _UAPI_INET_DIAG_H_ */
> diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
> index bb77ebdae3b3..4d32262c7502 100644
> --- a/net/ipv4/inet_diag.c
> +++ b/net/ipv4/inet_diag.c
> @@ -224,14 +224,16 @@ int inet_sk_diag_fill(struct sock *sk, struct inet_connection_sock *icsk,
>         handler->idiag_get_info(sk, r, info);
>
>         if (sk->sk_state < TCP_TIME_WAIT) {
> -               int err = 0;
> +               union tcp_cc_info info;
> +               size_t sz = 0;
> +               int attr;
>
>                 rcu_read_lock();
>                 ca_ops = READ_ONCE(icsk->icsk_ca_ops);
>                 if (ca_ops && ca_ops->get_info)
> -                       err = ca_ops->get_info(sk, ext, skb);
> +                       sz = ca_ops->get_info(sk, ext, &attr, &info);
>                 rcu_read_unlock();
> -               if (err < 0)
> +               if (sz && nla_put(skb, attr, sz, &info) < 0)
>                         goto errout;
>         }
>
> diff --git a/net/ipv4/tcp_dctcp.c b/net/ipv4/tcp_dctcp.c
> index 4376016f7fa5..4c41c1287197 100644
> --- a/net/ipv4/tcp_dctcp.c
> +++ b/net/ipv4/tcp_dctcp.c
> @@ -277,7 +277,8 @@ static void dctcp_cwnd_event(struct sock *sk, enum tcp_ca_event ev)
>         }
>  }
>
> -static int dctcp_get_info(struct sock *sk, u32 ext, struct sk_buff *skb)
> +static size_t dctcp_get_info(struct sock *sk, u32 ext, int *attr,
> +                            union tcp_cc_info *info)
>  {
>         const struct dctcp *ca = inet_csk_ca(sk);
>
> @@ -286,18 +287,17 @@ static int dctcp_get_info(struct sock *sk, u32 ext, struct sk_buff *skb)
>          */
>         if (ext & (1 << (INET_DIAG_DCTCPINFO - 1)) ||
>             ext & (1 << (INET_DIAG_VEGASINFO - 1))) {
> -               struct tcp_dctcp_info info;
> -
> -               memset(&info, 0, sizeof(info));
> +               memset(info, 0, sizeof(struct tcp_dctcp_info));
>                 if (inet_csk(sk)->icsk_ca_ops != &dctcp_reno) {
> -                       info.dctcp_enabled = 1;
> -                       info.dctcp_ce_state = (u16) ca->ce_state;
> -                       info.dctcp_alpha = ca->dctcp_alpha;
> -                       info.dctcp_ab_ecn = ca->acked_bytes_ecn;
> -                       info.dctcp_ab_tot = ca->acked_bytes_total;
> +                       info->dctcp.dctcp_enabled = 1;
> +                       info->dctcp.dctcp_ce_state = (u16) ca->ce_state;
> +                       info->dctcp.dctcp_alpha = ca->dctcp_alpha;
> +                       info->dctcp.dctcp_ab_ecn = ca->acked_bytes_ecn;
> +                       info->dctcp.dctcp_ab_tot = ca->acked_bytes_total;
>                 }
>
> -               return nla_put(skb, INET_DIAG_DCTCPINFO, sizeof(info), &info);
> +               *attr = INET_DIAG_DCTCPINFO;
> +               return sizeof(*info);
>         }
>         return 0;
>  }
> diff --git a/net/ipv4/tcp_illinois.c b/net/ipv4/tcp_illinois.c
> index 67476f085e48..f71002e4db0b 100644
> --- a/net/ipv4/tcp_illinois.c
> +++ b/net/ipv4/tcp_illinois.c
> @@ -300,24 +300,25 @@ static u32 tcp_illinois_ssthresh(struct sock *sk)
>  }
>
>  /* Extract info for Tcp socket info provided via netlink. */
> -static int tcp_illinois_info(struct sock *sk, u32 ext, struct sk_buff *skb)
> +static size_t tcp_illinois_info(struct sock *sk, u32 ext, int *attr,
> +                               union tcp_cc_info *info)
>  {
>         const struct illinois *ca = inet_csk_ca(sk);
>
>         if (ext & (1 << (INET_DIAG_VEGASINFO - 1))) {
> -               struct tcpvegas_info info = {
> -                       .tcpv_enabled = 1,
> -                       .tcpv_rttcnt = ca->cnt_rtt,
> -                       .tcpv_minrtt = ca->base_rtt,
> -               };
> +               info->vegas.tcpv_enabled = 1;
> +               info->vegas.tcpv_rttcnt = ca->cnt_rtt;
> +               info->vegas.tcpv_minrtt = ca->base_rtt;
> +               info->vegas.tcpv_rtt = 0;
>
> -               if (info.tcpv_rttcnt > 0) {
> +               if (info->vegas.tcpv_rttcnt > 0) {
>                         u64 t = ca->sum_rtt;
>
> -                       do_div(t, info.tcpv_rttcnt);
> -                       info.tcpv_rtt = t;
> +                       do_div(t, info->vegas.tcpv_rttcnt);
> +                       info->vegas.tcpv_rtt = t;
>                 }
> -               return nla_put(skb, INET_DIAG_VEGASINFO, sizeof(info), &info);
> +               *attr = INET_DIAG_VEGASINFO;
> +               return sizeof(struct tcpvegas_info);
>         }
>         return 0;
>  }
> diff --git a/net/ipv4/tcp_vegas.c b/net/ipv4/tcp_vegas.c
> index c71a1b8f7bde..a6cea1d5e20d 100644
> --- a/net/ipv4/tcp_vegas.c
> +++ b/net/ipv4/tcp_vegas.c
> @@ -286,18 +286,19 @@ static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 acked)
>  }
>
>  /* Extract info for Tcp socket info provided via netlink. */
> -int tcp_vegas_get_info(struct sock *sk, u32 ext, struct sk_buff *skb)
> +size_t tcp_vegas_get_info(struct sock *sk, u32 ext, int *attr,
> +                         union tcp_cc_info *info)
>  {
>         const struct vegas *ca = inet_csk_ca(sk);
> +
>         if (ext & (1 << (INET_DIAG_VEGASINFO - 1))) {
> -               struct tcpvegas_info info = {
> -                       .tcpv_enabled = ca->doing_vegas_now,
> -                       .tcpv_rttcnt = ca->cntRTT,
> -                       .tcpv_rtt = ca->baseRTT,
> -                       .tcpv_minrtt = ca->minRTT,
> -               };
> -
> -               return nla_put(skb, INET_DIAG_VEGASINFO, sizeof(info), &info);
> +               info->vegas.tcpv_enabled = ca->doing_vegas_now,
> +               info->vegas.tcpv_rttcnt = ca->cntRTT,
> +               info->vegas.tcpv_rtt = ca->baseRTT,
> +               info->vegas.tcpv_minrtt = ca->minRTT,
> +
> +               *attr = INET_DIAG_VEGASINFO;
> +               return sizeof(struct tcpvegas_info);
>         }
>         return 0;
>  }
> diff --git a/net/ipv4/tcp_vegas.h b/net/ipv4/tcp_vegas.h
> index e8a6b33cc61d..ef9da5306c68 100644
> --- a/net/ipv4/tcp_vegas.h
> +++ b/net/ipv4/tcp_vegas.h
> @@ -19,6 +19,7 @@ void tcp_vegas_init(struct sock *sk);
>  void tcp_vegas_state(struct sock *sk, u8 ca_state);
>  void tcp_vegas_pkts_acked(struct sock *sk, u32 cnt, s32 rtt_us);
>  void tcp_vegas_cwnd_event(struct sock *sk, enum tcp_ca_event event);
> -int tcp_vegas_get_info(struct sock *sk, u32 ext, struct sk_buff *skb);
> +size_t tcp_vegas_get_info(struct sock *sk, u32 ext, int *attr,
> +                         union tcp_cc_info *info);
>
>  #endif /* __TCP_VEGAS_H */
> --
> 2.2.0.rc0.207.ga3a616c
>

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

* Re: [PATCH net-next 2/2] tcp: add TCP_CC_INFO socket option
  2015-04-28 23:23 ` [PATCH net-next 2/2] tcp: add TCP_CC_INFO socket option Eric Dumazet
  2015-04-29  1:00   ` Neal Cardwell
  2015-04-29  8:17   ` Daniel Borkmann
@ 2015-04-29 16:15   ` Yuchung Cheng
  2015-04-29 22:12   ` David Miller
  3 siblings, 0 replies; 17+ messages in thread
From: Yuchung Cheng @ 2015-04-29 16:15 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: David S. Miller, netdev, Eric Dumazet, Neal Cardwell

On Tue, Apr 28, 2015 at 4:23 PM, Eric Dumazet <edumazet@google.com> wrote:
> Some Congestion Control modules can provide per flow information,
> but current way to get this information is to use netlink.
>
> Like TCP_INFO, let's add TCP_CC_INFO so that applications can
> issue a getsockopt() if they have a socket file descriptor,
> instead of playing complex netlink games.
>
> Sample usage would be :
>
>   union tcp_cc_info info;
>   socklen_t len = sizeof(info);
>
>   if (getsockopt(fd, SOL_TCP, TCP_CC_INFO, &info, &len) == -1)
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Yuchung Cheng <ycheng@google.com>
> Cc: Neal Cardwell <ncardwell@google.com>
Acked-by: Yuchung Cheng <ycheng@google.com>

Nice extension!

> ---
>  include/uapi/linux/tcp.h |  1 +
>  net/ipv4/tcp.c           | 21 +++++++++++++++++++++
>  2 files changed, 22 insertions(+)
>
> diff --git a/include/uapi/linux/tcp.h b/include/uapi/linux/tcp.h
> index 3b9718328d8b..937ec387276f 100644
> --- a/include/uapi/linux/tcp.h
> +++ b/include/uapi/linux/tcp.h
> @@ -112,6 +112,7 @@ enum {
>  #define TCP_FASTOPEN           23      /* Enable FastOpen on listeners */
>  #define TCP_TIMESTAMP          24
>  #define TCP_NOTSENT_LOWAT      25      /* limit number of unsent bytes in write queue */
> +#define TCP_CC_INFO            26      /* Get Congestion Control (optional) info */
>
>  struct tcp_repair_opt {
>         __u32   opt_code;
> diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
> index 8c5cd9efebbc..1e06c75a6837 100644
> --- a/net/ipv4/tcp.c
> +++ b/net/ipv4/tcp.c
> @@ -252,6 +252,7 @@
>  #include <linux/types.h>
>  #include <linux/fcntl.h>
>  #include <linux/poll.h>
> +#include <linux/inet_diag.h>
>  #include <linux/init.h>
>  #include <linux/fs.h>
>  #include <linux/skbuff.h>
> @@ -2734,6 +2735,26 @@ static int do_tcp_getsockopt(struct sock *sk, int level,
>                         return -EFAULT;
>                 return 0;
>         }
> +       case TCP_CC_INFO: {
> +               const struct tcp_congestion_ops *ca_ops;
> +               union tcp_cc_info info;
> +               size_t sz = 0;
> +               int attr;
> +
> +               if (get_user(len, optlen))
> +                       return -EFAULT;
> +
> +               ca_ops = icsk->icsk_ca_ops;
> +               if (ca_ops && ca_ops->get_info)
> +                       sz = ca_ops->get_info(sk, ~0U, &attr, &info);
> +
> +               len = min_t(unsigned int, len, sz);
> +               if (put_user(len, optlen))
> +                       return -EFAULT;
> +               if (copy_to_user(optval, &info, len))
> +                       return -EFAULT;
> +               return 0;
> +       }
>         case TCP_QUICKACK:
>                 val = !icsk->icsk_ack.pingpong;
>                 break;
> --
> 2.2.0.rc0.207.ga3a616c
>

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

* Re: [PATCH net-next 1/2] tcp: prepare CC get_info() access from getsockopt()
  2015-04-28 23:23 ` [PATCH net-next 1/2] tcp: prepare CC get_info() access from getsockopt() Eric Dumazet
                     ` (2 preceding siblings ...)
  2015-04-29 16:10   ` Yuchung Cheng
@ 2015-04-29 22:12   ` David Miller
  2015-04-29 22:40     ` Eric Dumazet
  3 siblings, 1 reply; 17+ messages in thread
From: David Miller @ 2015-04-29 22:12 UTC (permalink / raw)
  To: edumazet; +Cc: netdev, eric.dumazet, ycheng, ncardwell

From: Eric Dumazet <edumazet@google.com>
Date: Tue, 28 Apr 2015 16:23:48 -0700

> We would like that optional info provided by Congestion Control
> modules using netlink can also be read using getsockopt()
> 
> This patch changes get_info() to put this information in a buffer,
> instead of skb, like tcp_get_info(), so that following patch
> can reuse this common infrastructure.
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Applied.

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

* Re: [PATCH net-next 2/2] tcp: add TCP_CC_INFO socket option
  2015-04-28 23:23 ` [PATCH net-next 2/2] tcp: add TCP_CC_INFO socket option Eric Dumazet
                     ` (2 preceding siblings ...)
  2015-04-29 16:15   ` Yuchung Cheng
@ 2015-04-29 22:12   ` David Miller
  3 siblings, 0 replies; 17+ messages in thread
From: David Miller @ 2015-04-29 22:12 UTC (permalink / raw)
  To: edumazet; +Cc: netdev, eric.dumazet, ycheng, ncardwell

From: Eric Dumazet <edumazet@google.com>
Date: Tue, 28 Apr 2015 16:23:49 -0700

> Some Congestion Control modules can provide per flow information,
> but current way to get this information is to use netlink.
> 
> Like TCP_INFO, let's add TCP_CC_INFO so that applications can
> issue a getsockopt() if they have a socket file descriptor,
> instead of playing complex netlink games.
> 
> Sample usage would be :
> 
>   union tcp_cc_info info;
>   socklen_t len = sizeof(info);
> 
>   if (getsockopt(fd, SOL_TCP, TCP_CC_INFO, &info, &len) == -1)
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Applied.

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

* Re: [PATCH net-next 1/2] tcp: prepare CC get_info() access from getsockopt()
  2015-04-29 22:12   ` David Miller
@ 2015-04-29 22:40     ` Eric Dumazet
  2015-04-29 23:20       ` [PATCH net-next] tcp_westwood: fix tcp_westwood_info() Eric Dumazet
  0 siblings, 1 reply; 17+ messages in thread
From: Eric Dumazet @ 2015-04-29 22:40 UTC (permalink / raw)
  To: David Miller; +Cc: edumazet, netdev, ycheng, ncardwell

On Wed, 2015-04-29 at 18:12 -0400, David Miller wrote:
> From: Eric Dumazet <edumazet@google.com>
> Date: Tue, 28 Apr 2015 16:23:48 -0700
> 
> > We would like that optional info provided by Congestion Control
> > modules using netlink can also be read using getsockopt()
> > 
> > This patch changes get_info() to put this information in a buffer,
> > instead of skb, like tcp_get_info(), so that following patch
> > can reuse this common infrastructure.
> > 
> > Signed-off-by: Eric Dumazet <edumazet@google.com>
> 
> Applied.

Thanks David, I'll send an update to tcp_westwood, kbuild test robot
gave me a notice.

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

* [PATCH net-next] tcp_westwood: fix tcp_westwood_info()
  2015-04-29 22:40     ` Eric Dumazet
@ 2015-04-29 23:20       ` Eric Dumazet
  2015-04-29 23:36         ` Neal Cardwell
  2015-04-30  4:28         ` David Miller
  0 siblings, 2 replies; 17+ messages in thread
From: Eric Dumazet @ 2015-04-29 23:20 UTC (permalink / raw)
  To: David Miller; +Cc: edumazet, netdev, ycheng, ncardwell, kbuild test robot

From: Eric Dumazet <edumazet@google.com>

I forgot to update tcp_westwood when changing get_info() behavior,
this patch should fix this.

Fixes: 64f40ff5bbdb ("tcp: prepare CC get_info() access from getsockopt()")
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
 net/ipv4/tcp_westwood.c |   15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/net/ipv4/tcp_westwood.c b/net/ipv4/tcp_westwood.c
index b3c57cceb9907fe9d79f33f33369a96b647b5f26..c10732e39837872c724b801700f627a7fb1c9390 100644
--- a/net/ipv4/tcp_westwood.c
+++ b/net/ipv4/tcp_westwood.c
@@ -256,18 +256,19 @@ static void tcp_westwood_event(struct sock *sk, enum tcp_ca_event event)
 }
 
 /* Extract info for Tcp socket info provided via netlink. */
-static int tcp_westwood_info(struct sock *sk, u32 ext, struct sk_buff *skb)
+static size_t tcp_westwood_info(struct sock *sk, u32 ext, int *attr,
+				union tcp_cc_info *info)
 {
 	const struct westwood *ca = inet_csk_ca(sk);
 
 	if (ext & (1 << (INET_DIAG_VEGASINFO - 1))) {
-		struct tcpvegas_info info = {
-			.tcpv_enabled = 1,
-			.tcpv_rtt = jiffies_to_usecs(ca->rtt),
-			.tcpv_minrtt = jiffies_to_usecs(ca->rtt_min),
-		};
+		info->vegas.tcpv_enabled = 1;
+		info->vegas.tcpv_rttcnt	= 0;
+		info->vegas.tcpv_rtt	= jiffies_to_usecs(ca->rtt),
+		info->vegas.tcpv_minrtt	= jiffies_to_usecs(ca->rtt_min),
 
-		return nla_put(skb, INET_DIAG_VEGASINFO, sizeof(info), &info);
+		*attr = INET_DIAG_VEGASINFO;
+		return sizeof(struct tcpvegas_info);
 	}
 	return 0;
 }

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

* Re: [PATCH net-next] tcp_westwood: fix tcp_westwood_info()
  2015-04-29 23:20       ` [PATCH net-next] tcp_westwood: fix tcp_westwood_info() Eric Dumazet
@ 2015-04-29 23:36         ` Neal Cardwell
  2015-04-30  4:28         ` David Miller
  1 sibling, 0 replies; 17+ messages in thread
From: Neal Cardwell @ 2015-04-29 23:36 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: David Miller, Eric Dumazet, Netdev, Yuchung Cheng, kbuild test robot

On Wed, Apr 29, 2015 at 7:20 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> I forgot to update tcp_westwood when changing get_info() behavior,
> this patch should fix this.
>
> Fixes: 64f40ff5bbdb ("tcp: prepare CC get_info() access from getsockopt()")
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Acked-by: Neal Cardwell <ncardwell@google.com>

neal

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

* Re: [PATCH net-next] tcp_westwood: fix tcp_westwood_info()
  2015-04-29 23:20       ` [PATCH net-next] tcp_westwood: fix tcp_westwood_info() Eric Dumazet
  2015-04-29 23:36         ` Neal Cardwell
@ 2015-04-30  4:28         ` David Miller
  1 sibling, 0 replies; 17+ messages in thread
From: David Miller @ 2015-04-30  4:28 UTC (permalink / raw)
  To: eric.dumazet; +Cc: edumazet, netdev, ycheng, ncardwell, fengguang.wu

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 29 Apr 2015 16:20:58 -0700

> From: Eric Dumazet <edumazet@google.com>
> 
> I forgot to update tcp_westwood when changing get_info() behavior,
> this patch should fix this.
> 
> Fixes: 64f40ff5bbdb ("tcp: prepare CC get_info() access from getsockopt()")
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Applied, thanks Eric.

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

end of thread, other threads:[~2015-04-30  4:28 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-28 23:23 [PATCH net-next 0/2] tcp: extend access to CC information Eric Dumazet
2015-04-28 23:23 ` [PATCH net-next 1/2] tcp: prepare CC get_info() access from getsockopt() Eric Dumazet
2015-04-29  0:58   ` Neal Cardwell
2015-04-29  7:55   ` Daniel Borkmann
2015-04-29 16:10   ` Yuchung Cheng
2015-04-29 22:12   ` David Miller
2015-04-29 22:40     ` Eric Dumazet
2015-04-29 23:20       ` [PATCH net-next] tcp_westwood: fix tcp_westwood_info() Eric Dumazet
2015-04-29 23:36         ` Neal Cardwell
2015-04-30  4:28         ` David Miller
2015-04-28 23:23 ` [PATCH net-next 2/2] tcp: add TCP_CC_INFO socket option Eric Dumazet
2015-04-29  1:00   ` Neal Cardwell
2015-04-29  8:17   ` Daniel Borkmann
2015-04-29 11:07     ` Eric Dumazet
2015-04-29 11:15       ` Daniel Borkmann
2015-04-29 16:15   ` Yuchung Cheng
2015-04-29 22:12   ` David Miller

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).