On Wed, Feb 19, 2014 at 08:49:01PM +0200, Mikolaj Golub wrote:
M> > -SLIST_HEAD(pf_overload_head, pf_overload_entry);
M> > +struct pf_overload_head {
M> > + SLIST_HEAD(, pf_overload_entry) head;
M> > + struct vnet *vnet;
M> > +};
M> > static VNET_DEFINE(struct pf_overload_head, pf_overloadqueue);
M> > #define V_pf_overloadqueue VNET(pf_overloadqueue)
M>
M> ...
M>
M> > - SLIST_INIT(&V_pf_overloadqueue);
M> > + SLIST_INIT(&V_pf_overloadqueue.head);
M> > TASK_INIT(&V_pf_overloadtask, 0, pf_overload_task, &V_pf_overloadqueue);
M> > + V_pf_overloadqueue.vnet = curvnet;
M>
M> Why not pass vnet as a context to pf_overload_task instead of
M> &V_pf_overloadqueue? Then you would not need this hack with storing a
M> vnet inside a vnet variable.
Yes, that would look much better.
The pf_overloadqueue can be made global after that. Its lock is
already global.
--
Totus tuus, Glebius.
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"