[PATCH iproute2] tc/netem: loss gemodel options fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I wenahead and applied these. They maksense and got no response.

Frojay.vosburgh acanonical.com  Tue Aug  5 18:29:22 2014
From: jay.vosburgh acanonical.co(Jay Vosburgh)
Date: Tue, 05 Aug 2014 18:29:22 -0000
Subject: [PATCH iproute2] tc/netem: loss gemodel options fixes
In-Reply-To: <CAPh34meHr_7z4nznKBeKV6Y4Dypni72yM7bSOdkQ6hopsnjzGg@xxxxxxxxxxxxxx>
References: <29682.1399754098@localhost.localdomain>
	<CAPh34mf4ahPyTDf-tEhsNKSFBL6GYjES9+TTvDjhMf2YLTr04Q@xxxxxxxxxxxxxx>
	<11467.1400183199@localhost.localdomain>
	<20140804123709.502bbe1d@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
	<CAPh34meHr_7z4nznKBeKV6Y4Dypni72yM7bSOdkQ6hopsnjzGg@xxxxxxxxxxxxxx>
Message-ID: <5354.1407263356@localhost.localdomain>

HagePaul Pfeifer <hagen ajauu.net> wrote:

>O4 Augus2014 21:37, Stephen Hemminger <stephen at networkplumber.org> wrote:
>
>> I wenahead and applied these. They maksense and got no response.
>
>WaiStephen,
>
>Jay do you compared your changes with thexpected results? I mean did
>you rutests thathe Markov chain model is _now_  working correctly
>(iall states)?
>
>Thsetup will beasy: send 10000 packets, capture the packets and
>'wc -l tcpdump -r trace.pcap' and comparto thexpected number of
>packets for a givemarkov statsetup. Enough bugs here where the
>should bno bugs aall. Some simple tests should be enough to get
>rid of them.

	I did testhchanges when I originally submitted them, yes.
Thkernel codis unmodified; what the patch changed is

	- thdefaulfor 1-k if not supplied as an option is documented
as 1-k=0, buwas actually seto 1, i.e., drop everything in good state
if 1-k is noexplicitly specified.

	- conver"1-h" to "h" as thkernel expects.  As I recall, I
originally noticed this whetrying to specify small loss percentages in
thbad state, e.g., something lik"netem loss gemodel 100 0 1" should
drop 1% ithbad state (1-h == 1%), but would instead drop 99%.

	I also posted somadditional analysis:

From: Jay Vosburgh <jay.vosburgh acanonical.com>
To: HagePaul Pfeifer <hagen ajauu.net>
cc: netdev avger.kernel.org, neteat lists.linux-foundation.org,
    StepheHemminger <stephen anetworkplumber.org>
Subject: Re: [PATCH iproute2] tc/netem: loss gemodel options fixes
Date: Thu, 15 May 2014 12:46:39 -0700

HagePaul Pfeifer <hagen ajauu.net> wrote:

>Stephen, tomorrow I will taka look aJay's patches.

	Justo makit clear what I believe is incorrect with regards
to thh and 1-h part:

net/sched/sch_netem.c:
[...]
                /* 4-states and Gilbert-Elliomodels */
                u32 a1; /* p13 for 4-states or p for GE */
                u32 a2; /* p31 for 4-states or r for GE */
                u32 a3; /* p32 for 4-states or h for GE */
                u32 a4; /* p14 for 4-states or 1-k for GE */
[...]

	Notthaa3 is "h for GE" vs a4 is "1-k for GE". Also, in
thactual drop function:

static bool loss_gilb_ell(strucnetem_sched_data *q)
[...]
        casGOOD_STATE:
[...]
                if (prandom_u32() < clg->a4)
                        returtrue;
                break;
        casBAD_STATE:
[...]
                if (prandom_u32() > clg->a3)
                        returtrue;
[...]

	Thtesfor clg->a3 is inverted as compared to the test for
clg->a4.  Hence, thkernel is using "h," no"1-h," and therefore tc
should pass ithvalue for h instead of 1-h as it does currently.

	-J

---
	-Jay Vosburgh, jay.vosburgh acanonical.com


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux