Eric Dumazet
12c87d10ae
net: introduce SO_MAX_PACING_RATE
...
As mentioned in commit afe4fd062416b ("pkt_sched: fq: Fair Queue packet
scheduler"), this patch adds a new socket option.
SO_MAX_PACING_RATE offers the application the ability to cap the
rate computed by transport layer. Value is in bytes per second.
u32 val = 1000000;
setsockopt(sockfd, SOL_SOCKET, SO_MAX_PACING_RATE, &val, sizeof(val));
To be effectively paced, a flow must use FQ packet scheduler.
Note that a packet scheduler takes into account the headers for its
computations. The effective payload rate depends on MSS and retransmits
if any.
I chose to make this pacing rate a SOL_SOCKET option instead of a
TCP one because this can be used by other protocols.
Signed-off-by: Eric Dumazet <edumazet@google.com >
Cc: Steinar H. Gunderson <sesse@google.com >
Cc: Michael Kerrisk <mtk.manpages@gmail.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
Change-Id: Iea51b6104a5420d5c9ed1ea7382cbd53bdb8f4be
2020-12-10 23:16:40 +01:00
..
2012-03-28 18:30:03 +01:00
2009-07-27 12:10:38 -07:00
2009-06-15 13:27:38 +10:00
2009-06-12 11:32:58 +02:00
2012-03-28 18:30:03 +01:00
2011-05-04 14:41:28 -04:00
2011-05-04 14:41:28 -04:00
2011-05-04 14:41:28 -04:00
2007-05-11 05:38:25 -04:00
2011-05-04 14:41:28 -04:00
2009-06-11 21:02:15 +02:00
2012-03-28 18:30:03 +01:00
2011-03-23 19:46:22 -07:00
2009-06-11 21:02:14 +02:00
2012-03-23 16:58:31 -07:00
2009-06-11 21:02:37 +02:00
2009-06-11 21:02:50 +02:00
2011-05-25 08:39:37 -07:00
2011-11-01 07:34:21 -07:00
2010-10-07 14:08:55 +01:00
2012-04-02 14:41:27 -07:00
2019-08-23 13:20:00 +02:00
2009-06-11 21:02:37 +02:00
2011-07-22 18:45:33 +02:00
2009-07-22 00:28:38 +02:00
2008-05-01 08:03:58 -07:00
2012-08-15 13:06:05 -07:00
2013-03-01 09:43:32 -08:00
2010-08-11 08:59:21 -07:00
2012-03-04 17:54:34 -05:00
2009-06-11 21:02:42 +02:00
2005-07-26 14:35:41 -07:00
2005-04-16 15:20:36 -07:00
2011-03-17 13:08:27 -03:00
2012-03-28 18:30:03 +01:00
2009-06-11 21:02:37 +02:00
2019-08-09 12:02:27 +02:00
2011-03-17 09:19:04 +08:00
2011-03-11 12:23:31 +01:00
2012-02-24 10:39:27 -08:00
2013-06-14 13:34:03 -07:00
2010-10-07 14:08:55 +01:00
2009-06-11 21:02:42 +02:00
2005-04-16 15:20:36 -07:00
2009-06-11 21:02:14 +02:00
2009-06-11 21:02:14 +02:00
2012-02-21 16:47:28 -08:00
2012-02-21 16:47:28 -08:00
2012-01-10 18:04:27 -08:00
2008-08-12 16:07:31 -07:00
2019-08-23 23:53:10 +02:00
2012-02-27 09:43:30 -06:00
2009-06-11 21:02:15 +02:00
2010-12-17 15:07:19 +01:00
2009-06-11 21:02:37 +02:00
2010-10-07 14:08:55 +01:00
2010-08-14 22:26:51 +02:00
2010-08-14 22:26:51 +02:00
2010-10-09 21:51:44 +02:00
2010-05-25 08:07:03 -07:00
2007-10-12 14:55:37 -04:00
2009-06-11 21:02:37 +02:00
2011-07-26 16:49:47 -07:00
2011-07-26 16:49:47 -07:00
2011-08-17 13:00:20 -07:00
2007-05-02 19:27:14 +02:00
2012-03-23 16:58:42 -07:00
2009-09-22 07:17:41 -07:00
2009-06-11 21:02:50 +02:00
2009-06-11 21:02:50 +02:00
2009-06-11 21:02:37 +02:00
2009-06-11 21:02:15 +02:00
2008-10-23 09:18:20 -07:00
2006-10-03 23:01:26 +02:00
2019-08-05 14:20:47 +02:00
2009-06-11 21:02:37 +02:00
2012-01-10 17:39:40 -08:00
2011-12-13 09:26:45 +00:00
2009-06-11 21:02:42 +02:00
2012-02-27 09:43:30 -06:00
2012-02-23 20:18:56 -07:00
2010-03-12 15:52:42 -08:00
2012-02-23 20:19:04 -07:00
2010-09-10 10:56:51 +02:00
2009-06-11 21:02:50 +02:00
2009-07-27 12:10:38 -07:00
2009-07-27 12:10:38 -07:00
2019-08-05 14:20:47 +02:00
2012-02-24 11:42:50 -08:00
2012-02-20 12:48:47 -08:00
2011-05-26 17:12:36 -07:00
2011-05-25 08:39:43 -07:00
2009-06-11 21:02:18 +02:00
2011-11-01 07:34:20 -07:00
2010-05-27 09:12:54 -07:00
2011-03-08 17:22:11 +01:00
2009-06-11 21:02:50 +02:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:42 +02:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:15 +02:00
2019-08-05 14:22:31 +02:00
2009-06-11 21:01:52 +02:00
2019-08-05 14:20:47 +02:00
2015-12-23 16:54:28 +05:30
2011-03-17 09:19:04 +08:00
2020-12-10 23:16:40 +01:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:37 +02:00
2010-11-01 15:31:29 -04:00
2012-04-30 12:55:15 -07:00
2009-06-11 21:02:37 +02:00
2009-06-11 21:02:15 +02:00
2012-03-28 18:30:03 +01:00
2019-08-05 14:21:59 +02:00
2010-08-18 12:12:38 -07:00
2010-08-10 13:47:39 -07:00
2009-06-11 21:01:52 +02:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:42 +02:00
2019-08-05 14:20:47 +02:00
2012-03-04 17:54:34 -05:00
2010-08-09 20:44:57 -07:00
2012-01-03 22:55:17 -05:00
2009-06-11 21:02:17 +02:00
2011-10-06 19:47:12 -04:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:37 +02:00
2020-12-10 21:34:01 +01:00
2011-03-01 15:49:39 +01:00
2009-06-11 21:02:42 +02:00
2019-08-02 15:14:10 +02:00
2011-05-20 12:50:29 -07:00