Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Sign in
W
White Rabbit Switch - Software
  • Project
    • Project
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 71
    • Issues 71
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 1
    • Merge Requests 1
  • CI / CD
    • CI / CD
    • Pipelines
    • Schedules
  • Wiki
    • Wiki
  • image/svg+xml
    Discourse
    • Discourse
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Commits
  • Issue Boards
  • Projects
  • White Rabbit Switch - Software
  • Issues
  • #227

Closed
Open
Opened Jan 27, 2021 by Adam Wujek@awujek💬
  • Report abuse
  • New issue
Report abuse New issue

allow a writer to reopen shmem without clearing a data

A reader can open shmem and use wrs_shm_follow to apply offset between shmem address in a writer and reader. No problem here. The problem is when the writer reopens shmem. For simplicity it does not use wrs_shm_follow nor similar function during reading/writing of pointers. All values of pointers written to shmem are in the form <shmem map address> + <offset within shmem> the first part changes between opening of shmem by a writer. It is stored in basemap field of a shmem header. Unfortunately, as mentioned before, the map address changes from one opening to another so having one basemap is not enough (there might be many openings). On the other hand keeping a list of such map addresses does not resolve a problem, since it is not known which pointer was written during which opening and what was the map address then.

The solution is to try to mmap shmem always at the same address. If it is not possible to map at the same (fixed) address the entire shmem shall be cleared or a writer shall exit.

As today only in wrs_rtud there is a need to preserve data between restarts of a writer (some configuration than can be written to FPGA but cannot be read later, so there is a mirror of the configuration in shmem). Fortunately, wrs_rtud does not store pointers in the shmem.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
No due date
1
Labels
feature
Assign labels
  • View project labels
Reference: project/wr-switch-sw#227