Hi, First of all happy new year, etc. =)
My problem: I'm writing a device driver kernel module that uses kernel level sosend() from the d_write write() function. But it runs out of bufferspace (error 55) when I really stress it (sending 15 megs in 3-4 secs over UDP with 32 or 60K packets). Thing is, my mbufs are fine, peak is 1/3rd of max. I also use sowriteable() to check if it's safe to send, and sbspace() tells me I have the full 128K sndbuf that I configured available. So I have 2 questions... 1) which buffers are there that I can run out of here and where can I check their status? 2) Should I free() the uio I get from userspace after I have passed it to the sosend? Side note on 1): after I run out of bufferspace with my little driver the box continues to function fine as far as I can tell, except that mount_smbfs has trouble: [ root@hera:~ ] # truss mount -t smbfs //drwilco@ceres/D$ /ceres/d_drive/ readlink("/etc/malloc.conf",0xbfbffa94,63) ERR#2 'No such file or directory' mmap(0x0,4096,0x3,0x1002,-1,0x0) = 671551488 (0x28071000) break(0x807c000) = 0 (0x0) break(0x807d000) = 0 (0x0) open(".",0,00) = 3 (0x3) chdir(0xbfbff090) = 0 (0x0) sigaction(SIGSYS,0xbfbfeaac,0xbfbfea94) = 0 (0x0) __getcwd(0xbfbff090,0x400) = 0 (0x0) sigaction(SIGSYS,0xbfbfea94,0x0) = 0 (0x0) fchdir(0x3) = 0 (0x0) close(3) = 0 (0x0) stat("/ceres/d_drive",0xbfbfeff4) = 0 (0x0) fork() = 3331 (0xd03) smbfs: can't get server address: syserr = No buffer space available SIGNAL 20 wait4(0xd03,0xbfbff088,0x0,0x0) = 3331 (0xd03) exit(0x1) process exit, rval = 256 A different tactic could be that I pull a m_devget() or some other mbuf creation stunt and copy the data from the uio into the mbuf. Do I have to clear the mbuf and/or uio after passing that mbuf to sosend? Any pointers (even to some docs, though I've done heavy googling) or hints would be greatly appreciated. DocWilco To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message