From ef881c942bc336e6864cc096e46b32c493cf68f2 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 30 Nov 2022 16:12:53 +0100 Subject: [PATCH] af-packet: output cleanups --- src/runmode-af-packet.c | 10 +++++----- src/source-af-packet.c | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/runmode-af-packet.c b/src/runmode-af-packet.c index 006e0a4cc0..7442332ed1 100644 --- a/src/runmode-af-packet.c +++ b/src/runmode-af-packet.c @@ -622,20 +622,20 @@ finalize: /* for cluster_flow use core count */ if (cluster_type == PACKET_FANOUT_HASH) { aconf->threads = (int)UtilCpuGetNumProcessorsOnline(); - SCLogPerf("%u cores, so using %u threads", aconf->threads, aconf->threads); + SCLogPerf("cluster_flow: %u cores, using %u threads", aconf->threads, aconf->threads); - /* for cluster_qm use RSS queue count */ + /* for cluster_qm use RSS queue count */ } else if (cluster_type == PACKET_FANOUT_QM) { int rss_queues = GetIfaceRSSQueuesNum(iface); if (rss_queues > 0) { aconf->threads = rss_queues; - SCLogPerf("%d RSS queues, so using %u threads", rss_queues, aconf->threads); + SCLogPerf( + "cluster_qm: %d RSS queues, using %u threads", rss_queues, aconf->threads); } } if (aconf->threads) { - SCLogPerf("Using %d AF_PACKET threads for interface %s", - aconf->threads, iface); + SCLogDebug("using %d threads for interface %s", aconf->threads, iface); } } if (aconf->threads <= 0) { diff --git a/src/source-af-packet.c b/src/source-af-packet.c index f2f8f3a5c9..ebea917db5 100644 --- a/src/source-af-packet.c +++ b/src/source-af-packet.c @@ -1570,9 +1570,9 @@ frame size: TPACKET_ALIGN(snaplen + TPACKET_ALIGN(TPACKET_ALIGN(tp_hdrlen) + siz ptv->req.v2.tp_block_nr = ptv->req.v2.tp_frame_nr / frames_per_block + 1; /* exact division */ ptv->req.v2.tp_frame_nr = ptv->req.v2.tp_block_nr * frames_per_block; - SCLogPerf("AF_PACKET RX Ring params: block_size=%d block_nr=%d frame_size=%d frame_nr=%d", - ptv->req.v2.tp_block_size, ptv->req.v2.tp_block_nr, - ptv->req.v2.tp_frame_size, ptv->req.v2.tp_frame_nr); + SCLogPerf("rx ring: block_size=%d block_nr=%d frame_size=%d frame_nr=%d", + ptv->req.v2.tp_block_size, ptv->req.v2.tp_block_nr, ptv->req.v2.tp_frame_size, + ptv->req.v2.tp_frame_nr); return 1; }