Re: [Linuxptp-devel] [PATCH v2 2/3] clock: dump unexpected packets received on the error queues of
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Jacob K. <jac...@in...> - 2020-06-18 20:43:34
|
On 6/18/2020 1:17 PM, Vladimir Oltean wrote: > On Thu, 18 Jun 2020 at 23:02, Jacob Keller <jac...@in...> wrote: >> >> >> >> On 6/18/2020 12:56 PM, Vladimir Oltean wrote: >>>> Could this use the pr facility, so that it honors the printing options >>>> to log to syslog and manages the level? >>>> >>>> I'm not sure what I would mark these as: debug because they no longer >>>> impact the syncing process, or true error because they are unexpected? >>>> >>>> Thanks, >>>> Jake >>>> >>> >>> Thanks a lot for looking at this. >>> Good point about redirecting to syslog, I did not think about that. >>> The reason why I did not use pr_err was due to the automatic line >>> ending, which would have unnecessarily complicated this function by >>> having me print each line of the packet to a temporary buffer first. >>> But now that I see there's no way around it, I guess I'll have to do >>> that. >> What about implementing this as part of pr.c? >> >> Thanks, >> Jake > > Not really sure what you mean. What would the prototype of the > function be (i.e. what would it do)? > > -Vladimir > I was thinking like something that would do a hexdump to a given print level. Perhaps that's overkill since not many places would need it... Thanks, Jake |