Discussion:
[Linuxptp-devel] unknown option ntpshm_segment at line 8 in eno1 section
Gary E. Miller
2015-07-31 18:16:04 UTC
Permalink
Yo All!

I'd like a config file change to the ptp4l config file.

In this case I have a server with two ethernet segments, and I want each
one to be on its own SHM. I would like to be able to do this:

[global]
uds_address /var/run/ptp4l

clock_servo ntpshm

[eno1]
ntpshm_segment 0

[eno2]
ntpshm_segment 1

But that gives me this rror:

unknown option ntpshm_segment at line 8 in eno1 section

So now I am back to having to use 2 config files which sorta makes the
global config file concept.

Any thing I missed? Or can this be fixed?

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
***@rellim.com Tel:+1(541)382-8588
Keller, Jacob E
2015-07-31 18:46:21 UTC
Permalink
Post by Gary E. Miller
Yo All!
I'd like a config file change to the ptp4l config file.
In this case I have a server with two ethernet segments, and I want each
[global]
uds_address /var/run/ptp4l
clock_servo ntpshm
[eno1]
ntpshm_segment 0
[eno2]
ntpshm_segment 1
unknown option ntpshm_segment at line 8 in eno1 section
So now I am back to having to use 2 config files which sorta makes the
global config file concept.
Any thing I missed? Or can this be fixed?
I don't believe this is currently supportable, since we only create one
clock for each instance of ptp4l, and that clock would be the one
generating the ntpshm_segment. The "per-port" configuration is only
useful when running the boundary clock mode, not for configuring
different settings depending on what device is loaded.

Regards,
Jake
------------------------------------------------------------------------------
Gary E. Miller
2015-07-31 19:35:18 UTC
Permalink
Yo Jacob E!

On Fri, 31 Jul 2015 18:46:21 +0000
Post by Keller, Jacob E
Post by Gary E. Miller
Any thing I missed? Or can this be fixed?
I don't believe this is currently supportable,
Yup, currently broken.
Post by Keller, Jacob E
since we only create
one clock for each instance of ptp4l, and that clock would be the one
generating the ntpshm_segment.
Which is why I tried running two instances of ptp4l. Fix the
config stuff and we are almost there.

When I dug a bit deeper I also found the IP address binding is not
quite right for multiple ptp4l instances.

Also, I see that I can put multiple interfaces on the ptp4l
command line. That can't work with just one clcok either.
Post by Keller, Jacob E
The "per-port" configuration is only
useful when running the boundary clock mode, not for configuring
different settings depending on what device is loaded.
So we agree the config file needs to be extended for SHM slave mode?

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
***@rellim.com Tel:+1(541)382-8588
Richard Cochran
2015-08-01 18:09:38 UTC
Permalink
Gary,

The configuration file scheme can't do what you want it to do, even
without the ntpshm_segment option.

This
Post by Gary E. Miller
[global]
uds_address /var/run/ptp4l
clock_servo ntpshm
[eno1]
ntpshm_segment 0
[eno2]
ntpshm_segment 1
is the same as entering

ptp4l -i eno1 -i eno2

on the comman line, but you want one interface per program instance.

You can use one file per ptp4l instance. Another possibility is

ptp4l -f -

together with a HERE file in your shell script.

Thanks,
Richard



------------------------------------------------------------------------------
Gary E. Miller
2015-08-02 02:58:34 UTC
Permalink
Yo Richard!

On Sat, 1 Aug 2015 20:09:38 +0200
Post by Richard Cochran
The configuration file scheme can't do what you want it to do, even
without the ntpshm_segment option.
Yeah, sadly...
Post by Richard Cochran
Post by Gary E. Miller
[eno1]
ntpshm_segment 0
[eno2]
ntpshm_segment 1
is the same as entering
ptp4l -i eno1 -i eno2
Sadly, no. When you do that ptp4l only uses one SHM, not two. Now
if ptp4l read the [eno1] and [eno2] sections it would work.
Post by Richard Cochran
You can use one file per ptp4l instance.
Yeah, which sort of shows how the config file syntax is not really
impleented as cleverly as it wass designed.
Post by Richard Cochran
Another possibility is
ptp4l -f -
together with a HERE file in your shell script.
Yeah, but then both instances try to grab ports 319 and 320. I tried
putting one instance on UDPv4 and one UDPv6, but the UDPv6 seems to also
grab the UDPv4 port.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
***@rellim.com Tel:+1(541)382-8588
Richard Cochran
2015-08-02 18:02:12 UTC
Permalink
Post by Gary E. Miller
Yeah, but then both instances try to grab ports 319 and 320. I tried
putting one instance on UDPv4 and one UDPv6, but the UDPv6 seems to also
grab the UDPv4 port.
You can run two instances, each on its own port, using Layer2 transport.

ptp4l -2 -i eth0
ptp4l -2 -i eth1

Thanks,
Richard

------------------------------------------------------------------------------
Miroslav Lichvar
2015-08-03 09:47:43 UTC
Permalink
Post by Gary E. Miller
Post by Richard Cochran
is the same as entering
ptp4l -i eno1 -i eno2
Sadly, no. When you do that ptp4l only uses one SHM, not two. Now
if ptp4l read the [eno1] and [eno2] sections it would work.
There is one ptp4l instance (and configuration file) for one PTP or
system clock, which may have one or more ports. How could one ptp4l
fill more that one SHM segment if it has only one clock?
Post by Gary E. Miller
Post by Richard Cochran
Another possibility is
ptp4l -f -
together with a HERE file in your shell script.
Yeah, but then both instances try to grab ports 319 and 320.
Hm, why is that a problem? The sockets are bound with the
SO_BINDTODEVICE socket option.

You can even run multiple ptp4l instances in different PTP domains on
the same NIC (only one using HW timestamping). The timemaster program
can do that for you. From a simple configuration file it will prepare
ptp4l/chronyd/ntpd configuration files and run all ptp4l/phc2sys
instances feeding chronyd/ntpd configured to read from the SHM
refclocks as needed.
Post by Gary E. Miller
I tried
putting one instance on UDPv4 and one UDPv6, but the UDPv6 seems to also
grab the UDPv4 port.
I don't see that happening here.
--
Miroslav Lichvar

------------------------------------------------------------------------------
Gary E. Miller
2015-08-03 20:58:20 UTC
Permalink
Yo Miroslav!

On Mon, 3 Aug 2015 11:47:43 +0200
Post by Miroslav Lichvar
Post by Gary E. Miller
Post by Richard Cochran
is the same as entering
ptp4l -i eno1 -i eno2
Sadly, no. When you do that ptp4l only uses one SHM, not two. Now
if ptp4l read the [eno1] and [eno2] sections it would work.
There is one ptp4l instance (and configuration file) for one PTP or
system clock, which may have one or more ports. How could one ptp4l
fill more that one SHM segment if it has only one clock?
I agree, I only tried it because someone on this list asked me to try it.
Post by Miroslav Lichvar
Post by Gary E. Miller
Post by Richard Cochran
Another possibility is
ptp4l -f -
together with a HERE file in your shell script.
Yeah, but then both instances try to grab ports 319 and 320.
Hm, why is that a problem? The sockets are bound with the
SO_BINDTODEVICE socket option.
I'm not sure on the exact details, but I get an error message when the 2nd
ptp4l starts and the 2nd instance is non-functional.
Post by Miroslav Lichvar
You can even run multiple ptp4l instances in different PTP domains on
the same NIC (only one using HW timestamping).
Assuming I could get HW timestamping to work. Trying on many hosts
with a few deffferent NIC types the HW timestamping is still non-functional
for me. Works for a short while, then goes bizarro.

You can search this list archive for the gory details...
Post by Miroslav Lichvar
The timemaster program can do that for you.
I wish.
Post by Miroslav Lichvar
Post by Gary E. Miller
I tried
putting one instance on UDPv4 and one UDPv6, but the UDPv6 seems to
also grab the UDPv4 port.
I don't see that happening here.
Interesting, can you share your setup?

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
***@rellim.com Tel:+1(541)382-8588
Miroslav Lichvar
2015-08-04 08:34:17 UTC
Permalink
Post by Gary E. Miller
Post by Miroslav Lichvar
You can even run multiple ptp4l instances in different PTP domains on
the same NIC (only one using HW timestamping).
Assuming I could get HW timestamping to work. Trying on many hosts
with a few deffferent NIC types the HW timestamping is still non-functional
for me. Works for a short while, then goes bizarro.
That's really odd if you see the same problem with different
HW/drivers.
Post by Gary E. Miller
Post by Miroslav Lichvar
Post by Gary E. Miller
I tried
putting one instance on UDPv4 and one UDPv6, but the UDPv6 seems to
also grab the UDPv4 port.
I don't see that happening here.
Interesting, can you share your setup?
When I run "ptp4l -6 -S -i ens5 -m", ss reports only IPv6 sockets for
ptp4l:

# ss -lup | grep ptp4l
UNCONN 0 0 ::%ens5:ptp-event :::* users:(("ptp4l",pid=5862,fd=10))
UNCONN 0 0 ::%ens5:ptp-general :::* users:(("ptp4l",pid=5862,fd=11))
--
Miroslav Lichvar

------------------------------------------------------------------------------
Gary E. Miller
2015-08-04 20:04:18 UTC
Permalink
Yo Miroslav!

On Tue, 4 Aug 2015 10:34:17 +0200
Post by Miroslav Lichvar
Post by Gary E. Miller
Interesting, can you share your setup?
When I run "ptp4l -6 -S -i ens5 -m", ss reports only IPv6 sockets for
# ss -lup | grep ptp4l
UNCONN 0
0 ::%ens5:ptp-event :::*
users:(("ptp4l",pid=5862,fd=10)) UNCONN 0
0 ::%ens5:ptp-general :::*
users:(("ptp4l",pid=5862,fd=11))
Yes, but by default binding to an IPv6 socket also binds to the IPv4 socket.

From the IPv6 man page:

IPv4 connections can be handled with the v6 API by using the
v4-mapped- on-v6 address type; thus a program needs to support
only this API type to support both protocols.

Did you try binding one ptp4l to IPv4 and one to IPv6?

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
***@rellim.com Tel:+1(541)382-8588
Gary E. Miller
2015-08-04 20:43:11 UTC
Permalink
Yo Miroslav!

On Tue, 4 Aug 2015 10:34:17 +0200
Post by Miroslav Lichvar
Post by Gary E. Miller
Interesting, can you share your setup?
When I run "ptp4l -6 -S -i ens5 -m", ss reports only IPv6 sockets for
For comparison, here is what I get when trying both UPDv4 and UDPv6:

export CONF1=ptp-backup-eno1.conf
export CONF2=ptp-backup-eno2.conf
killall ptp4l phc2sys
phc2sys: no process found
sleep 3
killall ptp4l phc2sys
ptp4l: no process found
phc2sys: no process found
sleep 3
killall -9 ptp4l phc2sys
ptp4l: no process found
phc2sys: no process found
cat ${CONF1}
[global]
uds_address /var/run/ptp4l
#network_transport L2
network_transport UDPv6

clock_servo ntpshm
ntpshm_segment 0
cat ${CONF2}
[global]
uds_address /var/run/ptp4l
network_transport UDPv4

clock_servo ntpshm
ntpshm_segment 1

ptp4l -i eno1 -l 3 -S -s -f ${CONF1} &
ptp4l -i eno2 -l 3 -S -s -f ${CONF2} &


That gives me this error in my logs:

Aug 4 13:41:10 backup ptp4l[4122]: [384829.489] uds: bind failed: Address already in use




RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
***@rellim.com Tel:+1(541)382-8588
Miroslav Lichvar
2015-08-05 06:34:28 UTC
Permalink
Post by Gary E. Miller
cat ${CONF1}
[global]
uds_address /var/run/ptp4l
#network_transport L2
network_transport UDPv6
clock_servo ntpshm
ntpshm_segment 0
cat ${CONF2}
[global]
uds_address /var/run/ptp4l
network_transport UDPv4
clock_servo ntpshm
ntpshm_segment 1
ptp4l -i eno1 -l 3 -S -s -f ${CONF1} &
ptp4l -i eno2 -l 3 -S -s -f ${CONF2} &
Aug 4 13:41:10 backup ptp4l[4122]: [384829.489] uds: bind failed: Address already in use
That's the Unix domain socket, the two instances need to have a
different path set by the uds_address option.

Here is an example with two interfaces, each in two PTP domains, the
first domain with HW timestamping, the other with SW timestamping.
There are four ptp4l instances and two phc2sys instances feeding four
SHM refclocks.

# cat timemaster.conf
[ntp_server 192.168.100.1]

[ptp_domain 0]
interfaces ens5 eno1

[ptp_domain 1]
interfaces ens5 eno1


# timemaster -n -f timemaster.conf
/var/run/timemaster/chrony.conf:

makestep 1 3
server 192.168.100.1 minpoll 6 maxpoll 10
refclock SHM 0 poll 2 dpoll 0 refid PTP0 precision 1.0e-9 delay 1.0e-04
refclock SHM 1 poll 2 dpoll 0 refid PTP1 precision 1.0e-9 delay 1.0e-04
refclock SHM 2 poll 2 dpoll 0 refid PTP2 precision 1.0e-9 delay 1.0e-04
refclock SHM 3 poll 2 dpoll 0 refid PTP3 precision 1.0e-9 delay 1.0e-04

/var/run/timemaster/ptp4l.0.conf:

[global]
slaveOnly 1
domainNumber 0
uds_address /var/run/timemaster/ptp4l.0.socket

/var/run/timemaster/ptp4l.1.conf:

[global]
slaveOnly 1
domainNumber 0
uds_address /var/run/timemaster/ptp4l.1.socket

/var/run/timemaster/ptp4l.2.conf:

[global]
slaveOnly 1
domainNumber 1
uds_address /var/run/timemaster/ptp4l.2.socket
clock_servo ntpshm
ntpshm_segment 2

/var/run/timemaster/ptp4l.3.conf:

[global]
slaveOnly 1
domainNumber 1
uds_address /var/run/timemaster/ptp4l.3.socket
clock_servo ntpshm
ntpshm_segment 3

commands:

chronyd -n -f /var/run/timemaster/chrony.conf
ptp4l -l 5 -f /var/run/timemaster/ptp4l.0.conf -H -i ens5
phc2sys -l 5 -a -r -R 1.00 -z /var/run/timemaster/ptp4l.0.socket -n 0 -E ntpshm -M 0
ptp4l -l 5 -f /var/run/timemaster/ptp4l.1.conf -H -i eno1
phc2sys -l 5 -a -r -R 1.00 -z /var/run/timemaster/ptp4l.1.socket -n 0 -E ntpshm -M 1
ptp4l -l 5 -f /var/run/timemaster/ptp4l.2.conf -S -i ens5
ptp4l -l 5 -f /var/run/timemaster/ptp4l.3.conf -S -i eno1
--
Miroslav Lichvar

------------------------------------------------------------------------------
Jiri Benc
2015-08-10 12:34:58 UTC
Permalink
Post by Miroslav Lichvar
When I run "ptp4l -6 -S -i ens5 -m", ss reports only IPv6 sockets for
# ss -lup | grep ptp4l
UNCONN 0 0 ::%ens5:ptp-event :::* users:(("ptp4l",pid=5862,fd=10))
UNCONN 0 0 ::%ens5:ptp-general :::* users:(("ptp4l",pid=5862,fd=11))
Sadly, ss does not report whether a given socket has IPV6_V6ONLY set or
not. By default (unless /proc/sys/net/ipv6/bindv6only is set), the IPv6
socket listens for both IPv6 and IPv4 connections, returning the latter
as v4-mapped IPv6 address.

linuxptp does not seem to set IPV6_V6ONLY, thus creating an UDP6 socket
indeed prevents creating an UDP4 one on the same UDP port.

Whether or not ptp4l should set IPV6_V6ONLY unconditionally needs some
more thinking, but my first impression is it would 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

------------------------------------------------------------------------------
Gary E. Miller
2015-08-10 17:32:54 UTC
Permalink
Yo Jiri!

On Mon, 10 Aug 2015 14:34:58 +0200
Post by Jiri Benc
Whether or not ptp4l should set IPV6_V6ONLY unconditionally needs some
more thinking, but my first impression is it would 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 :-)
Sadly not many people grok IPv6 yet. Many fewer get IPv4 mapped to IPv6.
They want to think of as distinct, even when they are not.

In keeping with the principla of least surprise, I would say go with the
flow and implement IPV6_V6ONLY.

Then at a later date an option could be added to use just IPv6 with
IPv4 mapping. But as you say, that has implications not thought through
yet.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
***@rellim.com Tel:+1(541)382-8588
Jiri Benc
2015-08-10 17:59:07 UTC
Permalink
Post by Gary E. Miller
In keeping with the principla of least surprise, I would say go with the
flow and implement IPV6_V6ONLY.
You could also argue that "least surprise" means to respect whatever the
administrator set in the bindv6only sysctl. It's there for a reason and
applications should respect the setting, unless they have a very good
exceptional reason to do otherwise.

Jiri
--
Jiri Benc

------------------------------------------------------------------------------
Gary E. Miller
2015-08-10 18:38:13 UTC
Permalink
Yo Jiri!

On Mon, 10 Aug 2015 19:59:07 +0200
Post by Jiri Benc
Post by Gary E. Miller
In keeping with the principla of least surprise, I would say go
with the flow and implement IPV6_V6ONLY.
You could also argue that "least surprise" means to respect whatever
the administrator set in the bindv6only sysctl. It's there for a
reason and applications should respect the setting, unless they have
a very good exceptional reason to do otherwise.
Of the tiny number of admins that know IPv6 listen can also bind IPv4, how
many of them know about bindv6only?

IMHO bindv6only is way too blunt a tool. Some things, like Icinga checks,
I do not want falling back to IPv4. Other things, like ntpd, can
benefit from the simplification it provides.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
***@rellim.com Tel:+1(541)382-8588
Richard Cochran
2015-08-10 17:58:05 UTC
Permalink
Post by Jiri Benc
Whether or not ptp4l should set IPV6_V6ONLY unconditionally needs some
more thinking, but my first impression is it would 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 :-)
Yes, we should add the socket option. Patch anyone?

Thanks,
Richard

------------------------------------------------------------------------------
Gary E. Miller
2015-08-10 19:14:56 UTC
Permalink
By default, at least on Linux, opening a PF_INET6 socket also
grabs the matching IPv4 port. This patch stops that.

Only tested on Linux. Unknown how this will work on *BSD or WinXX.
---
udp6.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/udp6.c b/udp6.c
index f098b8c..54df133 100644
--- a/udp6.c
+++ b/udp6.c
@@ -121,6 +121,10 @@ static int open_socket_ipv6(const char *name, struct in6_addr mc_addr[2], short

*interface_index = index;

+ if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof(on))) {
+ pr_err("setsockopt IPV6_V6ONLY failed: %m");
+ goto no_option;
+ }
if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on))) {
pr_err("setsockopt SO_REUSEADDR failed: %m");
goto no_option;
--
2.4.6
Jiri Benc
2015-08-10 19:30:16 UTC
Permalink
Post by Gary E. Miller
By default, at least on Linux, opening a PF_INET6 socket also
grabs the matching IPv4 port. This patch stops that.
Looks good but I think it should have more detailed description.
Especially elaborate on the reasons why linuxptp needs to
unconditionally deviate from the system-wide setting.

I always hate when I'm debugging a problem, track it down to a
particular commit and it's completely unclear why the change was
introduced. Given the confusion this option creates, I think that more
detailed description is in place here. Think about somebody who expects
that the v6 socket listens also for v4 traffic as he's used from other
programs and tries to debug why linuxptp behaves differently (I know
that you stated that's only minor part of users and you're probably
right but that's going to change once IPv6 becomes more common and
people get used to this behavior).
Post by Gary E. Miller
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

------------------------------------------------------------------------------
Richard Cochran
2015-08-10 19:54:33 UTC
Permalink
Gary,
Post by Gary E. Miller
By default, at least on Linux, opening a PF_INET6 socket also
grabs the matching IPv4 port. This patch stops that.
Can you please post once again, adding your "Signed-off-by:" tag?

Also, a word about why this is needed wouldn't hurt, as Jiri
suggested. Something like: "this patch allows running two PTP stacks,
one over IPv4 and the second over IPv6."
Post by Gary E. Miller
Only tested on Linux. Unknown how this will work on *BSD or WinXX.
No need to worry about this. The program really isn't portable to
those systems.

Thanks,
Richard

------------------------------------------------------------------------------
Gary E. Miller
2015-08-10 19:57:34 UTC
Permalink
Yo Richard!

On Mon, 10 Aug 2015 21:54:33 +0200
Post by Richard Cochran
Post by Gary E. Miller
By default, at least on Linux, opening a PF_INET6 socket also
grabs the matching IPv4 port. This patch stops that.
Can you please post once again, adding your "Signed-off-by:" tag?
Will do. Gotta run for today.
Post by Richard Cochran
Also, a word about why this is needed wouldn't hurt, as Jiri
suggested. Something like: "this patch allows running two PTP stacks,
one over IPv4 and the second over IPv6."
Will do. Gott run for today.
Post by Richard Cochran
Post by Gary E. Miller
Only tested on Linux. Unknown how this will work on *BSD or WinXX.
No need to worry about this. The program really isn't portable to
those systems.
(Slaps forehead). Duh, it is LINUXptp after all...

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
***@rellim.com Tel:+1(541)382-8588

Keller, Jacob E
2015-08-03 16:12:41 UTC
Permalink
Post by Gary E. Miller
Yo Richard!
On Sat, 1 Aug 2015 20:09:38 +0200
Post by Richard Cochran
The configuration file scheme can't do what you want it to do, even
without the ntpshm_segment option.
Yeah, sadly...
Post by Richard Cochran
Post by Gary E. Miller
[eno1]
ntpshm_segment 0
[eno2]
ntpshm_segment 1
is the same as entering
ptp4l -i eno1 -i eno2
Sadly, no. When you do that ptp4l only uses one SHM, not two. Now
if ptp4l read the [eno1] and [eno2] sections it would work.
You mis-understand. Passing eno1, eno2 or putting them in the
configuration file is how you would set up boundary clock mode. This
appears to not be what you want, so neither of these things is going to
work.
Post by Gary E. Miller
Post by Richard Cochran
You can use one file per ptp4l instance.
Yeah, which sort of shows how the config file syntax is not really
Post by Gary E. Miller
impleented as cleverly as it wass designed.
No it doesn't. ptp4l's one configuration file is designed to run one
instance of ptp4l.
Post by Gary E. Miller
Post by Richard Cochran
Another possibility is
ptp4l -f -
together with a HERE file in your shell script.
Yeah, but then both instances try to grab ports 319 and 320. I tried
putting one instance on UDPv4 and one UDPv6, but the UDPv6 seems to also
grab the UDPv4 port.
You'd have to use something like L2 instead, so that it doesn't bind
ports. You could also network namespace the sections, but that sounds
like overkill.

Regards,
Jake
Post by Gary E. Miller
RGDS
GARY
---------------------------------------------------------------------
------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
---------------------------------------------------------------------
---------
_______________________________________________
Linuxptp-devel mailing list
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel
------------------------------------------------------------------------------
Gary E. Miller
2015-08-03 20:52:16 UTC
Permalink
Yo Jacob E!

On Mon, 3 Aug 2015 16:12:41 +0000
Post by Keller, Jacob E
Post by Gary E. Miller
Yo Richard!
On Sat, 1 Aug 2015 20:09:38 +0200
Post by Richard Cochran
The configuration file scheme can't do what you want it to do,
even without the ntpshm_segment option.
Yeah, sadly...
Post by Richard Cochran
Post by Gary E. Miller
[eno1]
ntpshm_segment 0
[eno2]
ntpshm_segment 1
is the same as entering
ptp4l -i eno1 -i eno2
Sadly, no. When you do that ptp4l only uses one SHM, not two. Now
if ptp4l read the [eno1] and [eno2] sections it would work.
You mis-understand. Passing eno1, eno2 or putting them in the
configuration file is how you would set up boundary clock mode. This
appears to not be what you want, so neither of these things is going
to work.
I did not misunderstood, I never expected it to work, I just tried it
because someone on this list asked me to try it.
Post by Keller, Jacob E
Post by Gary E. Miller
Post by Richard Cochran
You can use one file per ptp4l instance.
Yeah, which sort of shows how the config file syntax is not really
Post by Gary E. Miller
impleented as cleverly as it wass designed.
No it doesn't. ptp4l's one configuration file is designed to run one
instance of ptp4l.
And yet it could easily be so much more.
Post by Keller, Jacob E
Post by Gary E. Miller
Yeah, but then both instances try to grab ports 319 and 320. I
tried putting one instance on UDPv4 and one UDPv6, but the UDPv6
seems to also
grab the UDPv4 port.
You'd have to use something like L2 instead, so that it doesn't bind
ports.
Yes, L2 seems to work for me. I'll let it run for a while before I declare
success.
Post by Keller, Jacob E
You could also network namespace the sections, but that sounds
like overkill.
Agreed, too much work.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
***@rellim.com Tel:+1(541)382-8588
Loading...