Skip to content

Commit

Permalink
modules/mqnic: Turn "TX ring ... full ..." message into netdev-relate…
Browse files Browse the repository at this point in the history
…d debug message

To not overwhelm any logging daemon. Full TX queues can be quite common
depending on a system's context and capabilities. Mostly all the details are not
required anyway in such cases.

To enable such debug messages and have their text turn up in dmesg and logging
daemons, the mqnic module has to be compiled with CPP symbol DEBUG being (`make
DEBUG=yes`) defined, or the kernel in use has to support "Dynamic Debug" [1]. In
the latter case all such debug messages in module mqnic can be enabled with:

echo 'module mqnic +pflmt' | sudo tee /sys/kernel/debug/dynamic_debug/control

To enable just this specific messages, based on its (partial) format:

echo 'format "TX ring %d full" +pflmt' | sudo tee /sys/kernel/debug/dynamic_debug/control

[1] https://www.kernel.org/doc/html/latest/admin-guide/dynamic-debug-howto.html

Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com>
  • Loading branch information
joft-mle authored and alexforencich committed Jul 7, 2023
1 parent 6a975f3 commit 1d72981
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/mqnic/mqnic_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ netdev_tx_t mqnic_start_xmit(struct sk_buff *skb, struct net_device *ndev)

stop_queue = mqnic_is_tx_ring_full(ring);
if (unlikely(stop_queue)) {
netdev_info(ndev, "%s: TX ring %d full on port %d",
netdev_dbg(ndev, "%s: TX ring %d full on port %d",
__func__, ring_index, priv->index);
netif_tx_stop_queue(ring->tx_queue);
}
Expand Down

0 comments on commit 1d72981

Please sign in to comment.