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: Sun, 17 Jan 2010 21:44:24 -0800 [thread overview]
Message-ID: <20100117214424.3cab20be@s6510> (raw)
In-Reply-To: <20100117.185636.163664050.davem@davemloft.net>
On Sun, 17 Jan 2010 18:56:36 -0800 (PST)
David Miller <davem@davemloft.net> wrote:
> From: Christian Samsel <christian.samsel@rwth-aachen.de>
> Date: Sun, 17 Jan 2010 13:11:18 +0100
>
> > Am Samstag, 16. Januar 2010 10:46:54 schrieb David Miller:
> >> This is a complete mess, and we need to sort it out before we think
> >> about changing the size of qopt at this point.
> >>
> > Just to state this clearly, by cleaning up the mess you mean switching netem
> > completely over to netlink attributes?
>
> I think the only way we can proceed is to keep the current qopt
> structure static, and only add things using new attributes.
>
> I would also suggest that we make sch_netem.c strictly require a
> specific size for the structure. And before anyone says that will
> break something, it's much better than what we have now which is
> random, silent, dropping of attributes.
Just to make it clearer. The normal netlink method of nesting attributes
(done by nla_parse_nested) is:
+----------------------+------------
| len1 | type1| data1 | len2 | ...
+----------------------+------------
But netem uses a sequential format:
+------+---------------------+------------
| qopt | len1 | type1| data1 | len2 | ...
+------+---------------------+------------
So to enhance netlink, the best way is to add new attributes.
Changing the size of qopt will break binary compatiablity because
the code that parses sequential options will get the wrong offset.
Changing the size of attributes will also break compatiablity
as well.
Also, at some point all the functions in netem could be broken
into separate if too complex. For example, the code that was
submitted to replay a recorded trace probably would be better off
as a separate qdisc.
prev parent reply other threads:[~2010-01-18 5:44 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
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 [this message]
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=20100117214424.3cab20be@s6510 \
--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).