Compare commits
3 commits
main
...
jh-fix-bsd
Author | SHA1 | Date | |
---|---|---|---|
|
d34481d830 | ||
|
4920b68d2c | ||
|
5ce3d1e7a1 |
2 changed files with 6 additions and 3 deletions
|
@ -431,10 +431,12 @@ void BSDEthernetTap::threadMain()
|
|||
// constructing itself.
|
||||
Thread::sleep(500);
|
||||
|
||||
for (unsigned int i = 0; i < _concurrency; ++i) {
|
||||
_rxThreads.push_back(std::thread([this, i, _pinning] {
|
||||
bool pinning = _pinning;
|
||||
|
||||
if (_pinning) {
|
||||
for (unsigned int i = 0; i < _concurrency; ++i) {
|
||||
_rxThreads.push_back(std::thread([this, i, pinning] {
|
||||
|
||||
if (pinning) {
|
||||
int pinCore = i % _concurrency;
|
||||
fprintf(stderr, "Pinning thread %d to core %d\n", i, pinCore);
|
||||
pthread_t self = pthread_self();
|
||||
|
|
|
@ -2599,6 +2599,7 @@ public:
|
|||
fprintf(stderr,"WARNING: using manually-specified secondary and/or tertiary ports. This can cause NAT issues." ZT_EOL_S);
|
||||
}
|
||||
_portMappingEnabled = OSUtils::jsonBool(settings["portMappingEnabled"],true);
|
||||
_node->setLowBandwidthMode(OSUtils::jsonBool(settings["lowBandwidthMode"],false));
|
||||
#if defined(__LINUX__) || defined(__FreeBSD__)
|
||||
_multicoreEnabled = OSUtils::jsonBool(settings["multicoreEnabled"],false);
|
||||
_concurrency = OSUtils::jsonInt(settings["concurrency"],1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue