Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
S slapos.toolbox
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • nexedi
  • slapos.toolbox
  • Merge requests
  • !125

Merged
Created Oct 27, 2023 by Kirill Smelkov@kirrOwner

promise/plugin/check_sdr_busy: Don't hardcode /dev/sdr0@0

  • Overview 6
  • Commits 1
  • Changes 1

Currently check_sdr_busy always checks /dev/sdr0 (via -c 0) and also implicitly DMA channel 0 as sdr_util help explains:

./sdr_util  -h
...
-c device_num              select the device (default = all)
-d channel_num             select the channel (default = 0)

This works well for ORS, which always has only single SDR board.

However for cases when there are either a) multiple SDR boards, or b) single CPRI board, the assumption is incorrect:

  • for multiple SDR boards we need to be able to specify /dev/sdrX instead of sdr0.

  • for the case of one CPRI boards, links to different Radio Units attached to different SFP ports are associated with different DMA channels, so to test e.g. whether RU1 is being used it is necessary to check e.g. sdr0@0, while for RU2 it is necessary to check sdr0@1.

    I explicitly verified that for CPRI case

    a) Amarisoft kernel driver allows /dev/sdrX associated with CPRI card to be opened multiple times simultaneously - up to the amount of SFP ports = # of DMA channels, and

    b) that only DMA channels / SFP ports actually being in use are reported as busy by sdr_util, while the other DMA channels / SFP ports are not reported as busy.

    I also verified that for regular SDR board (not CPRI) using -d 0 does not change any verification semantic as such SDR boards have only one DMA channel.

-> As a preparatory step for multiRU work adjust check_sdr_busy promise to take SDR device number and DMA channel number as arguments instead of hardcoding sdr0@0.

For now this change is accompanied by the following change in ors-amarisoft SR to keep it working as before:

--- a/software/ors-amarisoft/instance-enb.jinja2.cfg
+++ b/software/ors-amarisoft/instance-enb.jinja2.cfg
@@ -615,6 +615,8 @@ name = ${:_buildout_section_name_}
 promise = check_sdr_busy
 config-testing = {{ slapparameter_dict.get("testing", False) }}
 config-sdr = {{ sdr }}
+config-sdr_dev  = 0
+config-dma_chan = 0

(posted in slapos!1458 (merged))

/cc @jhuge, @lu.xu, @tomo, @xavier_thompson, @Daetalus

Edited Oct 27, 2023 by Kirill Smelkov
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: y/multiru-sdrbusy
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7