Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Jan 1997 11:36:06 -0800 (PST)
From:      Archie Cobbs <archie@whistle.com>
To:        julian@whistle.com (Julian Elischer)
Cc:        proff@iq.org, hackers@freebsd.org
Subject:   Re: divert code not thread/smp compatible
Message-ID:  <199701021936.LAA26380@bubba.whistle.com>
In-Reply-To: <32C858F6.41C67EA6@whistle.com> from Julian Elischer at "Dec 30, 96 04:06:14 pm"

next in thread | previous in thread | raw e-mail | index | archive | help

> > /*
> >  * ip_input() and ip_output() set this secret value before calling us to
> >  * let us know which divert port to divert a packet to; this is done so
> >  * we can use the existing prototype for struct protosw's pr_input().
> >  * This is stored in host order.
> >  */
> > u_short ip_divert_port;
> > 
> > /*
> >  * We set this value to a non-zero port number when we want the call to
> >  * ip_fw_chk() in ip_input() or ip_output() to ignore ``divert <port>''
> >  * chain entries. This is stored in host order.
> >  */
> > u_short ip_divert_ignore;
> > 
> > Is this an acceptable trick in the FreeBSD kernel, passing parameters
> > with global variables?
> > 
> > -Julian <proff@iq.org>

My only excuse is that at the time I started writing the divert code,
it wasn't planned on being checked in to the main branch, but instead
was going to be a patch to be applied locally... so I tried to keep
the patch as small as possible... and as a result committed some
non-esthetically pleasing programming in the process... :-)

Any suggestions on the best way to properly threadify this?

Thanks,
-Archie

___________________________________________________________________________
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701021936.LAA26380>