[PATCH rtems-lwip v1 0/8] NTP library support

Chris Johns chrisj at rtems.org
Wed Aug 24 02:19:45 UTC 2022


On 24/8/2022 5:47 am, Kinsey Moore wrote:
> This patch set cleans up the lwIP source imports, switches rtems-lwip
> over to using the tools headers for network structures, and brings in
> Sebastian Huber's work on the NTP client for rtems-libbsd along with the
> support necessary to compile it. I have verified the the BBB BSP still
> compiles.

I will comment in the patches for anything not NTP related.

> This patch set can also be found here:
> https://github.com/KinseyMoore/rtems-lwip/tree/ntp

I would like to discuss NTP and how it is managed across RTEMS before we add more instances and possible defaults are added. This also applies to libbsd. I am not sure if PTP needs to be included. My concern is adding things without consideration may complicate EPICS and existing systems. I hope investing a little effort and time on our part to define what NTP solutions we offer will help EPICS and it's users.

Recently I have found EPICS 7 has silently removed the legacy stack NTP [1] support with the addition of `RTEMS-posix` [2]. This has silently broken systems that depended on the the legacy stack NTP support present in EPICS 3 (or maybe EPICS 7 built with RTEMS 4.11?).

The legacy stack NTP support is not specific to the legacy stack. It is just some code to query an NTP server and handle the response. It uses some globals that application code may depend on. It exists and has done for decades so we cannot ignore it nor can we instruct users to update or sort it out. It is almost like half the solution is in EPICS and half is in RTEMS and it is our problem to own and resolve.

EPICS users on some BSPs automatically use the BOOTP server as the NTP server,  use environment variables [3] or boot NV settings. EPICS environment variables can be set in a number ways and systems designers can select any method.

I am working to restore the NTP support with the legacy stack on a POSIX build of EPICS on RTEMS 5. This will break EPICS 7 and libbsd. I feel this will result in further discussions with EPICS core developers on how we handle NTP at a system level and we will need some answers.

Chris

[1] https://git.rtems.org/rtems-net-legacy/tree/lib/rtems_bsdnet_ntp.c
    https://git.rtems.org/rtems/tree/cpukit/libnetworking/lib/rtems_bsdnet_ntp.c?h=4.11
    https://git.rtems.org/rtems/tree/cpukit/libnetworking/lib/rtems_bsdnet_ntp.c?h=5

[2] https://github.com/epics-base/epics-base/tree/7.0/modules/libcom/RTEMS/posix
    https://github.com/epics-base/epics-base/tree/7.0/modules/libcom/src/osi/os/RTEMS-posix

[3] https://docs.epics-controls.org/en/latest/appdevguide/IOCInit.html?highlight=ntp#environment-variables


More information about the devel mailing list