Thread: [Linuxptp-devel] unknown option ntpshm_segment at line 8 in eno1 section
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Gary E. M. <ge...@re...> - 2015-07-31 18:29:47
|
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 ge...@re... Tel:+1(541)382-8588 |
From: Keller, J. E <jac...@in...> - 2015-07-31 18:48:38
|
On Fri, 2015-07-31 at 18:16 +0000, Gary E. Miller wrote: > 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? 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 |
From: Gary E. M. <ge...@re...> - 2015-07-31 19:35:40
|
Yo Jacob E! On Fri, 31 Jul 2015 18:46:21 +0000 "Keller, Jacob E" <jac...@in...> wrote: > > Any thing I missed? Or can this be fixed? > > I don't believe this is currently supportable, Yup, currently broken. > 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. > 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 ge...@re... Tel:+1(541)382-8588 |
From: Richard C. <ric...@gm...> - 2015-08-01 18:09:50
|
Gary, The configuration file scheme can't do what you want it to do, even without the ntpshm_segment option. This > [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 |
From: Gary E. M. <ge...@re...> - 2015-08-02 02:59:49
|
Yo Richard! On Sat, 1 Aug 2015 20:09:38 +0200 Richard Cochran <ric...@gm...> wrote: > The configuration file scheme can't do what you want it to do, even > without the ntpshm_segment option. Yeah, sadly... > > [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 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. > 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 ge...@re... Tel:+1(541)382-8588 |
From: Richard C. <ric...@gm...> - 2015-08-02 18:02:23
|
On Sun, Aug 02, 2015 at 02:58:34AM +0000, Gary E. Miller wrote: > 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 |
From: Miroslav L. <mli...@re...> - 2015-08-03 09:47:52
|
On Sun, Aug 02, 2015 at 02:58:34AM +0000, Gary E. Miller wrote: > > 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? > > 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. > 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 |
From: Keller, J. E <jac...@in...> - 2015-08-03 16:12:54
|
On Sun, 2015-08-02 at 02:58 +0000, Gary E. Miller wrote: > Yo Richard! > > On Sat, 1 Aug 2015 20:09:38 +0200 > Richard Cochran <ric...@gm...> wrote: > > > The configuration file scheme can't do what you want it to do, even > > without the ntpshm_segment option. > > Yeah, sadly... > > > > [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. > > 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. > No it doesn't. ptp4l's one configuration file is designed to run one instance of ptp4l. > > 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 > RGDS > GARY > --------------------------------------------------------------------- > ------ > Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703 > ge...@re... Tel:+1(541)382-8588 > --------------------------------------------------------------------- > --------- > _______________________________________________ > Linuxptp-devel mailing list > Lin...@li... > https://lists.sourceforge.net/lists/listinfo/linuxptp-devel |
From: Gary E. M. <ge...@re...> - 2015-08-03 20:52:35
|
Yo Jacob E! On Mon, 3 Aug 2015 16:12:41 +0000 "Keller, Jacob E" <jac...@in...> wrote: > On Sun, 2015-08-02 at 02:58 +0000, Gary E. Miller wrote: > > Yo Richard! > > > > On Sat, 1 Aug 2015 20:09:38 +0200 > > Richard Cochran <ric...@gm...> wrote: > > > > > The configuration file scheme can't do what you want it to do, > > > even without the ntpshm_segment option. > > > > Yeah, sadly... > > > > > > [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. > > > 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. > > > > 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. > > 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. > 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 ge...@re... Tel:+1(541)382-8588 |
From: Gary E. M. <ge...@re...> - 2015-08-03 20:58:34
|
Yo Miroslav! On Mon, 3 Aug 2015 11:47:43 +0200 Miroslav Lichvar <mli...@re...> wrote: > On Sun, Aug 02, 2015 at 02:58:34AM +0000, Gary E. Miller wrote: > > > 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. > > > 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. > 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... > The timemaster program can do that for you. I wish. > > 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 ge...@re... Tel:+1(541)382-8588 |
From: Miroslav L. <mli...@re...> - 2015-08-04 08:34:31
|
On Mon, Aug 03, 2015 at 08:58:20PM +0000, Gary E. Miller wrote: > > 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. > > > 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 |
From: Gary E. M. <ge...@re...> - 2015-08-04 20:04:33
|
Yo Miroslav! On Tue, 4 Aug 2015 10:34:17 +0200 Miroslav Lichvar <mli...@re...> wrote: > > 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)) 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 ge...@re... Tel:+1(541)382-8588 |
From: Gary E. M. <ge...@re...> - 2015-08-04 20:43:26
|
Yo Miroslav! On Tue, 4 Aug 2015 10:34:17 +0200 Miroslav Lichvar <mli...@re...> wrote: > > Interesting, can you share your setup? > > When I run "ptp4l -6 -S -i ens5 -m", ss reports only IPv6 sockets for > ptp4l: 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 ge...@re... Tel:+1(541)382-8588 |
From: Miroslav L. <mli...@re...> - 2015-08-05 06:34:37
|
On Tue, Aug 04, 2015 at 08:43:11PM +0000, Gary E. Miller wrote: > 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 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 |
From: Jiri B. <jb...@re...> - 2015-08-10 12:35:10
|
On Tue, 4 Aug 2015 10:34:17 +0200, Miroslav Lichvar wrote: > 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)) 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 |
From: Gary E. M. <ge...@re...> - 2015-08-10 17:33:08
|
Yo Jiri! On Mon, 10 Aug 2015 14:34:58 +0200 Jiri Benc <jb...@re...> wrote: > 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 ge...@re... Tel:+1(541)382-8588 |
From: Richard C. <ric...@gm...> - 2015-08-10 17:58:16
|
On Mon, Aug 10, 2015 at 02:34:58PM +0200, Jiri Benc wrote: > 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 |
From: Jiri B. <jb...@re...> - 2015-08-10 17:59:18
|
On Mon, 10 Aug 2015 10:32:54 -0700, Gary E. Miller wrote: > 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 |
From: Gary E. M. <ge...@re...> - 2015-08-10 18:38:25
|
Yo Jiri! On Mon, 10 Aug 2015 19:59:07 +0200 Jiri Benc <jb...@re...> wrote: > On Mon, 10 Aug 2015 10:32:54 -0700, Gary E. Miller wrote: > > 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 ge...@re... Tel:+1(541)382-8588 |
From: Gary E. M. <ge...@re...> - 2015-08-10 19:15:13
|
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 |
From: Jiri B. <jb...@re...> - 2015-08-10 19:30:27
|
On Mon, 10 Aug 2015 12:14:56 -0700, Gary E. Miller wrote: > 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). > 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 |
From: Richard C. <ric...@gm...> - 2015-08-10 19:54:45
|
Gary, On Mon, Aug 10, 2015 at 12:14:56PM -0700, Gary E. Miller wrote: > 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." > 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 |
From: Gary E. M. <ge...@re...> - 2015-08-10 19:57:55
|
Yo Richard! On Mon, 10 Aug 2015 21:54:33 +0200 Richard Cochran <ric...@gm...> wrote: > On Mon, Aug 10, 2015 at 12:14:56PM -0700, Gary E. Miller wrote: > > 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. > 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. > > 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 ge...@re... Tel:+1(541)382-8588 |