Re: [Linuxptp-devel] [PATCH RFC 29/30] interface: Silence warning from gcc version 8.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > When compiling with gcc8 and -O2, the clever compiler complains: > >interface.c: In function ‘interface_ensure_tslabel’: >interface.c:38:3: error: ‘strncpy’ output may be truncated copying 108 > bytes from a string of length 108

Re: [Linuxptp-devel] [PATCH RFC 27/30] pmc: Use the proper create/destroy API for network interfaces.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller > --- > pmc_common.c | 19 --- > 1 file changed, 12 insertions(+), 7 deletions(-) > > diff --git a/pmc_common.c b/pmc_common.c > index 41181fb..3aab4b9 100644 > ---

Re: [Linuxptp-devel] [PATCH RFC 26/30] config: Use the proper create/destroy API for network interfaces.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller > --- > config.c | 6 ++ > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/config.c b/config.c > index 717ee65..e033842 100644 > --- a/config.c > +++ b/config.c > @@

Re: [Linuxptp-devel] [PATCH RFC 25/30] clock: Use the proper create/destroy API for network interfaces.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller > --- > clock.c | 17 + > 1 file changed, 9 insertions(+), 8 deletions(-) > > diff --git a/clock.c b/clock.c > index 71b5795..e5f104e 100644 > --- a/clock.c > +++ b/clock.c

Re: [Linuxptp-devel] [PATCH RFC 24/30] interface: Introduce methods to create and destroy instances.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > In order to eventually hide the implementation details of the interface, > users will need to be able to create and destroy instances thereof. This > patch adds the needed methods. > > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller >

Re: [Linuxptp-devel] [PATCH RFC 23/30] Convert call sites to the proper method for testing time stamping modes.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller > --- > clock.c | 2 +- > port.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/clock.c b/clock.c > index 845e27a..71b5795 100644 > --- a/clock.c > +++

Re: [Linuxptp-devel] [PATCH RFC 22/30] interface: Introduce a method to test supported time stamping modes.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller > --- > interface.c | 8 > interface.h | 8 > 2 files changed, 16 insertions(+) > > diff --git a/interface.c b/interface.c > index 7a3eddc..74a2512 100644 > ---

Re: [Linuxptp-devel] [PATCH RFC 21/30] Convert call sites to the proper method for testing time stamp info validity.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran Straight forward. Reviewed-by: Jacob Keller > --- > clock.c | 4 ++-- > port.c | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/clock.c b/clock.c > index 71b3899..845e27a 100644 >

Re: [Linuxptp-devel] [PATCH RFC 20/30] interface: Introduce a method to test the time stamping information validity.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller > --- > interface.c | 5 + > interface.h | 8 > 2 files changed, 13 insertions(+) > > diff --git a/interface.c b/interface.c > index 02f63a0..7a3eddc 100644 > ---

Re: [Linuxptp-devel] [PATCH RFC 18/30] interface: Introduce a method to get the PHC index.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran > --- > interface.c | 5 + > interface.h | 7 +++ > 2 files changed, 12 insertions(+) > > diff --git a/interface.c b/interface.c > index d7eeb41..02f63a0 100644 > --- a/interface.c > +++ b/interface.c > @@

Re: [Linuxptp-devel] [PATCH RFC 19/30] Convert call sites to the proper method for getting the PHC index.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller > --- > clock.c | 2 +- > port.c | 17 ++--- > 2 files changed, 11 insertions(+), 8 deletions(-) > > diff --git a/clock.c b/clock.c > index 5001e66..71b3899 100644 > ---

Re: [Linuxptp-devel] [PATCH RFC 18/30] interface: Introduce a method to get the PHC index.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller > --- > interface.c | 5 + > interface.h | 7 +++ > 2 files changed, 12 insertions(+) > > diff --git a/interface.c b/interface.c > index d7eeb41..02f63a0 100644 > ---

Re: [Linuxptp-devel] [PATCH RFC 17/30] Convert call sites to the proper method for setting the time stamping label.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran > --- > clock.c | 6 -- > nsm.c | 5 - > port.c | 2 +- > rtnl.c | 2 +- > rtnl.h | 4 +++- > 5 files changed, 13 insertions(+), 6 deletions(-) > > diff --git a/clock.c b/clock.c > index

Re: [Linuxptp-devel] [PATCH RFC 16/30] interface: Introduce a method to set the time stamping label.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > The ts_label field of the interface is set in different ways by different > callers. In order to prevent users from open coding the logic that sets > the label, this patch adds an appropriate method. > > Signed-off-by: Richard Cochran Reviewed-by:

Re: [Linuxptp-devel] [PATCH RFC 15/30] Convert call sites to the proper method for setting the name.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller > --- > clock.c | 5 +++-- > config.c | 2 +- > pmc_common.c | 2 +- > 3 files changed, 5 insertions(+), 4 deletions(-) > > diff --git a/clock.c b/clock.c > index

Re: [Linuxptp-devel] [PATCH RFC 13/30] Convert call sites to the proper method for initializing the time stamping label.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran > --- > clock.c | 12 +--- > nsm.c| 4 +--- > pmc_common.c | 4 +--- > 3 files changed, 3 insertions(+), 17 deletions(-) > Reviewed-by: Jacob Keller > diff --git a/clock.c b/clock.c >

Re: [Linuxptp-devel] [PATCH RFC 14/30] interface: Introduce a method to set the name.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > The name field of the interface is set in different ways by different > callers. In order to prevent users from open coding the logic that sets > the name, this patch adds an appropriate method. > > Signed-off-by: Richard Cochran Reviewed-by:

Re: [Linuxptp-devel] [PATCH RFC 12/30] interface: Introduce a method to initialize the time stamping label.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > In many cases, the time stamping label will be the same as the name of > the interface. In order to prevent users from open coding the logic that > initializes the label from the interface name, this patch add an > appropriate method. > >

Re: [Linuxptp-devel] [PATCH RFC 12/30] interface: Introduce a method to initialize the time stamping label.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > In many cases, the time stamping label will be the same as the name of > the interface. In order to prevent users from open coding the logic that > initializes the label from the interface name, this patch add an > appropriate method. > >

Re: [Linuxptp-devel] [PATCH RFC 11/30] Convert call sites to the proper method for getting time stamp information.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller > --- > clock.c | 2 +- > port.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/clock.c b/clock.c > index 66c6bc1..f987965 100644 > --- a/clock.c > +++

Re: [Linuxptp-devel] [PATCH RFC 10/30] interface: Introduce a method to get the time stamping information.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > In order to prevent users from open coding this logic, this patch > provides a method that populates the time stamping information from > the interface label. > > Signed-off-by: Richard Cochran Makes sense. Reviewed-by: Jacob Keller > --- >

Re: [Linuxptp-devel] [PATCH RFC 09/30] Convert call sites to the proper method for getting interface labels.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:03 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran Straight forward. Besides wondering about the object groups in the makefile, Reviewed-by: Jacob Keller > --- > clock.c | 2 +- > port.c | 17 ++--- > raw.c | 5 +++-- > udp.c | 2 +- > udp6.c

Re: [Linuxptp-devel] [PATCH RFC 08/30] interface: Introduce an access method for the time stamping label.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:03 AM, Richard Cochran wrote: > Many of the users only require a read only reference to the time > stamping label of the interface. This patch adds an appropriate > method. > > Signed-off-by: Richard Cochran Makes sense. > --- > interface.c | 5 + > interface.h | 9

Re: [Linuxptp-devel] [PATCH RFC 08/30] interface: Introduce an access method for the time stamping label.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:03 AM, Richard Cochran wrote: > Many of the users only require a read only reference to the time > stamping label of the interface. This patch adds an appropriate > method. > > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller

Re: [Linuxptp-devel] [PATCH RFC 07/30] Convert call sites to the proper method for getting interface names.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:03 AM, Richard Cochran wrote: > Signed-off-by: Richard Cochran > --- > clock.c| 21 +++-- > config.c | 12 +++- > makefile | 10 +- > nsm.c | 9 + > pmc_common.c | 2 +- > port.c | 19

Re: [Linuxptp-devel] [PATCH RFC 06/30] interface: Introduce an access method for the name field.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:03 AM, Richard Cochran wrote: > Many of the users only require a read only reference to the interface name. > This patch adds an appropriate method. > Right. > Signed-off-by: Richard Cochran --- > interface.c | 12 > interface.h | 7 +++ > makefile| 8

Re: [Linuxptp-devel] [PATCH RFC 05/30] Move the network interface into its own header file.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:03 AM, Richard Cochran wrote: > Up until now, the users of the interface data structure simply access > its fields without restriction. This patch takes the first step > towards abstracting this data structure by giving it a file of its > very own. > > Signed-off-by: Richard

Re: [Linuxptp-devel] [PATCH RFC 04/30] utils: Constify the posix clock interface.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:03 AM, Richard Cochran wrote: > The function to open a posix clock never modifies the passed in > string. This patch adds the const keyword to ensure this function > stays that way. > > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller > --- > util.c | 2 +- >

Re: [Linuxptp-devel] [PATCH RFC 03/30] rtnl: Constify the public interface.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:03 AM, Richard Cochran wrote: > Three of the rtnl methods never modify the strings passed in. This > patch adds the const keyword to ensure these functions stay that way. > > Signed-off-by: Richard Cochran Reviewed-by: Jacob Keller > --- > rtnl.c | 6 +++--- > rtnl.h | 6

Re: [Linuxptp-devel] [PATCH RFC 02/30] config: Constify the public interface.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:03 AM, Richard Cochran wrote: > The two methods, config_create_interface and config_read, never modify the > strings passed in. This patch adds the const keyword to ensure these > functions stay that way. > Makes sense. Using const in more places like this is great! It helps

Re: [Linuxptp-devel] [PATCH RFC 01/30] Group related objects together within the makefile.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:03 AM, Richard Cochran wrote: > Any program that links to the servo interface must also link with the > implementations of that interface. Similarly, the filter and network > transport interfaces each require their implementations. This patch > re-factors the makefile to

Re: [Linuxptp-devel] [PATCH RFC 00/30] Convert open coded interface into proper module.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:03 AM, Richard Cochran wrote: > Using gcc8 and -O2, the compiler emits an annoying false positive > warning. Since I want to have -Werror, I went about fixing it. Start > pulling on a thread, and ... > Excellent goal! > The 'struct interface' is wide open to its users, and each