[Linuxptp-devel] [PATCH_SNMP 2/6] pmc: Move new common funtionality into pmc_common

2018-05-24 Thread Anders Selhammer
Code from pmc.c will be reused by new snmpd.c in later commit. Signed-off-by: Anders Selhammer <anders.selham...@est.tech> --- pmc.c| 299 +-- pmc_common.c

[Linuxptp-devel] [PATCH_SNMP 6/6] snmpd: Add data collection from ptp4l program for one mib get request

2018-05-24 Thread Anders Selhammer
One mib object is initialized in master agent and data is received from ptp4l. Signed-off-by: Anders Selhammer <anders.selham...@est.tech> --- makefile | 4 +- ptpbase_mib.c | 130 ++ ptpbase_mib.h | 30 ++ s

[Linuxptp-devel] [PATCH_SNMP 5/6] snmpd: Added communication to ptp4l via the UDS port.

2018-05-24 Thread Anders Selhammer
UDS transport is configured using pmc_common funtions. Signed-off-by: Anders Selhammer <anders.selham...@est.tech> --- makefile | 3 +- snmpd.c | 95 ++-- 2 files changed, 95 insertions(+), 3 deletions(-) diff --git a/make

[Linuxptp-devel] [PATCH_SNMP 0/6] Add support of snmp

2018-05-24 Thread Anders Selhammer
Add of the first step of supporting SNMP communication to linuxptp. This patchset only adds the basics for SNMP. The support of published MIBs will be added later on. Anders Selhammer (6): pmc: Refactoring of in arguments in pmc_create pmc: Move new common funtionality into pmc_common pdt

[Linuxptp-devel] [PATCH_SNMP 3/6] pdt: Added check if already defined

2018-05-24 Thread Anders Selhammer
TRUE and FALSE is also defined in net-snmp library. Without this check, compilation and includes must be made in a certain order. Signed-off-by: Anders Selhammer <anders.selham...@est.tech> --- pdt.h | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pdt.h b/pdt.h

[Linuxptp-devel] [PATCH_SNMP 1/6] pmc: Refactoring of in arguments in pmc_create

2018-05-24 Thread Anders Selhammer
Attributes are global ones in config file which also is an in argument Signed-off-by: Anders Selhammer <anders.selham...@est.tech> --- phc2sys.c| 4 +--- pmc.c| 6 ++ pmc_common.c | 21 +++-- pmc_common.h | 1 - 4 files changed, 14 insertions(+), 18 del

[Linuxptp-devel] [PATCH_SNMP 4/6] snmpd: Add snmp sub agent

2018-05-24 Thread Anders Selhammer
The sub agent use net-snmp library and AgentX protocol for the communication towards the snmp master agent. Signed-off-by: Anders Selhammer <anders.selham...@est.tech> --- makefile | 12 snmpd.c| 57 + snmpd.con

Re: [Linuxptp-devel] [PATCH 6/9] Introduce unicast client logic.

2018-06-07 Thread Anders Selhammer
Thursday, June 7, 2018 6:18 PM > In unicast_client_set_renewal() we take the minimum of the old > renewal_tmo and the new one. > > tmo = now.tv_sec + duration; > if (!master->renewal_tmo || tmo < master->renewal_tmo) { > master->renewal_tmo = tmo; > } > Then, when

[Linuxptp-devel] [PATCH_SNMP_v3 4/5] snmpd: Added communication to ptp4l via the UDS port.

2018-06-18 Thread Anders Selhammer
UDS transport is configured using pmc_common functions. Signed-off-by: Anders Selhammer --- makefile | 3 +- snmpd.c | 102 +-- 2 files changed, 102 insertions(+), 3 deletions(-) diff --git a/makefile b/makefile index ed5c554

[Linuxptp-devel] [PATCH_SNMP_v3 2/5] pdt: Added check if already defined

2018-06-18 Thread Anders Selhammer
TRUE and FALSE is also defined in net-snmp library. Without this check, compilation and includes must be made in a certain order. Signed-off-by: Anders Selhammer --- pdt.h | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pdt.h b/pdt.h index 29ffbb5..e46b218 100644

Re: [Linuxptp-devel] [PATCH_SNMPD_v2 4/6] snmpd: Add snmp sub agent

2018-06-18 Thread Anders Selhammer
Friday, June 15, 2018 4:36 PM > This won't work. The 'dirs' are only the built in include paths from > gcc, and the sysroot containing net-snmp-config will be somewhere > else. > Let's try something else: > If CROSS_COMPILE is empty, just test `which net-snmp-config`, and if > it doesn't fail,

[Linuxptp-devel] [PATCH_SNMP_v3 1/5] pmc: Move new common funtionality into pmc_common

2018-06-18 Thread Anders Selhammer
Code from pmc.c will be reused by new snmpd.c in later commit. Signed-off-by: Anders Selhammer --- pmc.c| 299 +-- pmc_common.c | 294 ++ pmc_common.h | 9 ++ 3 files

[Linuxptp-devel] [PATCH_SNMP_v3 3/5] snmpd: Add snmp sub agent

2018-06-18 Thread Anders Selhammer
compilation. configs/snmpd.conf should be placed in /etc/snmp/ Signed-off-by: Anders Selhammer --- configs/snmpd.conf | 26 + incdefs.sh | 16 ++- ldlibs.sh | 44 + makefile | 11 --- optprg.sh

[Linuxptp-devel] [PATCH_SNMP_v3 0/5] Add support of snmp

2018-06-18 Thread Anders Selhammer
Add of the first step of supporting SNMP communication to linuxptp. This patchset only adds the basics for SNMP. The support of published MIBs will be added later on. Support of cross compilation will also be included later on. Anders Selhammer (5): pmc: Move new common funtionality

Re: [Linuxptp-devel] [PATCH_SNMPD_v2 4/6] snmpd: Add snmp sub agent

2018-06-15 Thread Anders Selhammer
Thursday, June 14, 2018 6:40 AM > This won't work when cross compiling. That is an important use case, > and we should support it. Will do the check like done for clock_adjtime user_flags() { # Needed for vasprintf(). printf " -D_GNU_SOURCE" # Get list of directories

Re: [Linuxptp-devel] [PATCH_SNMPD_v2 4/6] snmpd: Add snmp sub agent

2018-06-14 Thread Anders Selhammer
Thursday, June 14, 2018 6:44 AM > Please forgive my ignorance, but this minimal program is functional, > right? > What does it do? How does one test it to see that it is working? At this point, the subagent only register itself towards the master agent, which is provided by the lib. It has not

Re: [Linuxptp-devel] [PATCH_SNMPD_v2 5/6] snmpd: Added communication to ptp4l via the UDS port.

2018-06-14 Thread Anders Selhammer
Thursday, June 14, 2018 6:49 AM > "functions." I will update > Don't need parenthesis here. No, I often use that anyway just to state the condition but I can remove it. > It would be useful to have "-q" as well, just like the other programs. I can add that. Did not find it in pmc or nsm.

Re: [Linuxptp-devel] [PATCH_SNMPD_v2 6/6] snmpd: Add data collection from ptp4l program for some mib get requests

2018-06-14 Thread Anders Selhammer
Thursday, June 14, 2018 7:11 AM > This looks pretty good. Can we have the whole MIB please? Thanks. Yes, still working on it, the rest will come in part 2. Maybe we should just ignore ptpbase_mib.c in this first part since it should only include the adding of the sub agent. The support of the

Re: [Linuxptp-devel] [PATCH_SNMPD_v2 1/6] pmc: Refactoring of in arguments in pmc_create

2018-06-14 Thread Anders Selhammer
Thursday, June 14, 2018 5:50 AM > I don't like this patch. It isn't required for SNMP support, and it > makes every PMC message do a hash table lookup once ... No, it is not required. Only the code get a little bit cleaner and you made like this in NSM. Off course it is another type of

Re: [Linuxptp-devel] [PATCH_SNMP 0/6] Add support of snmp

2018-05-28 Thread Anders Selhammer
Monday, May 28, 2018 10:09 PM > When I tried to compile this, it failed because I didn't have > libsnmp-dev installed. This will be the first library dependency that > linuxptp ever had (other than the C library). I want the project to > still compile even without libsnmp. > Please extend the

[Linuxptp-devel] [PATCH_SNMPD_v2 6/6] snmpd: Add data collection from ptp4l program for some mib get requests

2018-05-29 Thread Anders Selhammer
Three random picked mib object from ptpbase_mib is initialized in sub agent and data is received from ptp4l. All different MIBs should be placed in separate .c files and use the combined .h file (snmpd_mib.h) for their global initialization function. Signed-off-by: Anders Selhammer --- makefile

[Linuxptp-devel] [PATCH_SNMPD_v2 3/6] pdt: Added check if already defined

2018-05-29 Thread Anders Selhammer
TRUE and FALSE is also defined in net-snmp library. Without this check, compilation and includes must be made in a certain order. Signed-off-by: Anders Selhammer --- pdt.h | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pdt.h b/pdt.h index 29ffbb5..e46b218 100644

[Linuxptp-devel] [PATCH_SNMPD_v2 1/6] pmc: Refactoring of in arguments in pmc_create

2018-05-29 Thread Anders Selhammer
Attributes are global ones in config file which also is an in argument Signed-off-by: Anders Selhammer --- phc2sys.c| 4 +--- pmc.c| 6 ++ pmc_common.c | 21 +++-- pmc_common.h | 1 - 4 files changed, 14 insertions(+), 18 deletions(-) diff --git a/phc2sys.c b

[Linuxptp-devel] [PATCH_SNMPD_v2 5/6] snmpd: Added communication to ptp4l via the UDS port.

2018-05-29 Thread Anders Selhammer
UDS transport is configured using pmc_common funtions. Signed-off-by: Anders Selhammer --- makefile | 3 +- snmpd.c | 95 ++-- 2 files changed, 95 insertions(+), 3 deletions(-) diff --git a/makefile b/makefile index ed5c554..fdf3747

[Linuxptp-devel] [PATCH_SNMPD_v2 0/6] Add support of snmp

2018-05-29 Thread Anders Selhammer
Add of the first step of supporting SNMP communication to linuxptp. This patchset only adds the basics for SNMP. The support of published MIBs will be added later on. Anders Selhammer (6): pmc: Refactoring of in arguments in pmc_create pmc: Move new common funtionality into pmc_common pdt

[Linuxptp-devel] [PATCH_SNMPD_v2 2/6] pmc: Move new common funtionality into pmc_common

2018-05-29 Thread Anders Selhammer
Code from pmc.c will be reused by new snmpd.c in later commit. Signed-off-by: Anders Selhammer --- pmc.c| 299 +-- pmc_common.c | 294 ++ pmc_common.h | 9 ++ 3 files

[Linuxptp-devel] [PATCH_SNMPD_v2 4/6] snmpd: Add snmp sub agent

2018-05-29 Thread Anders Selhammer
compilation. configs/snmpd.conf should be placed in /etc/snmp/ Signed-off-by: Anders Selhammer --- configs/snmpd.conf | 26 + incdefs.sh | 13 - ldlibs.sh | 33 +++ makefile | 11 --- optprg.sh

Re: [Linuxptp-devel] [PATCH_SNMP 6/6] snmpd: Add data collection from ptp4l program for one mib get request

2018-05-28 Thread Anders Selhammer
Monday, May 28, 2018 7:23 AM > It is hard for me to see why the code in ptpbase_mib.c needs to be in > a seperate file from snmpd.c The idea was to have all different MIBs in separate files. Then it is easy to get a view on which MIBs that are implemented and which code is MIB specific and

Re: [Linuxptp-devel] [PATCH 8/9] port: Add a method for processing received signaling messages.

2018-06-07 Thread Anders Selhammer
Wednesday, June 6, 2018 1:17 AM > +int process_signaling(struct port *p, struct ptp_message *m) I suggest: port_signaling_tx or port_signaling_process or port_process_signaling /Anders -- Check out the vibrant tech

Re: [Linuxptp-devel] [PATCH 6/9] Introduce unicast client logic.

2018-06-07 Thread Anders Selhammer
Wednesday, June 6, 2018 1:17 AM Hi This is more of a question or a clarification if I get it right, but this ucma->renewal_tmo is general for all types of messages for a ucma. So if announce is granted, this renewal_tmo will be updated to 3/4 of the duration that was given in grant and state go

Re: [Linuxptp-devel] [PATCH 8/9] port: Add a method for processing received signaling messages.

2018-07-02 Thread Anders Selhammer
Sunday, July 1, 2018 7:18 AM > > > +int process_signaling(struct port *p, struct ptp_message *m) > > > > I suggest: port_signaling_tx or port_signaling_process or > > port_process_signaling > That would break the pattern. > We already have: That's true, but there is also a pattern to start

Re: [Linuxptp-devel] [PATCH 3/8] Introduce unicast service.

2018-06-20 Thread Anders Selhammer
Friday, June 8, 2018 7:53 AM > +static struct timespec log_to_timespec(int log_seconds); > +static void timespec_normalize(struct timespec *ts); > +static int timespec_compare(struct timespec *a, struct timespec *b); Why not in the same order as implemented? > +static void

Re: [Linuxptp-devel] [PATCH RFC 0/3] Basis for SNMP support

2018-07-26 Thread Anders Selhammer
Thursday, July 26, 2018 2:39 AM > Sounds good. You will apply the series without updates and I include it in next series then? Then I do not need to poll the mail the next few days  > Don't hurry - enjoy your vacation... No need to worry about that. /Anders

Re: [Linuxptp-devel] [PATCH RFC 0/3] Basis for SNMP support

2018-07-25 Thread Anders Selhammer
Friday, July 6, 2018 10:08 PM > This series is a rework of Anders' SNMP v3 series. > Here is what changed: > - dropped first two patches as they have been merged > - renamed snmpd to snmp4lptp to avoid clash with net-snmp > - simplified build > - support cross compilation > Please review and

[Linuxptp-devel] [PATCH snmp4lptp 1/3] snmp4lptp: Add snmp sub agent for linuxptp

2018-08-21 Thread Anders Selhammer
compilation. configs/snmpd.conf should be placed in /etc/snmp/ Signed-off-by: Anders Selhammer --- .gitignore | 1 + configs/snmpd.conf | 26 + makefile | 13 + snmp4lptp.c| 57

[Linuxptp-devel] [PATCH snmp4lptp 3/3] snmp4lptp: Added function for data collection from ptp4l program.

2018-08-21 Thread Anders Selhammer
General function to use for sending signals for data collection from ptp4l program. Signed-off-by: Anders Selhammer --- snmp4lptp.c | 37 + snmp4lptp_mib.h | 30 ++ 2 files changed, 67 insertions(+) create mode 100644

[Linuxptp-devel] [PATCH snmp4lptp 0/3] Basis for SNMP support

2018-08-21 Thread Anders Selhammer
This series add the basis for SNMP support in linuxptp. The support of published MIBs will be added later on. Anders Selhammer (3): snmp4lptp: Add snmp sub agent for linuxptp snmp4lptp: Added communication to ptp4l via the UDS port. snmp4lptp: Added function for data collection from ptp4l

[Linuxptp-devel] [PATCH snmp4lptp 2/3] snmp4lptp: Added communication to ptp4l via the UDS port.

2018-08-21 Thread Anders Selhammer
UDS transport is configured using pmc_common functions. Signed-off-by: Anders Selhammer --- makefile| 3 +- snmp4lptp.c | 102 ++-- 2 files changed, 102 insertions(+), 3 deletions(-) diff --git a/makefile b/makefile index b6a96d0

Re: [Linuxptp-devel] [PATCH RFC 0/3] Basis for SNMP support

2018-08-20 Thread Anders Selhammer
Thursday, July 26, 2018 9:34 AM >Thursday, July 26, 2018 2:39 AM >> Sounds good. >You will apply the series without updates and I include it in next series then? >Then I do not need to poll the mail the next few days  Hi Im back from vacation and since you have not applied the patches yet, I

Re: [Linuxptp-devel] [PATCH 0/8] unicast part III - server support

2018-07-06 Thread Anders Selhammer
Richard Cochran > This series completes the unicast and telecom support by adding the > server side of the equation. The first patch introduces a priority > queue in order to service any number of clients, each with its own > interval (as required by the telecom profile). In that way we can >

Re: [Linuxptp-devel] [PATCH_SNMP_v3 0/5] Add support of snmp

2018-07-06 Thread Anders Selhammer
Friday, July 6, 2018 8:17 AM > These first two patches are fine, and I'll merge them soon. Great > The code in snmpd.c looks fine to me. It´s not that complicated when using this AgentX master agent > The name 'snmpd' is a not a good choice. The net-snmp project already > delivers a program

Re: [Linuxptp-devel] [PATCH_SNMP_v3 0/5] Add support of snmp

2018-07-06 Thread Anders Selhammer
Richard Cochran Maybe I was too fast on the send button. > We are building an AgentX, are we not? So let's use a unique name >that is also more descriptive. We are building an snmp sub agent using the AgentX protocol towards the master agent supporting AgentX protocol. So we are not really

[Linuxptp-devel] [PATCH] Added TAILQ for sent delay_req

2018-03-13 Thread Anders Selhammer
arise. Signed-off-by: Anders Selhammer <anders.selham...@est.tech> --- msg.c | 1 + port.c | 57 ++--- 2 files changed, 35 insertions(+), 23 deletions(-) diff --git a/msg.c b/msg.c index a36d4d0..7c0a027 100644 --- a/msg.c +++ b

Re: [Linuxptp-devel] [PATCH 1/6] sk: turn warnings about unexpected RX filter into debug messages.

2018-03-13 Thread Anders Selhammer
Sorry about this. Configured my git-email and accidentally switched repo before I sent the mail. Please ignore this PATCH X/6 -- Check out the vibrant tech community on one of the world's most engaging tech sites,

[Linuxptp-devel] [PATCH 5/6] Added TAILQ for sent delay_req

2018-03-13 Thread Anders Selhammer
arise. Signed-off-by: Anders Selhammer <anders.selham...@est.tech> --- msg.c | 1 + port.c | 57 ++--- 2 files changed, 35 insertions(+), 23 deletions(-) diff --git a/msg.c b/msg.c index a36d4d0..7c0a027 100644 --- a/msg.c +++ b

[Linuxptp-devel] [PATCH 1/6] sk: turn warnings about unexpected RX filter into debug messages.

2018-03-13 Thread Anders Selhammer
From: Miroslav Lichvar When a network interface doesn't support the most specific PTP filter (e.g. it can timestamp either all or no received packets), it is expected that the driver will report a different filter than was requested. Turn the warnings into debug messages to

[Linuxptp-devel] [PATCH 3/6] clock: add option to specify initial path delay.

2018-03-13 Thread Anders Selhammer
From: Miroslav Lichvar This option allows the clock to be updated before the path delay is measured in order to speed up the initial correction of the clock, e.g. in domains using a very long logMinDelayReqInterval. Signed-off-by: Miroslav Lichvar ---

[Linuxptp-devel] [PATCH 6/6] dummy

2018-03-13 Thread Anders Selhammer
--- msg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msg.c b/msg.c index 7c0a027..8b64e10 100644 --- a/msg.c +++ b/msg.c @@ -354,7 +354,7 @@ int msg_post_recv(struct ptp_message *m, int cnt) timestamp_post_recv(m, >sync.originTimestamp);

[Linuxptp-devel] [PATCH 4/6] gitignore

2018-03-13 Thread Anders Selhammer
--- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 68a4c3e..22b3f37 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +/*.rpm +/*.project /*.d /*.o /.version -- 1.8.3.1

[Linuxptp-devel] TAILQ for delay request

2018-03-14 Thread Anders Selhammer
Hi Sorry for yesterdays mistake when I did push from wrong branch. Had problem with authorization in my git-email and when I solved it, I was to quick on the send button so I forgot that I switched branch earlier. I send this mail to verify that you noticed that there was a correct patch sent

[Linuxptp-devel] [PATCH 3/3] port: Fix coding style in updated functions

2018-03-15 Thread Anders Selhammer
We always but braces around 'if' blocks. Signed-off-by: Anders Selhammer <anders.selham...@est.tech> --- port.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/port.c b/port.c index 2edfb26..5f333be 100644 --- a/port.c +++ b/port.c @@ -1347,12 +1

[Linuxptp-devel] [PATCH 2/3] port: Remove obsolete delay_req in TAILQ

2018-03-15 Thread Anders Selhammer
This patch will remove all delay requests in queue that is older than the latest processed. Connected responses to these are either much more delayed or lost. Any received response derived from an obsolete request will be neglected. Signed-off-by: Anders Selhammer <anders.selham...@est.t

[Linuxptp-devel] [PATCH 0/3] Add TAILQ for sent delay_req

2018-03-15 Thread Anders Selhammer
delay_req arise. Anders Selhammer (3): port: Added TAILQ for sent delay_req port: Remove obsolete delay_req in TAILQ port: Fix coding style in updated functions msg.c | 1 + port.c | 57 ++--- 2 files changed, 35 insertions(+), 23 deletions

[Linuxptp-devel] [PATCH 1/3] port: Added TAILQ for sent delay_req

2018-03-15 Thread Anders Selhammer
of for portIdentity in received delay response messages. Signed-off-by: Anders Selhammer <anders.selham...@est.tech> --- msg.c | 1 + port.c | 42 ++ 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/msg.c b/msg.c index a36d4d0..7c0a027

Re: [Linuxptp-devel] [PATCH] Added TAILQ for sent delay_req

2018-03-15 Thread Anders Selhammer
On Wed, Mar 14, 2018 at 09:17:35PM +, Keller, Jacob E wrote: > This seems like a reasonable thing to want... However, a bit more > explanation on how the storage helps solve this problem, and possibly > how you prevent the list from growing too large in the worst case > might be good. >

[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 <anders.selham...@est.tech> --- clock.c| 4 port.c | 61 ++ port.h | 9 + port_private.h | 4 4

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

2018-04-06 Thread Anders Selhammer
in the draft. Anders Selhammer (12): port: Fix coding style clock: Fix coding style pm: Added pm.h including struct for pm storage stats: Added copy and combine help funktions pm: Added pm.c including pm storage handling clock: Added pm collection for clock statistics port: Added pm collection

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

2018-04-06 Thread Anders Selhammer
pmc.o pmc_common.o \ diff --git a/pm.c b/pm.c new file mode 100644 index 000..8521c88 --- /dev/null +++ b/pm.c @@ -0,0 +1,414 @@ +/** + * @file pm.c + * @note Copyright (C) 2018 Anders Selhammer <anders.selham...@est.tech> + * + * This program is free software; you can redistribute it a

[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 <anders.selham...@est.tech> --- clock.c| 15 ++- port.c | 19 +++ port.h | 18 +- port_private.h | 1 + 4 files c

[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 <anders.selham...@est.tech> --- port.c | 10 -- port.

[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 <anders.selham...@est.tech> --- clock.c | 28 +++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/clock.c b/clock.c index 7e92958..6575130

[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 <anders.selham...@est.tech> --- stats.c | 19 +++ stats.h | 14 ++ 2 files changed, 33 insertions(+) diff --git a/stats.c b/stats.c index 41136f0..1ec88d5 100644 --- a/s

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

2018-04-06 Thread Anders Selhammer
Signed-off-by: Anders Selhammer <anders.selham...@est.tech> --- 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

[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 <anders.selham...@est.tech> --- clock.c | 46 ++ clock.h | 7 +++ 2 files changed, 53 insertions(+) diff --git a/clock.c b/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 <anders.selham...@est.tech> --- pm.

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

2018-04-06 Thread Anders Selhammer
Signed-off-by: Anders Selhammer <anders.selham...@est.tech> --- 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 clock_d

[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 <anders.selham...@est.tech> --- 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 <anders.selham...@est.tech> --- 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/c

Re: [Linuxptp-devel] [PATCH RFC 3/8] bmc: Allow alternative data set comparison algorithms.

2018-04-05 Thread Anders Selhammer
Saturday, March 31, 2018 11:33 PM > -enum port_state bmc_state_decision(struct clock *c, struct port *r); > +enum port_state bmc_state_decision(struct clock *c, struct port *r, > +int (*comapre)(struct dataset *a, struct > dataset *b)); Misspelled compare above

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

2018-04-05 Thread Anders Selhammer
Signed-off-by: Anders Selhammer <anders.selham...@est.tech> --- port.c | 226 + 1 file changed, 144 insertions(+), 82 deletions(-) diff --git a/port.c b/port.c index cee6445..2bde67c 100644 --- a/port.c +++ b/port.c @@ -200,8

[Linuxptp-devel] [PATCH 2/2] clock: Fix coding style

2018-04-05 Thread Anders Selhammer
Signed-off-by: Anders Selhammer <anders.selham...@est.tech> --- clock.c | 126 +--- 1 file changed, 82 insertions(+), 44 deletions(-) diff --git a/clock.c b/clock.c index bc67fb4..aa09691 100644 --- a/clock.c +++ b/clock.c @@

[Linuxptp-devel] [PATCH 0/2] Coding style

2018-04-05 Thread Anders Selhammer
We always but braces around 'if' blocks Anders Selhammer (2): port: Fix coding style clock: Fix coding style clock.c | 126 +++- port.c | 226 +--- 2 files changed, 226 insertions(+), 126 deletions

Re: [Linuxptp-devel] [PATCH RFC 1/8] port: Make the data set comparison algorithm into a function variable.

2018-04-04 Thread Anders Selhammer
Saturday, March 31, 2018 11:33 PM > + int (*dscmp)(struct dataset *a, struct dataset *b); > - else if (dscmp(>dataset, >best->dataset) > 0) > + else if (p->dscmp(>dataset, >best->dataset) > 0) > + p->dscmp = dscmp; > + int (*dscmp)(struct dataset *a, struct

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 pm 04/12] stats: Added copy and combine help funktions

2018-04-13 Thread Anders Selhammer
Friday, April 13, 2018 8:16 AM > Let me suggest an easier way. I agree. It became way to complex then I first believed. I wanted to have some input on it before I did a rework on it. I will look into your suggestion and update accordingly. I believe that the reporting issue will be solved.

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

2018-04-13 Thread Anders Selhammer
Friday, April 13, 2018 7:16 AM > I have two major issues with this series: > 1. You collect statistics but never report it. This set of patch was just for collecting and storage of the data. My intention was, in a later set of patches, add possibility to collect this data. As it is now, there

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

2018-04-13 Thread Anders Selhammer
Friday, April 13, 2018 5:13 AM > > +typedef tmv_t PMTimestamp; > This typedef serves no useful purpose. Just use this... > time_t pm_time; > The PMTime data type is never actually defined in the draft. Brilliant. > It looks like this is only used for very coarse time

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

2018-04-16 Thread Anders Selhammer
Friday, April 13, 2018 4:33 PM > I'd like to have a plan. It would be a shame to invent our own TLVs > if the standard turns out to say that reporting should go over > SNMP/Yang model/whatever. > Do you have insight into what the authors of Annex M are thinking? On Friday after I went for

[Linuxptp-devel] [PATCH 7/7] Add a configuration file option for bmca and local priority

2018-04-20 Thread Anders Selhammer
Signed-off-by: Anders Selhammer <anders.selham...@est.tech> --- clock.c | 15 --- config.c| 12 +++- default.cfg | 3 +++ gPTP.cfg| 3 +++ port.c | 1 + 5 files changed, 30 insertions(+), 4 deletions(-) diff --git a/clock.c b/clock.c index 272c7da..1

[Linuxptp-devel] [PATCH 2/7] clock: Added getter for dscmp configured for the clock

2018-04-20 Thread Anders Selhammer
Signed-off-by: Anders Selhammer <anders.selham...@est.tech> --- bmc.c | 2 ++ bmc.h | 9 ++--- clock.c| 7 ++- clock.h| 8 port.c | 5 +++-- port_private.h | 1 - 6 files changed, 25 insertions(+), 7 deletions(-) diff --git a/b

[Linuxptp-devel] [PATCH 3/7] clock: Renamed get function for clock dataset

2018-04-20 Thread Anders Selhammer
Signed-off-by: Anders Selhammer <anders.selham...@est.tech> --- bmc.c | 2 +- clock.c | 6 +++--- clock.h | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bmc.c b/bmc.c index a2103b5..b6f8a92 100644 --- a/bmc.c +++ b/bmc.c @@ -146,7 +146,7 @@ enum port

[Linuxptp-devel] [PATCH 4/7] bmc: Renamed dscmp to dscmp_ieee1588

2018-04-20 Thread Anders Selhammer
Signed-off-by: Anders Selhammer <anders.selham...@est.tech> --- bmc.c | 2 +- bmc.h | 2 +- clock.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bmc.c b/bmc.c index b6f8a92..d346397 100644 --- a/bmc.c +++ b/bmc.c @@ -81,7 +81,7 @@ int dscmp2(struct dataset *a,

[Linuxptp-devel] [PATCH 5/7] ds: Added localPriority attribute

2018-04-20 Thread Anders Selhammer
Signed-off-by: Anders Selhammer <anders.selham...@est.tech> --- clock.c| 7 +++ clock.h| 7 +++ ds.h | 1 + port.c | 20 +--- port.h | 9 - port_private.h | 1 + 6 files changed, 37 insertions(+), 8 deletions(-)

[Linuxptp-devel] [PATCH 6/7] bmc: Added dscmp_alternate

2018-04-20 Thread Anders Selhammer
Signed-off-by: Anders Selhammer <anders.selham...@est.tech> --- bmc.c | 48 +++- bmc.h | 15 +++ 2 files changed, 54 insertions(+), 9 deletions(-) diff --git a/bmc.c b/bmc.c index d346397..a86148d 100644 --- a/bmc.c +++ b/bmc.c @@

[Linuxptp-devel] [PATCH 0/7] Adding option to select alternate bmca defined in ITU-T G.8275.1

2018-04-20 Thread Anders Selhammer
In profile ITU-T G.8275.1 and Alternate Best Master Clock Algorithm is defined. This includes the new attribute local priority for both the clock and the port. This set of patches makes it possible to configure local priority and select the alternate BCMA instead of default IEEE1588 BCMA. Anders

Re: [Linuxptp-devel] [PATCH V2 5/6] telecom: Add a configuration option to use the alternate BMCA.

2018-04-23 Thread Anders Selhammer
Friday, April 20, 2018 6:09 PM - p->dscmp = dscmp; + if (config_get_int(cfg, NULL, "dataset_comparison") == DS_CMP_G8275) { + p->dscmp = telecom_dscmp; + } else { + p->dscmp = dscmp; + } This should not be needed if port get the comparation

Re: [Linuxptp-devel] [PATCH V2 2/6] telecom: Add the data set comparison algorithm from the Telecom Profiles.

2018-04-23 Thread Anders Selhammer
Friday, April 20, 2018 6:09 PM > +int telecom_dscmp(struct dataset *a, struct dataset *b) This function introduces a lot of "if" without braces. /Anders -- Check out the vibrant tech community on one of the world's

[Linuxptp-devel] [PATCH v2 3/7] clock: Renamed get function for clock dataset

2018-04-23 Thread Anders Selhammer
Signed-off-by: Anders Selhammer <anders.selham...@est.tech> --- bmc.c | 2 +- clock.c | 6 +++--- clock.h | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bmc.c b/bmc.c index 198a574..605183e 100644 --- a/bmc.c +++ b/bmc.c @@ -145,7 +145,7 @@ enum port

[Linuxptp-devel] [PATCH v2 7/7] Add a configuration file option for dscmp and local priority

2018-04-23 Thread Anders Selhammer
Signed-off-by: Anders Selhammer <anders.selham...@est.tech> --- bmc.h | 5 + clock.c | 15 --- config.c| 12 +++- default.cfg | 3 +++ gPTP.cfg| 3 +++ port.c | 2 ++ ptp4l.8 | 33 + 7 files chang

[Linuxptp-devel] [PATCH v2 6/7] bmc: Added dscmp_G8275

2018-04-23 Thread Anders Selhammer
Signed-off-by: Anders Selhammer <anders.selham...@est.tech> --- bmc.c | 63 +++ bmc.h | 10 ++ 2 files changed, 73 insertions(+) diff --git a/bmc.c b/bmc.c index fd80f99..7a8bca1 100644 --- a/bmc.c +++ b/bmc.c @@ -139,6 +

[Linuxptp-devel] [PATCH v2 2/7] clock: Added getter for dscmp configured for the clock

2018-04-23 Thread Anders Selhammer
Signed-off-by: Anders Selhammer <anders.selham...@est.tech> --- bmc.c | 3 ++- bmc.h | 9 ++--- clock.c| 7 ++- clock.h| 8 port.c | 5 +++-- port_private.h | 1 - 6 files changed, 25 insertions(+), 8 deletions(-) diff --git a/b

[Linuxptp-devel] [PATCH v2 0/7] Adding option to select alternate bmca defined in ITU-T G.8275.1

2018-04-23 Thread Anders Selhammer
In profile ITU-T G.8275.1 an Alternate Best Master Clock Algorithm is defined. This includes the new attribute local priority for both the clock and the port. This set of patches makes it possible to configure local priority and select the G8275 BCMA instead of default IEEE1588 BCMA. Anders

[Linuxptp-devel] [PATCH v2 5/7] ds: Added localPriority attribute

2018-04-23 Thread Anders Selhammer
Signed-off-by: Anders Selhammer <anders.selham...@est.tech> --- clock.c| 7 +++ clock.h| 7 +++ ds.h | 1 + port.c | 20 +--- port.h | 9 - port_private.h | 1 + 6 files changed, 37 insertions(+), 8 deletions(-)

[Linuxptp-devel] [PATCH v2 4/7] bmc: Renamed dscmp to dscmp_ieee1588

2018-04-23 Thread Anders Selhammer
Signed-off-by: Anders Selhammer <anders.selham...@est.tech> --- bmc.c | 2 +- bmc.h | 2 +- clock.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bmc.c b/bmc.c index 605183e..fd80f99 100644 --- a/bmc.c +++ b/bmc.c @@ -80,7 +80,7 @@ int dscmp2(struct dataset *a,

Re: [Linuxptp-devel] [PATCH V2 6/6] telecom: Introduce the G.8275.masterOnly option.

2018-04-23 Thread Anders Selhammer
Friday, April 20, 2018 6:09 PM > + PORT_ITEM_INT("G.8275.masterOnly", 0, 0, 1), masterOnly will be included in v2.1 so it will not be a profile specific attribute. Should this be changed when updated for v2.1? /Anders

Re: [Linuxptp-devel] [PATCH 0/3] Add TAILQ for sent delay_req

2018-03-20 Thread Anders Selhammer
of a limit of how many delay req the stack should store. For that, a counter is needed. Should I add that? /Anders -Ursprungligt meddelande- Från: Anders Selhammer <anders.selham...@est.tech> Skickat: Thursday, March 15, 2018 12:00 PM Till: linuxptp-devel@lists.sourceforge.ne

Re: [Linuxptp-devel] [PATCH 0/3] Add TAILQ for sent delay_req

2018-03-20 Thread Anders Selhammer
Tuesday, March 20, 2018 3:27 PM >No, use a time out just like we do in other places, please. Ok, great. I did not notice this. Much better than counter. I will include this, see summary in the end. >> msg: Added missing network to host convertion of for portIdentity in >> received delay

Re: [Linuxptp-devel] [PATCH v2 2/2] port: Added TAILQ for sent delay_req

2018-03-21 Thread Anders Selhammer
Wednesday, March 21, 2018 6:48 PM Thanks for comments, I will update and send in new patches /A -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org!

[Linuxptp-devel] [PATCH v3 0/2] Add TAILQ for sent delay_req

2018-03-21 Thread Anders Selhammer
. Anders Selhammer (2): port: Fix coding style port: Added TAILQ for sent delay_req msg.c | 2 ++ port.c | 81 +++--- 2 files changed, 60 insertions(+), 23 deletions(-) -- 1.8.3.1

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

2018-03-21 Thread Anders Selhammer
We always but braces around 'if' blocks. Signed-off-by: Anders Selhammer <anders.selham...@est.tech> --- port.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/port.c b/port.c index 8191e77..635676d 100644 --- a/port.c +++ b/port.c @@ -1331,12 +1

  1   2   >