Skip to content

Commit 11af1e8

Browse files
committed
acl: only dump unmatched packets in DEBUG level
Not only was the log unconditional, the amount of it can be unberable in production.
1 parent 0691ff2 commit 11af1e8

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

lib/acl.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,11 @@ drop_unmatched_pkts(struct rte_mbuf **pkts, unsigned int num_pkts,
4343
* Gatekeeper down since Gatekeeper does a lot of
4444
* processing to eventually discard these packets.
4545
*/
46-
G_LOG(WARNING,
47-
"acl: a packet failed to match any ACL rules, the whole packet is dumped below:\n");
48-
rte_pktmbuf_dump(log_file, pkts[i], pkts[i]->pkt_len);
46+
if (unlikely(G_LOG_CHECK(DEBUG))) {
47+
G_LOG(DEBUG,
48+
"acl: a packet failed to match any ACL rules, the whole packet is dumped below:\n");
49+
rte_pktmbuf_dump(log_file, pkts[i], pkts[i]->pkt_len);
50+
}
4951
rte_pktmbuf_free(pkts[i]);
5052
}
5153

0 commit comments

Comments
 (0)