[Linuxptp-devel] [PATCH RFC 1/2] util: add function for rate limiting.

2015-09-07 Thread Miroslav Lichvar
--- util.c | 14 ++ util.h | 18 ++ 2 files changed, 32 insertions(+) diff --git a/util.c b/util.c index 6bbbe91..e10cedc 100644 --- a/util.c +++ b/util.c @@ -512,3 +512,17 @@ void parray_extend(void ***a, ...) va_end(ap); (*a)[len - 1] = NULL; } + +in

[Linuxptp-devel] [PATCH RFC 2/2] port: print bogus delay request message as rate limited info.

2015-09-07 Thread Miroslav Lichvar
Upgrade the message level to info so the user can see it, but print it at most once per 5 minutes to not spam the syslog. --- port.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/port.c b/port.c index 9c804cf..527cd6b 100644 --- a/port.c +++ b/port.c @@ -1688,8 +1688,8 @@