>On Friday 01 January 2016 16:25:59, Theo de Raadt wrote: >> dlg writes: >> > should we just do it unconditionally? is there a downside to that? > >It may decrease performance a tiny bit. Since such bits tend to add >up, I would be hesitant to enable the check for drivers that don't >need it. OTOH, freebsd and linux seem to always do the check.
How does it decrease performance? I tried to read the rest of what you wrote. It makes no sense. Since these mbufs are coming off a ring, aren't they already linear; aren't these mbufs already normalzed ie. "pulled up". The performance cost seems to be one condition in a mbuf macro which decides to do no work. Maybe you should show the diff which does the check in the driver itself, then then it will be easier to see the performance cost. Right now I can't perceive the problem.