netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: David Miller <davem@davemloft.net>
Cc: christian.samsel@rwth-aachen.de, netdev@vger.kernel.org
Subject: Re: [PATCH 1/2] improve netem reorder flexibility
Date: Mon, 21 Dec 2009 09:54:07 -0800	[thread overview]
Message-ID: <20091221095407.5430a630@nehalam> (raw)
In-Reply-To: <20091218.195907.189689401.davem@davemloft.net>

On Fri, 18 Dec 2009 19:59:07 -0800 (PST)
David Miller <davem@davemloft.net> wrote:

> From: Christian Samsel <christian.samsel@rwth-aachen.de>
> Date: Fri, 18 Dec 2009 19:01:28 +0100
> 
> > Am Freitag, 18. Dezember 2009 18:32:40 schrieb Stephen Hemminger:  
> >> On Fri, 18 Dec 2009 14:18:37 +0100
> >> 
> >> Christian Samsel <christian.samsel@rwth-aachen.de> wrote:  
> >> > This patch adds a new feature to netem: The newly introduced parameter
> >> > reorderdelay TIME is the time a reordered packet is delayed. It can be
> >> > used in a combination with delay TIME to enable netem to produce late
> >> > packets, which is not possible in the standard netem / iproute2. In the
> >> > standard version reordered packets are always sent immediately and
> >> > therefore are always early packets.  
> >> 
> >> I like the idea but is it binary compatible with older kernels/ older
> >>  iproute2 utilities?
> >>   
> > Thats a good point. I will test it. So far i think it should work.  
> 
> It won't work.
> 
> If you change the size of the tc_netem_qopt, older kernels will
> reject because the size is different from what the kernel expects.
> 
> So newer iproute2 will not work with older kernels.
> 
> You can't change these structures, add new netlink attributes
> to pass the new data instead.

The netem logic for parsing attributes is different from others for
historical reasons.  Looking at parse_attr():

If qopt is larger than expected, then the extra data is interpreted as
the following nested attribute.

If qopt is smaller than expected, then it returns -EINVAL.

Note: in early versions of netem development, the parsing was different,
and it was possible to grow the structure, but the attribute parsing got
changed and is now more restrictive.  BUT that is okay, since the correct
way to add options to netlink API's is to add new attributes, not extend
size of structures.

  parent reply	other threads:[~2009-12-21 17:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-18 13:18 [PATCH 1/2] improve netem reorder flexibility Christian Samsel
2009-12-18 13:18 ` [PATCH 2/2] " Christian Samsel
2009-12-18 17:32 ` [PATCH 1/2] " Stephen Hemminger
2009-12-18 17:56   ` Christian Samsel
2009-12-18 18:01   ` Christian Samsel
2009-12-19  3:59     ` David Miller
2009-12-19 10:38       ` Christian Samsel
2009-12-21 17:54       ` Stephen Hemminger [this message]
2010-01-16  9:46         ` David Miller
2010-01-17 12:11           ` Christian Samsel
2010-01-18  2:56             ` David Miller
2010-01-18  5:44               ` Stephen Hemminger

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=20091221095407.5430a630@nehalam \
    --to=shemminger@vyatta.com \
    --cc=christian.samsel@rwth-aachen.de \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /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).