if (connected && !threadStarted.test_and_set()) {
#ifdef HAVE_XSK
if (xskInfo != nullptr) {
- tid = std::thread(dnsdist::xsk::XskResponderThread, shared_from_this());
- }
- else {
- tid = std::thread(responderThread, shared_from_this());
+ auto xskResponderThread = std::thread(dnsdist::xsk::XskResponderThread, shared_from_this());
+ if (!d_config.d_cpus.empty()) {
+ mapThreadToCPUList(xskResponderThread.native_handle(), d_config.d_cpus);
+ }
+ xskResponderThread.detach();
}
-#else
- tid = std::thread(responderThread, shared_from_this());
#endif /* HAVE_XSK */
+ auto tid = std::thread(responderThread, shared_from_this());
if (!d_config.d_cpus.empty()) {
mapThreadToCPUList(tid.native_handle(), d_config.d_cpus);
}
-
tid.detach();
}
}
uint32_t words[3];
};
};
- struct ipv4_pseudo_header_t pseudo_header{};
+ ipv4_pseudo_header_t pseudo_header{};
static_assert(sizeof(pseudo_header) == 12, "IPv4 pseudo-header size is incorrect");
/* Fill in the pseudo-header. */
uint32_t words[10];
};
};
- struct ipv6_pseudo_header_t pseudo_header{};
+ ipv6_pseudo_header_t pseudo_header{};
static_assert(sizeof(pseudo_header) == 40, "IPv6 pseudo-header size is incorrect");
/* Fill in the pseudo-header. */