You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I want to write a module which looks something like:
in :: FromDevice(eth1)
q :: Queue
uq :: Unqueue
// do some processing here
out :: ToDevice(eth2)
in -> q -> uq -> processing here -> out
However, I want to do this in a mult-threaded way, assuming I have multiple processing threads. A packet comes on eth1, it is queued. Then I want it to be dequeued by whichever thread is currently not busy and so on. And then finally all threads push the packets out to eth2. I came across ThreadSafeQueue but I am not sure about the Unqueue part.
The text was updated successfully, but these errors were encountered:
Hello @AqsaKashaf, did you manage to do this;
I am starting to use click again after a long time and I am trying to figure out how can I do the same thing.
THis solution duplicates the processing pipeline because nearly no processing elements in "normal" Click is thread-safe, but you can have :
inq-> Stuff -> Stuff2 -> f :: Stuff3;
f -> p0;
f -> p1;
In that case Stuff and Stuff2 will be traversed by multiple threads which is fine for state-less elements.
My own thought : pipelining is a thing of the past when CPU had 4 cores... In no ways it scales with many-cores CPUs and high-speed links where a single core cannot act as the RX or TX core anyway. Use sharding instead, properly supported in FastClick. Or in Click duplicating the pipeline N times and handling manually the state reconcilation.
Hi, I want to write a module which looks something like:
in :: FromDevice(eth1)
q :: Queue
uq :: Unqueue
// do some processing here
out :: ToDevice(eth2)
in -> q -> uq -> processing here -> out
However, I want to do this in a mult-threaded way, assuming I have multiple processing threads. A packet comes on eth1, it is queued. Then I want it to be dequeued by whichever thread is currently not busy and so on. And then finally all threads push the packets out to eth2. I came across ThreadSafeQueue but I am not sure about the Unqueue part.
The text was updated successfully, but these errors were encountered: