From: Phil Sutter <phil@nwl.cc>
To: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Stephen Hemminger <shemming@brocade.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [iproute PATCH 3/3] tc: pedit: Fix retain value for ihl adjustments
Date: Mon, 7 Mar 2016 13:57:44 +0100 [thread overview]
Message-ID: <20160307125744.GC13481@orbyte.nwl.cc> (raw)
In-Reply-To: <56DD642D.8010401@mojatatu.com>
Hi,
On Mon, Mar 07, 2016 at 06:21:17AM -0500, Jamal Hadi Salim wrote:
> On 16-03-03 09:32 AM, Phil Sutter wrote:
> >> The patches look good to me. Phil, maybe get rid of that comment at the
> >> top which was worrying about endianness. I think you fixed it.
> >
> > I'm not so sure. The kernel explicitly takes care to get the bit
> > ordering right:
> >
> [..]
> > act_pedit though just mangles the whole byte as-is, and if that was
> > correct, we would not have to go that extra mile in struct iphdr, or do
> > we?
> >
>
> I meant in general - the note to say that there are endianes issues
> should go.
Sorry, I didn't get that yet: To me it looks as if on a big-endian
system, the code will actually change the Version field instead of IHL.
Probably the proof of the pudding is in the eating, so I'll try to get
access to a big-endian system for testing.
> >> These would of course require more of a larger setup to vet
> >> and running tcpdump to check the correct bytes are being
> >> modified.
> >
>
> Indeed - That is how i normally would test. It is more complex.
> Your scheme is good - but will not catch a kernel bug.
Sure. OTOH the algorithm in act_pedit is not overly complex. Plus,
fixing one side only prevents accidental workarounds of other side's
bugs.
> > Since I am lazy, I wanted to have as much automation as possible while
> > testing. Therefore I just assumed that act_pedit does the right thing
> > all the time,
>
> famous last words ;->
:)
> > and iproute just has to feed it correct values. Given the
> > scope of this patch, this is also completely sufficient. Of course, the
> > tests/ directory would benefit more from a full test. But since
> > automation then becomes tricky, I'm not sure it makes much sense to
> > deliberately write code for that.
> >
>
> Your test is still useful and i think should go into the tests dir.
OK, I'll give it a thought.
Thanks, Phil
prev parent reply other threads:[~2016-03-07 12:57 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-02 11:20 [iproute PATCH 0/3] tc: pedit fixes Phil Sutter
2016-03-02 11:20 ` [iproute PATCH 1/3] tc: pedit: Fix layered op parsing Phil Sutter
2016-03-02 11:20 ` [iproute PATCH 2/3] tc: pedit: Fix parse_cmd() Phil Sutter
2016-03-02 11:20 ` [iproute PATCH 3/3] tc: pedit: Fix retain value for ihl adjustments Phil Sutter
[not found] ` <499abfe479324d1e83289cd68b2a7641@HQ1WP-EXMB11.corp.brocade.com>
2016-03-02 17:54 ` Stephen Hemminger
2016-03-02 18:45 ` [iproute PATCH v2 0/4] tc: pedit fixes Phil Sutter
2016-03-02 18:45 ` [iproute PATCH v2 1/4] tc: pedit: Fix layered op parsing Phil Sutter
2016-03-02 18:45 ` [iproute PATCH v2 2/4] tc: pedit: Fix parse_cmd() Phil Sutter
2016-03-02 18:45 ` [iproute PATCH v2 3/4] tc: pedit: Fix retain value for ihl adjustments Phil Sutter
2016-03-02 18:45 ` [iproute PATCH v2 4/4] tc/p_ip.c: Lint through checkpatch.pl Phil Sutter
2016-03-02 19:05 ` [iproute PATCH v2 0/4] tc: pedit fixes Stephen Hemminger
2016-03-02 19:23 ` Phil Sutter
[not found] ` <fd3bfe390dda465ab0d6b758553a9b04@HQ1WP-EXMB11.corp.brocade.com>
2016-03-21 19:21 ` [iproute PATCH v2 4/4] tc/p_ip.c: Lint through checkpatch.pl Stephen Hemminger
2016-03-03 14:21 ` [iproute PATCH 3/3] tc: pedit: Fix retain value for ihl adjustments Jamal Hadi Salim
2016-03-03 14:28 ` Jamal Hadi Salim
2016-03-03 14:54 ` Phil Sutter
2016-03-03 14:32 ` Phil Sutter
2016-03-07 11:21 ` Jamal Hadi Salim
2016-03-07 12:57 ` Phil Sutter [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=20160307125744.GC13481@orbyte.nwl.cc \
--to=phil@nwl.cc \
--cc=jhs@mojatatu.com \
--cc=netdev@vger.kernel.org \
--cc=shemming@brocade.com \
/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).