On Tue, Mar 06, 2018 at 06:01:02PM +0100, Oliver Westermann wrote: > We might have a different perspective on "complex use case". I would have > expected that this (getting the status of a local ptp instance) is a quite > common and also simple use-case.
And the simple case does work. > On a big network, this can easily congest the socket make parsing behave > unexpected. It really isn't rocket science. Here is an (untested) awk script that accepts responses from exactly one port: BEGIN { pid = "123456.fffe.780102-1"; } { if ($4 == "RESPONSE") { echo = $1 == pid ? 1 : 0; } if (echo) { print $0; } } > If I use pmc with -u, the ClockIdentity field is NOT populated and > therefore the responses don't populate the targetPortIdentity (It's all 0, > which feels incorrect looking at 13.3.2.8). Using UDS is not part of 1588. The UDS client has no 1588 port ID at all. Therefore, we set the source port ID to zero. > But if I use pmc directly on > the network (without -u), it populates the field and also the responses > have a correct targetPortIdentity. Naturally. > My idea is to introduce a "response" filter option to pmc: If that flag is > set, throw away all message responses that do not have targetPortIdentity == > pmc.ClockIdentity. I don't really see the need, as you can filter the pmc output fairly easily. I'd like to keep the pmc really simple, as a kind of example program. A fully featured PTP network monitoring program is really a new feature for future development. > So a) whats the opinion on the filter option and I don't think your network setup is very common. Normally, you would have just one PC sending monitoring requests into the network, not dozens. Because the responses are multicast, the responses are seen everywhere. I think that is by design. > b) is there a reason not to use IP_MULTICAST_LOOP on the IPv4 port > for pmc? I guess this was never needed, because we have UDS. The point of UDS was to allow SET commands, but it also gives the local GET for free. Here are the use cases: | I want to query... | options | |---------------------------------------+--------------| | the network up to the BC boundary | -i ethx -b 0 | | the network up over 'N' BC boundaries | -i ethx -b N | | the local node | -u -b 0 | | the local node and the local network | -u -b 1 | | the local node and 'N' networks | -u -b N | Thanks, Richard ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users