Re: [Linuxptp-devel] Adding libpmc

2020-04-16 Thread Jiri Benc
On Thu, 16 Apr 2020 17:06:46 +, Geva, Erez wrote: > While the Kernel is under GPL 2. > The headers and system call are under exception, so user can use the > Kernel with non GPL code. But any changes or addition to the kernel > itself should be GPL 2. This is very different. The Linux kernel

Re: [Linuxptp-devel] Adding libpmc

2020-04-16 Thread Jiri Benc
Hi Erez, On Thu, 16 Apr 2020 14:18:25 +, Geva, Erez wrote: > I see that linux PTP is under GPL 2. > > I would like to ask your permission to allow using a libpmc library > and headers needed by it under LGPL 2. Could I ask you to provide more context, please? I contributed to the Linux PTP

Re: [Linuxptp-devel] [PATCH 5/6] Add PHC methods for querying and configuring the pin functionality.

2020-03-09 Thread Jiri Benc
On Mon, 9 Mar 2020 07:16:23 -0700, Richard Cochran wrote: > But maybe that wouldn't be worst thing in the world. There is a trade > off between maintaining parallel copies of ptp_clock_caps and the > convenience of compiling the stack just once with the "future" kernel > definitions. > >

Re: [Linuxptp-devel] [PATCH 5/6] Add PHC methods for querying and configuring the pin functionality.

2020-03-09 Thread Jiri Benc
On Fri, 6 Mar 2020 11:23:00 -0800, Richard Cochran wrote: > +int phc_number_pins(clockid_t clkid) > +{ > + struct ptp_clock_caps caps; > + > + if (phc_get_caps(clkid, )) { > + return 0; > + } > +#ifdef HAVE_PIN_SETFUNC > + return caps.n_pins; > +#else > + return 0;

Re: [Linuxptp-devel] [PATCH 2/2] pmc: Support querying TLV_PORT_PROPERTIES_NP

2019-09-17 Thread Jiri Benc
On Mon, 16 Sep 2019 14:44:57 +, Petr Machata wrote: > So you want to change the current TLV? I guess that's reasonable, since > it is essentially an internal API. Whatever, just have a way to extend this in the future, while allowing the tools compiled today to still work after the extension.

Re: [Linuxptp-devel] [PATCH 2/2] pmc: Support querying TLV_PORT_PROPERTIES_NP

2019-09-16 Thread Jiri Benc
On Mon, 16 Sep 2019 14:04:00 +, Petr Machata wrote: > I was actually thinking about /var/run/netns being mounted elsewhere or > some such, which would prevent "ip netns id" from working. The symbolic > names seem to be accessible from other namespaces just fine --"ip netns > exec foo ip netns

Re: [Linuxptp-devel] [PATCH 2/2] pmc: Support querying TLV_PORT_PROPERTIES_NP

2019-09-16 Thread Jiri Benc
On Mon, 16 Sep 2019 09:56:29 +, Petr Machata wrote: > Inside the namespace you can do "ip netns id" to get the namespace that > you are in. Beware that this netnsid is only valid in the net name space that the 'ip' command ran in. It is not a global identifier and it is not valid in another

Re: [Linuxptp-devel] [PATCH 2/2] pmc: Support querying TLV_PORT_PROPERTIES_NP

2019-09-13 Thread Jiri Benc
On Fri, 13 Sep 2019 09:32:37 +, Petr Machata wrote: > I would guess the same problem applies when phc2sys uses the interface. > Why is it not an issue there? It is an issue, too, of course, but it's mostly theoretical. It won't happen in practice - usually, phc2sys will be started together

Re: [Linuxptp-devel] [PATCH 2/2] pmc: Support querying TLV_PORT_PROPERTIES_NP

2019-09-13 Thread Jiri Benc
On Thu, 12 Sep 2019 11:06:30 +, Petr Machata wrote: > + text2str(>interface)); How does this work when net name spaces are in use? There's no guarantee that pmc is run in the same net name space where ptp4l is running. The returned interface name may correspond to a

Re: [Linuxptp-devel] ptp4l wrongly takes padding bytes as TLV?

2019-02-05 Thread Jiri Benc
On Tue, 5 Feb 2019 15:44:47 +, Vincent Li X wrote: > In our case, it's not wrong FCS or unwanted padding, but PHY replaced > original FCS with frame padding of random value. I very much doubt that. I bet the FCS was just stripped. I have yet to see a NIC that would replace FCS by a random

Re: [Linuxptp-devel] ptp4l wrongly takes padding bytes as TLV?

2019-01-31 Thread Jiri Benc
On Thu, 31 Jan 2019 16:28:30 +, Vincent Li X wrote: > we might also need to check again m->header.messageLength is bigger than > cnt. This might not be a bad idea; if the packet length is inconsistent with the PTP or 802.3 standard, a warning can be emitted and the packet dropped and not

Re: [Linuxptp-devel] ptp4l wrongly takes padding bytes as TLV?

2019-01-31 Thread Jiri Benc
On Thu, 31 Jan 2019 07:41:38 -0800, Richard Cochran wrote: > FWIW, Wireshark shows "Bad FCS" for this frame. Please fix it at the > sender. To be fair, this is just an artifact of Wireshark guessing wrong on the packet structure. AFAIK there's no indication of the frames having FCS or not in

Re: [Linuxptp-devel] ptp4l wrongly takes padding bytes as TLV?

2019-01-30 Thread Jiri Benc
On Wed, 30 Jan 2019 11:34:25 +0100, Miroslav Lichvar wrote: > Are there other vendors than Qulsar that do this? If it's a common > issue, it might need to be specified. IIRC there are few other cases > where the spec had to be adjusted to follow what existing HW was doing. The Qulsar hardware

Re: [Linuxptp-devel] [PATCH v2 4/5] sk: Added functionality for reassociate namespace

2018-11-13 Thread Jiri Benc
On Tue, 13 Nov 2018 10:34:20 +, Anders Selhammer wrote: > + snprintf(path, sizeof path, "/var/run/netns/%s", ns); This path is just a convention used by iproute2. There's nothing that forces a network name space to be mounted in /var/run/netns. It can be mounted elsewhere or even

Re: [Linuxptp-devel] [PATCH 1/8] rtnl: use ifinfomsg instead of rtgenmsg to request link info

2017-07-03 Thread Jiri Benc
On Mon, 3 Jul 2017 09:12:46 +0200, Richard Cochran wrote: > We can even call uname(2) to check the kernel version when bonding is > requested in the configuration. Please don't do that. Always check for the feature being present, never for a kernel version. It's common for various groups to

Re: [Linuxptp-devel] [PATCH] Force IPv6 to IPV6 only, no ipv4 to ipv6 mapping.

2015-08-10 Thread Jiri Benc
and people get used to this behavior). Only tested on Linux. Unknown how this will work on *BSD or WinXX. I wouldn't worry about it given the amount of Linux-only interfaces linuxptp uses. Thanks, Jiri -- Jiri Benc

Re: [Linuxptp-devel] unknown option ntpshm_segment at line 8 in eno1 section

2015-08-10 Thread Jiri Benc
need to use IPv4 multicast addresses (v4-mapped to IPv6) to send the packets to the v4 hosts and not the IPv6 multicast addresses. This doesn't seem worth the complications and IPV6_V6ONLY looks like to be appropriate here. But somebody should think it through first :-) Jiri -- Jiri Benc

Re: [Linuxptp-devel] ntp SHMs

2015-02-25 Thread Jiri Benc
is a no-op, and thus does nothing. Using manual mode instead of the automatic one won't change this. What's needed is implementing ntpshm to be a clock, not a servo. tl;dr: What you're trying to achieve does not work with linuxptp currently. Jiri -- Jiri Benc

Re: [Linuxptp-devel] [PATCH RFC V2 06/10] config: add a option to enable a poor man's boundary clock.

2014-11-13 Thread Jiri Benc
collection of devices, should the user really want it. Signed-off-by: Richard Cochran richardcoch...@gmail.com Acked-by: Jiri Benc jb...@redhat.com -- Jiri Benc -- Comprehensive Server Monitoring with Site24x7

Re: [Linuxptp-devel] [PATCH RFC V2 10/10] port: allow running a boundary clock with multiple clock devices.

2014-11-13 Thread Jiri Benc
should be separate, too. The reference counted structure would be a good place to hold that. Jiri -- Jiri Benc -- Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email

Re: [Linuxptp-devel] [PATCH RFC 0/3] Poor man's boundary clock

2014-11-05 Thread Jiri Benc
messages cannot be sent until the clock is really synced. This will need further communication between ptp4l and phc2sys. I still intend to work on this but have less time to work on linuxptp than before. Jiri -- Jiri Benc

Re: [Linuxptp-devel] [PATCH RFC 0/3] Poor man's boundary clock

2014-11-05 Thread Jiri Benc
On Wed, 5 Nov 2014 19:58:32 +0100, Richard Cochran wrote: On Wed, Nov 05, 2014 at 05:56:28PM +0100, Jiri Benc wrote: My plan for the next steps has been allowing ptp4l to work with multiple independent PHCs that would form a PTP clock (and rely on phc2sys to sync those PHCs). Doesn't my

Re: [Linuxptp-devel] [PATCH 1/1] Restore the peer addresses in P2P mode.

2014-10-09 Thread Jiri Benc
peer_prepare_and_send(), analogous to the port_prepare_and_send() function. I probably intended to pass the 'peer' argument to transport_send or something similar. Sorry for introducing the bug. Acked-by: Jiri Benc jb...@redhat.com -- Jiri Benc

Re: [Linuxptp-devel] [PATCH v4 3/6] Dynamic port allocation

2014-08-14 Thread Jiri Benc
for removed ports. Jiri -- Jiri Benc -- ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

[Linuxptp-devel] [PATCH v5 0/6] Dynamic port allocation

2014-08-14 Thread Jiri Benc
of LIST_FOREACH_SAFE, using the system one where available. Changes in v2: rebased on top of the current git, resolved warnings reported by Richard. Jiri Benc (6): Put fault_fd into struct port Make uds port a separate field in struct clock Dynamic port allocation Lazy regeneration of pollfd Remember last

[Linuxptp-devel] [PATCH v5 2/6] Make uds port a separate field in struct clock

2014-08-14 Thread Jiri Benc
The uds port is handled specially in almost all cases, it doesn't behave like the rest of ports in the port array. Make it a standalone member of struct clock. Signed-off-by: Jiri Benc jb...@redhat.com --- clock.c | 78 + 1 file

[Linuxptp-devel] [PATCH v3 09/15] phc2sys: event subscription

2014-06-11 Thread Jiri Benc
Add support for subscribing to events (run_pmc_subscribe) and receiving and handling of received events (run_pmc_events). Add initial support for port status changes. Signed-off-by: Jiri Benc jb...@redhat.com --- phc2sys.c | 116 +++- 1

[Linuxptp-devel] [PATCH v3 01/15] phc2sys: generalize run_pmc

2014-06-11 Thread Jiri Benc
Make run_pmc usable for any kind of management message. Create wrappers for waiting for ptp4l and for getting UTC offset. Signed-off-by: Jiri Benc jb...@redhat.com --- phc2sys.c | 131 +++-- 1 files changed, 66 insertions(+), 65 deletions

Re: [Linuxptp-devel] linuxptp in kernel 2.6.30+?

2014-06-03 Thread Jiri Benc
the backport. Feel free to send any problems in 6.5 you find my way. But this is off topic on this list... Jiri -- Jiri Benc -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide

Re: [Linuxptp-devel] [PATCH v2 04/14] phc2sys: store information about clocks being UTC or TAI

2014-05-30 Thread Jiri Benc
On Fri, 23 May 2014 10:32:28 +0200, Miroslav Lichvar wrote: On Wed, May 14, 2014 at 03:39:40PM +0200, Jiri Benc wrote: For now, only CLOCK_REALTIME can be UTC. This may stay this way forever but now we have a clean separation between codepaths where CLOCK_REALTIME is required and codepaths

Re: [Linuxptp-devel] [PATCH 11/14] phc2sys: autoconfiguration

2014-05-14 Thread Jiri Benc
On Mon, 12 May 2014 17:25:51 +0200, Miroslav Lichvar wrote: On Wed, May 07, 2014 at 06:23:15PM +0200, Jiri Benc wrote: + do_leap = update_pmc(node, 0); Shouldn't the second parameter be subscriptions 0? Yes. Seems it got incorrect during rework of the Subscription time limit

Re: [Linuxptp-devel] [PATCH 09/14] phc2sys: event subscription

2014-05-14 Thread Jiri Benc
On Mon, 12 May 2014 17:35:18 +0200, Miroslav Lichvar wrote: One more comment, could you please define the 180 second constant as a macro near PMC_UPDATE_INTERVAL so it's more clear the two are related and changing one without other could break things. Good idea. Thanks, Jiri -- Jiri Benc

[Linuxptp-devel] [PATCH v2 01/14] phc2sys: generalize run_pmc

2014-05-14 Thread Jiri Benc
Make run_pmc usable for any kind of management message. Create wrappers for waiting for ptp4l and for getting UTC offset. Signed-off-by: Jiri Benc jb...@redhat.com --- phc2sys.c | 131 +++-- 1 files changed, 66 insertions(+), 65 deletions

[Linuxptp-devel] [PATCH v2 10/14] phc2sys: propagate received errors

2014-05-14 Thread Jiri Benc
Recognize errors returned in MANAGEMENT_ERROR_STATUS TLV and return a distinct value from run_pmc in case such error is received. Signed-off-by: Jiri Benc jb...@redhat.com --- phc2sys.c | 34 +++--- 1 files changed, 27 insertions(+), 7 deletions(-) diff --git

[Linuxptp-devel] [PATCH v2 12/14] phc2sys: autoconfigure realtime clock on demand only

2014-05-14 Thread Jiri Benc
By default, do not synchronize CLOCK_REALTIME. To do it, -r option is needed. That will only consider CLOCK_REALTIME as the destination. To consider it also as a possible time source, use -rr. Signed-off-by: Jiri Benc jb...@redhat.com --- phc2sys.c | 31 --- 1 files

[Linuxptp-devel] [PATCH v2 06/14] phc2sys: open devices in clock_add

2014-05-14 Thread Jiri Benc
Do not call clock_open to open a clock device but let clock_add do that and return the newly created struct. Also, store the device (interface) name in struct clock. Signed-off-by: Jiri Benc jb...@redhat.com --- phc2sys.c | 81 ++-- 1

[Linuxptp-devel] [PATCH v2 13/14] phc2sys: check clockIdentity

2014-05-14 Thread Jiri Benc
Make sure that we handle only one PTP clock (node). This is for an extra safety. Signed-off-by: Jiri Benc jb...@redhat.com --- phc2sys.c | 44 ++-- 1 files changed, 42 insertions(+), 2 deletions(-) diff --git a/phc2sys.c b/phc2sys.c index 52417268305c

[Linuxptp-devel] [PATCH v2 09/14] phc2sys: event subscription

2014-05-14 Thread Jiri Benc
Add support for subscribing to events (run_pmc_subscribe) and receiving and handling of received events (run_pmc_events). Add initial support for port status changes. Signed-off-by: Jiri Benc jb...@redhat.com --- phc2sys.c | 116 +++- 1

[Linuxptp-devel] [PATCH v2 14/14] phc2sys: man page update for -a and -r options

2014-05-14 Thread Jiri Benc
Signed-off-by: Jiri Benc jb...@redhat.com --- phc2sys.8 | 115 ++--- 1 files changed, 79 insertions(+), 36 deletions(-) diff --git a/phc2sys.8 b/phc2sys.8 index fa3ae206f3df..37a39d0ba60f 100644 --- a/phc2sys.8 +++ b/phc2sys.8 @@ -1,12

[Linuxptp-devel] [PATCH v2 05/14] phc2sys: rearrange declarations

2014-05-14 Thread Jiri Benc
This just moves code around to have related functions together and forward declaration at the beginning of the file. No code changes. Signed-off-by: Jiri Benc jb...@redhat.com --- phc2sys.c | 208 ++--- 1 files changed, 103 insertions

[Linuxptp-devel] [PATCH 11/14] phc2sys: autoconfiguration

2014-05-07 Thread Jiri Benc
Add automatic configuration option (-a). Signed-off-by: Jiri Benc jb...@redhat.com --- phc2sys.c | 265 + 1 files changed, 250 insertions(+), 15 deletions(-) diff --git a/phc2sys.c b/phc2sys.c index 731c2bb1af35..d102ca8e8d93 100644

[Linuxptp-devel] [PATCH 07/14] phc2sys: track ports

2014-05-07 Thread Jiri Benc
Add tracking of which ports have been added and to which clock they belong. Signed-off-by: Jiri Benc jb...@redhat.com --- phc2sys.c | 51 +++ 1 files changed, 51 insertions(+), 0 deletions(-) diff --git a/phc2sys.c b/phc2sys.c index 62e9b8c19e17

[Linuxptp-devel] [PATCH 06/14] phc2sys: open devices in clock_add

2014-05-07 Thread Jiri Benc
Do not call clock_open to open a clock device but let clock_add do that and return the newly created struct. Also, store the device (interface) name in struct clock. Signed-off-by: Jiri Benc jb...@redhat.com --- phc2sys.c | 81 ++-- 1

[Linuxptp-devel] [PATCH 10/14] phc2sys: propagate received errors

2014-05-07 Thread Jiri Benc
Recognize errors returned in MANAGEMENT_ERROR_STATUS TLV and return a distinct value from run_pmc in case such error is received. Signed-off-by: Jiri Benc jb...@redhat.com --- phc2sys.c | 34 +++--- 1 files changed, 27 insertions(+), 7 deletions(-) diff --git

[Linuxptp-devel] [PATCH 08/14] pmc_common: easy way to set port and broadcast target

2014-05-07 Thread Jiri Benc
Implement pmc_target_port to set a port number, leaving clock identity unchanged, and pmc_target_all to set clock identity and port number to all 1's. Signed-off-by: Jiri Benc jb...@redhat.com --- pmc_common.c | 12 +++- pmc_common.h |2 ++ 2 files changed, 13 insertions(+), 1

[Linuxptp-devel] [PATCH 03/14] phc2sys: split clock and node

2014-05-07 Thread Jiri Benc
Split members that apply to all synchronized clocks and members that apply to an individual clock. Keep all clocks in a list, with a pointer to the source clock. This will allow to support multiple clocks synchronization. Signed-off-by: Jiri Benc jb...@redhat.com --- phc2sys.c | 397

[Linuxptp-devel] [PATCH 00/14] automatic phc2sys configuration, phc2sys part

2014-05-07 Thread Jiri Benc
+ patchset to support multiple PHC's) which I'll rebase on top of this and post after the patchset is accepted. Jiri Jiri Benc (14): phc2sys: generalize run_pmc phc2sys: split update_sync_offset phc2sys: split clock and node phc2sys: store information about clocks being UTC or TAI

[Linuxptp-devel] [PATCH 02/14] phc2sys: split update_sync_offset

2014-05-07 Thread Jiri Benc
Split the generic (global) part of update_sync_offset and the part that affects individual clocks. This is in preparation for phc2sys handling synchronization of more clocks. Signed-off-by: Jiri Benc jb...@redhat.com --- phc2sys.c | 71

[Linuxptp-devel] [PATCH 05/14] phc2sys: rearrange declarations

2014-05-07 Thread Jiri Benc
This just moves code around to have related functions together and forward declaration at the beginning of the file. No code changes. Signed-off-by: Jiri Benc jb...@redhat.com --- phc2sys.c | 208 ++--- 1 files changed, 103 insertions

[Linuxptp-devel] [PATCH 04/14] phc2sys: store information about clocks being UTC or TAI

2014-05-07 Thread Jiri Benc
on the fly based on the source and destination when we have multiple clocks supported and automatic following of ptp4l state changes implemented. Signed-off-by: Jiri Benc jb...@redhat.com --- phc2sys.c | 60 +--- 1 files changed, 29

[Linuxptp-devel] [PATCH 12/14] phc2sys: autoconfigure realtime clock on demand only

2014-05-07 Thread Jiri Benc
By default, do not synchronize CLOCK_REALTIME. To do it, -r option is needed. That will only consider CLOCK_REALTIME as the destination. To consider it also as a possible time source, use -rr. Signed-off-by: Jiri Benc jb...@redhat.com --- phc2sys.c | 31 --- 1 files

[Linuxptp-devel] [PATCH 01/14] phc2sys: generalize run_pmc

2014-05-07 Thread Jiri Benc
Make run_pmc usable for any kind of management message. Create wrappers for waiting for ptp4l and for getting UTC offset. Signed-off-by: Jiri Benc jb...@redhat.com --- phc2sys.c | 131 +++-- 1 files changed, 66 insertions(+), 65 deletions

[Linuxptp-devel] [PATCH 13/14] phc2sys: check clockIdentity

2014-05-07 Thread Jiri Benc
Make sure that we handle only one PTP clock (node). This is for an extra safety. Signed-off-by: Jiri Benc jb...@redhat.com --- phc2sys.c | 44 ++-- 1 files changed, 42 insertions(+), 2 deletions(-) diff --git a/phc2sys.c b/phc2sys.c index 29916a59f2a5

[Linuxptp-devel] [PATCH 14/14] phc2sys: man page update for -a and -r options

2014-05-07 Thread Jiri Benc
Signed-off-by: Jiri Benc jb...@redhat.com --- phc2sys.8 | 115 ++--- 1 files changed, 79 insertions(+), 36 deletions(-) diff --git a/phc2sys.8 b/phc2sys.8 index fa3ae206f3df..37a39d0ba60f 100644 --- a/phc2sys.8 +++ b/phc2sys.8 @@ -1,12

[Linuxptp-devel] [PATCH v4 2/6] Subscription time limit

2014-05-06 Thread Jiri Benc
Add expiration time to subscriptions; they need to be renewed before they expiry. This way, the subscription automatically times out when phc2sys is killed. Signed-off-by: Jiri Benc jb...@redhat.com --- clock.c | 38 ++ tlv.c |8 tlv.h

[Linuxptp-devel] [PATCH v4 6/6] Custom management TLV PORT_PROPERTIES_NP

2014-05-06 Thread Jiri Benc
Will be used by phc2sys to find out interfaces corresponding to ports. Signed-off-by: Jiri Benc jb...@redhat.com --- clock.c |9 + port.c | 13 + tlv.c | 14 ++ tlv.h |8 4 files changed, 44 insertions(+), 0 deletions(-) diff --git

[Linuxptp-devel] [PATCH v4 0/6] automatic phc2sys configuration, ptp4l part

2014-05-06 Thread Jiri Benc
-archive.com/linuxptp-devel@lists.sourceforge.net/msg00236.html Jiri Benc (6): Event subscribing Subscription time limit port: event notification clock: event notification Event notification: port state Custom management TLV PORT_PROPERTIES_NP clock.c| 236

[Linuxptp-devel] [PATCH v4 3/6] port: event notification

2014-05-06 Thread Jiri Benc
function. The difference is port_management_get_response uses the request message to construct the reply message, while port_notify_event constructs the reply message based on the notification id. Signed-off-by: Jiri Benc jb...@redhat.com --- port.c | 94

[Linuxptp-devel] [PATCH v4 5/6] Event notification: port state

2014-05-06 Thread Jiri Benc
Notify subscribers about port state changes. Signed-off-by: Jiri Benc jb...@redhat.com --- notification.h |2 +- port.c |6 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/notification.h b/notification.h index 57e7a7856360..47c9b56c4f7e 100644

[Linuxptp-devel] [PATCH v4 4/6] clock: event notification

2014-05-06 Thread Jiri Benc
function. The difference is clock_management_get_response uses the request message to construct the reply message, while clock_notify_event constructs the reply message based on the notification id. Signed-off-by: Jiri Benc jb...@redhat.com --- clock.c | 63

[Linuxptp-devel] [PATCH v4 1/6] Event subscribing

2014-05-06 Thread Jiri Benc
This puts groundwork for event subscription and notification. The individual events are added by subsequent patches. Signed-off-by: Jiri Benc jb...@redhat.com --- clock.c| 134 clock.h| 11 + notification.h | 27

Re: [Linuxptp-devel] [PATCH v3 05/11] Event subscribing

2014-05-05 Thread Jiri Benc
On Sat, 3 May 2014 20:19:10 +0200, Richard Cochran wrote: On Fri, May 02, 2014 at 12:37:48PM +0200, Jiri Benc wrote: +static void clock_flush_subscriptions(struct clock *c) +{ + struct clock_subscriber *s, *tmp; + + LIST_FOREACH_SAFE(s, c-subscribers, list, tmp

Re: [Linuxptp-devel] [PATCH v3 07/11] Subscription time limit

2014-05-05 Thread Jiri Benc
even thought about limiting the maximum value to a hour or so. The client is supposed to renew the subscription, otherwise the time limit would be useless. Jiri -- Jiri Benc -- Is your legacy SCM system holding you back

Re: [Linuxptp-devel] [PATCH v3 08/11] port: event notification

2014-05-05 Thread Jiri Benc
On Sat, 3 May 2014 20:49:16 +0200, Richard Cochran wrote: On Fri, May 02, 2014 at 12:37:51PM +0200, Jiri Benc wrote: Split management message creation to more fine-grained functions to allow notification messages to be created. I must admit I didn't understand what you did, at first

[Linuxptp-devel] [PATCH v3 01/11] uds: don't output Connection refused

2014-05-02 Thread Jiri Benc
errors in their send routine. Signed-off-by: Jiri Benc jb...@redhat.com --- pmc_common.c | 10 +++--- uds.c|2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/pmc_common.c b/pmc_common.c index a7201f92454d..2c75074c8fb7 100644 --- a/pmc_common.c +++ b

[Linuxptp-devel] [PATCH v3 05/11] Event subscribing

2014-05-02 Thread Jiri Benc
This puts groundwork for event subscription and notification. The individual events are added by subsequent patches. Signed-off-by: Jiri Benc jb...@redhat.com --- clock.c| 136 clock.h| 11 + notification.h | 27

[Linuxptp-devel] [PATCH v3 09/11] clock: event notification

2014-05-02 Thread Jiri Benc
Split management message creation to more fine-grained functions to allow notification messages to be created. Signed-off-by: Jiri Benc jb...@redhat.com --- clock.c | 58 -- clock.h |8 port.c |8 +++- port.h | 14

[Linuxptp-devel] [PATCH v3 03/11] Remove unneeded parameter in port_forward

2014-05-02 Thread Jiri Benc
This parameter was made obsolete by the common address refactoring. Signed-off-by: Jiri Benc jb...@redhat.com --- clock.c |2 +- port.c |2 +- port.h |3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/clock.c b/clock.c index c541951dcc68..a85efdec2857 100644

[Linuxptp-devel] [PATCH v3 10/11] Event notification: port state

2014-05-02 Thread Jiri Benc
Notify subscribers about port state changes. Signed-off-by: Jiri Benc jb...@redhat.com --- notification.h |2 +- port.c |6 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/notification.h b/notification.h index 57e7a7856360..47c9b56c4f7e 100644

[Linuxptp-devel] [PATCH v3 08/11] port: event notification

2014-05-02 Thread Jiri Benc
Split management message creation to more fine-grained functions to allow notification messages to be created. Signed-off-by: Jiri Benc jb...@redhat.com --- port.c | 93 ++-- port.h |9 ++ 2 files changed, 82 insertions(+), 20

[Linuxptp-devel] [PATCH v3 00/11] automatic phc2sys configuration, ptp4l part

2014-05-02 Thread Jiri Benc
reviewers' comments to v2. v2: rebased to the current HEAD For the description of the set, see the v1 cover letter: https://www.mail-archive.com/linuxptp-devel@lists.sourceforge.net/msg00236.html Jiri Benc (11): uds: don't output Connection refused Respond with an error to management messages

[Linuxptp-devel] [PATCH v3 11/11] Custom management TLV PORT_PROPERTIES_NP

2014-05-02 Thread Jiri Benc
Will be used by phc2sys to find out interfaces corresponding to ports. Signed-off-by: Jiri Benc jb...@redhat.com --- clock.c |9 + port.c | 13 + tlv.c | 14 ++ tlv.h |8 4 files changed, 44 insertions(+), 0 deletions(-) diff --git

Re: [Linuxptp-devel] [PATCH 4/5] Common type holding an address

2014-04-22 Thread Jiri Benc
On Thu, 17 Apr 2014 07:19:05 +0200, Richard Cochran wrote: I don't see why you need to call into the transport twice. Can't you pass addr=NULL in order to get the default address? Makes sense. Jiri -- Jiri Benc

[Linuxptp-devel] [PATCH v2 2/2] Implement transport_sendto

2014-04-22 Thread Jiri Benc
Also, document transport_send, transport_peer and transport_sendto usage. Signed-off-by: Jiri Benc jb...@redhat.com --- transport.c |8 transport.h | 33 + 2 files changed, 41 insertions(+), 0 deletions(-) diff --git a/transport.c b/transport.c

[Linuxptp-devel] [PATCH v2 0/2] Common address struct, sendto implementation

2014-04-22 Thread Jiri Benc
Changes in v2: removed default_addr, passing NULL address to transport send methods instead. Jiri Benc (2): Common type holding an address Implement transport_sendto address.h | 38 +++ msg.h |6 raw.c | 50

[Linuxptp-devel] [PATCH 0/5] Common address struct, sendto implementation

2014-04-11 Thread Jiri Benc
and P2P, 802.3 E2E and with pmc. The last patch implements transport_sendto, which will be needed by phc2sys autoconfiguration. Signed-off-by: Jiri Benc jb...@redhat.com Jiri Benc (5): raw: replace hard coded constants by MAC_LEN raw: separate src and dst addresses Let transport_recv/send/peer

Re: [Linuxptp-devel] [PATCH 4/5] Common type holding an address

2014-04-11 Thread Jiri Benc
the union here, which led to a shorter and cleaner code, and the compiler being able to do type checking as a bonus. Jiri -- Jiri Benc -- Put Bad Developers to Shame Dominate Development with Jenkins Continuous Integration

Re: [Linuxptp-devel] [PATCH v2 10/27] Custom management TLV PORT_ENUMERATION_NP

2014-04-07 Thread Jiri Benc
21? I did not, thanks for the pointer. If I'm reading it correctly, it basically matches what I've been expecting. Thanks, Jiri -- Jiri Benc -- Put Bad Developers to Shame Dominate Development with Jenkins Continuous

Re: [Linuxptp-devel] [PATCH v2 03/27] Allow sending to a specified (unicast) address

2014-04-02 Thread Jiri Benc
-- Jiri Benc -- ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Re: [Linuxptp-devel] [PATCH 00/27] automatic phc2sys configuration

2014-03-24 Thread Jiri Benc
: Event subscribing /home/richard/git/linuxptp/.git/rebase-apply/patch:272: new blank line at EOF. + warning: 1 line adds whitespace errors. Fixed. Jiri -- Jiri Benc -- Learn Graph Databases - Download FREE O'Reilly Book

[Linuxptp-devel] [PATCH v2 00/27] automatic phc2sys configuration

2014-03-24 Thread Jiri Benc
v2: rebased to the current HEAD For the description of the set, see the v1 cover letter: https://www.mail-archive.com/linuxptp-devel@lists.sourceforge.net/msg00236.html Jiri Benc (27): Move check of TLV length for management COMMAND messages Move common code into port_prepare_and_send

[Linuxptp-devel] [PATCH v2 10/27] Custom management TLV PORT_ENUMERATION_NP

2014-03-24 Thread Jiri Benc
Used to enumerate all ports. With the future dynamic port adding/removal, there may be holes in the port number sequence. For now, just fill it with the sequence numbers. Signed-off-by: Jiri Benc jb...@redhat.com --- clock.c | 16 tlv.c | 29

[Linuxptp-devel] [PATCH v2 17/27] phc2sys: rearrange declarations

2014-03-24 Thread Jiri Benc
This just moves code around to have related functions together and forward declaration at the beginning of the file. No code changes. Signed-off-by: Jiri Benc jb...@redhat.com --- phc2sys.c | 208 ++--- 1 files changed, 103 insertions

[Linuxptp-devel] [PATCH v2 06/27] Include TLV in replies to management commands

2014-03-24 Thread Jiri Benc
the request. Signed-off-by: Jiri Benc jb...@redhat.com --- clock.c |3 +++ msg.c | 17 + msg.h | 11 +++ 3 files changed, 31 insertions(+), 0 deletions(-) diff --git a/clock.c b/clock.c index f06ebcd77032..80804cad1996 100644 --- a/clock.c +++ b/clock.c @@ -18,6 +18,7

[Linuxptp-devel] [PATCH v2 13/27] phc2sys: generalize run_pmc

2014-03-24 Thread Jiri Benc
Make run_pmc usable for any kind of management message. Create wrappers for waiting for ptp4l and for getting UTC offset. Signed-off-by: Jiri Benc jb...@redhat.com --- phc2sys.c | 131 +++-- 1 files changed, 66 insertions(+), 65 deletions

[Linuxptp-devel] [PATCH v2 18/27] phc2sys: open devices in clock_add

2014-03-24 Thread Jiri Benc
Do not call clock_open to open a clock device but let clock_add do that and return the newly created struct. Also, store the device (interface) name in struct clock. Signed-off-by: Jiri Benc jb...@redhat.com --- phc2sys.c | 81 ++-- 1

[Linuxptp-devel] [PATCH v2 07/27] port: event notification

2014-03-24 Thread Jiri Benc
Split management message creation to more fine-grained functions to allow notification messages to be created. Signed-off-by: Jiri Benc jb...@redhat.com --- port.c | 93 ++-- port.h |9 ++ 2 files changed, 82 insertions(+), 20

[Linuxptp-devel] [PATCH v2 11/27] Event notification: port addition/removal

2014-03-24 Thread Jiri Benc
Add an event number for port adding/removal. As currently the ports are static, this event is not emitted for now. Signed-off-by: Jiri Benc jb...@redhat.com --- clock.c|4 +++- notification.h |1 + 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/clock.c b/clock.c

[Linuxptp-devel] [PATCH v2 09/27] Event notification: port state

2014-03-24 Thread Jiri Benc
Notify subscribers about port state changes. Signed-off-by: Jiri Benc jb...@redhat.com --- notification.h |2 +- port.c |6 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/notification.h b/notification.h index 57e7a7856360..47c9b56c4f7e 100644

[Linuxptp-devel] [PATCH v2 12/27] Custom management TLV PORT_PROPERTIES_NP

2014-03-24 Thread Jiri Benc
Will be used by phc2sys to find out interfaces corresponding to ports. Signed-off-by: Jiri Benc jb...@redhat.com --- clock.c |9 + port.c | 16 tlv.c | 20 tlv.h |8 4 files changed, 53 insertions(+), 0 deletions(-) diff

[Linuxptp-devel] [PATCH v2 27/27] phc2sys: man page update for -a and -r options

2014-03-24 Thread Jiri Benc
Signed-off-by: Jiri Benc jb...@redhat.com --- phc2sys.8 | 115 ++--- 1 files changed, 79 insertions(+), 36 deletions(-) diff --git a/phc2sys.8 b/phc2sys.8 index fa3ae206f3df..37a39d0ba60f 100644 --- a/phc2sys.8 +++ b/phc2sys.8 @@ -1,12

[Linuxptp-devel] [PATCH v2 25/27] phc2sys: check clockIdentity

2014-03-24 Thread Jiri Benc
Make sure that we handle only one PTP clock (node). This is for an extra safety. Signed-off-by: Jiri Benc jb...@redhat.com --- phc2sys.c | 39 +-- 1 files changed, 37 insertions(+), 2 deletions(-) diff --git a/phc2sys.c b/phc2sys.c index e184fc9cd637

[Linuxptp-devel] [PATCH v2 15/27] phc2sys: split clock and node

2014-03-24 Thread Jiri Benc
Split members that apply to all synchronized clocks and members that apply to an individual clock. Keep all clocks in a list, with a pointer to the source clock. This will allow to support multiple clocks synchronization. Signed-off-by: Jiri Benc jb...@redhat.com --- phc2sys.c | 397

[Linuxptp-devel] [PATCH v2 23/27] phc2sys: autoconfiguration

2014-03-24 Thread Jiri Benc
Add automatic configuration option (-a). Signed-off-by: Jiri Benc jb...@redhat.com --- phc2sys.c | 247 ++--- 1 files changed, 236 insertions(+), 11 deletions(-) diff --git a/phc2sys.c b/phc2sys.c index 369fb7c177a5..bc5c4dc61073 100644

[Linuxptp-devel] [PATCH v2 19/27] phc2sys: track ports

2014-03-24 Thread Jiri Benc
Add tracking of which ports have been added and to which clock they belong. Signed-off-by: Jiri Benc jb...@redhat.com --- phc2sys.c | 51 +++ 1 files changed, 51 insertions(+), 0 deletions(-) diff --git a/phc2sys.c b/phc2sys.c index 62e9b8c19e17

[Linuxptp-devel] [PATCH 03/27] Allow sending to a specified (unicast) address

2014-03-20 Thread Jiri Benc
This will be needed for notifications. Only implemented for UDS. Signed-off-by: Jiri Benc jb...@redhat.com --- port.c | 14 ++ port.h | 22 ++ transport.c | 17 + transport.h | 25

[Linuxptp-devel] [PATCH 01/27] Move check of TLV length for management COMMAND messages

2014-03-20 Thread Jiri Benc
-by: Jiri Benc jb...@redhat.com --- clock.c |4 tlv.c |9 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/clock.c b/clock.c index 3aa2407d0bcc..10fa4b6621c4 100644 --- a/clock.c +++ b/clock.c @@ -848,10 +848,6 @@ int clock_manage(struct clock *c, struct port

[Linuxptp-devel] [PATCH 24/27] phc2sys: autoconfigure realtime clock on demand only

2014-03-20 Thread Jiri Benc
By default, do not synchronize CLOCK_REALTIME. To do it, -r option is needed. That will only consider CLOCK_REALTIME as the destination. To consider it also as a possible time source, use -rr. Signed-off-by: Jiri Benc jb...@redhat.com --- phc2sys.c | 33 + 1

[Linuxptp-devel] [PATCH 21/27] pmc_common: implement pmc_send_command_action

2014-03-20 Thread Jiri Benc
Signed-off-by: Jiri Benc jb...@redhat.com --- pmc_common.c | 16 ++-- pmc_common.h |2 +- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/pmc_common.c b/pmc_common.c index 061529e25b83..763b06e8e4c5 100644 --- a/pmc_common.c +++ b/pmc_common.c @@ -260,12 +260,14

[Linuxptp-devel] [PATCH 06/27] Include TLV in replies to management commands

2014-03-20 Thread Jiri Benc
the request. Signed-off-by: Jiri Benc jb...@redhat.com --- clock.c |3 +++ msg.c | 17 + msg.h | 11 +++ 3 files changed, 31 insertions(+), 0 deletions(-) diff --git a/clock.c b/clock.c index f06ebcd77032..80804cad1996 100644 --- a/clock.c +++ b/clock.c @@ -18,6 +18,7

  1   2   >