Date: Fri, 18 May 2001 08:41:50 -0700 (PDT) From: Archie Cobbs <archie@dellroad.org> To: "Roman V. Palagin" <romanp@unshadow.net> Cc: freebsd-hackers@freebsd.org Subject: Re: How to transfer data from netgraph node to user program? Message-ID: <200105181541.f4IFfoq79682@arch20m.dellroad.org> In-Reply-To: <Pine.SOL.4.33.0105181351210.6629-100000@abyss.unshadow.net> "from Roman V. Palagin at May 18, 2001 02:15:13 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
Roman V. Palagin writes: > When size of collected data about 10Kb, all works fine. But when I need to > send 400Kb in reply - oops, ng_xxx_show_data() returns ENOBUFS (I think > because ng_socket receive queue is full, nobody reads from socket). So, I > don't understand how I can transfer large amount of data :-\ Any ideas? FreeBSD 4.x will not allow a context switch from within the kernel. Therefore, it is possible to overflow a socket if you keep adding data to it without leaving the kernel... because the user process never gets a chance to read the data. Maybe you can set a short timeout in your node after writing a certain amount of data, return, and then write some more when the timer goes off. -Archie __________________________________________________________________________ Archie Cobbs * Packet Design * http://www.packetdesign.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200105181541.f4IFfoq79682>