On 10/02/08 18:14, Sebastien Roy wrote:
> On Thu, 2008-10-02 at 16:58 -0700, Erik Nordmark wrote:
>
>> I've merged again with clearview, and I see that since last time we've
>> gone from
>> if (ipst->ips_ipnet_cb_list) {
>> to
>> if (list_head(&ipst->ips_ipobs_cb_list) != NULL) {
>>
>> for every packet that is transmitted, received, or looped back.
>>
>> I think this needs to be restructured so that the check in the datapaths
>> is just one load, one test, and one branch instruction.
>>
>
> Agreed, we should have a boolean in ipst in addition to the callback
> list itself to improve this. This is easy to fix.
>
Without wanting to be too much of a devil, now that the multi-callback
problem is solved with pfhooks, shouldn't the infrastructure like this
that supports ipobs perhaps be revisited? For example, the data path
hooks for packets use a macro, FW_HOOKS(), that starts like this:
if ((_hook).he_interested) { \
...
Cheers,
Darren
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://mail.opensolaris.org/pipermail/clearview-discuss/attachments/20081003/579228bb/attachment.html>