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
_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"