netdev
[Top] [All Lists]

Re: [PATCH 2.6] (1/4) netem - update API for new features

To: Stephen Hemminger <shemminger@xxxxxxxx>
Subject: Re: [PATCH 2.6] (1/4) netem - update API for new features
From: jamal <hadi@xxxxxxxxxx>
Date: 26 Aug 2004 08:08:51 -0400
Cc: "David S. Miller" <davem@xxxxxxxxxx>, netdev@xxxxxxxxxxx
In-reply-to: <20040825105339.30210e84@xxxxxxxxxxxxxxxxxxxxx>
Organization: jamalopolous
References: <20040825105339.30210e84@xxxxxxxxxxxxxxxxxxxxx>
Reply-to: hadi@xxxxxxxxxx
Sender: netdev-bounce@xxxxxxxxxxx
On Wed, 2004-08-25 at 13:53, Stephen Hemminger wrote:
> Extend netem options to support new features.
> 

>  struct tc_netem_qopt
>  {
>       __u32   latency;        /* added delay (us) */
> @@ -409,6 +410,13 @@
>       __u32   loss;           /* random packet loss (0=none ~0=100%) */
>       __u32   gap;            /* re-ordering gap (0 for delay all) */
>       __u32   duplicate;      /* random packet dup  (0=none ~0=100%) */
> -     __u32   jitter;         /* random jitter in latency (us) */
> +     __u32   jitter;         /* delay sigma (us) */
> +
> +     __u32   delay_corr;     /* delay correllation (0=none ~0=100%) */
> +     __u32   loss_corr;      /* packet loss correllation (0=none ~0=100%) */
> +     __u32   dup_corr;       /* duplicate correlation (0=none ~0=100%) */
> +
> +     __s16   delay_dist[0];  /* delay distribution table (optional) */
> +#define TCA_NETEM_TABLEFACTOR        8192
>  };

You should really send the delay_dist in its own TLV to avoid
the kind of mistakes that showed up in u32 classifier.
Also allows you to extend that structure in the future.

cheers,
jamal

PS:- kudos on moving that stuff to user space.



<Prev in Thread] Current Thread [Next in Thread>