Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Draft] PubSub: Interrupt based pubsub on Linux RT with ETF #3046

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

sureshaei
Copy link

@sureshaei sureshaei commented Aug 27, 2019

Based on top of #2756.

  • Includes fixes for pull request [WIP] [FEATURE] Interrupt based PubSub with ETF #2756 , to compile and run thread based publisher.
  • Includes fix for early tx time calculation.
  • Includes fix for segmentation fault during long run.
  • Includes Linux rt timer event (interrupt) based publisher (new).
  • Rebased to latest master.
  • Few code cleanup and Doxygen for functions.
  • Both publishers are tested @100us.
  • Subscriber duplicate thread is removed and tested.

Note1: Pubsub loop back is not included in this pull request.

Note2: There are still reusable code sections between pubsub raw and pubsub udp; we are planning to work on a pull request to split and abstract the code sections for max reusability, after this pull request is integrated.

With these commits, support for opc ua application data round trip time measurement is enabled by adding the loopback option.

  • The counter data value source at T4 subscriber and T8 subscriber are updated for RTT calculation correction.
  • Loopback functionality is combined into the standalone publisher/subscriber source code for avoiding code duplication.

A round trip time of 170 to 210 us is measured at 100us publishing interval.

Aswin Palaniappa Andappan and others added 5 commits August 27, 2019 00:14
 - Add Interrupt based application and networking files to stack
 - i210 hardware & ETF support is required to compile and
   run this application
 - UDP socket based applications
 - Enable UA_ENABLE_PUBSUB_CUSTOM_PUBLISH_HANDLING and
   UA_ENABLE_PUBSUB_CUSTOM_PUBLISH_HANDLING_TSN to use txtime
 - Script available in udp_socket folder is used to setup
   VLAN interface and time synchronization of user and system clock

Change-Id: Ia91b9a161ffe3aa46acf355cfc2465fb2245941e
Signed-off-by: Aswin Palaniappa Andappan <[email protected]>
Bugs Fixed:

    - TX time calculation in thread based publisher.
    - System load increases and freeze the DUT due to
      multiple subscriber thread.
    - Compilation error(Type casting access control messages
      to socket extended error).
    - Segfault due to overflow of timestamps in publisher
      array.
    - Unit test error due to hardcoded IP address for
      selecting the interface, Kernel should decide the interface.

802.1Qbv - ETF validated with timely delivery:

    - Modified TX time calculation using clock nano sleep.
    - SO_TXTIME validated by capturing packets using tcpdump
      in Rx side; observed jitter in nanoseconds.

Configuration:

    - QDISC with mqprio enabled in the i210 NIC hardware.
Code quality improvements:
 - Improve readability.
 - Removed unwanted code sections.

Bugs Fixed:
 - Fix: Segfault due to overflow of timestamps in subscriber
   array.
Feature:
 - Interrupt based publisher.
 - Self priority added for interrupt based application.
 - Real-time signals introduced to improve performance.
@CLAassistant
Copy link

CLAassistant commented Aug 27, 2019

CLA assistant check
All committers have signed the CLA.

Bugs Fixed:

 - Redirections removed and added tee command.
 - Redirections use current shell's user and permissions
   to open and write to the file.
 - tee command opens and writes to files without help from the shell.
sureshaei and others added 3 commits September 13, 2019 00:53
Merged loopback functionality into the standalone pub/sub source,
to avoid code duplication.

For correct RTT calculation,
 - T1 published counter value was written at T4 subscriber (into the
   information model) instead of a locally generated counter value.
 - At the T8 subscriber end, this same counter data value,
   looped back by T4->T5 (sub->pub),  was received instead of the T5
   generated local counter value.

Minor cleanups:
 - Function description modified for better readability.
 - Removed loopback source file to avoid code duplication;
   instead merged loopback functionality into the realtime
   standalone pub/sub source file.
 - Renamed the pubsub_interrupt_publisher source file name.
 - CMake file modified for building and compiling the renamed source
   file.
@andreasebner andreasebner changed the title PubSub: Interrupt based pubsub on Linux RT with ETF [Draft] PubSub: Interrupt based pubsub on Linux RT with ETF May 10, 2022
@andreasebner andreasebner marked this pull request as draft May 10, 2022 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants