Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Mar 2012 14:19:35 -0700
From:      Julian Elischer <julian@freebsd.org>
To:        Arnaud Lacombe <lacombar@gmail.com>
Cc:        FreeBSD Net <freebsd-net@freebsd.org>
Subject:   Re: Netgraph message size limitation.
Message-ID:  <4F722EE7.50102@freebsd.org>
In-Reply-To: <CACqU3MW1Fywj7r%2BC-trmMB88X=jDft9D1azN7G_Vt2xT-FZ=zw@mail.gmail.com>
References:  <CACqU3MW1Fywj7r%2BC-trmMB88X=jDft9D1azN7G_Vt2xT-FZ=zw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 3/27/12 9:58 AM, Arnaud Lacombe wrote:
> Hi Julian,
>
> In `sys/netgraph/ng_base.c', there is the following:
>
> static int
> ng_generic_msg(node_p here, item_p item, hook_p lasthook)
> {
>      case NGM_BINARY2ASCII:
>        {
>          int bufSize = 20 * 1024; /* XXX hard coded constant */
>      [...]
>      case NGM_ASCII2BINARY:
>        {
>          int bufSize = 2000;      /* XXX hard coded constant */
>
> I put on the side the reasoning behind archie@ bump of one value and
> not the other 12 years ago. What I would like to know is why use
> harcoded, undocumented, limits. It seems to me that there is no way
> the code can do anything clever at this point wrt. size of the data
> coming in or out. All the allocation and buffer management should be
> done by the parser. If my type specify a 512 32bits array, I should be
> to pass this array. Thought ?
I have no real thoughts because Archie did the parser and I didn't 
really touch it.
However given that Netgraph was written for a specific set of jobs and 
that since then
people seem to have found all sorts of other things to do with it, it 
is quite possible that
we should revisit these limits.

regardless, they should probably be in the documentation..

I hope to get back to BSD work one of these years.. Until then, 
"patches accepted"..

> Thanks,
>   - Arnaud
>




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