Re: [Linuxptp-devel] [PATCH v2 10/10] tmv: Convert tmv_t to a non-scalar type

2018-03-07 Thread Richard Cochran
On Thu, Mar 01, 2018 at 06:12:28PM +, Michael Brown wrote: > Enforce the use of the tmv_t wrapper functions by converting tmv_t > from an int64_t to a struct containing an int64_t. > > Inspection of the disassembly shows that this change has essentially > no impact on the resulting object code

Re: [Linuxptp-devel] [PATCH RFC V2 08/11] port: Implement the NetSync Monitor protocol.

2018-03-08 Thread Richard Cochran
On Thu, Mar 08, 2018 at 08:07:26AM +, Anders Selhammer wrote: > I reviewed it in outlook, but now when I open it in windows 10 built in > client, it all look as it should. I strongly suggest getting a different email client. If your MTA is exchange, then you will have to create an outside em

[Linuxptp-devel] Planning release 1.9

2018-03-08 Thread Richard Cochran
Dear linuxptp developers and users, I've just pushed out my multi-TLV and NSM series posted last week. Now it is time to cut the 1.9 release. If you know of any outstanding bugs or issues, please report them right away! Also, I would appreciate anyone testing the latest git head. In one week's

Re: [Linuxptp-devel] [Linuxptp-users] Planning release 1.9

2018-03-08 Thread Richard Cochran
On Thu, Mar 08, 2018 at 10:42:14PM +0100, Ahmad Fatoum wrote: > In a DSA setup, transmitted packets may be timestamped more than once causing > ptp4l to fail, > as it expects only a single Tx timestamp to be looped back to the socket's > error queue. Right, so this is a limitation of the kernel

Re: [Linuxptp-devel] [PATCH v2 09/10] tmv: Add converters for hardware timestamps

2018-03-08 Thread Richard Cochran
On Thu, Mar 08, 2018 at 07:18:04PM +, Michael Brown wrote: > Can you give me some idea of what names will be acceptable? I was trying to > fit within the current naming scheme as closely as possible, but I'm very > happy to redo it with whatever names you prefer. Let me think about this. Par

Re: [Linuxptp-devel] [Linuxptp-users] Planning release 1.9

2018-03-09 Thread Richard Cochran
On Fri, Mar 09, 2018 at 04:59:58PM +, Keller, Jacob E wrote: > Would it be worth adding some mechanism to the ptp clock interface to > standardize a way of "run time" disabling the clock? Maybe you don't even > need such a thing by simply not requesting the timestamps for the given > device?

Re: [Linuxptp-devel] Planning release 1.9

2018-03-09 Thread Richard Cochran
On Sat, Mar 10, 2018 at 02:38:18AM +0100, Peter Schneider wrote: > 1) ph2c2sys uses in "autodetect" (-a -r) or "wait for ptp4l" (-w) mode > pmc-functionality to do his job. Unfortunately, the constant value "0" is > used for the transportSpecific parameter, which is wrong for 802.1AS, and > thus av

Re: [Linuxptp-devel] Planning release 1.9

2018-03-10 Thread Richard Cochran
On Fri, Mar 09, 2018 at 07:46:13PM -0800, Richard Cochran wrote: > I don't want to add yet another command line option to phc2sys. The > way forward for that program is to add '-f config' and enable the long > options, like in ptp4l and the new nsm. > > But that

Re: [Linuxptp-devel] [PATCH 0/3] transportSpecific / 802.1AS

2018-03-12 Thread Richard Cochran
On Mon, Mar 12, 2018 at 02:56:26PM +0100, Peter Schneider wrote: > As promised, this is a set of patches to enable specifying the > transportSpecific value via commandline. > > Patch 1: add cmdline parameter for 'transportSpecific' I guess I wasn't clear before. The phc2sys program already

Re: [Linuxptp-devel] TAILQ for delay request

2018-03-14 Thread Richard Cochran
On Wed, Mar 14, 2018 at 10:12:14AM +, Anders Selhammer wrote: > I send this mail to verify that you noticed that there was a correct patch > sent right after the incorrect set of patches. Yes, we see it on the list. Thanks, Richard ---

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

2018-03-14 Thread Richard Cochran
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. +1 > Al

Re: [Linuxptp-devel] [PATCH 1/4] phc2sys: long options / cfg file / transportSpecific

2018-03-14 Thread Richard Cochran
On Wed, Mar 14, 2018 at 05:17:01PM +0100, Peter Schneider wrote: > diff --git a/phc2sys.c b/phc2sys.c > index 5c54055..c2f0d8e 100644 > --- a/phc2sys.c > +++ b/phc2sys.c > @@ -1286,6 +1286,7 @@ static void usage(char *progname) > " -O [offset]slave-master time offset (0)\n" >

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

2018-03-15 Thread Richard Cochran
On Thu, Mar 15, 2018 at 06:43:00AM +, Anders Selhammer wrote: > How do I send a PATCH 0/X where I can explain the patches? An empty commit > with just comments? Here is how I do that: * Exporting Patches git format-patch \ --subject-prefix="PATCH" \ --output-directory ./patc

Re: [Linuxptp-devel] [PATCH] differ message printed when local clock is best master

2018-03-15 Thread Richard Cochran
On Thu, Mar 15, 2018 at 01:31:38PM -0700, Jacob Keller wrote: > I've often been looking at log output from ptp4l and wondered which > clock id was which port. This patch helps ease the mental burden by > explicitly stating when we selected the local clock as the best choice. Me too. Thanks for th

Re: [Linuxptp-devel] Despite the patch, "timed out while polling for tx timestamp" keeps happening

2018-03-16 Thread Richard Cochran
On Fri, Mar 16, 2018 at 09:37:59AM +0100, Frantisek Rysanek wrote: > let me just briefly follow up on the past thread on "TX timestamp > timeouts". To sum up: on the my part the problem seems gone. ... > On tuesday I had another chance to try PTP against the TC switch at a > substation with IEC

Re: [Linuxptp-devel] [PATCH 1/3] pmc: long opts / cfg file

2018-03-16 Thread Richard Cochran
On Fri, Mar 16, 2018 at 07:31:04PM +0100, Peter Schneider wrote: > diff --git a/pmc_common.c b/pmc_common.c > index 91fffb3..850544c 100644 > --- a/pmc_common.c > +++ b/pmc_common.c > @@ -93,6 +93,10 @@ struct pmc *pmc_create(struct config *cfg, enum > transport_type transport_type, > } >

Re: [Linuxptp-devel] [PATCH 0/7] Use tmv_t abstraction for hardware timestamps

2018-03-16 Thread Richard Cochran
On Thu, Mar 15, 2018 at 10:42:22PM +, Michael Brown wrote: > Any comments for this patch series? Are you happy with the general approach > to use tmv_t within struct hw_timestamp? For my part it is just -ENOSPARECYCLES. I'll get to it eventually... Sorry, Richard -

Re: [Linuxptp-devel] [PATCH 0/7] Use tmv_t abstraction for hardware timestamps

2018-03-16 Thread Richard Cochran
On Fri, Mar 16, 2018 at 06:53:13PM -0700, Richard Cochran wrote: > For my part it is just -ENOSPARECYCLES. I'll get to it eventually... I just scanned throught the series. Looks really good. Thanks for avoiding the "ugly" functions, and the "early conversion" t

Re: [Linuxptp-devel] [PATCH 0/7] Use tmv_t abstraction for hardware timestamps

2018-03-17 Thread Richard Cochran
On Mon, Mar 12, 2018 at 12:36:26PM +, Michael Brown wrote: > This is a revised patch series to ensure that the tmv_t operations are > used consistently for calculations involving hardware timestamps. Series applied. Thanks, Richard

Re: [Linuxptp-devel] [PATCH 3/3] pmc(2): long opts / cfg file

2018-03-18 Thread Richard Cochran
Peter, The patches are better WRT white space, but now some of the long lines have been wrapped by the mailer, apparently... On Sun, Mar 18, 2018 at 06:38:25PM +0100, Peter Schneider wrote: > +.SH LONG OPTIONS > + > +Each and every configuration file option (see below in sections > +.BR PROGRAM\

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

2018-03-20 Thread Richard Cochran
On Thu, Mar 15, 2018 at 12:00:26PM +0100, Anders Selhammer wrote: > In a ptp unaware network (like the telecom profile for frequency sync > G.8265.1), both the RTD and the PDV can be substantially higher than in a ptp > aware network. To achieve more accurate measurements, the rate may need to be

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

2018-03-20 Thread Richard Cochran
On Thu, Mar 15, 2018 at 12:00:27PM +0100, Anders Selhammer wrote: > 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 >

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

2018-03-20 Thread Richard Cochran
On Thu, Mar 15, 2018 at 12:00:27PM +0100, Anders Selhammer wrote: > 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 >

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

2018-03-20 Thread Richard Cochran
On Thu, Mar 15, 2018 at 12:00:27PM +0100, Anders Selhammer wrote: > @@ -1830,7 +1830,7 @@ out: > static void process_delay_resp(struct port *p, struct ptp_message *m) > { > struct delay_resp_msg *rsp = &m->delay_resp; > - struct ptp_message *req; > + struct ptp_message *req, *obs;

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

2018-03-20 Thread Richard Cochran
On Thu, Mar 15, 2018 at 12:00:28PM +0100, Anders Selhammer wrote: > We always but braces around 'if' blocks. Please put any clean-up patches first in the series. Thanks, Richard -- Check out the vibrant tech community on

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

2018-03-20 Thread Richard Cochran
On Tue, Mar 20, 2018 at 08:21:09AM +, Anders Selhammer wrote: > One thing that I might overseen is the growing part. I covered that > some packets might be lost but if all delay resp are lost by some > reason it might be good to have some kind of a limit of how many > delay req the stack shoul

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

2018-03-21 Thread Richard Cochran
On Tue, Mar 20, 2018 at 11:04:00PM +0100, Anders Selhammer wrote: > In a ptp unaware network (like the telecom profile for frequency sync > G.8265.1), both the RTD and the PDV can be substantially higher than > in a ptp aware network. To achieve more accurate measurements, the > rate may need to be

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

2018-03-21 Thread Richard Cochran
On Tue, Mar 20, 2018 at 11:04:02PM +0100, Anders Selhammer wrote: > @@ -146,6 +146,7 @@ struct port { > static int port_capable(struct port *p); > static int port_is_ieee8021as(struct port *p); > static void port_nrate_initialize(struct port *p); > +static void flush_delay_req(struct port *p);

[Linuxptp-devel] [PATCH RFC V1 0/3] Peer to Peer One-Step

2018-03-21 Thread Richard Cochran
egress time stamp into the correction field. I am posting kernel support as an RFC on the netdev list today. As always, comments and review are most welcome. Thanks, Richard Richard Cochran (3): msg: Move the check for missing HW time stamps into caller. Introduce peer to peer one step

[Linuxptp-devel] [PATCH RFC V1 3/3] Expand and rationalize time stamping options.

2018-03-21 Thread Richard Cochran
"time_stamping" option. The "twoStepFlag" is adjusted automatically if needed. The legacy behavior for Sync message one step is preserved. Signed-off-by: Richard Cochran --- clock.c | 42 +- config.c | 40 ++

[Linuxptp-devel] [PATCH RFC V1 2/3] Introduce peer to peer one step.

2018-03-21 Thread Richard Cochran
The 1588 standard defines one step operation for both Sync and PDelay_Resp messages. Up until now, hardware with P2P one step has been rare, and kernel support was lacking. This patch adds support of the mode in anticipation of new kernel and hardware developments. Signed-off-by: Richard

[Linuxptp-devel] [PATCH RFC V1 1/3] msg: Move the check for missing HW time stamps into caller.

2018-03-21 Thread Richard Cochran
order to accommodate the exceptional case. Signed-off-by: Richard Cochran --- msg.c | 3 --- port.c | 10 ++ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/msg.c b/msg.c index a36d4d0..616d937 100644 --- a/msg.c +++ b/msg.c @@ -390,9 +390,6 @@ int msg_post_recv(struct

Re: [Linuxptp-devel] POSIX Timers for External Hardware

2018-03-23 Thread Richard Cochran
On Fri, Mar 23, 2018 at 11:03:50AM -0500, Alex Fontaine wrote: > The kernel documentation states the ability to use POSIX timers with the PTP > hardware clocks. This does not appear to be implemented in the ptp > subsystem drivers. What is preventing this timer interface from being > implemented?

Re: [Linuxptp-devel] PTP Periodic Output to Multiple Pins

2018-03-23 Thread Richard Cochran
On Fri, Mar 23, 2018 at 11:26:29AM -0500, Alex Fontaine wrote: > The PTP subsystem only allows one pin to be mapped to one channel for > periodic outputs. Why does the ptp subsystem force only allowing one pin > index to one a periodic output channel? Because this has been sufficient up until now

Re: [Linuxptp-devel] PTP Periodic Output to Multiple Pins

2018-03-23 Thread Richard Cochran
On Fri, Mar 23, 2018 at 05:00:18PM +, Keller, Jacob E wrote: > > The PTP subsystem only allows one pin to be mapped to one channel for > > periodic > > outputs. Why does the ptp subsystem force only allowing one pin index to > > one a > > periodic output channel? It seems like a common use

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

2018-03-24 Thread Richard Cochran
On Wed, Mar 21, 2018 at 08:24:24PM +0100, Anders Selhammer wrote: > In a ptp unaware network (like the telecom profile for frequency sync > G.8265.1), both the RTD and the PDV can be substantially higher than > in a ptp aware network. To achieve more accurate measurements, the > rate may need to be

Re: [Linuxptp-devel] [PATCH v2 0/3] pmc: long opts / cfg file

2018-03-24 Thread Richard Cochran
On Thu, Mar 22, 2018 at 12:28:31AM +0100, Peter Schneider wrote: > Now trying with git send-email: > > > Peter Schneider (3): > pmc_common: Preset uninitialized 'iface.ts_label' with 'iface.name' > pmc: add long options and configuration file > pmc: Documentation for long opts / cfg file I

Re: [Linuxptp-devel] [PATCH v2 1/3] pmc_common: Preset uninitialized 'iface.ts_label' with 'iface.name'

2018-03-24 Thread Richard Cochran
On Thu, Mar 22, 2018 at 12:28:32AM +0100, Peter Schneider wrote: > strncpy(iface.name, iface_name, MAX_IFNAME_SIZE); > + if (transport_type == TRANS_IEEE_802_3) { > + strncpy(iface.ts_label, iface_name, MAX_IFNAME_SIZE); > + } > + The field, ts_label, should always be set

Re: [Linuxptp-devel] [PATCH v2 2/3] pmc: add long options and configuration file

2018-03-24 Thread Richard Cochran
On Thu, Mar 22, 2018 at 12:28:33AM +0100, Peter Schneider wrote: > Signed-off-by: Peter Schneider > --- > pmc.c | 61 + > 1 file changed, 53 insertions(+), 8 deletions(-) I added the flag into the usage message and also cleaned up the c

Re: [Linuxptp-devel] [PATCH v2 3/3] pmc: Documentation for long opts / cfg file

2018-03-24 Thread Richard Cochran
On Thu, Mar 22, 2018 at 12:28:34AM +0100, Peter Schneider wrote: > +Be cautious when the same configuration file is used for both ptp4l and pmc. > +Keep in mind, that values specified in the configuration file take precedence > +over their default values. If a certain option, which is common to ptp

Re: [Linuxptp-devel] [PATCH v2 1/4] phc2sys: Implement configuration file handling

2018-03-24 Thread Richard Cochran
On Fri, Mar 23, 2018 at 01:24:35PM +0100, Peter Schneider wrote: > @@ -1477,6 +1482,10 @@ int main(int argc, char *argv[]) > } > } > > + if (config && (c = config_read(config, cfg))) { > + return c; > + } > + This is not quite right. I noticed that some o

Re: [Linuxptp-devel] linuxptp GM BC with two ports into the same subnet

2018-03-26 Thread Richard Cochran
On Mon, Mar 26, 2018 at 11:55:37AM +, Jesuiter, Henry (ALC NetworX GmbH) wrote: > Setup (kind of abnormal, as state in IEEE 1588-2008 😉): > - Boundary Clock > - 2 Ports into the same subnet May I ask why you placed two ports into the same network? Is that supposed to be some kind of redunda

Re: [Linuxptp-devel] [PATCH] differ message printed when local clock is best master

2018-03-27 Thread Richard Cochran
On Thu, Mar 15, 2018 at 01:31:38PM -0700, Jacob Keller wrote: > Make the log output a bit more clear by changing how we inform the user > when the local clock is the best master clock. This allows easier > parsing of the log and identifying when the local clock is being > selected as the best clock

[Linuxptp-devel] [PATCH] Correct macro to avoid undefined C language behavior.

2018-03-27 Thread Richard Cochran
where clockid_t resolves to a signed int, which once negated, is undefined behavior to shift the value of if the results thus far are negative. Signed-off-by: Richard Cochran --- missing.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/missing.h b/missing.h index 1

[Linuxptp-devel] [announce] version 1.9 released

2018-03-31 Thread Richard Cochran
ons and configuration file pmc: Documentation for long opts / cfg file Petr Kulhavy (3): Remove conflicting netinet/ether.h Fix detection of clock_adjtime pmc: optimize duplicated code in do_set_action() Richard Cochran (63): ptp4l: Accept any configuration option as

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

2018-03-31 Thread Richard Cochran
Instead of using a hard coded algorithm, let the caller provide the function that performs the comparison. This will allow implementing alternative algorithms from PTP profiles. Signed-off-by: Richard Cochran --- bmc.c | 9 + bmc.h | 6 -- clock.c | 2 +- 3 files changed, 10

[Linuxptp-devel] [PATCH RFC 6/8] port: Provide a common method for updating the port state.

2018-03-31 Thread Richard Cochran
, making it available to future TC implementations. Signed-off-by: Richard Cochran --- port.c | 82 -- port.h | 9 2 files changed, 54 insertions(+), 37 deletions(-) diff --git a/port.c b/port.c index 9c7f695..bc44017 100644

[Linuxptp-devel] [PATCH RFC 4/8] bmc: Make the second part of the data set comparison algorithm public.

2018-03-31 Thread Richard Cochran
This code will be shared by future alternative algorithms. Signed-off-by: Richard Cochran --- bmc.c | 7 +-- bmc.h | 11 +++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/bmc.c b/bmc.c index 4b435b2..3c3db82 100644 --- a/bmc.c +++ b/bmc.c @@ -21,12 +21,7

[Linuxptp-devel] [PATCH RFC 0/8] Transparent Clock - Part I

2018-03-31 Thread Richard Cochran
preparation for alternate behaviors needed by TC. Richard Cochran (8): port: Make the data set comparison algorithm into a function variable. clock: Make the data set comparison algorithm into a function variable. bmc: Allow alternative data set comparison algorithms. bmc: Make the second part

[Linuxptp-devel] [PATCH RFC 5/8] port: make the dispatch and event methods variable based on clock type.

2018-03-31 Thread Richard Cochran
This paves the way to allow different implementations for the upcoming Transparent Clock code. Signed-off-by: Richard Cochran --- port.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/port.c b/port.c index 627fbb2..9c7f695 100644 --- a/port.c +++ b/port.c

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

2018-03-31 Thread Richard Cochran
This will allow adding alternative algorithms as defined in PTP profiles. Signed-off-by: Richard Cochran --- port.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/port.c b/port.c index 454c60d..627fbb2 100644 --- a/port.c +++ b/port.c @@ -106,6 +106,7 @@ struct port

[Linuxptp-devel] [PATCH RFC 7/8] port: export a private interface.

2018-03-31 Thread Richard Cochran
This patch places the internal port data structure into a common header for use by the original BC and the new TC code. Signed-off-by: Richard Cochran --- port.c | 97 +--- port_private.h | 124

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

2018-03-31 Thread Richard Cochran
This will allow adding alternative algorithms as defined in PTP profiles. Signed-off-by: Richard Cochran --- clock.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clock.c b/clock.c index 97f1188..9f0d3be 100644 --- a/clock.c +++ b/clock.c @@ -80,6 +80,7 @@ struct clock

[Linuxptp-devel] [PATCH RFC 8/8] port: share init code, peer delay code, and helpers

2018-03-31 Thread Richard Cochran
This patch makes a number of subroutines into global functions in order to share code with the TC implementations to come. Signed-off-by: Richard Cochran --- port.c | 44 +--- port_private.h | 25 + 2 files changed, 46

[Linuxptp-devel] [PATCH] msg: Append multiple TLVs correctly.

2018-04-02 Thread Richard Cochran
lowing appended TLVs. Note that the stack does not currently trigger this latent bug because only single TLVs are appended. Fixes: 4a8877f90462 ("msg: Introduce method for appending multiple TLVs on transmit.") Signed-off-by: Richard Cochran --- msg.c | 2 ++ 1 file changed, 2 inser

Re: [Linuxptp-devel] Missing man page for nsm?

2018-04-04 Thread Richard Cochran
On Wed, Apr 04, 2018 at 02:48:24PM +0200, Miroslav Lichvar wrote: > I was packaging 1.9 and noticed that the make install command fails > with: > install: cannot stat 'nsm.8': No such file or directory > > Could you please consider adding a (short) man page, or fix the > makefile to check if

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

2018-04-04 Thread Richard Cochran
On Wed, Apr 04, 2018 at 11:56:32AM +, Anders Selhammer wrote: > Should it be possible to have different data set comparison algorithms in > clock and port struct? No, that doesn't make sense. > Otherwise, why not use the dscmp in clock struct? You are right. The dscmp() function is needles

Re: [Linuxptp-devel] Missing man page for nsm?

2018-04-05 Thread Richard Cochran
On Wed, Apr 04, 2018 at 04:45:41PM +0200, Miroslav Lichvar wrote: > My preference would be the third digit. It indicates it's just a small > bug-fix-only update of 1.9. (I'm assuming you don't want to include > the recent refactoring commits). So I cut version 1.9.1 which includes two bug fixes.

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

2018-04-05 Thread Richard Cochran
On Thu, Apr 05, 2018 at 10:33:49AM +0200, Anders Selhammer wrote: > Signed-off-by: Anders Selhammer > --- > port.c | 226 > + > 1 file changed, 144 insertions(+), 82 deletions(-) I appreciate the gesture, but I won't take mega- cod

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 communit

[Linuxptp-devel] [PATCH RFC 4/8] transport: Introduce method for fetching a deferred transmit time stamp.

2018-04-07 Thread Richard Cochran
When a messages is sent with the DEFER_EVENT flag, the lower transport code does not fetch the time stamp right away. This patch introduces a method that allows a second call to retrieve the waiting transmit time stamp. Signed-off-by: Richard Cochran --- transport.c | 11

[Linuxptp-devel] [PATCH RFC 7/8] clock: Calculate frequency offset even without any delay estimation.

2018-04-07 Thread Richard Cochran
. However, a typical transparent clock application will want to use the frequency offset to correct the residence times to match the master's frequency. This patch adds a call to the "no adjust" routine even if no valid delay measurement has been made. Signed-off-by: Richard Cochran

[Linuxptp-devel] [PATCH RFC 5/8] msg: Refactor the finding of the TLV suffix on receive.

2018-04-07 Thread Richard Cochran
Now that we have a helper routine to find the suffix, use that instead of open coding the same logic. This simplifies the code and consolidates the definition of which message types are allowed to carry TLVs. Signed-off-by: Richard Cochran --- msg.c | 13 +++-- 1 file changed, 3

[Linuxptp-devel] [PATCH RFC 1/8] transport: Use the proper enumerated event code.

2018-04-07 Thread Richard Cochran
Originally the 'event' parameter to transport_send() was a single Boolean flag. Over time, we grew an enumerated list of event flavors, but the function signatures were never updated. This patch changes the methods to use the proper type. Signed-off-by: Richard Cochran

[Linuxptp-devel] [PATCH RFC 6/8] msg: Introduce a method to copy a message.

2018-04-07 Thread Richard Cochran
The transparent clock will want to have two copies of certain messages, one for forwarding and one for internal use (in the BMCA and for syntonization). This patch add a function that duplicates a given message, including all of the attached TLVs. Signed-off-by: Richard Cochran --- msg.c | 34

[Linuxptp-devel] [PATCH RFC 8/8] clock: Maintain the master/local rate ratio when free running.

2018-04-07 Thread Richard Cochran
ratio when the clock is free running. Signed-off-by: Richard Cochran --- clock.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/clock.c b/clock.c index ed440d7..b0d0542 100644 --- a/clock.c +++ b/clock.c @@ -115,6 +115,7 @@ struct clock { struct tsproc *tsproc; s

[Linuxptp-devel] [PATCH RFC 2/8] transport: Fix callers to pass a proper enumeration value.

2018-04-07 Thread Richard Cochran
The majority of the callers of transport_send() use hard coded magic numbers. This patch fixes them to use the corresponding enumerated values instead. Signed-off-by: Richard Cochran --- clock.c | 2 +- nsm.c| 2 +- pmc_common.c | 3 ++- port.c | 19

[Linuxptp-devel] [PATCH RFC 0/8] Transparent Clock part II

2018-04-07 Thread Richard Cochran
code to support virtual "syntonization". Richard Cochran (8): transport: Use the proper enumerated event code. transport: Fix callers to pass a proper enumeration value. transport: Introduce transmit time stamp deferral. transport: Introduce method for fetching a deferred tra

[Linuxptp-devel] [PATCH RFC 3/8] transport: Introduce transmit time stamp deferral.

2018-04-07 Thread Richard Cochran
switch. This patch adds a new transmit mode for event messages that will be used to signal the new behavior. Signed-off-by: Richard Cochran --- raw.c | 14 +- transport.h | 1 + udp.c | 16 ++-- udp6.c | 16 ++-- 4 files changed, 42 insertions

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

2018-04-12 Thread Richard Cochran
On Fri, Apr 06, 2018 at 12:34:33PM +0200, Anders Selhammer wrote: > Signed-off-by: Anders Selhammer > --- > clock.c | 36 > 1 file changed, 24 insertions(+), 12 deletions(-) Applied. Thanks, Richard --

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

2018-04-12 Thread Richard Cochran
On Fri, Apr 06, 2018 at 12:34:32PM +0200, Anders Selhammer wrote: > Signed-off-by: Anders Selhammer > --- > port.c | 70 > +++--- > 1 file changed, 46 insertions(+), 24 deletions(-) Applied. Thanks, Richard --

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

2018-04-12 Thread Richard Cochran
On Fri, Apr 06, 2018 at 12:34:34PM +0200, Anders Selhammer wrote: > +#ifndef HAVE_PM_H > +#define HAVE_PM_H > + > +#include > + > +#include "stats.h" > +#include "tmv.h" > + > +#define PM_15M_TIMER 900 > + > +typedef tmv_t PMTimestamp; This typedef serves no useful purpose. Just use this... > +

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

2018-04-12 Thread Richard Cochran
On Fri, Apr 06, 2018 at 12:34:31PM +0200, Anders Selhammer wrote: > 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

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

2018-04-12 Thread Richard Cochran
On Fri, Apr 06, 2018 at 12:34:35PM +0200, Anders Selhammer wrote: > +void stats_combine(struct stats *to, struct stats *from) > +{ > + if (!from->num) { > + return; > + } > + to->min = (to->num && to->min < from->min) ? to->min : from->min; > + to->max = (to->num && to->

Re: [Linuxptp-devel] [PATCH v3 06/12] phc2sys.c: Handling of node.servo_type

2018-04-12 Thread Richard Cochran
On Sat, Apr 07, 2018 at 10:35:10PM +0200, Peter Schneider wrote: > Use struct config item 'clock_servo' for > parameter handling. Copy this to node.servo_type afterwards. Please format your paragraphs evenly, for example: Use struct config item 'clock_servo' for parameter handling. Copy this

Re: [Linuxptp-devel] [PATCH v3 07/12] phc2sys.c: Handling of node.kernel_leap

2018-04-12 Thread Richard Cochran
On Sat, Apr 07, 2018 at 10:35:11PM +0200, Peter Schneider wrote: > + if (node.servo_type == CLOCK_SERVO_NTPSHM) { > + config_set_int(cfg, "kernel_leap", 0); > + } So this coupling of kernel_leap with the servo is new logic, right? > + node.kernel_leap = config_get_int(cfg,

Re: [Linuxptp-devel] [PATCH v3 08/12] phc2sys.c: Handling of node.sanity_freq_limit

2018-04-12 Thread Richard Cochran
On Sat, Apr 07, 2018 at 10:35:12PM +0200, Peter Schneider wrote: > Copy 'node.sanity_freq_limit' to struct > config item 'sanity_freq_limit'. Check for 'servo_type' == > CLOCK_SERVO_NTPSHM. Copy 'node.sanity_freq_limit' to struct config item 'sanity_freq_limit'. Check for 'servo_type' == CLOCK_SER

Re: [Linuxptp-devel] [PATCH v3 05/12] phc2sys.c: Handlöing of use_syslog

2018-04-12 Thread Richard Cochran
Handlöing :^) -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Linuxptp-devel mailing list Lin

Re: [Linuxptp-devel] [PATCH v3 09/12] phc2sys.c: Implement configuration file handling

2018-04-12 Thread Richard Cochran
On Sat, Apr 07, 2018 at 10:35:13PM +0200, Peter Schneider wrote: > @@ -1339,6 +1340,7 @@ static void usage(char *progname) > int main(int argc, char *argv[]) > { > char *progname; > + char *config = NULL; > char *src_name = NULL, *dst_name = NULL; Can you please organize these a

Re: [Linuxptp-devel] [PATCH v3 10/12] phc2sys.c: Implement handling of Long options

2018-04-12 Thread Richard Cochran
On Sat, Apr 07, 2018 at 10:35:14PM +0200, Peter Schneider wrote: > @@ -1344,11 +1344,13 @@ int main(int argc, char *argv[]) > char *src_name = NULL, *dst_name = NULL; > struct clock *src, *dst; > struct config *cfg; > + struct option *opts; > int autocfg = 0, rt = 0; >

Re: [Linuxptp-devel] [PATCH v3 12/12] phc2sys.8: Doc long opts / cfgfile handling

2018-04-13 Thread Richard Cochran
We also want this bit. You can copy it from ptp4l.8: -f config Read configuration from the specified file. No configuration file is read by default. > +There are more options, which SHOULD be working, but these are untested: Please leave this out. We'll

Re: [Linuxptp-devel] [PATCH v3 00/12] phc2sys: long-opts/cfg-file/tS

2018-04-13 Thread Richard Cochran
On Sat, Apr 07, 2018 at 10:35:04PM +0200, Peter Schneider wrote: > This patch series changes phc2sys. It implements the possibility to use a > configuration file, enables the usage of long options and allows > configuring the transportSpecific value. > In contrast to v2 of this patch series, all (p

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

2018-04-13 Thread Richard Cochran
On Fri, Apr 13, 2018 at 07:38:57AM +, Anders Selhammer wrote: > I believe that the reporting issue will be solved. Otherwise we maybe could > introduce > some linuxptp TLVs for this purpose and update these later when the standard > describe them ? I'd like to have a plan. It would be a sha

Re: [Linuxptp-devel] [PATCH 4/4] phc2sys: fix race between signals and port initialization.

2018-04-13 Thread Richard Cochran
On Fri, Apr 13, 2018 at 05:11:59PM +0200, Miroslav Lichvar wrote: > @@ -1148,6 +1148,8 @@ static int auto_init_ports(struct node *node, int > add_rt) > char iface[IFNAMSIZ]; > > while (1) { > + if (!is_running()) > + return -1; Why not this?

[Linuxptp-devel] [PATCH RFC 6/6] Add an example configuration for an end to end transparent clock.

2018-04-14 Thread Richard Cochran
Signed-off-by: Richard Cochran --- E2E-TC.cfg | 91 ++ 1 file changed, 91 insertions(+) create mode 100644 E2E-TC.cfg diff --git a/E2E-TC.cfg b/E2E-TC.cfg new file mode 100644 index 000..9d9aacc --- /dev/null +++ b/E2E-TC.cfg

[Linuxptp-devel] [PATCH RFC 5/6] Add an example configuration for a peer to peer transparent clock.

2018-04-14 Thread Richard Cochran
Signed-off-by: Richard Cochran --- P2P-TC.cfg | 91 ++ 1 file changed, 91 insertions(+) create mode 100644 P2P-TC.cfg diff --git a/P2P-TC.cfg b/P2P-TC.cfg new file mode 100644 index 000..119627c --- /dev/null +++ b/P2P-TC.cfg

[Linuxptp-devel] [PATCH RFC 2/6] p2p_tc: Implement a peer to peer transparent clock.

2018-04-14 Thread Richard Cochran
The P2P TC forwards Announce, Management, Signaling, and Sync messages, consumes P2P Delay messages, and drops E2E Delay messages. This implementation tracks the GM using the BMCA in order to syntonize (or possibly even synchronize) with it. Signed-off-by: Richard Cochran --- clock.c

[Linuxptp-devel] [PATCH RFC 1/6] tc: Add the transparent clock implementation.

2018-04-14 Thread Richard Cochran
the message buffers. Signed-off-by: Richard Cochran --- clock.c| 1 + makefile | 2 +- port.c | 3 + port.h | 5 + port_private.h | 9 ++ tc.c | 441 + tc.h | 94 7

[Linuxptp-devel] [PATCH RFC 0/6] Transparent Clock - third and final part

2018-04-14 Thread Richard Cochran
This series add support for running a TC over multiple ports. Comments, testing, and review are most welcome. Thanks, Richard Richard Cochran (6): tc: Add the transparent clock implementation. p2p_tc: Implement a peer to peer transparent clock. e2e_tc: Implement an end to end transparent

[Linuxptp-devel] [PATCH RFC 4/6] config: Add a configuration option for TC mode.

2018-04-14 Thread Richard Cochran
This patch adds a new configuation option that enables transparent clock mode. When TC mode is specified, the configured delay mechanism must also match. The legacy behavior of upgrading a multi-port clock from OC to BC is preserved. Signed-off-by: Richard Cochran --- config.c| 10

[Linuxptp-devel] [PATCH RFC 3/6] e2e_tc: Implement an end to end transparent clock.

2018-04-14 Thread Richard Cochran
The E2E TC forwards Announce, Delay_Req, Delay_Resp, Management, Signaling, and Sync messages, and drops P2P Delay messages. This implementation tracks the GM using the BMCA in order to syntonize (or possibly even synchronize) with it. Signed-off-by: Richard Cochran --- clock.c| 2

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

2018-04-16 Thread Richard Cochran
On Mon, Apr 16, 2018 at 07:20:05AM +, Anders Selhammer wrote: > On Friday after I went for weekend, I got this from one of the authors of > Annex M: > "In the present standard, it is SNMP or NETCONF that is supposed to be used > to retrieve PM data." > When I read Annex M again, this is menti

[Linuxptp-devel] [PATCH 1/2] nsm, pmc: Check for missing HW time stamps.

2018-04-16 Thread Richard Cochran
ned-off-by: Richard Cochran --- nsm.c| 9 + pmc_common.c | 9 + 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/nsm.c b/nsm.c index 0fb73fb..cefea5d 100644 --- a/nsm.c +++ b/nsm.c @@ -337,16 +337,17 @@ static struct ptp_message *nsm_recv(struct nsm *ns

[Linuxptp-devel] [PATCH 2/2] msg: Detect missing HW time stamps on duplicated messages.

2018-04-16 Thread Richard Cochran
method to check properly for this error condition. Fixes: 51b540875fab ("msg: Introduce a method to copy a message.") Signed-off-by: Richard Cochran --- msg.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/msg.c b/msg.c index a4a44fd..090715b 100644 --- a/m

Re: [Linuxptp-devel] [PATCH v4 00/12] phc2sys: long-opts/cfg-file/tS

2018-04-18 Thread Richard Cochran
On Sun, Apr 15, 2018 at 09:13:46PM +0200, Peter Schneider wrote: > This patch series changes phc2sys. It implements the possibility to use a > configuration file, enables the usage of long options and allows > configuring the transportSpecific value. > Changes proposed by Anders and Richard added.

Re: [Linuxptp-devel] [PATCH 1/1] pmc: Fix LOG_SYNC_INTERVAL

2018-04-18 Thread Richard Cochran
On Tue, Apr 17, 2018 at 08:59:09PM +0200, Peter Schneider wrote: > Signed-off-by: Peter Schneider > --- > pmc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/pmc.c b/pmc.c > index 209a88a..6f23167 100644 > --- a/pmc.c > +++ b/pmc.c > @@ -414,7 +414,7 @@ static void pmc

Re: [Linuxptp-devel] [PATCH 0/1] Allow commands on command line in nsm

2018-04-19 Thread Richard Cochran
On Thu, Apr 19, 2018 at 01:52:35PM +0200, Miroslav Lichvar wrote: > Will the interactive mode still be useful if there is only one > command, which can be specified on the command line? It isn't too useful now, but maybe it will grow commands over time? Thanks, Richard --

Re: [Linuxptp-devel] [PATCH 0/4] timemaster enhacements

2018-04-19 Thread Richard Cochran
On Fri, Apr 13, 2018 at 05:11:55PM +0200, Miroslav Lichvar wrote: > The first patch is needed to avoid conflicts between config.h and > timemaster.c. The second patch adds support for bonded interfaces to > timemaster and the third patch adds automatic restarting of (failed) > processes. The last p

Re: [Linuxptp-devel] [PATCH] phc2sys: fix PPS mode with no source clock.

2018-04-19 Thread Richard Cochran
On Thu, Apr 19, 2018 at 04:35:11PM +0200, Miroslav Lichvar wrote: > When using a PPS source with no source clock specified with the -s > option, avoid referencing a NULL pointer and using CLOCK_INVALID in > system calls. Applied. Thanks, Richard --

<    1   2   3   4   5   6   7   8   9   10   >