netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: Paolo Valente <paolo.valente@unimore.it>
Cc: jhs@mojatatu.com, davem@davemloft.net, shemminger@vyatta.com,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	rizzo@iet.unipi.it, fchecconi@gmail.com
Subject: Re: [PATCH RFC] pkt_sched: enable QFQ to support TSO/GSO
Date: Mon, 29 Oct 2012 19:08:29 +0800	[thread overview]
Message-ID: <508E63AD.20803@gmail.com> (raw)
In-Reply-To: <20121029085106.GA3733@paolo-ThinkPad-W520>

On 10/29/2012 04:51 PM, Paolo Valente wrote:
> Hi,
> if the max packet size for some class (configured through tc) is
> violated by the actual size of the packets of that class, then QFQ
> would not schedule classes correctly, and the data structures
> implementing the bucket lists may get corrupted. This problem occurs
> with TSO/GSO even if the max packet size is set to the MTU, and is,
> e.g., the cause of the failure reported in [1]. Two patches have been
> proposed to solve this problem in [2], one of them is a preliminary
> version of this patch.
>
> This patch addresses the above issues by: 1) setting QFQ parameters to
> proper values for supporting TSO/GSO (in particular, setting the
> maximum possible packet size to 64KB), 2) automatically increasing the
> max packet size for a class, lmax, when a packet with a larger size
> than the current value of lmax arrives (a notification is also appended
> to the log).
>
> The drawback of the first point is that the maximum weight for a class
> is now limited to 4096, which is equal to 1/16 of the maximum weight
> sum.
>
> Finally, this patch also forcibly caps the timestamps of a class if
> they are too high to be stored in the bucket list. This capping, taken
> from QFQ+ [3], handles the unfrequent case described in the comment to
> the function slot_insert.
>
> [1] http://marc.info/?l=linux-netdev&m=134968777902077&w=2
> [2] http://marc.info/?l=linux-netdev&m=135096573507936&w=2
> [3] http://marc.info/?l=linux-netdev&m=134902691421670&w=2
>
> Signed-off-by: Paolo Valente <paolo.valente@unimore.it>


Please respect people who helps you to test it:

Tested-by: Cong Wang <amwang@redhat.com>

I tested it again just in case...

By the way, one nit below:


> +	if (unlikely(cl->lmax < qdisc_pkt_len(skb))) {
> +		pr_notice("qfq: increasing maxpkt from %u to %u for class %u",
> +			  cl->lmax, qdisc_pkt_len(skb), cl->common.classid);
> +		qfq_update_reactivate_class(q, cl, cl->inv_w,
> +					    qdisc_pkt_len(skb), 0);
> +	}


Seems the log level KERN_NOTICE is overkill, normal users don't care 
about these information, so s/pr_notice/pr_debug/.


Thanks!

  reply	other threads:[~2012-10-29 11:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-29  8:51 [PATCH RFC] pkt_sched: enable QFQ to support TSO/GSO Paolo Valente
2012-10-29 11:08 ` Cong Wang [this message]
2012-10-29 11:24   ` Paolo Valente
2012-10-29 11:31     ` Cong Wang
  -- strict thread matches above, loose matches on Subject: below --
2012-10-30  6:00 Paolo Valente
2012-10-30 14:24 ` Stephen Hemminger
2012-11-05  8:41   ` Cong Wang
2012-11-05 16:46     ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=508E63AD.20803@gmail.com \
    --to=xiyou.wangcong@gmail.com \
    --cc=davem@davemloft.net \
    --cc=fchecconi@gmail.com \
    --cc=jhs@mojatatu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=paolo.valente@unimore.it \
    --cc=rizzo@iet.unipi.it \
    --cc=shemminger@vyatta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).