[Linuxptp-devel] [PATCH pm 07/12] port: Added pm collection for port statistics

2018-04-06 Thread Anders Selhammer
This patch adds the pm data collection for the specific port. Signed-off-by: Anders Selhammer --- clock.c| 4 port.c | 61 ++ port.h | 9 + port_private.h | 4 4 files

[Linuxptp-devel] [PATCH pm 00/12] Performance Monitoring

2018-04-06 Thread Anders Selhammer
I stumbled over the suggested solution to monitor the performance of the network and of the network elements when I reviewed a draft for IEEE1588 v2.1. This set of patches implements the collection and local storage of the data needed for this performance measurement according to Annex M in the

[Linuxptp-devel] [PATCH pm 05/12] pm: Added pm.c including pm storage handling

2018-04-06 Thread Anders Selhammer
This patch adds pm.c which includes handling of pm data. Each 15 minute, the data is stored in 15 minute and 24 hour recordlists. 24 hour recordlist stores the last complete 24 hour cycle and the ongoing. 15 minute recordlist stores the last 96 complete 15 minute cycles. Signed-off-by: Anders

[Linuxptp-devel] [PATCH pm 11/12] port: Update pm recordlist

2018-04-06 Thread Anders Selhammer
When pm timer expires, the collected data should be stored in recordlist. Signed-off-by: Anders Selhammer --- clock.c| 15 ++- port.c | 19 +++ port.h | 18 +- port_private.h | 1 + 4 files changed,

[Linuxptp-devel] [PATCH pm 08/12] util: Move utility function set_tmo_lin from port to util

2018-04-06 Thread Anders Selhammer
The file, port.c, contains utility functions for setting timers. We will want to call one of this functions from clock.c so this patch moves the utility function where they belong. Signed-off-by: Anders Selhammer --- port.c | 10 -- port.h | 13 -

[Linuxptp-devel] [PATCH pm 10/12] clock: Update pm recordlist

2018-04-06 Thread Anders Selhammer
When pm timer expires, the collected data should be stored in recordlist. Signed-off-by: Anders Selhammer --- clock.c | 28 +++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/clock.c b/clock.c index 7e92958..6575130 100644 ---

[Linuxptp-devel] [PATCH pm 04/12] stats: Added copy and combine help funktions

2018-04-06 Thread Anders Selhammer
Methods for copy and combine stats structs is needed for PM Signed-off-by: Anders Selhammer --- stats.c | 19 +++ stats.h | 14 ++ 2 files changed, 33 insertions(+) diff --git a/stats.c b/stats.c index 41136f0..1ec88d5 100644 --- a/stats.c

[Linuxptp-devel] [PATCH pm 01/12] port: Fix coding style

2018-04-06 Thread Anders Selhammer
Signed-off-by: Anders Selhammer --- port.c | 70 +++--- 1 file changed, 46 insertions(+), 24 deletions(-) diff --git a/port.c b/port.c index cee6445..4ec8b70 100644 --- a/port.c +++ b/port.c @@ -330,8 +330,9

[Linuxptp-devel] [PATCH] port: fix buffer overflow in net_sync_resp_append()

2018-04-06 Thread Miroslav Lichvar
The PortAddress structure has no space for the actual address and should be used only as a pointer to a larger buffer. The issue was reported by gcc with enabled source fortification. Signed-off-by: Miroslav Lichvar --- port.c | 28 +++- 1 file

[Linuxptp-devel] [PATCH pm 06/12] clock: Added pm collection for clock statistics

2018-04-06 Thread Anders Selhammer
This patch adds the pm data collection based on data from the active slave port. Signed-off-by: Anders Selhammer --- clock.c | 46 ++ clock.h | 7 +++ 2 files changed, 53 insertions(+) diff --git a/clock.c b/clock.c

[Linuxptp-devel] [PATCH pm 03/12] pm: Added pm.h including struct for pm storage

2018-04-06 Thread Anders Selhammer
This patch adds pm.h which includes structs for performance monitoring in a PTP network. The monitoring is according to Annex M in draft for v2.1 of the ieee1588 standard Signed-off-by: Anders Selhammer --- pm.h | 99

[Linuxptp-devel] [PATCH pm 02/12] clock: Fix coding style

2018-04-06 Thread Anders Selhammer
Signed-off-by: Anders Selhammer --- clock.c | 36 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/clock.c b/clock.c index bc67fb4..8e7af0d 100644 --- a/clock.c +++ b/clock.c @@ -276,8 +276,9 @@ void

[Linuxptp-devel] [PATCH pm 09/12] clock: Added pm timer

2018-04-06 Thread Anders Selhammer
15 minutes timer is added for pm cycle. Signed-off-by: Anders Selhammer --- clock.c | 46 -- 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/clock.c b/clock.c index ee5f855..7e92958 100644 --- a/clock.c +++

[Linuxptp-devel] [PATCH pm 12/12] Add a configuration file option to enable the Performance Monitoring

2018-04-06 Thread Anders Selhammer
Signed-off-by: Anders Selhammer --- clock.c | 2 ++ config.c| 1 + default.cfg | 1 + gPTP.cfg| 1 + ptp4l.8 | 9 + 5 files changed, 14 insertions(+) diff --git a/clock.c b/clock.c index 37959e7..78a93fc 100644 --- a/clock.c +++ b/clock.c @@

Re: [Linuxptp-devel] [PATCH 1/2] port: Fix coding style

2018-04-06 Thread Anders Selhammer
Thursday, April 5, 2018 10:47 PM > I appreciate the gesture, but I won't take mega- coding style patches. > It is too hard to review. One misplaced brace, and... you know what > happens. > I will take small coding style fixes as part of new development. Ok, then I know. Got bored to make this

Re: [Linuxptp-devel] [PATCH] port: fix buffer overflow in net_sync_resp_append()

2018-04-06 Thread Richard Cochran
On Fri, Apr 06, 2018 at 12:30:08PM +0200, Miroslav Lichvar wrote: > The PortAddress structure has no space for the actual address and should > be used only as a pointer to a larger buffer. Oh man, Sloppy! Time for 1.9.2. > @@ -403,32 +403,34 @@ static int net_sync_resp_append(struct port *p,

Re: [Linuxptp-devel] [PATCH] port: fix buffer overflow in net_sync_resp_append()

2018-04-06 Thread Richard Cochran
On Fri, Apr 06, 2018 at 05:13:11PM +0200, Miroslav Lichvar wrote: > That's definitely better. Will you fix the patch, or would you like me > to send v2? I'll fix it. Thanks, Richard -- Check out the vibrant tech