Giter Club home page Giter Club logo

Comments (5)

lguohan avatar lguohan commented on July 17, 2024

That's one implementation approach, a common one. Some chip might support partial reconfiguration without hitting the data plane, that might be another approach.

from sai.

zubinshah avatar zubinshah commented on July 17, 2024

@lguohan @sonicyao1985 how do you control or quantify this partial reconfiguration ? should we or do we want to explicitly mention the expected behavior for this case .

from sai.

atitjain avatar atitjain commented on July 17, 2024

@AnbalaganNatchimuthu Please help me understand following from the warmboot proposal:

  1. It seems the boot type flag is sent as part of the shutdown_switch API and not from the initialize_switch API. So is adapter supposed to remember this parameter. Typically this is system/platform/application code that should be reading the bootflags. The bootflags are set during shutdown or even as part of signal handler for a segfault etc. I think it should be passed to SAI from initialize call.
  2. initiate_switch in the doc should be replaced by initialize_switch
  3. Following description is not clear and the comments contradict
    
    /* READ_ONLY */
    /* Minimum interval of time required by SAI for planned restart [sai_uint32_t]
    in milliseconds. Will be 0 for SAI_RESTART_TYPE_NONE */
    /* The Host Adapter will have to wait for this minimum interval of time before it decides
      to bring down SAI due to init failure. */
    SAI_SWITCH_ATTR_MIN_PLANNED_RESTART_INTERVAL,
    
    Which of the two comments is valid. In the second comment. Is it only related to init failure, do you mean once the Host Adapter gets a init failure it should wait for this interval.
  4. Please let me know why we have 2 files, shouldnt it be a common file for maintaining and recovering state? Rather in a more generic sense the NV could be something that could be completely abstracted from the user. The file format etc might be very different for each of the SDK implementation. In most ideal case the read/write/open etc should be abstracted from a OS abstraction layer.
    
     /* The file to recover SAI/NPU state from */
    #define SAI_KEY_WARM_BOOT_READ_FILE “SAI_WARM_BOOT_READ_FILE”
    /* The file to write SAI/NPU state to */
    #define SAI_KEY_WARM_BOOT_WRITE_FILE “SAI_WARM_BOOT_WRITE_FILE”
    
  5. In the following code
    
    /* The NV storage is full. (rv for shutdown_switch()) */
    SAI_STATUS_NV_STORAGE_FULL                    SAI_STATUS_CODE(0x00000015L)
    
    Why is this coupled with the shutdown alone. The state sync is ongoing activity.

from sai.

AnbalaganNatchimuthu avatar AnbalaganNatchimuthu commented on July 17, 2024

Dell - Internal Use - Confidential
Hi,

  1.  The shutdown_switch API is not taking the boot_type flag. The shutdown_switch API is used to trigger a planned restart. Once this trigger reaches SAI,  SAI would dump its contents to NV store and the also trigger the NPU to dump its contents to NV Store and enter restart. The bootflags indicating the type of boot (either warm or cold) are read from the key value pair before calling the initialize_switch API.
    
  2.  I will correct the document for initiate_switch
    
  3.  The minimum restart interval is the time required by SAI and NPU to store its contents to the NV store on receiving a trigger to do a restart from the Host Adapter. If time taken exceeds this minimum interval then the Host Adapter can take a decision  on bringing down SAI. I will update the document on this section.
    
  4.  Regarding the usage of files for storage, it was decided in the OCP technical committee  to go with files for now and abstract it later with function pointers. Shankara and Gouhan can provide more details on this.
    
  5.  The state sync can be either one time or periodic based on the restart type the NPU supports. I will update the document.
    

Thanks
Anbalagan

From: Atit Jain [mailto:[email protected]]
Sent: Friday, January 29, 2016 4:44 PM
To: opencomputeproject/SAI [email protected]
Cc: Natchimuth, Anbalagan [email protected]
Subject: Re: [SAI] About warmboot (#53)

@AnbalaganNatchimuthuhttps://github.com/AnbalaganNatchimuthu Please help me understand following from the warmboot proposal:

  1. It seems the boot type flag is sent as part of the shutdown_switch API and not from the initialize_switch API. So is adapter supposed to remember this parameter. Typically this is system/platform/application code that should be reading the bootflags. The bootflags are set during shutdown or even as part of signal handler for a segfault etc. I think it should be passed to SAI from initialize call.

  2. initiate_switch in the doc should be replaced by initialize_switch

  3. Following description is not clear and the comments contradict

  4. /* READ_ONLY */

  5. /* Minimum interval of time required by SAI for planned restart [sai_uint32_t]

  6. in milliseconds. Will be 0 for SAI_RESTART_TYPE_NONE */

  7. /* The Host Adapter will have to wait for this minimum interval of time before it decides

  8. to bring down SAI due to init failure. */

10.SAI_SWITCH_ATTR_MIN_PLANNED_RESTART_INTERVAL,

Which of the two comments is valid. In the second comment. Is it only related to init failure, do you mean once the Host Adapter gets a init failure it should wait for this interval.

  1. Please let me know why we have 2 files, shouldnt it be a common file for maintaining and recovering state? Rather in a more generic sense the NV could be something that could be completely abstracted from the user. The file format etc might be very different for each of the SDK implementation. In most ideal case the read/write/open etc should be abstracted from a OS abstraction layer.

  2. /* The file to recover SAI/NPU state from */

14.#define SAI_KEY_WARM_BOOT_READ_FILE “SAI_WARM_BOOT_READ_FILE”

15./* The file to write SAI/NPU state to */

16.#define SAI_KEY_WARM_BOOT_WRITE_FILE “SAI_WARM_BOOT_WRITE_FILE”

  1. In the following code

19./* The NV storage is full. (rv for shutdown_switch()) */

20.SAI_STATUS_NV_STORAGE_FULL SAI_STATUS_CODE(0x00000015L)
Why is this coupled with the shutdown alone. The state sync is ongoing activity.


Reply to this email directly or view it on GitHubhttps://github.com//issues/53#issuecomment-176698172.

from sai.

atitjain avatar atitjain commented on July 17, 2024

Why not pass the boot-flag things from the system side (infrastructure and other things around the host adapter) to the SAI swith init API, this makes things simpler for various implementations.

from sai.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.