On 4/29/05, Martin Jambor <jamborm@xxxxxxxxx> wrote: > My first thought would be to use a semaphore, myTx would be upping it > after it has added an element to the work queue and myDeliver would > use down to wait for another item to arrive. Please note that you need > to protect queue manipulation with a separate lock as well so take > care of a potential deadlock. Thanks for the reply. Yeah, I think as far as formulation goes, it fits in nicely as a producer consumer problem, but there might be more to it. As far as queue locking goes, since I am talking about packets, I can just use the skb_(de)queue and other functions in the kernel API, which take care of locking? I am not sure if semaphore is the right way, especially when you are talking about having to use the function to process something like 2000+ packets per second. So, I was thinking a tasklet might be the best way, also since I expect to have not more than one instance of myDeliver() at any time? Once again, I have no experience here, so could be very wrong. Would appreciate any kind of advice, even if not directly relavant. -- Chandrakanth Chereddi. ECE-UIUC. -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/