Re: [Linuxptp-devel] [PATCH] Avoid setting clock frequency when free running.

2020-11-09 Thread Miroslav Lichvar
On Sun, Nov 08, 2020 at 08:34:33AM -0800, Richard Cochran wrote: > @@ -1114,8 +1114,9 @@ struct clock *clock_create(enum clock_type type, struct > config *config, > /* Due to a bug in older kernels, the reading may silently fail > and return 0. Set the frequency back

Re: [Linuxptp-devel] [PATCH] Avoid setting clock frequency when free running.

2020-11-09 Thread Richard Cochran
On Mon, Nov 09, 2020 at 10:12:58AM +0100, Miroslav Lichvar wrote: > > Makes sense to me, but maybe it's time to drop the workaround? Looking > at the git log, it was added in 2013. Are people still using linuxptp > on kernels older than that? Yes, I think so. When I was collaborating with Balint

[Linuxptp-devel] [PATCH 3/5] pmc_agent: Hide the implementation.

2020-11-09 Thread Richard Cochran
The PMC agent's implementation should not be exposed to its users. This patch hides the details and provides a method to create an instance. In addition, the signature of the receive callback is made generic, removing the container_of pattern meant for sub-classing modules. Signed-off-by: Richar

[Linuxptp-devel] [PATCH 2/5] pmc_agent: Rename pmc_node to something more descriptive.

2020-11-09 Thread Richard Cochran
Signed-off-by: Richard Cochran --- phc2sys.c | 4 ++-- pmc_agent.c | 26 +- pmc_agent.h | 26 +- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/phc2sys.c b/phc2sys.c index 17d5b4f..c1eab1b 100644 --- a/phc2sys.c +++ b/phc2sys.c

[Linuxptp-devel] [PATCH 1/5] Introduce the PMC agent module.

2020-11-09 Thread Richard Cochran
The logic for placing PTP management queries migrated out of phc2sys into pmc_common in order to be shared with other programs in the future. This logic uses pmc_common rather than extending it, and so it should live in its own module stacked on top of pmc_common. This patch moves the code into i

[Linuxptp-devel] [PATCH 4/5] Find a better home for the management TLV ID helper function.

2020-11-09 Thread Richard Cochran
Signed-off-by: Richard Cochran --- msg.h | 12 phc2sys.c | 2 +- pmc_agent.c | 10 +- pmc_agent.h | 1 - 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/msg.h b/msg.h index e71d3ce..b600ff0 100644 --- a/msg.h +++ b/msg.h @@ -247,6 +247,18 @@ static

[Linuxptp-devel] [PATCH 0/5] PMC Agent - Part I

2020-11-09 Thread Richard Cochran
As a result of the recent refactoring of PMC logic out of the phc2sys program, the pmc_common module has collected two interfaces, one of which layers on top of the other. This series names the upper layer "PMC agent" and places it into its own module. - Patch #1 moves the existing code without c

[Linuxptp-devel] [PATCH 5/5] Find a better home for the management TLV data helper function.

2020-11-09 Thread Richard Cochran
Signed-off-by: Richard Cochran --- msg.h | 12 phc2sys.c | 2 +- pmc_agent.c | 18 +- pmc_agent.h | 1 - 4 files changed, 18 insertions(+), 15 deletions(-) diff --git a/msg.h b/msg.h index b600ff0..84380da 100644 --- a/msg.h +++ b/msg.h @@ -247,6 +247,18 @@

Re: [Linuxptp-devel] [PATCH 2/5] pmc_agent: Rename pmc_node to something more descriptive.

2020-11-09 Thread Vladimir Oltean
On Mon, Nov 09, 2020 at 01:44:56PM -0800, Richard Cochran wrote: > Signed-off-by: Richard Cochran > --- > phc2sys.c | 4 ++-- > pmc_agent.c | 26 +- > pmc_agent.h | 26 +- > 3 files changed, 28 insertions(+), 28 deletions(-) > > diff --git a/phc

Re: [Linuxptp-devel] [PATCH 2/5] pmc_agent: Rename pmc_node to something more descriptive.

2020-11-09 Thread Richard Cochran
On Tue, Nov 10, 2020 at 12:54:16AM +0200, Vladimir Oltean wrote: > It will remain named "node" though? No, it will change, too. I just want to avoid having too much churn in a single patch... Part II will finish the job... Thanks, Richard ___ Linuxp

Re: [Linuxptp-devel] [PATCH 3/5] pmc_agent: Hide the implementation.

2020-11-09 Thread Vladimir Oltean
On Mon, Nov 09, 2020 at 01:44:57PM -0800, Richard Cochran wrote: > The PMC agent's implementation should not be exposed to its users. This > patch hides the details and provides a method to create an instance. In > addition, the signature of the receive callback is made generic, removing > the co

Re: [Linuxptp-devel] [PATCH 4/5] Find a better home for the management TLV ID helper function.

2020-11-09 Thread Vladimir Oltean
On Mon, Nov 09, 2020 at 01:44:58PM -0800, Richard Cochran wrote: > Signed-off-by: Richard Cochran > --- > msg.h | 12 > phc2sys.c | 2 +- > pmc_agent.c | 10 +- > pmc_agent.h | 1 - > 4 files changed, 14 insertions(+), 11 deletions(-) > > diff --git a/msg.h b/msg.h

Re: [Linuxptp-devel] [PATCH 5/5] Find a better home for the management TLV data helper function.

2020-11-09 Thread Vladimir Oltean
On Mon, Nov 09, 2020 at 01:44:59PM -0800, Richard Cochran wrote: > Signed-off-by: Richard Cochran > --- > msg.h | 12 > phc2sys.c | 2 +- > pmc_agent.c | 18 +- > pmc_agent.h | 1 - > 4 files changed, 18 insertions(+), 15 deletions(-) > > diff --git a/msg.h

Re: [Linuxptp-devel] [PATCH 5/5] Find a better home for the management TLV data helper function.

2020-11-09 Thread Vladimir Oltean
On Tue, Nov 10, 2020 at 01:28:19AM +0200, Vladimir Oltean wrote: > Again, great improvement already, but could you please say > 'Obtain the dataField from the Management TLV in a management message' > in the comments here? Some of us are not great with pattern matching, > and like to have it easy.

Re: [Linuxptp-devel] [PATCH 3/5] pmc_agent: Hide the implementation.

2020-11-09 Thread Richard Cochran
On Tue, Nov 10, 2020 at 01:19:29AM +0200, Vladimir Oltean wrote: > Now that the pmc_agent is going to have a more 'stable' interface, I > wonder if this callback is even properly placed in struct pmc_agent and > shouldn't be a simple argument passed to run_pmc_events(), considering > that this is

Re: [Linuxptp-devel] [PATCH 4/5] Find a better home for the management TLV ID helper function.

2020-11-09 Thread Richard Cochran
On Tue, Nov 10, 2020 at 01:24:30AM +0200, Vladimir Oltean wrote: > This is a lot easier to read, with the new name and the description. Do > you think you could specify in this function's comments that it obtains > the managementId field, for easier cross-referencing with the standard? Will do.