Menu

#3294 mds: refactor huge api functions

5.22.11
fixed
None
enhancement
mds
lib
minor
False
2022-11-18
2021-10-26
No

Some functions have 1.5K+ line of code. It's hard to maintain those functions. We should refactor it into smaller sub-functions.

For example:

line 1863: uint32_t mds_mcm_svc_up(PW_ENV_ID pwe_id, MDS_SVC_ID svc_id, V_DEST_RL role,
line 1864:          NCSMDS_SCOPE_TYPE scope, MDS_VDEST_ID vdest_id,
line 1865:          NCS_VDEST_TYPE vdest_policy, MDS_DEST adest,
line 1866:          bool my_pcon, MDS_SVC_HDL local_svc_hdl,
line 1867:          MDS_SUBTN_REF_VAL subtn_ref_val,
line 1868:          MDS_SVC_PVT_SUB_PART_VER svc_sub_part_ver,
line 1869:          MDS_SVC_ARCHWORD_TYPE archword_type)
line 1870:          {
....
line 3494: }

Related

Wiki: ChangeLog-5.22.11
Wiki: NEWS-5.22.11

Discussion

  • Hieu Hong Hoang

    Hieu Hong Hoang - 2022-01-14
    • status: unassigned --> assigned
     
  • Gary Lee

    Gary Lee - 2022-01-23
    • Milestone: 5.22.01 --> future
     
  • Hieu Hong Hoang

    Hieu Hong Hoang - 2022-02-08
    • status: assigned --> accepted
     
  • Hieu Hong Hoang

    Hieu Hong Hoang - 2022-05-27
    • status: accepted --> review
     
  • Hieu Hong Hoang

    Hieu Hong Hoang - 2022-08-08

    commit 8274994dd5a75157915f9af805b8ae6e7e2f4cb2 (HEAD -> develop, origin/develop, ticket-3294)
    Author: hieu.h.hoang hieu.h.hoang@dektech.com.au
    Date: Mon Mar 21 14:20:34 2022 +0700

    mds: Refactor api functions [#3294]
    
    Refactor big functions in the mds api.
    
     
  • Hieu Hong Hoang

    Hieu Hong Hoang - 2022-08-08
    • status: review --> fixed
     
  • Gary Lee

    Gary Lee - 2022-11-18
    • Milestone: future --> 5.22.11
     

Log in to post a comment.