Subject: Re: [PATCH v3] filter: Optimize instruction revalidation code.

From: Hagen Paul Pfeifer <[email-masked]>
Date: Wed, 17 Nov 2010 10:01:56 +0100

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