From owner-freebsd-net Sat Nov 3 10:45: 9 2001 Delivered-To: freebsd-net@freebsd.org Received: from InterJet.dellroad.org (adsl-63-194-81-26.dsl.snfc21.pacbell.net [63.194.81.26]) by hub.freebsd.org (Postfix) with ESMTP id D1CDF37B416 for ; Sat, 3 Nov 2001 10:45:04 -0800 (PST) Received: from arch20m.dellroad.org (arch20m.dellroad.org [10.1.1.20]) by InterJet.dellroad.org (8.9.1a/8.9.1) with ESMTP id KAA86983; Sat, 3 Nov 2001 10:31:47 -0800 (PST) Received: (from archie@localhost) by arch20m.dellroad.org (8.11.6/8.11.6) id fA3IVl424031; Sat, 3 Nov 2001 10:31:47 -0800 (PST) (envelope-from archie) From: Archie Cobbs Message-Id: <200111031831.fA3IVl424031@arch20m.dellroad.org> Subject: Re: Mpd with a large number, 200+ , of bundles In-Reply-To: <3BE40BC8.9060504@ii.uib.no> "from Trond Davidsen at Nov 3, 2001 04:22:48 pm" To: Trond Davidsen Date: Sat, 3 Nov 2001 10:31:46 -0800 (PST) Cc: freebsd-net@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL82 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Trond Davidsen writes: > When I try to make 240 bundles, from the log, it seems mpd is makeing > all the nodes ok, but when I try to establish a connection nothing > happens, no respons, nothing in the log, and mpd is frozen and needs to > be killed with kill -9. And then it leaves 720 nodes behind which needs > to be removed manually. Hmmm.. sounds like a kernel problem (the fact that kill -9 is required). > > This is probably due to a fixed size buffer in the base netgraph > > code somewhere... it doesn't look like libnetgraph can generate > > an ENOBUFS on its own. Try running ngctl with one or more '-d' flags.. > > vpn-gw3# ngctl -d -d -d > Available commands: > config get or set configuration of node at > connect Connects hook of the node at to > debug Get/set debugging verbosity level > help Show command summary or get more help on a specific command > list Show information about all nodes > mkpeer Create and connect a new node to the node at "path" > msg Send a netgraph control message to the node at "path" > name Assign name to the node at > read Read and execute commands from a file > rmhook Disconnect hook "hook" of the node at "path" > show Show information about the node at > shutdown Shutdown the node at > status Get human readable status information from the node at > types Show information about all installed node types > quit Exit program > + list > ngctl: SENDING MESSAGE: > ngctl: SOCKADDR: { fam=32 len=4 addr="." } > ngctl: NG_MESG : > ngctl: vers 2 > ngctl: arglen 0 > ngctl: flags 0 > ngctl: token 1 > ngctl: cookie GENERIC (851672668) > ngctl: cmd 9 > ngctl: args (0 bytes) > ngctl: sendto(.): No buffer space available > ngctl: send msg: No buffer space available I think this error must be coming from the socket code. I wonder if increasing the receive buffer size on the netgraph socket would help.. try this patch for example: Index: main.c =================================================================== RCS file: /home/cvs/freebsd/src/usr.sbin/ngctl/main.c,v retrieving revision 1.4.2.3 diff -u -r1.4.2.3 main.c --- main.c 2001/01/09 06:52:25 1.4.2.3 +++ main.c 2001/11/03 18:29:33 @@ -145,6 +145,13 @@ if (NgMkSockNode(name, &csock, &dsock) < 0) err(EX_OSERR, "can't create node"); + { + int size = 128 * 1024; + + if (setsockopt(csock, SOL_SOCKET, SO_RCVBUF, &size, sizeof(size)) == -1) + err(1, "setsockopt"); + } + /* Do commands as requested */ if (ac == 0) { if (fp != NULL) { > When I create 240 bundles, mpd creates 720 netgraph nodes. > Is there a limit on how many nodes the netgraph system can handle? No hard limit internally, but there are limits on how large a control message you can jam through a socket. > Where is the netgraph system defined? i can find the modules under > /usr/src/sys/modules/netgraph, but I can't find the 'netgraph base system'. It's in /sys/netgraph/ng_base.c. -Archie __________________________________________________________________________ Archie Cobbs * Packet Design * http://www.packetdesign.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message