From: Stephen Hemminger <shemminger@vyatta.com>
To: Thomas Graf <tgraf@suug.ch>
Cc: "Duyck, Alexander H" <alexander.h.duyck@intel.com>,
Alexander Duyck <alexander.duyck@gmail.com>,
"Kirsher, Jeffrey T" <jeffrey.t.kirsher@intel.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>
Subject: Re: [PATCH] IPROUTE: correct nla nested message generated by netem_parse_opt
Date: Wed, 27 Aug 2008 14:10:28 -0700 [thread overview]
Message-ID: <20080827141028.0587ace9@extreme> (raw)
In-Reply-To: <20080827204750.GV20815@postel.suug.ch>
On Wed, 27 Aug 2008 22:47:50 +0200
Thomas Graf <tgraf@suug.ch> wrote:
> Please learn to use you enter key. Thank you.
>
> * Duyck, Alexander H <alexander.h.duyck@intel.com> 2008-08-27 09:30
> > >How was it ever supposed to work? The code looked like the following
> > >prior to commit b03f4672007e533c8dbf0965f995182586216bf1 which made
> > >it used nla_parse_nested_compat()
> > >
> > >- /* Handle nested options after initial queue options.
> > >- * Should have put all options in nested format but
> > >too late now.
> > >- */
> > >- if (nla_len(opt) > sizeof(*qopt)) {
> > >- struct nlattr *tb[TCA_NETEM_MAX + 1];
> > >- if (nla_parse(tb, TCA_NETEM_MAX,
> > >- nla_data(opt) + sizeof(*qopt),
> > >- nla_len(opt) - sizeof(*qopt), NULL))
> > >
> > >nla_parse_nested_compat() now does exactly what the above code does. So
> > >in what way has the kernel ABI changed?
> >
> > This is exactly what I am talking about. Someone assumed it was just manually coding the nested compat format and it wasn't. It was using its own custom message format. The change you made changed the kernel ABI to support that custom format instead fixing the message sent to fit the kernel ABI format.
>
> For the last time, the message format *CANNOT* be changed, the ABI has to
> be stable. I didn't change the ABI, I _restored the ABI to the original
> state after it was broken by the initial nla_parse_nested_compat()
> implementation which contained a bug.
>
> It's actually trivial to figure this out in 5 minutes using
> git-whatchanged, not sure why you didn't do it.
>
> 1092cb219774a82b1f16781aec7b8d4ec727c981
> [NETLINK]: attr: add nested compat attribute type
>
> Introduced nla_parse_nested_compat() for use in netem, unfortunately
> it contained a bug which made it behave incorrectly and broke netem.
>
> b9a2f2e450b0f770bb4347ae8d48eb2dea701e24
> netlink: Fix nla_parse_nested_compat() to call nla_parse() directly
>
> This fixed nla_parse_nested_compat() in the way it was supposed
> to be from the beginning. It restored the original ABI.
>
> Unfortunately, commit 1e90474c377e92db7262a8968a45c1dd980ca9e5 made
> prio use nla_parse_nested_compat() which it shouldn't have as it
> does not use the same format. It worked due to the bug in
> nla_parse_nested_compat() and then broke when nla_parse_nested_compat()
> was fixed. Since prio was removed, this is no longer a problem.
>
> Ever since, netem is the only user of nla_parse_nested_compat() so
> I have no idea what you mean when you say I broke it for everybody
> else.
>
> To put it very very simple, users of the message format as found in
> netem is supposed to use nla_parse_nested_compat(), everybody else
> is supposed to be using nla_parse_nested().
>
> I won't bother to comment on the rest, since it shoudl be answered with
> this or simply didn't make any sense.
Thomas is right. The ABI was established incrementally and does not use
pure nested format. The original format was just one structure, then
as additional features were added, additional attributes were added.
next prev parent reply other threads:[~2008-08-27 21:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-22 0:50 [PATCH] IPROUTE: correct nla nested message generated by netem_parse_opt Jeff Kirsher
2008-08-22 1:19 ` Stephen Hemminger
2008-08-22 2:37 ` Alexander Duyck
2008-08-22 10:44 ` David Miller
2008-08-27 14:41 ` Thomas Graf
2008-08-27 16:30 ` Duyck, Alexander H
2008-08-27 20:47 ` Thomas Graf
2008-08-27 21:10 ` Stephen Hemminger [this message]
2008-08-28 6:47 ` David Miller
2008-08-28 10:18 ` Thomas Graf
2008-08-28 10:19 ` David Miller
2008-08-28 13:03 ` [PATCH 2.6.26.y] sch_prio: Fix nla_parse_nested_compat() regression Thomas Graf
2008-09-03 0:31 ` David Miller
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=20080827141028.0587ace9@extreme \
--to=shemminger@vyatta.com \
--cc=akpm@linux-foundation.org \
--cc=alexander.duyck@gmail.com \
--cc=alexander.h.duyck@intel.com \
--cc=davem@davemloft.net \
--cc=jeffrey.t.kirsher@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tgraf@suug.ch \
/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).