8000 Comparing richardcochran:master...westermo:wmo/v3.1.1 · richardcochran/linuxptp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: richardcochran/linuxptp
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: westermo/linuxptp
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: wmo/v3.1.1
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 16 commits
  • 22 files changed
  • 6 contributors

Commits on Jul 5, 2021

  1. 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>
    richardcochran committed Jul 5, 2021
    Configuration menu
    Copy the full SHA
    ce15e4d View commit details
    Browse the repository at this point in the history
  2. 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>
    mlichvar authored and richardcochran committed Jul 5, 2021
    Configuration menu
    Copy the full SHA
    0b3ab45 View commit details
    Browse the repository at this point in the history
  3. Version 3.1.1

    Signed-off-by: Richard Cochran <richardcochran@gmail.com>
    richardcochran committed Jul 5, 2021
    Configuration menu
    Copy the full SHA
    6feb761 View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2021

  1. 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>
    voldymyr committed Oct 18, 2021
    Configuration menu
    Copy the full SHA
    fb74f94 View commit details
    Browse the repository at this point in the history
  2. 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>
    panord authored and voldymyr committed Oct 18, 2021
    Configuration menu
    Copy the full SHA
    48b0226 View commit details
    Browse the repository at this point in the history
  3. 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>
    panord authored and voldymyr committed Oct 18, 2021
    Configuration menu
    Copy the full SHA
    0475bc3 View commit details
    Browse the repository at this point in the history
  4. 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>
    panord authored and voldymyr committed Oct 18, 2021
    Configuration menu
    Copy the full SHA
    581fe20 View commit details
    Browse the repository at this point in the history
  5. 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>
    voldymyr committed Oct 18, 2021
    Configuration menu
    Copy the full SHA
    143f4eb View commit details
    Browse the repository at this point in the history
  6. net_tstamp: Update kernel header for P2P onestep support

    Signed-off-by: PatrikLundgren <patrik.lundgren@outlook.com>
    panord authored and voldymyr committed Oct 18, 2021
    Configuration menu
    Copy the full SHA
    2584939 View commit details
    Browse the repository at this point in the history
  7. 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>
    aggelander authored and voldymyr committed Oct 18, 2021
    Configuration menu
    Copy the full SHA
    b5a164f View commit details
    Browse the repository at this point in the history
  8. 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>
    panord authored and voldymyr committed Oct 18, 2021
    Configuration menu
    Copy the full SHA
    3c77a6d View commit details
    Browse the repository at this point in the history
  9. tc: Allow Management packets to swim upstream with tc_spanning_tree

    Signed-off-by: PatrikLundgren <patrik.lundgren@outlook.com>
    panord authored and voldymyr committed Oct 18, 2021
    Configuration menu
    Copy the full SHA
    8f12c28 View commit details
    Browse the repository at this point in the history
  10. 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>
    panord authored and voldymyr committed Oct 18, 2021
    Configuration menu
    Copy the full SHA
    679f630 View commit details
    Browse the repository at this point in the history
  11. 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>
    panord authored and voldymyr committed Oct 18, 2021
    Configuration menu
    Copy the full SHA
    f8ec6f0 View commit details
    Browse the repository at this point in the history
  12. 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>
    Anders Öhlander authored and voldymyr committed Oct 18, 2021
    Configuration menu
    Copy the full SHA
    1985450 View commit details
    Browse the repository at this point in the history
  13. 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>
    voldymyr committed Oct 18, 2021
    Configuration menu
    Copy the full SHA
    f167b46 View commit details
    Browse the repository at this point in the history
Loading
0