]> git.baikalelectronics.ru Git - kernel.git/commit
net-core: use netdev_* calls for kernel messages
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Tue, 19 Oct 2021 16:42:28 +0000 (09:42 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Oct 2021 13:30:34 +0000 (14:30 +0100)
commit82e10a999fc94c6915027d159ba58345c6f9721b
tree55857b775615133ce73c65ba2137eb57ee2de3d9
parentafabea96d2df12c026faaa9a9457f2f2351855a0
net-core: use netdev_* calls for kernel messages

While loading a driver and changing the number of queues, I noticed this
message in the kernel log:

"[253489.070080] Number of in use tx queues changed invalidating tc
mappings. Priority traffic classification disabled!"

But I had no idea what interface was being talked about because this
message used pr_warn().

After investigating, it appears we can use the netdev_* helpers already
defined to create predictably formatted messages, and that already handle
<unknown netdev> cases, in more of the messages in dev.c.

After this change, this message (and others) will look like this:
"[  170.181093] ice 0000:3b:00.0 ens785f0: Number of in use tx queues
changed invalidating tc mappings. Priority traffic classification
disabled!"

One goal here was not to change the message significantly from the
original format so as to not break user's expectations, so I just
changed messages that used pr_* and generally started with %s ==
dev->name.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c