Skip to content
  1. Dec 13, 2024
    • Divin Raj's avatar
      cam-service: Add clock tolerance to mitigate real-time clock drift · 9852ac71
      Divin Raj authored
      
      
      This commit introduces a configurable clock tolerance value to
      address real-time clock differences between the server and client.
      The adjustment helps reduce drift and ensures improved
      synchronization.This tolerance allows for fine-tuning the clock
      synchronization and helps reduce drift. The default value for the
      tolerance is set to 0 nanoseconds.
      
      Signed-off-by: Divin Raj's avatarDivin Raj <divin.raj@arm.com>
      9852ac71
  2. Oct 24, 2024
  3. Oct 02, 2024
  4. Sep 23, 2024
  5. Sep 03, 2024
  6. Apr 15, 2024
  7. Apr 11, 2024
    • Luca Fancellu's avatar
      cam-image,test: Add tcpdump support to Pytest · aaa0945b
      Luca Fancellu authored
      
      
      Add tcpdump support to the Pytest tests by the optional parameter
      --with-tcpdump, when it is passed with the path to the tcpdump
      binary, it enables its usage in order to capture the packets
      exchanged between the cam-app-example and the cam-service, saving
      the data to perform analysis in case of issues.
      
      Install tcpdump in the Linux container, update the documentation,
      update codeclimate structure checker to allow 6 parameters,
      because Pytest framework needs that amount.
      
      Signed-off-by: Luca Fancellu's avatarLuca Fancellu <luca.fancellu@arm.com>
      aaa0945b
  8. Apr 10, 2024
    • Luca Fancellu's avatar
      test,doc: Don't use exit fault action in the Pytest · cafb40c7
      Luca Fancellu authored
      
      
      The exit fault action makes the service exit in case of errors,
      unfortunately there are a limited amount of logs that are printed
      before exit. In order to ease the debug in case of errors, remove
      the exit action from the Pytest and instead check for error strings
      inside the service log.
      Because of this change, the test_cam_app_fault_injection test is
      split in two, in order to have two separate log.
      
      Furthermore, in order to test the exit fault action which would
      remain untested given this change, a new test is introduced.
      
      Update the documentation with the new number of tests.
      
      Signed-off-by: Luca Fancellu's avatarLuca Fancellu <luca.fancellu@arm.com>
      cafb40c7
    • Luca Fancellu's avatar
      test: Log exit code of the component · b9004519
      Luca Fancellu authored
      
      
      Log the exit code of the component in its log file at the end
      of its execution.
      
      Signed-off-by: Luca Fancellu's avatarLuca Fancellu <luca.fancellu@arm.com>
      b9004519
    • Luca Fancellu's avatar
      cam-tool/test: Use tmpfs when writing to the file system · f153a46f
      Luca Fancellu authored
      
      
      The test test_deploy_message_a2s is currently opening a file
      inside the repository in append mode, this will trigger an error
      on read-only file systems and it's wrong because even if the code
      doesn't write anything, it should be prevented to write in the
      same repository of the test.
      
      To overcome this issue, use the tmp_path_factory mechanism of
      Pytest to copy the file under tmpfs and do the operation safely
      from there.
      
      Add missing word to the dictionary to please the spell checker.
      
      Signed-off-by: Luca Fancellu's avatarLuca Fancellu <luca.fancellu@arm.com>
      f153a46f
    • Luca Fancellu's avatar
      doc: Document the timeout issue resolution · 757146a1
      Luca Fancellu authored
      
      
      Document the resolution of a known issue in the v1.0 release
      where a timeout issue was observed due to a transient timing
      issue, the issue is now fixed and this commit is documenting
      it.
      
      Signed-off-by: Luca Fancellu's avatarLuca Fancellu <luca.fancellu@arm.com>
      757146a1
    • Luca Fancellu's avatar
      cam-service: Introduce packet lock · 303cb166
      Luca Fancellu authored
      
      
      Currently, during the time from the packet receive to
      the decoding and handling of the correct stream it belongs,
      there might be the timer callback that locks the stream
      few instant before.
      
      In theory, if a packet is received, and that packet belongs
      to the stream we were waiting for, the timer callback should
      not prevent it to be handled, there should be a critical
      section starting immediately after the receive of a new packet
      and ending just after the handling is complete, so that the
      timer should stop us only during the time spent waiting the
      packets.
      
      With this purpose, introduce a packet lock, a global lock for
      each connection, that is locked right after a packet is received
      and unlocked right after the right stream context is found for
      the received packet. The timer callback would then wait for
      the packet lock and afterwards will lock the stream context it
      belongs, so that it can't interfere during the packet handling
      time.
      The timer call will be fired anyway, the only thing that stops
      the function to give an error and destroy the context is that
      the packet lock is held until the packet context is found, so
      in case another stream's packet is keeping the packet lock, it
      won't prevent the timer to return the error on the invalid
      stream. But in case the packet was the one for which the timer
      was fired, then since we received it and handled it, the callback
      needs to return without actions because the state is fine and
      the packet was received in time.
      
      Update the unit test accordingly.
      
      Signed-off-by: Luca Fancellu's avatarLuca Fancellu <luca.fancellu@arm.com>
      303cb166
    • Luca Fancellu's avatar
      cam-service: Fix start to event timeout condition · 251bd288
      Luca Fancellu authored
      
      
      The timeout from the CAM start packet to the first event
      is checked by the state timer, it checks that the start message
      is sent by ensuring the state is CAM_STREAM_STATE_IN_PROGRESS,
      but it should also check that the sequence_id we expect is zero,
      because that is the condition of the first event message, so the
      current check is not complete.
      
      Fix this issue checking also the sequence_id.
      
      Signed-off-by: Luca Fancellu's avatarLuca Fancellu <luca.fancellu@arm.com>
      251bd288
  9. Apr 08, 2024
    • Luca Fancellu's avatar
      cam-service,doc: Use explicit padding in cam_message.h · 9fc38864
      Luca Fancellu authored
      
      
      Currently the structure cam_msg_a2s_start, cam_msg_a2s_stop and
      cam_msg_a2s_event are using GCC attributes packed and aligned(8),
      the latter is making these structure to have an implicit padding
      of 4 bytes for cam_msg_a2s_start and cam_msg_a2s_stop and 6 bytes
      for cam_msg_a2s_event.
      
      In order to don't rely on the implicit padding, make them explicit
      and update the documentation to list the reserved space of each
      message.
      
      Take also the occasion to update the "Stream Event Message" section
      listing some missing field.
      
      Signed-off-by: Luca Fancellu's avatarLuca Fancellu <luca.fancellu@arm.com>
      9fc38864
    • Luca Fancellu's avatar
      libcam,cam-service: Make TCP socket more responsive · cda952c9
      Luca Fancellu authored
      
      
      A current issue happening on the CI is that the cam-service is
      spending a considerable amount of time on the recv() after the
      CAM packet header is received, leading to a timeout of the
      timer that expects some packet by the cam-app-example.
      
      On the cam-app-example side, the packet is sent in one time
      on the TCP stream, so this narrows down the issue on the TCP
      stream handling.
      
      TCP is a complex protocol that tries to maximize the efficiency
      and so it's not tuned for a small amount of data that needs to be
      received timely, it usually tries to put together most of the
      data to be sent and tries to send the less possible amount of ACK,
      putting them together in one go when it really needs.
      
      All of this is delaying the receive (and send) of the CAM packets
      into the TCP stream, leading to the above issue.
      
      To handle that, this commit is disabling TCP Nagle algorithm in
      order to send immediately the data when requested and it is also
      disabling the TCP delayed ack, in order to don't wait for more data
      before sending a broader acknowledgment and have the protocol more
      responsive for smalls amount of data in transit. The Zephyr
      implementation won't need to disable the TCP delayed ack because the
      RTOS doesn't implement it.
      
      Furthermore, network stack implementations can have different queues
      depending on the Type Of Service of the IP packet, so for the CAM
      packets set the low delay TOS on the Linux implementation, so that
      the receiving system knows that it needs to be prioritized.
      The current Zephyr code doesn't seems to implement any mechanism for
      different TOS, so don't set it for Zephyr.
      
      Add missing word to the dictionary to please the spell checker.
      
      Signed-off-by: Luca Fancellu's avatarLuca Fancellu <luca.fancellu@arm.com>
      cda952c9
  10. Apr 03, 2024
  11. Mar 18, 2024
  12. Mar 15, 2024
  13. Mar 12, 2024
  14. Mar 05, 2024
  15. Feb 29, 2024
    • Luca Fancellu's avatar
      doc: Documentation improvements · 908f6cda
      Luca Fancellu authored
      
      
      * Add README.md to the Dockerfiles folder with simple instructions
        to build and run the containers.
      * Modify instruction to clone, build and run CAM from a single
        folder in the home, instead of creating multiple folders in the
        home directory.
      * Improved getting started page with a new section to setup the
        terminal environment.
      * Fix example output of the integration tests.
      * Line break for commands that are very long.
      * Minor fixes to csc.yml example file and command output.
      
      Signed-off-by: Luca Fancellu's avatarLuca Fancellu <luca.fancellu@arm.com>
      908f6cda
  16. Feb 28, 2024
  17. Feb 23, 2024
  18. Feb 22, 2024
  19. Feb 19, 2024
  20. Feb 15, 2024
    • Luca Fancellu's avatar
      cam-app-example,test: Increase timeout_init_to_start for the streams · 3cf791b7
      Luca Fancellu authored
      
      
      Currently the CI is spotting an intermittent issue where when two
      applications are running at the same time, one of them is receiving
      a "state init to start timeout" error.
      
      This is due to the time taken by the cam-server to serve the
      connections when multiple applications and streams are present, and
      apparently the timeout_init_to_start needs to be relaxed when we
      have two application.
      
      This is a configuration side change, the numbers were computed when
      only one application was running and because of the new requirement,
      now we need to have a different set for them to handle also the
      deployment of two applications at the same time.
      
      Add word to the dictionary to please the spell checker.
      
      Signed-off-by: Luca Fancellu's avatarLuca Fancellu <luca.fancellu@arm.com>
      3cf791b7
  21. Feb 14, 2024
  22. Feb 13, 2024
Loading