[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1380328094.30872.41.camel@edumazet-glaptop.roam.corp.google.com>
Date: Fri, 27 Sep 2013 17:28:14 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: "Steinar H. Gunderson" <sesse@...gle.com>
Cc: David Miller <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
Michael Kerrisk <mtk.manpages@...il.com>
Subject: Re: [PATCH net-next] net: introduce SO_MAX_PACING_RATE
On Fri, 2013-09-27 at 23:16 +0200, Steinar H. Gunderson wrote:
> On Mon, Sep 23, 2013 at 08:10:14AM -0700, Eric Dumazet wrote:
> > SO_MAX_PACING_RATE offers the application the ability to cap the
> > rate computed by transport layer. Value is in bytes per second.
>
> I tried this (the first version) on top of 3.12-rc2, but it doesn't actually
> appear to work.
>
> The setsockopt goes through:
>
> [pid 30501] setsockopt(11, SOL_SOCKET, 0x2f /* SO_??? */, [1920000], 4) = 0
>
> And the fq scheduler is active on the machine:
The socket option actually works, but FQ has a problem with non TSO
frames, because default quantum is 3028 (2 * 1514)
I am testing this patch :
diff --git a/net/sched/sch_fq.c b/net/sched/sch_fq.c
index 32ad015..f7e45b0 100644
--- a/net/sched/sch_fq.c
+++ b/net/sched/sch_fq.c
@@ -473,7 +473,8 @@ begin:
rate = min(rate, q->flow_max_rate);
if (rate) {
- u64 len = (u64)qdisc_pkt_len(skb) * NSEC_PER_SEC;
+ u32 plen = max(qdisc_pkt_len(skb), q->quantum);
+ u64 len = (u64)plen * NSEC_PER_SEC;
do_div(len, rate);
/* Since socket rate can change later,
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists