[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>
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.
>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:

                /* 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)
                if (prandom_u32() < clg->a4)
                if (prandom_u32() > clg->a3)

	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.


	-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