[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fb1f2f80c2a0663226799d4fa345d0f8@localhost>
Date: Wed, 17 Nov 2010 10:01:56 +0100
From: Hagen Paul Pfeifer <hagen@...u.net>
To: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
Cc: <eric.dumazet@...il.com>, <mjt@....msk.ru>, <davem@...emloft.net>,
<drosenberg@...curity.com>, <xiaosuo@...il.com>,
<netdev@...r.kernel.org>
Subject: Re: [PATCH v3] filter: Optimize instruction revalidation code.
On Wed, 17 Nov 2010 17:06:10 +0900, Tetsuo Handawrote:
> If compilers can generate better code for continuous case values
> than discontinuous case values, then keeping BPF_S_* makes sense.
Yes, this is crucial. A compiler cannot generate a jump table of O(1) for
dense labels. The BPF_S_* translation was done to convert to a dense label
construct. So this "optimization" is a no-go.
Look at the log and read my comment for a detailed explanation.
Anyway: "code--" increments the _copied_ value, not the value in the
evaluated opcode itself. I will validate the patch!
Hagen
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists