-
Notifications
You must be signed in to change notification settings - Fork 173
Comparing changes
Open a pull request
base repository: richardcochran/linuxptp
base: master
head repository: westermo/linuxptp
compare: wmo/v3.1.1
- 16 commits
- 22 files changed
- 6 contributors
Commits on Jul 5, 2021
-
Validate the messageLength field of incoming messages.
The PTP messageLength field is redundant because the length of a PTP message is precisely determined by the message type and the appended TLVs. The current implementation validates the sizes of both the main message (according to the fixed header length and fixed length by type) and the TLVs (by using the 'L' of the TLV). However, when forwarding a message, the messageLength field is used. If a message arrives with a messageLength field larger than the actual message size, the code will read and possibly write data beyond the allocated buffer. Fix the issue by validating the field on ingress. This prevents reading and sending data past the message buffer when forwarding a management message or other messages when operating as a transparent clock, and it also prevents a memory corruption in msg_post_recv() after forwarding a management message. Reported-by: Miroslav Lichvar <mlichvar@redhat.com> Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for ce15e4d - Browse repository at this point
Copy the full SHA ce15e4dView commit details -
tc: Fix length of follow-up message of one-step sync.
Convert the length of the generated follow-up message to network order. This fixes reading and sending of data past the message buffer. Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for 0b3ab45 - Browse repository at this point
Copy the full SHA 0b3ab45View commit details -
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 6feb761 - Browse repository at this point
Copy the full SHA 6feb761View commit details
Commits on Oct 18, 2021
-
tc: introduce 1-step for E2E & P2P Transparent Clocks
This tiny patch provides generic solution for 1-step E2E & P2P Transparent Clocks. Before revealing any further details, I want to state in plain words that changes brought about in this patch will only work for HW that is compliant with IEEE 1588 V2 standard, with regard to Transparent Clock and 1-step operation. That is to say, HW that is capable of updating correction field on-the-fly, for the following packets: 1. SYNC 2. DELAY_REQ 3. PDELAY_RESP Any deviation (in HW) from the standard will most likely produce unexpected results. The general idea is that in 1-step mode HW renders time stamps and updates correction field, without SW's intervantion in the process. To make linuxptp conform to 1-step TC, a set of simple yet effective changes must be introduced. The following paragraph is plausible for 1-step E2E TC: SYNC, DELAY_REQ and DELAY_RESP messages need to be forwarded by linuxptp, without any intrusion into packets content. No egress time stamp will be available for these packets, since HW will update correction field (for SYNC & DELAY_REQ) on-the-fly. With this in mind, linuxptp essentially needs to skip the code that fetches time stamps from kernel. No other changes are needed. As for 1-step P2P TC - upstream link delay must be added (by SW) to correction field of SYNC message, prior to forwarding. HW will add residence time to correction field upon egress. Hence, collection of timestamp from kernel should be skipped. 1-step related prerequisites for running TC in E2E mode: 1. --time_stampint=onestep Two different possibilities exist for 1-step P2P TC: 1. --time_stamping=onestep will result in TC updating correction field of SYNC packets in HW. Peer delay mechanism will work in 2-step mode though. 2. --time_stamping=p2p1step will make TC fully compatible with 1-step principles of IEEE 1588 V2 standard. NOTE: --twoStepFlag=0 must be valid for both E2E & P2P. Signed-off-by: Volodymyr Bendiuga <volodymyr.bendiuga@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for fb74f94 - Browse repository at this point
Copy the full SHA fb74f94View commit details -
Add config support for westermo-kernel feature clk_type
hwtstamp_clk_type enables the user to specify an enum which is passed to the driver for hardware timestamping configuration via ioctl. This option enables the driver to make a decision based on its clock type when configuring the hardware. HWTSTAMP_CLOCK_TYPE_NONE HWTSTAMP_CLOCK_TYPE_TRANSPARENT_CLOCK HWTSTAMP_CLOCK_TYPE_ORDINARY_CLOCK HWTSTAMP_CLOCK_TYPE_BOUNDARY_CLOCK Signed-off-by: PatrikLundgren <patrik.lundgren@outlook.com>
Configuration menu - View commit details
-
Copy full SHA for 48b0226 - Browse repository at this point
Copy the full SHA 48b0226View commit details -
revertme: Copy net_tstamp header to enable use of modified kernel header
This commit is by no means intended to be kept around. It is a temporary workaround. Signed-off-by: PatrikLundgren <patrik.lundgren@outlook.com>
Configuration menu - View commit details
-
Copy full SHA for 0475bc3 - Browse repository at this point
Copy the full SHA 0475bc3View commit details -
sk: Run hwts_init despite timestamping type, ignore ENOTSUP
Previously, if linuxptp was running on hardware which supports PTP which has been configured to run some type of hardware timestamping. linuxptp gave the hardware no opportunity to deactivate its hardware timestamping to allow software timestamping. So, always call hwts_init to give the driver an opportunity to reconfigure but ignore ENOTSUP in case we don't have a hardware timestamping capable driver. Signed-off-by: PatrikLundgren <patrik.lundgren@outlook.com>
10000 batch-deferred-content> Configuration menu - View commit details
-
Copy full SHA for 581fe20 - Browse repository at this point
Copy the full SHA 581fe20View commit details -
copy reserved2 field from PD_REQ to PD_RESP
This workaround is specific to types of HW that use reserved field to transfer RX timestamp from ingress port to egress port. This is necessary when running in P2P mode. When PD_REQ packet is received, reserved field will contain RX timestamp t1, taken by HW. Linuxptp will create PD_RESP packet and copy some field from PD_REQ packet, and reserved2 field must be taken care of too, so that on egress HW can read t1 from PD_RESP packet and calculate residence time. Failure to copy reserved frield from PD_REQ packet will result in HW being unabel to calculate residence time on egress, when sending PD_RESP. Signed-off-by: Anders Öhlander <aggelander@gmail.com> Signed-off-by: Volodymyr Bendiuga <volodymyr.bendiuga@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 143f4eb - Browse repository at this point
Copy the full SHA 143f4ebView commit details -
net_tstamp: Update kernel header for P2P onestep support
Signed-off-by: PatrikLundgren <patrik.lundgren@outlook.com>
Configuration menu - View commit details
-
Copy full SHA for 2584939 - Browse repository at this point
Copy the full SHA 2584939View commit details -
Handle management packets on transparent clock
clock_manage fulfils the requirements of ordinary/boundary clocks for management packets. It supports a wider variety of requests and performs different work when forwarding. tc_manage implements the same function for the transparent clock. There two TLV's that is addresses to the TC node, TLV_TRANSPARENT_CLOCK_DEFAULT_DATA_SET and the TLV_TRANSPARENT_CLOCK_PORT_DATA_SET. Still accept ordinary/boundary clock TLV requests for now though. As there is some information in the other data sets which are useful. Signed-off-by: aggelander <aggelander@gmail.com> Signed-off-by: PatrikLundgren <patrik.lundgren@outlook.com>
Configuration menu - View commit details
-
Copy full SHA for b5a164f - Browse repository at this point
Copy the full SHA b5a164fView commit details -
Implement management response pmc for transparent clock specific data…
… sets There are two data sets specific to the transparent clock standard. The default data set and the clock port data set. The default and clock port data sets for the transparent clock is (almost) a sub-set of the defaultDS and portDS of the ordinary|boundary clocks. Thus, we do not store any seperate data, but simply reuse those structs. Signed-off-by: PatrikLundgren <patrik.lundgren@outlook.com>
Configuration menu - View commit details
-
Copy full SHA for 3c77a6d - Browse repository at this point
Copy the full SHA 3c77a6dView commit details -
tc: Allow Management packets to swim upstream with tc_spanning_tree
Signed-off-by: PatrikLundgren <patrik.lundgren@outlook.com>
Configuration menu - View commit details
-
Copy full SHA for 8f12c28 - Browse repository at this point
Copy the full SHA 8f12c28View commit details -
tc: Introduce clock_do_manage which only handles local response
This allows tc to re-use clock_do_manage while handling its own forwarding for management packets. Signed-off-by: PatrikLundgren <patrik.lundgren@outlook.com>
Configuration menu - View commit details
-
Copy full SHA for 679f630 - Browse repository at this point
Copy the full SHA 679f630View commit details -
Forwarded management packets to uds port for TC
We may be sending ptp management traffic from this port. So when forwarding PTP management responses, check if the response is destined for the local clock. If so, forward to uds port. Signed-off-by: PatrikLundgren <patrik.lundgren@outlook.com>
Configuration menu - View commit details
-
Copy full SHA for f8ec6f0 - Browse repository at this point
Copy the full SHA f8ec6f0View commit details -
Add vlan support for the power profile
Support transmitting an egress vlan id and priority as required by the power profile. With this comes three new config options: egress_vlan.tagged # Enables the others egress_vlan.id egress_vlan.prio Signed-off-by: Anders Öhlander <aggelander@gmail.com> Signed-off-by: Patrik Lundgren <patrik.lundgren@outlook.com>
Configuration menu - View commit details
-
Copy full SHA for 1985450 - Browse repository at this point
Copy the full SHA 1985450View commit details -
config: allow full range (0 - 255) of domain numbers
Required by IEC/IEEE 61850-9-3, chapter 8 (Default Settings): "A clock is settable to any domainNumber {0 to 255} even if this value is reserved." Signed-off-by: Volodymyr Bendiuga <volodymyr.bendiuga@westermo.se>
Configuration menu - View commit details
-
Copy full SHA for f167b46 - Browse repository at this point
Copy the full SHA f167b46View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff master...wmo/v3.1.1