static inline void LoopHandleTimeoutOnIdle(ThreadVars *tv)
{
- static uint64_t last_timeout_msec = 0;
+ static thread_local uint64_t last_timeout_msec = 0;
SCTime_t t = DPDKSetTimevalReal(&machine_start_time);
uint64_t msecs = SCTIME_MSECS(t);
if (msecs > last_timeout_msec + 100) {
*/
static inline bool RXPacketCountHeuristic(ThreadVars *tv, DPDKThreadVars *ptv, uint16_t nb_rx)
{
- static uint32_t zero_pkt_polls_cnt = 0;
+ static thread_local uint32_t zero_pkt_polls_cnt = 0;
if (nb_rx > 0) {
zero_pkt_polls_cnt = 0;
static inline void DPDKSegmentedMbufWarning(struct rte_mbuf *mbuf)
{
- static bool segmented_mbufs_warned = false;
+ static thread_local bool segmented_mbufs_warned = false;
if (!segmented_mbufs_warned && !rte_pktmbuf_is_contiguous(mbuf)) {
char warn_s[] = "Segmented mbufs detected! Redmine Ticket #6012 "
"Check your configuration or report the issue";
static void PeriodicDPDKDumpCounters(DPDKThreadVars *ptv)
{
- static time_t last_dump = 0;
+ static thread_local time_t last_dump = 0;
time_t current_time = DPDKGetSeconds();
/* Trigger one dump of stats every second */
if (current_time != last_dump) {