From: Thomas Peter-apt090 (apt090@motorola.com)
Date: Wed Jan 24 2001 - 13:01:25 EST
I have a few questions concerning the send and recv functions. I would like a way to cut down on the number of instructions that it takes to read in a packet from a socket's input buffer. Ideally, instead of passing a pointer to memory and having the data copied into my buffer I would simply like to grab the address in memory that points to the next packet for the socket and the length of the packet. Then there would be a seperate function that says that that packet has been used and can be overwritten by an incoming packet. It seems like one way to do this would be to go all the way down to the driver level and just grab packets as they come in, but I would prefer that the kernel be allowed to do all the TCP acknowledgement stuff and packet ordering so that I don't have to. I woud literally like 4 functions: int getNextInputBuffer(int fd, void **pntr_to_buf); //returns length of buffer that pntr_to_buf points to void removeNextInputFromQue(int fd, int len); //remove the next message from the input que, either freeing the memory it used or overwriting it int getNextOutputBuffer(int fd, void **pntr_to_buf); //put a packet into the output que, return max_len void putOutputBufferInOuputQue(int fd, int len); //this will put the next completely filled message into the output que I think this is the minimum number of functions I would need. The reason for this is that I have a vocoder that wants an 8khz clock to drive it. I changed a few pieces of the kernel, added an interrupt handler and now I have a hard 8khz. I either feed in 16000 PCM bits of data and get out 900 bytes of compressed data or I feed in 900 bytes and get out 16000. Either way I have to get that data between the board and a host machine. Unfortunately the interrupt eats up a lot of cpu time so there is not much time for getting the data which comes over the ethernet to the interrupt service routine. I am unsure that the data is even in a buffer in the kernel by the time I need it, but if it is it still takes a good amount of time to move the 16000 bytes a second needed to keep up with the interrupt. It can't even keep up with 900 bytes a second. After that long winded rant, what I would like to know is 1) is there anything that does something similar, 2) are these functions po! ! ! ssible, and 3) where is the best place to start looking to make the necessary changes. Any help would be greatly appreciated. Peter Thomas This message resent by the uclinux-dev@uclinux.org list server http://www.uClinux.org/
This archive was generated by hypermail 2.1.4 : Thu Sep 19 2002 - 13:19:27 EDT