mbox series

[00/11] Use RTE_LOG_LINE in drivers

Message ID 20240907145433.1479091-1-david.marchand@redhat.com (mailing list archive)
Headers
Series Use RTE_LOG_LINE in drivers |

Message

David Marchand Sept. 7, 2024, 2:54 p.m. UTC
This is a continuation of the cleanup effort in logging macros.

As a reminder of what this series is about, RTE_LOG_LINE() has been
introduced to check that the format string does not contain a trailing \n.
The goal was to prevent from:
- introducing multilines log messages (ugly and unhelpful for lambda
  users),
- introducing double \n in logs,
- introducing missing \n in logs,

I have built/maintained this series for fixing drivers/ since the
beginning of the year and I hope we can merge this series early in
24.11.

Some drivers are not converted because of multiple inconsistencies
(like event/dlb2 where the _INFO/_ERR macros add an internal \n but
the _DBG macros does not).
Those may be fixed later.

As for the changes on lib/, new macros have been introduced so that
backports trigger a build error and force the backport to adjust the
patches containing logs accordingly.


Most of the changes have been done with some scripting, but it is likely
there are some errors and I hope driver maintainers will review in
depth.


A check is added for drivers/ in the hope that new drivers don't
introduce more mess.

Yet, sometimes it is not possible to fix macros (a good example 
is base/ drivers code...), so the check skips *osdep.h headers where
calls to RTE_LOG() may be accepted.