[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 3 Mar 2016 15:54:31 +0100
From: Phil Sutter <phil@....cc>
To: Jamal Hadi Salim <jhs@...atatu.com>
Cc: Stephen Hemminger <shemming@...cade.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [iproute PATCH 3/3] tc: pedit: Fix retain value for ihl
adjustments
On Thu, Mar 03, 2016 at 09:28:27AM -0500, Jamal Hadi Salim wrote:
> Phil, there is one thing i noticed in your patch - dont think
> it is a big deal but you are doing htons on an int
> (instead of u16).
Indeed, I totally overlooked that. Does not look like there's an easy
fix though, as all tc_pedit_key fields are u32. OTOH htons() will cast
to u16 first, therefore cutting off any higher bits. Looks like the code
does the right thing anyway, and the test results fortify that.
Do you see a cleaner way to implement this? Otherwise I would vote for
leaving it as a little surprise to future readers. ;)
Cheers, Phil
Powered by blists - more mailing lists