[prev in list] [next in list] [prev in thread] [next in thread]
List: ipfilter
Subject: Re: qif linklist
From: Biswajit Tripathy <tbiswajit () sbcglobal ! net>
Date: 2003-08-20 8:49:35
[Download RAW message or body]
Hi Daren
--- darrenr@reed.wattle.id.au wrote:
> > Hi,
> >
> > As I did not get any response to my last mail re
> > qif link list (attached below), let me try my luck
> > again by giving a little background :-)
> >
> > Currently, on HP-UX, the PFIL module uses autopush
> > to push itself over DLPI. This pushes PFIL into
> > any process that does a large number of open() to
> > /dev/dlpi, making the qif linklist very large.
> > I have had a system panic as it takes a long time
> > to execute the "for" loop under such circumstance
> > and the "spinlock is held too long". So I'm trying
> > to find a better "for" loop that does things
> > quicker.
>
> I think the correct solution here would be to not
> create or push the pfil module in this situation.
You are right. I'm trying to have a modified
"ifconfig" on HP-UX that would accept an option
to push PFIL in while bringing up the interface.
But the above problem can still show up when a large
number of interfaces are created using VLAN (is that
correct?).
> > > MUTEX_ENTER(&qif_mutex);
> > > qif->qf_q = q;
> > > qif->qf_oq = OTHERQ(q);
> > > i = 0;
> > > for (qf = qif_head; qf; qf = qf->qf_next)
> > > if (i == qf->qf_num) {
> > > i++;
> > > qf = qif_head;
> > > }
>
> An alternative might be to derive qf_num from the
> value of qif rather than searching for a value.
>
> Something like:
> i = (int)((intptr_t)qif & 0xffffffff);
> sprintf(qif->qf_name, sizeof(qif->qf_name),
> "QIF%x", i);
I'm sorry I don't really get this part. Are you
suggesting that I remove the entire for loop and
put in the above two lines? How would qif & ffffffff
give the value of i? Am I missing something
obvious here (it's going to be 2.00AM and I think
I need some sleep :-)) ?
- Biswajit
>
> Darren
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic