Revert "Revert a change to LinuxEthernetTap threading to eliminate out of order packet issues on some systems."

This reverts commit 0461b24db3.
This commit is contained in:
Adam Ierymenko 2021-06-28 17:59:28 -04:00
parent 547b0de8a5
commit 89ddf2991b
No known key found for this signature in database
GPG key ID: C8877CF2D7A5D7F3
2 changed files with 145 additions and 79 deletions

View file

@ -26,6 +26,7 @@
#include <mutex>
#include "../node/MulticastGroup.hpp"
#include "EthernetTap.hpp"
#include "BlockingQueue.hpp"
namespace ZeroTier {
@ -70,7 +71,12 @@ private:
int _shutdownSignalPipe[2];
std::atomic_bool _enabled;
std::atomic_bool _run;
std::thread _tapReaderThread;
std::thread _tapReaderThread[2];
std::thread _tapProcessorThread;
std::mutex _buffers_l;
std::mutex _thread_init_l;
std::vector<void *> _buffers;
BlockingQueue< std::pair<void *,int> > _tapq;
};
} // namespace ZeroTier